- Flatten style in widget root, options, and nested structures (row_options.fields etc.)
170 lines
7.3 KiB
XML
170 lines
7.3 KiB
XML
{
|
|
"widgettype": "Page",
|
|
"options": {
|
|
"title": "审批实例管理",
|
|
"height": "100vh",
|
|
"padding": "0"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"padding": "16px",
|
|
"height": "100%"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"marginBottom": "16px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": "审批实例管理",
|
|
"fontSize": "20px",
|
|
"fontWeight": "bold"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"options": {
|
|
"label": "发起审批",
|
|
"onclick": "openDialog('newInstanceDialog')",
|
|
"backgroundColor": "#007bff",
|
|
"color": "#fff",
|
|
"border": "none",
|
|
"padding": "8px 16px",
|
|
"borderRadius": "4px",
|
|
"marginLeft": "auto"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "DataViewer",
|
|
"options": {
|
|
"title": "审批实例",
|
|
"data_url": "/main/workflow_approval/api/instance_list.dspy",
|
|
"page_rows": 20,
|
|
"row_options": {
|
|
"fields": [
|
|
{
|
|
"name": "title",
|
|
"label": "审批标题",
|
|
"uitype": "text"
|
|
},
|
|
{
|
|
"name": "workflow_name",
|
|
"label": "工作流",
|
|
"uitype": "text"
|
|
},
|
|
{
|
|
"name": "module_type",
|
|
"label": "模块类型",
|
|
"uitype": "text"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"label": "状态",
|
|
"uitype": "text"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"label": "发起时间",
|
|
"uitype": "text"
|
|
},
|
|
{
|
|
"name": "completed_at",
|
|
"label": "完成时间",
|
|
"uitype": "text"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Dialog",
|
|
"id": "newInstanceDialog",
|
|
"options": {
|
|
"title": "发起审批",
|
|
"width": 500,
|
|
"content": {
|
|
"widgettype": "Form",
|
|
"id": "newInstanceForm",
|
|
"fields": [
|
|
{
|
|
"name": "workflow_id",
|
|
"label": "选择工作流",
|
|
"uitype": "code",
|
|
"data_url": "/main/workflow_approval/api/workflow_list.dspy",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "module_type",
|
|
"label": "模块类型",
|
|
"uitype": "code",
|
|
"data": [
|
|
{
|
|
"value": "customer",
|
|
"text": "客户管理"
|
|
},
|
|
{
|
|
"value": "opportunity",
|
|
"text": "商机管理"
|
|
},
|
|
{
|
|
"value": "contract",
|
|
"text": "合同管理"
|
|
},
|
|
{
|
|
"value": "financial",
|
|
"text": "财务管理"
|
|
}
|
|
],
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "module_record_id",
|
|
"label": "业务记录ID",
|
|
"uitype": "text",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "title",
|
|
"label": "审批标题",
|
|
"uitype": "text",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "description",
|
|
"label": "审批描述",
|
|
"uitype": "textarea"
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"widgettype": "Button",
|
|
"options": {
|
|
"label": "取消",
|
|
"onclick": "closeDialog('newInstanceDialog')"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"options": {
|
|
"label": "提交",
|
|
"onclick": "submitForm('newInstanceForm', '/main/workflow_approval/api/instance_create.dspy', 'newInstanceDialog', null)",
|
|
"backgroundColor": "#007bff",
|
|
"color": "#fff"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |