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