accounting/wwwroot/billing.ui
yumoqing f7f9581cd9 fix(billing): InlineForm target can't find sibling Tabular
InlineForm and Tabular are siblings in the same VBox. Default
getWidgetById() searches downward from the source widget, missing
siblings. Use 'app.' prefix to resolve from root.
2026-07-16 16:28:25 +08:00

162 lines
3.3 KiB
XML

{% set billing_url = entire_url('/accounting/billing.dspy') %}
{% set download_url = entire_url('/accounting/billing_download.dspy') %}
{
"widgettype": "VBox",
"id": "billing_page",
"options": {
"width": "100%",
"height": "100%",
"gap": "10px"
},
"subwidgets": [
{
"widgettype": "InlineForm",
"id": "billing_form",
"options": {
"fields": [
{
"name": "start_date",
"label": "开始日期",
"uitype": "date",
"required": true
},
{
"name": "end_date",
"label": "结束日期",
"uitype": "date",
"required": true
}
],
"submit_text": "查询"
},
"binds": [
{
"wid": "billing_form",
"event": "submit",
"actiontype": "method",
"target": "app.billing_tabular",
"method": "render"
}
]
},
{
"widgettype": "HBox",
"id": "billing_stats_box",
"options": {
"width": "100%",
"height": "40px",
"gap": "20px",
"align_items": "center"
},
"subwidgets": [
{
"widgettype": "Text",
"id": "billing_stats",
"options": {
"text": "请输入日期范围进行查询",
"css": "font-size: 14px; color: #666;"
}
},
{
"widgettype": "Button",
"id": "billing_download_btn",
"options": {
"text": "下载Excel",
"css": "display: none; background-color: #52c41a; color: white; padding: 5px 15px; border-radius: 4px; cursor: pointer;"
}
}
]
},
{
"widgettype": "Tabular",
"id": "billing_tabular",
"options": {
"width": "100%",
"flex": "1",
"cheight": 9,
"data_url": "{{entire_url('/accounting/billing.dspy')}}",
"editable": false,
"page_rows": 60,
"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
}
]
}
}
}
]
}