customer_management/wwwroot/customer_list.ui
yumoqing 6fe0cb4930 fix: Text widgets use 'text' not 'label', Button widgets use 'label' not 'text'
Per bricks-framework spec:
- Text/Title: use 'text' for non-i18n, 'otext'+'i18n:true' for i18n
- Button: use 'label' for button text
2026-05-05 19:28:22 +08:00

121 lines
4.5 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": {
"variant": "primary",
"label": "搜索"
}
}
]
},
{
"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 %}')"
}
]
}
}
]
}
]
}