diff --git a/init/data.json b/init/data.json index 1cfe6a8..43b2f3f 100644 --- a/init/data.json +++ b/init/data.json @@ -50,6 +50,40 @@ {"k": "1", "v": "是"}, {"k": "0", "v": "否"} ] + }, + { + "parentid": "supplier_is_external", + "parentname": "供应商类型", + "items": [ + {"k": "1", "v": "外部供应商"}, + {"k": "0", "v": "内部供应商"} + ] + }, + { + "parentid": "supplier_payment_type", + "parentname": "付款方式", + "items": [ + {"k": "prepaid", "v": "预付费"}, + {"k": "postpaid", "v": "后付费"} + ] + }, + { + "parentid": "supplier_settlement_cycle", + "parentname": "结算周期", + "items": [ + {"k": "monthly", "v": "月结"}, + {"k": "weekly", "v": "周结"}, + {"k": "biweekly", "v": "半月结"}, + {"k": "quarterly", "v": "季结"} + ] + }, + { + "parentid": "supplier_status", + "parentname": "供应商状态", + "items": [ + {"k": "1", "v": "正常"}, + {"k": "0", "v": "停用"} + ] } ] } diff --git a/json/suppliers_list.json b/json/suppliers_list.json index a421733..7e18890 100644 --- a/json/suppliers_list.json +++ b/json/suppliers_list.json @@ -29,33 +29,23 @@ }, "is_external": { "uitype": "code", - "data": [ - {"value": "1", "text": "外部供应商"}, - {"value": "0", "text": "内部供应商"} - ] + "valueField": "is_external", + "textField": "is_external_text" }, "payment_type": { "uitype": "code", - "data": [ - {"value": "prepaid", "text": "预付费"}, - {"value": "postpaid", "text": "后付费"} - ] + "valueField": "payment_type", + "textField": "payment_type_text" }, "settlement_cycle": { "uitype": "code", - "data": [ - {"value": "monthly", "text": "月结"}, - {"value": "weekly", "text": "周结"}, - {"value": "biweekly", "text": "半月结"}, - {"value": "quarterly", "text": "季结"} - ] + "valueField": "settlement_cycle", + "textField": "settlement_cycle_text" }, "status": { "uitype": "code", - "data": [ - {"value": "1", "text": "正常"}, - {"value": "0", "text": "停用"} - ] + "valueField": "status", + "textField": "status_text" } } }, diff --git a/models/suppliers.json b/models/suppliers.json index 78c2860..629ca6d 100644 --- a/models/suppliers.json +++ b/models/suppliers.json @@ -170,6 +170,34 @@ "table": "organization", "valuefield": "id", "textfield": "orgname" + }, + { + "field": "is_external", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='supplier_is_external'" + }, + { + "field": "payment_type", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='supplier_payment_type'" + }, + { + "field": "settlement_cycle", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='supplier_settlement_cycle'" + }, + { + "field": "status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='supplier_status'" } ] }