From b949ed4968ca1ec461abc26012d200e5df8e9c4b Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 5 May 2026 19:28:24 +0800 Subject: [PATCH] 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 --- wwwroot/financial_vouchers.ui | 10 +- wwwroot/index.ui | 38 ++++---- wwwroot/payments.ui | 10 +- wwwroot/receipts.ui | 10 +- wwwroot/receivables.ui | 171 +++++++++++++++++++++++++--------- 5 files changed, 161 insertions(+), 78 deletions(-) diff --git a/wwwroot/financial_vouchers.ui b/wwwroot/financial_vouchers.ui index e966284..d9eea4f 100644 --- a/wwwroot/financial_vouchers.ui +++ b/wwwroot/financial_vouchers.ui @@ -11,20 +11,20 @@ { "widgettype": "Text", "options": { - "label": "Financial Vouchers", "fontSize": "24px", "fontWeight": "bold", "color": "#1E40AF", - "marginBottom": "10px" + "marginBottom": "10px", + "text": "Financial Vouchers" } }, { "widgettype": "Text", "options": { - "label": "Feature under development", "fontSize": "16px", - "color": "#6B7280" + "color": "#6B7280", + "text": "Feature under development" } } ] -} +} \ No newline at end of file diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 0c35017..e34670f 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -10,11 +10,11 @@ { "widgettype": "Text", "options": { - "label": "Financial Management", "fontSize": "24px", "fontWeight": "bold", "color": "#1E40AF", - "marginBottom": "20px" + "marginBottom": "20px", + "text": "Financial Management" } }, { @@ -49,19 +49,19 @@ { "widgettype": "Text", "options": { - "label": "Receivables", "fontSize": "18px", "fontWeight": "bold", - "color": "#1E40AF" + "color": "#1E40AF", + "text": "Receivables" } }, { "widgettype": "Text", "options": { - "label": "Manage accounts receivable", "fontSize": "14px", "color": "#6B7280", - "marginTop": "8px" + "marginTop": "8px", + "text": "Manage accounts receivable" } } ] @@ -91,19 +91,19 @@ { "widgettype": "Text", "options": { - "label": "Receipts", "fontSize": "18px", "fontWeight": "bold", - "color": "#059669" + "color": "#059669", + "text": "Receipts" } }, { "widgettype": "Text", "options": { - "label": "Manage incoming payments", "fontSize": "14px", "color": "#6B7280", - "marginTop": "8px" + "marginTop": "8px", + "text": "Manage incoming payments" } } ] @@ -133,19 +133,19 @@ { "widgettype": "Text", "options": { - "label": "Payments", "fontSize": "18px", "fontWeight": "bold", - "color": "#D97706" + "color": "#D97706", + "text": "Payments" } }, { "widgettype": "Text", "options": { - "label": "Manage outgoing payments", "fontSize": "14px", "color": "#6B7280", - "marginTop": "8px" + "marginTop": "8px", + "text": "Manage outgoing payments" } } ] @@ -175,19 +175,19 @@ { "widgettype": "Text", "options": { - "label": "Vouchers", "fontSize": "18px", "fontWeight": "bold", - "color": "#7C3AED" + "color": "#7C3AED", + "text": "Vouchers" } }, { "widgettype": "Text", "options": { - "label": "Financial vouchers", "fontSize": "14px", "color": "#6B7280", - "marginTop": "8px" + "marginTop": "8px", + "text": "Financial vouchers" } } ] @@ -208,4 +208,4 @@ } } ] -} +} \ No newline at end of file diff --git a/wwwroot/payments.ui b/wwwroot/payments.ui index 7f31818..7adc2ec 100644 --- a/wwwroot/payments.ui +++ b/wwwroot/payments.ui @@ -11,20 +11,20 @@ { "widgettype": "Text", "options": { - "label": "Payments Management", "fontSize": "24px", "fontWeight": "bold", "color": "#1E40AF", - "marginBottom": "10px" + "marginBottom": "10px", + "text": "Payments Management" } }, { "widgettype": "Text", "options": { - "label": "Feature under development", "fontSize": "16px", - "color": "#6B7280" + "color": "#6B7280", + "text": "Feature under development" } } ] -} +} \ No newline at end of file diff --git a/wwwroot/receipts.ui b/wwwroot/receipts.ui index d28d113..442dd5c 100644 --- a/wwwroot/receipts.ui +++ b/wwwroot/receipts.ui @@ -11,20 +11,20 @@ { "widgettype": "Text", "options": { - "label": "Receipts Management", "fontSize": "24px", "fontWeight": "bold", "color": "#1E40AF", - "marginBottom": "10px" + "marginBottom": "10px", + "text": "Receipts Management" } }, { "widgettype": "Text", "options": { - "label": "Feature under development", "fontSize": "16px", - "color": "#6B7280" + "color": "#6B7280", + "text": "Feature under development" } } ] -} +} \ No newline at end of file diff --git a/wwwroot/receivables.ui b/wwwroot/receivables.ui index 2d4c90e..0cb23b2 100644 --- a/wwwroot/receivables.ui +++ b/wwwroot/receivables.ui @@ -1,46 +1,129 @@ { - "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": {"text": "搜索", "variant": "primary"}}, - {"widgettype": "Button", "id": "btn_add", "options": {"text": "新增", "variant": "primary", "action": "navigate('main/financial_management/receivable_edit.ui')"}} - ] - }, - { - "widgettype": "DataGrid", - "id": "receivables_grid", - "options": { - "url": "{{entire_url('api/receivables_list.dspy')}}", - "style": {"flex": 1}, - "columns": [ - {"field": "id", "header": "编号", "width": 150}, - {"field": "contract_id", "header": "合同", "width": 140}, - {"field": "customer_id", "header": "客户", "width": 140}, - {"field": "receivable_amount", "header": "应收金额", "width": 120}, - {"field": "received_amount", "header": "已收金额", "width": 120}, - {"field": "due_date", "header": "到期日", "width": 110}, - {"field": "status", "header": "状态", "width": 90}, - {"field": "description", "header": "说明", "width": 200} - ], - "toolbar": [ - {"type": "button", "text": "编辑", "icon": "edit", "action": "navigate('main/financial_management/receivable_edit.ui?id={% raw %}{{selectedRow.id}}{% endraw %}')"}, - {"type": "button", "text": "删除", "icon": "delete", "action": "doDelete('{% raw %}{{selectedRow.id}}{% endraw %}')"} - ] - } + "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": "Button", + "id": "btn_add", + "options": { + "variant": "primary", + "action": "navigate('main/financial_management/receivable_edit.ui')", + "label": "新增" + } + } + ] + }, + { + "widgettype": "DataGrid", + "id": "receivables_grid", + "options": { + "url": "{{entire_url('api/receivables_list.dspy')}}", + "style": { + "flex": 1 + }, + "columns": [ + { + "field": "id", + "header": "编号", + "width": 150 + }, + { + "field": "contract_id", + "header": "合同", + "width": 140 + }, + { + "field": "customer_id", + "header": "客户", + "width": 140 + }, + { + "field": "receivable_amount", + "header": "应收金额", + "width": 120 + }, + { + "field": "received_amount", + "header": "已收金额", + "width": 120 + }, + { + "field": "due_date", + "header": "到期日", + "width": 110 + }, + { + "field": "status", + "header": "状态", + "width": 90 + }, + { + "field": "description", + "header": "说明", + "width": 200 + } + ], + "toolbar": [ + { + "type": "button", + "text": "编辑", + "icon": "edit", + "action": "navigate('main/financial_management/receivable_edit.ui?id={% raw %}{{selectedRow.id}}{% endraw %}')" + }, + { + "type": "button", + "text": "删除", + "icon": "delete", + "action": "doDelete('{% raw %}{{selectedRow.id}}{% endraw %}')" + } + ] + } + } + ] + } + ] +} \ No newline at end of file