{ "tblname": "customers", "alias": "customers_list", "title": "客户档案管理", "params": { "sortby": [ "created_at desc" ], "logined_userid": "owner_id", "browserfields": { "exclouded": [ "id", "owner_id", "updated_at" ], "alters": { "customer_type": { "uitype": "code", "data": [ { "value": "individual", "text": "个人" }, { "value": "enterprise", "text": "企业" } ] }, "customer_level": { "uitype": "code", "data": [ { "value": "important", "text": "重要" }, { "value": "normal", "text": "普通" }, { "value": "potential", "text": "潜在" } ] }, "status": { "uitype": "code", "data": [ { "value": "active", "text": "活跃" }, { "value": "inactive", "text": "非活跃" }, { "value": "in_pool", "text": "公海" } ] } } }, "editor": { "binds": [ { "wid": "customer_type", "event": "changed", "actiontype": "script", "target": "tax_id", "script": "// 当客户类型为个人时,隐藏税号字段\nconst customerType = this.getValue('customer_type');\nconst taxIdField = this.getWidget('tax_id');\nif (customerType === 'individual') {\n taxIdField.hide();\n} else {\n taxIdField.show();\n}" } ] }, "subtables": [ { "field": "customer_id", "title": "客户360度视图", "url": "{{entire_url('customers')}}", "subtable": "customers" }, { "field": "customer_id", "title": "交接记录", "url": "{{entire_url('handover_list')}}", "subtable": "customer_handover" }, { "field": "customer_id", "title": "公海记录", "url": "{{entire_url('customer_pool_list')}}", "subtable": "customer_pool" } ] } }