- Updated core.py - Updated base.ui - Added new API files: check_tables, customer_pool_list, customers CRUD, handover_list - Added new UI/DSPY files: customer_edit, customer_list, customer_pool, handover_list
45 lines
2.0 KiB
XML
45 lines
2.0 KiB
XML
{
|
|
"widgettype": "Page",
|
|
"options": {
|
|
"title": "客户列表",
|
|
"style": {"height": "100vh", "padding": "0"}
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"style": {"padding": "16px", "flex": 1, "overflow": "hidden"}},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {"style": {"marginBottom": "16px", "gap": "8px"}},
|
|
"subwidgets": [
|
|
{"widgettype": "TextField", "id": "search_keyword", "options": {"label": "搜索", "placeholder": "客户名称/编码", "style": {"flex": 1}}},
|
|
{"widgettype": "Button", "id": "btn_search", "options": {"text": "搜索", "variant": "primary"}}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "DataGrid",
|
|
"id": "customer_grid",
|
|
"options": {
|
|
"url": "{{entire_url('api/customers_list.dspy')}}",
|
|
"style": {"flex": 1},
|
|
"columns": [
|
|
{"field": "customer_code", "header": "客户编码", "width": 120},
|
|
{"field": "customer_name", "header": "客户名称", "width": 200},
|
|
{"field": "customer_type", "header": "类型", "width": 100},
|
|
{"field": "industry", "header": "行业", "width": 120},
|
|
{"field": "contact_person", "header": "联系人", "width": 100},
|
|
{"field": "phone", "header": "电话", "width": 120},
|
|
{"field": "status", "header": "状态", "width": 80}
|
|
],
|
|
"toolbar": [
|
|
{"type": "button", "text": "新增", "icon": "add", "action": "navigate('main/customer_management/customer_edit.ui')"},
|
|
{"type": "button", "text": "编辑", "icon": "edit", "action": "navigate('main/customer_management/customer_edit.ui?id={% raw %}{{selectedRow.id}}{% endraw %}')"},
|
|
{"type": "button", "text": "删除", "icon": "delete", "action": "doDelete('{% raw %}{{selectedRow.id}}{% endraw %}')"}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |