- Flatten nested style objects directly into options
- Text/Title use 'text', Button uses 'label'
- All paths use {{entire_url()}}
185 lines
7.7 KiB
XML
185 lines
7.7 KiB
XML
{
|
|
"widgettype": "Page",
|
|
"options": {
|
|
"title": "客户编辑",
|
|
"height": "100vh",
|
|
"padding": "0"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"padding": "16px",
|
|
"flex": 1,
|
|
"overflow": "auto"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Form",
|
|
"id": "customer_form",
|
|
"options": {
|
|
"submit_url": "{{entire_url('api/customers_create.dspy')}}",
|
|
"method": "POST",
|
|
"layout": "vertical",
|
|
"fields": [
|
|
{
|
|
"name": "customer_name",
|
|
"label": "客户名称",
|
|
"uitype": "text",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "customer_type",
|
|
"label": "客户类型",
|
|
"uitype": "code",
|
|
"required": true,
|
|
"data": [
|
|
{
|
|
"value": "enterprise",
|
|
"text": "企业客户"
|
|
},
|
|
{
|
|
"value": "individual",
|
|
"text": "个人客户"
|
|
},
|
|
{
|
|
"value": "government",
|
|
"text": "政府客户"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "contact_person",
|
|
"label": "联系人",
|
|
"uitype": "text"
|
|
},
|
|
{
|
|
"name": "phone",
|
|
"label": "电话",
|
|
"uitype": "text"
|
|
},
|
|
{
|
|
"name": "email",
|
|
"label": "邮箱",
|
|
"uitype": "text"
|
|
},
|
|
{
|
|
"name": "tax_id",
|
|
"label": "税号",
|
|
"uitype": "text"
|
|
},
|
|
{
|
|
"name": "industry",
|
|
"label": "行业",
|
|
"uitype": "code",
|
|
"data": [
|
|
{
|
|
"value": "manufacturing",
|
|
"text": "制造业"
|
|
},
|
|
{
|
|
"value": "technology",
|
|
"text": "科技"
|
|
},
|
|
{
|
|
"value": "finance",
|
|
"text": "金融"
|
|
},
|
|
{
|
|
"value": "retail",
|
|
"text": "零售"
|
|
},
|
|
{
|
|
"value": "other",
|
|
"text": "其他"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "customer_level",
|
|
"label": "客户等级",
|
|
"uitype": "code",
|
|
"data": [
|
|
{
|
|
"value": "potential",
|
|
"text": "潜在客户"
|
|
},
|
|
{
|
|
"value": "active",
|
|
"text": "活跃客户"
|
|
},
|
|
{
|
|
"value": "vip",
|
|
"text": "VIP客户"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "address",
|
|
"label": "地址",
|
|
"uitype": "textarea"
|
|
},
|
|
{
|
|
"name": "owner_id",
|
|
"label": "负责人",
|
|
"uitype": "text",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "region",
|
|
"label": "区域",
|
|
"uitype": "code",
|
|
"data": [
|
|
{
|
|
"value": "east",
|
|
"text": "华东"
|
|
},
|
|
{
|
|
"value": "south",
|
|
"text": "华南"
|
|
},
|
|
{
|
|
"value": "west",
|
|
"text": "华西"
|
|
},
|
|
{
|
|
"value": "north",
|
|
"text": "华北"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "status",
|
|
"label": "状态",
|
|
"uitype": "code",
|
|
"data": [
|
|
{
|
|
"value": "active",
|
|
"text": "有效"
|
|
},
|
|
{
|
|
"value": "inactive",
|
|
"text": "无效"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"buttons": [
|
|
{
|
|
"type": "submit",
|
|
"text": "保存",
|
|
"variant": "primary"
|
|
},
|
|
{
|
|
"type": "button",
|
|
"text": "取消",
|
|
"action": "navigate('main/customer_management/customer_list.ui')"
|
|
}
|
|
],
|
|
"maxWidth": "600px"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |