yumoqing 469255afe7 sync: local modifications to customer_management
- 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
2026-04-28 18:51:23 +08:00

67 lines
3.2 KiB
XML

{
"type": "Page",
"title": "Customer Management",
"content": {
"type": "VBox",
"style": {"padding": "16px", "height": "100%"},
"children": [
{
"type": "HBox",
"justify": "space-between",
"style": {"marginBottom": "16px"},
"children": [
{"type": "Text", "content": "Customer List", "style": {"fontSize": "20px", "fontWeight": "bold"}},
{"type": "Button", "id": "addCustomerBtn", "text": "Add Customer", "variant": "primary", "leadingIcon": "add", "onclick": "openDialog('addCustomerDialog')"}
]
},
{
"type": "CRUD",
"id": "customerCRUD",
"api": {
"list": "main/customer_management/api/customers_list.dspy",
"create": "main/customer_management/api/customers_create.dspy",
"update": "main/customer_management/api/customers_update.dspy",
"delete": "main/customer_management/api/customers_delete.dspy"
},
"columns": [
{"field": "customer_name", "title": "Customer Name", "width": 180},
{"field": "customer_type", "title": "Type", "width": 100, "formatter": "code:customer_type"},
{"field": "phone", "title": "Phone", "width": 130},
{"field": "email", "title": "Email", "width": 180},
{"field": "industry", "title": "Industry", "width": 120},
{"field": "customer_level", "title": "Level", "width": 100, "formatter": "code:customer_level"},
{"field": "region", "title": "Region", "width": 100},
{"field": "status", "title": "Status", "width": 80, "formatter": "code:customer_status"},
{"field": "created_at", "title": "Created", "width": 160}
],
"style": {"flex": 1}
},
{
"type": "Dialog",
"id": "addCustomerDialog",
"title": "Add Customer",
"width": 600,
"content": {
"type": "Form",
"id": "addCustomerForm",
"fields": [
{"field": "customer_name", "title": "Customer Name", "uitype": "TextField", "required": true},
{"field": "customer_type", "title": "Type", "uitype": "SelectField", "required": true, "options": "code:customer_type"},
{"field": "phone", "title": "Phone", "uitype": "TextField"},
{"field": "email", "title": "Email", "uitype": "TextField"},
{"field": "tax_id", "title": "Tax ID", "uitype": "TextField"},
{"field": "industry", "title": "Industry", "uitype": "TextField"},
{"field": "customer_level", "title": "Level", "uitype": "SelectField", "options": "code:customer_level", "value": "potential"},
{"field": "address", "title": "Address", "uitype": "TextField"},
{"field": "region", "title": "Region", "uitype": "TextField"},
{"field": "owner_id", "title": "Owner ID", "uitype": "TextField", "required": true}
],
"actions": [
{"type": "Button", "text": "Cancel", "onclick": "closeDialog('addCustomerDialog')"},
{"type": "Button", "text": "Submit", "variant": "primary", "onclick": "submitForm('addCustomerForm', 'main/customer_management/api/customers_create.dspy', 'addCustomerDialog', 'customerCRUD')"}
]
}
}
]
}
}