- Flatten nested style objects directly into options
- Text/Title use 'text', Button uses 'label'
- All paths use {{entire_url()}}
114 lines
3.8 KiB
XML
114 lines
3.8 KiB
XML
{
|
|
"id": "customer_management",
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "100%",
|
|
"padding": "16px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"marginBottom": "16px",
|
|
"gap": "8px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": "客户管理",
|
|
"fontSize": "20px",
|
|
"fontWeight": "bold"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Filler",
|
|
"options": {}
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "btn_add_customer",
|
|
"options": {
|
|
"label": "新增客户",
|
|
"variant": "primary"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Tabular",
|
|
"id": "customer_grid",
|
|
"options": {
|
|
"data_url": "{{entire_url('api/customers_list.dspy')}}",
|
|
"data_method": "GET",
|
|
"row_options": {
|
|
"fields": [
|
|
{
|
|
"name": "customer_code",
|
|
"title": "客户编码",
|
|
"uitype": "str",
|
|
"cwidth": 12
|
|
},
|
|
{
|
|
"name": "customer_name",
|
|
"title": "客户名称",
|
|
"uitype": "str",
|
|
"cwidth": 15
|
|
},
|
|
{
|
|
"name": "customer_type",
|
|
"title": "类型",
|
|
"uitype": "str",
|
|
"cwidth": 10
|
|
},
|
|
{
|
|
"name": "industry",
|
|
"title": "行业",
|
|
"uitype": "str",
|
|
"cwidth": 10
|
|
},
|
|
{
|
|
"name": "contact_person",
|
|
"title": "联系人",
|
|
"uitype": "str",
|
|
"cwidth": 10
|
|
},
|
|
{
|
|
"name": "phone",
|
|
"title": "电话",
|
|
"uitype": "str",
|
|
"cwidth": 12
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "状态",
|
|
"uitype": "str",
|
|
"cwidth": 8
|
|
}
|
|
],
|
|
"toolbar": [
|
|
{
|
|
"type": "button",
|
|
"text": "新增",
|
|
"icon": "add",
|
|
"action": "navigate('customer_edit.ui')"
|
|
},
|
|
{
|
|
"type": "button",
|
|
"text": "编辑",
|
|
"icon": "edit",
|
|
"action": "navigate('customer_edit.ui?id={{selectedRow.id}}')"
|
|
},
|
|
{
|
|
"type": "button",
|
|
"text": "删除",
|
|
"icon": "delete",
|
|
"action": "doDelete('{{selectedRow.id}}')"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
} |