fix: flatten style to options, fix Button/Text widget properties
- Flatten nested style objects directly into options
- Text/Title use 'text', Button uses 'label'
- All paths use {{entire_url()}}
This commit is contained in:
parent
b949ed4968
commit
49c99a5e74
@ -1,45 +1,109 @@
|
||||
{
|
||||
"widgettype": "Page",
|
||||
"options": {
|
||||
"title": "编辑应收账款",
|
||||
"style": {"height": "100vh", "padding": "0"}
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {"style": {"padding": "16px", "flex": 1, "overflow": "auto"}},
|
||||
"subwidgets": [
|
||||
"widgettype": "Page",
|
||||
"options": {
|
||||
"title": "编辑应收账款",
|
||||
"height": "100vh",
|
||||
"padding": "0"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Form",
|
||||
"id": "receivable_form",
|
||||
"options": {
|
||||
"submit_url": "{{entire_url('api/receivables_create.dspy')}}",
|
||||
"method": "POST",
|
||||
"layout": "vertical",
|
||||
"style": {"maxWidth": "600px"},
|
||||
"fields": [
|
||||
{"name": "order_id", "label": "订单号", "uitype": "text"},
|
||||
{"name": "contract_id", "label": "合同ID", "uitype": "text"},
|
||||
{"name": "customer_id", "label": "客户ID", "uitype": "text"},
|
||||
{"name": "receivable_amount", "label": "应收金额", "uitype": "number", "required": true},
|
||||
{"name": "due_date", "label": "到期日", "uitype": "date", "required": true},
|
||||
{"name": "status", "label": "状态", "uitype": "code", "data": [
|
||||
{"value": "pending", "text": "待收"},
|
||||
{"value": "partial", "text": "部分收款"},
|
||||
{"value": "received", "text": "已收款"},
|
||||
{"value": "overdue", "text": "逾期"}
|
||||
]},
|
||||
{"name": "received_amount", "label": "已收金额", "uitype": "number"},
|
||||
{"name": "description", "label": "说明", "uitype": "textarea"},
|
||||
{"name": "org_id", "label": "组织ID", "uitype": "text"}
|
||||
],
|
||||
"buttons": [
|
||||
{"type": "submit", "text": "保存", "variant": "primary"},
|
||||
{"type": "button", "text": "取消", "action": "navigate('main/financial_management/receivables.ui')"}
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"padding": "16px",
|
||||
"flex": 1,
|
||||
"overflow": "auto"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Form",
|
||||
"id": "receivable_form",
|
||||
"options": {
|
||||
"submit_url": "{{entire_url('api/receivables_create.dspy')}}",
|
||||
"method": "POST",
|
||||
"layout": "vertical",
|
||||
"fields": [
|
||||
{
|
||||
"name": "order_id",
|
||||
"label": "订单号",
|
||||
"uitype": "text"
|
||||
},
|
||||
{
|
||||
"name": "contract_id",
|
||||
"label": "合同ID",
|
||||
"uitype": "text"
|
||||
},
|
||||
{
|
||||
"name": "customer_id",
|
||||
"label": "客户ID",
|
||||
"uitype": "text"
|
||||
},
|
||||
{
|
||||
"name": "receivable_amount",
|
||||
"label": "应收金额",
|
||||
"uitype": "number",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "due_date",
|
||||
"label": "到期日",
|
||||
"uitype": "date",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"label": "状态",
|
||||
"uitype": "code",
|
||||
"data": [
|
||||
{
|
||||
"value": "pending",
|
||||
"text": "待收"
|
||||
},
|
||||
{
|
||||
"value": "partial",
|
||||
"text": "部分收款"
|
||||
},
|
||||
{
|
||||
"value": "received",
|
||||
"text": "已收款"
|
||||
},
|
||||
{
|
||||
"value": "overdue",
|
||||
"text": "逾期"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "received_amount",
|
||||
"label": "已收金额",
|
||||
"uitype": "number"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"label": "说明",
|
||||
"uitype": "textarea"
|
||||
},
|
||||
{
|
||||
"name": "org_id",
|
||||
"label": "组织ID",
|
||||
"uitype": "text"
|
||||
}
|
||||
],
|
||||
"buttons": [
|
||||
{
|
||||
"type": "submit",
|
||||
"text": "保存",
|
||||
"variant": "primary"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"text": "取消",
|
||||
"action": "navigate('main/financial_management/receivables.ui')"
|
||||
}
|
||||
],
|
||||
"maxWidth": "600px"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -2,29 +2,23 @@
|
||||
"widgettype": "Page",
|
||||
"options": {
|
||||
"title": "应收账款",
|
||||
"style": {
|
||||
"height": "100vh",
|
||||
"padding": "0"
|
||||
}
|
||||
"height": "100vh",
|
||||
"padding": "0"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"style": {
|
||||
"padding": "16px",
|
||||
"flex": 1,
|
||||
"overflow": "hidden"
|
||||
}
|
||||
"padding": "16px",
|
||||
"flex": 1,
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"style": {
|
||||
"marginBottom": "16px",
|
||||
"gap": "8px"
|
||||
}
|
||||
"marginBottom": "16px",
|
||||
"gap": "8px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
@ -33,9 +27,7 @@
|
||||
"options": {
|
||||
"label": "搜索",
|
||||
"placeholder": "合同/客户",
|
||||
"style": {
|
||||
"flex": 1
|
||||
}
|
||||
"flex": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -62,9 +54,6 @@
|
||||
"id": "receivables_grid",
|
||||
"options": {
|
||||
"url": "{{entire_url('api/receivables_list.dspy')}}",
|
||||
"style": {
|
||||
"flex": 1
|
||||
},
|
||||
"columns": [
|
||||
{
|
||||
"field": "id",
|
||||
@ -120,7 +109,8 @@
|
||||
"icon": "delete",
|
||||
"action": "doDelete('{% raw %}{{selectedRow.id}}{% endraw %}')"
|
||||
}
|
||||
]
|
||||
],
|
||||
"flex": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user