From 7361614f89238bd80a3d6d5e2721f94df851f633 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 31 May 2026 13:24:32 +0800 Subject: [PATCH] fix: billing query - use Tabular instead of DataViewer, fix form submit target - Changed DataViewer to Tabular with row_options.fields for proper table rendering - Form submit target changed from 'self' to 'billing_page' (root VBox ID) with mode:replace, preventing nested page loading inside Form - Fixed page_size to page_rows (correct parameter name) - Added column definitions: date, time, subject, direction, summary, amount, balance --- wwwroot/billing.ui | 92 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 87 insertions(+), 5 deletions(-) diff --git a/wwwroot/billing.ui b/wwwroot/billing.ui index 216602b..d610eaa 100644 --- a/wwwroot/billing.ui +++ b/wwwroot/billing.ui @@ -2,10 +2,11 @@ {% set end_date = params_kw.get('end_date', '') %} { "widgettype":"VBox", + "id":"billing_page", "options":{ "width":"100%", + "height":"100%", "css":"card", - "cwidth":30, "gap":"8px" }, "subwidgets":[ @@ -45,24 +46,105 @@ "wid":"self", "event":"submit", "actiontype":"urlwidget", - "target":"self", + "target":"billing_page", "options":{ "url":"{{entire_url('/accounting/billing.ui')}}" - } + }, + "mode":"replace" } ] } {% if start_date and end_date %} ,{ - "widgettype":"DataViewer", + "widgettype":"Tabular", "options":{ + "width":"100%", + "height":"100%", "data_url":"{{entire_url('/accounting/billing.dspy')}}", "data_params":{ "start_date":"{{start_date}}", "end_date":"{{end_date}}" }, "editable":false, - "page_size":30 + "page_rows":80, + "cache_limit":3, + "row_options":{ + "browserfields":{ + "exclouded":["row_num_"] + }, + "fields":[ + { + "name":"acc_date", + "title":"日期", + "type":"date", + "uitype":"date", + "datatype":"date", + "label":"日期", + "cwidth":12 + }, + { + "name":"acc_timestamp", + "title":"时间", + "type":"timestamp", + "uitype":"timestamp", + "datatype":"timestamp", + "label":"时间", + "cwidth":16 + }, + { + "name":"subject_name", + "title":"科目", + "type":"str", + "length":50, + "uitype":"str", + "datatype":"str", + "label":"科目", + "cwidth":14 + }, + { + "name":"acc_dir", + "title":"方向", + "type":"str", + "length":4, + "uitype":"str", + "datatype":"str", + "label":"方向", + "cwidth":8 + }, + { + "name":"summary", + "title":"摘要", + "type":"str", + "length":100, + "uitype":"str", + "datatype":"str", + "label":"摘要", + "cwidth":30 + }, + { + "name":"amount", + "title":"金额", + "type":"float", + "length":18, + "dec":4, + "uitype":"float", + "datatype":"float", + "label":"金额", + "cwidth":12 + }, + { + "name":"balance", + "title":"余额", + "type":"float", + "length":18, + "dec":4, + "uitype":"float", + "datatype":"float", + "label":"余额", + "cwidth":12 + } + ] + } } } {% endif %}