refactor: use Tabular built-in search_form for failed_accounting filter - Remove standalone InlineForm + custom toggle scripts - Use search_form config (framework handles create/hide/toggle/submit) - Toolbar button name 'filter' triggers built-in toggle_search_form()
This commit is contained in:
parent
e99e7774f2
commit
9b9e2a22d6
@ -1,20 +1,29 @@
|
|||||||
{
|
{
|
||||||
"widgettype": "VBox",
|
"widgettype": "Tabular",
|
||||||
|
"id": "failed_table",
|
||||||
"options": {
|
"options": {
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
"height": "100%",
|
"height": "100%",
|
||||||
"padding": "8px",
|
|
||||||
"gap": "8px"
|
|
||||||
},
|
|
||||||
"subwidgets": [
|
|
||||||
{
|
|
||||||
"widgettype": "InlineForm",
|
|
||||||
"id": "filter_form",
|
|
||||||
"options": {
|
|
||||||
"css": "card",
|
"css": "card",
|
||||||
"padding": "8px",
|
"toolbar": {
|
||||||
"submit_label": "查询",
|
"tools": [
|
||||||
"submit_css": "primary",
|
{
|
||||||
|
"name": "filter",
|
||||||
|
"label": "搜索"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show_reason",
|
||||||
|
"label": "原因",
|
||||||
|
"selected_row": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "retry_accounting",
|
||||||
|
"label": "重试记账",
|
||||||
|
"selected_row": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"search_form": {
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"name": "start_date",
|
"name": "start_date",
|
||||||
@ -41,37 +50,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"binds": [
|
|
||||||
{
|
|
||||||
"wid": "self",
|
|
||||||
"event": "submit",
|
|
||||||
"actiontype": "script",
|
|
||||||
"target": "app.failed_table",
|
|
||||||
"script": "var tbl = bricks.getWidgetById('app.failed_table'); if(tbl) await tbl.render(params);"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"widgettype": "Tabular",
|
|
||||||
"id": "failed_table",
|
|
||||||
"options": {
|
|
||||||
"width": "100%",
|
|
||||||
"height": "100%",
|
|
||||||
"css": "card",
|
|
||||||
"toolbar": {
|
|
||||||
"tools": [
|
|
||||||
{
|
|
||||||
"name": "show_reason",
|
|
||||||
"label": "原因",
|
|
||||||
"selected_row": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "retry_accounting",
|
|
||||||
"label": "重试记账",
|
|
||||||
"selected_row": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"data_url": "{{entire_url('/llmage/api/failed_accounting_list.dspy')}}",
|
"data_url": "{{entire_url('/llmage/api/failed_accounting_list.dspy')}}",
|
||||||
"data_method": "GET",
|
"data_method": "GET",
|
||||||
"page_rows": 20,
|
"page_rows": 20,
|
||||||
@ -141,5 +119,3 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user