refactor: billing - use Form title, Tabular always present, form submit loadData via script
This commit is contained in:
parent
6d3dcf2db9
commit
8d447b90ea
@ -1,5 +1,3 @@
|
||||
{% set start_date = params_kw.get('start_date', '') %}
|
||||
{% set end_date = params_kw.get('end_date', '') %}
|
||||
{
|
||||
"widgettype":"VBox",
|
||||
"id":"billing_page",
|
||||
@ -11,33 +9,19 @@
|
||||
},
|
||||
"subwidgets":[
|
||||
{
|
||||
"widgettype":"Title6",
|
||||
"widgettype":"Form",
|
||||
"options":{
|
||||
"text":"账单查询"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype":"VBox",
|
||||
"options":{
|
||||
"width":"100%",
|
||||
"height":"60px"
|
||||
},
|
||||
"subwidgets":[
|
||||
{
|
||||
"widgettype":"Form",
|
||||
"options":{
|
||||
"fields":[
|
||||
"title":"账单查询",
|
||||
"fields":[
|
||||
{
|
||||
"name":"start_date",
|
||||
"label":"开始日期",
|
||||
"uitype":"date",
|
||||
"value":"{{start_date}}"
|
||||
"uitype":"date"
|
||||
},
|
||||
{
|
||||
"name":"end_date",
|
||||
"label":"结束日期",
|
||||
"uitype":"date",
|
||||
"value":"{{end_date}}"
|
||||
"uitype":"date"
|
||||
}
|
||||
],
|
||||
"buttons":[
|
||||
@ -52,29 +36,22 @@
|
||||
{
|
||||
"wid":"self",
|
||||
"event":"submit",
|
||||
"actiontype":"urlwidget",
|
||||
"target":"billing_page",
|
||||
"actiontype":"script",
|
||||
"target":"billing_tabular",
|
||||
"options":{
|
||||
"url":"{{entire_url('/accounting/billing.ui')}}"
|
||||
},
|
||||
"mode":"replace"
|
||||
"script":"this.loadData(params)"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{% if start_date and end_date %}
|
||||
,{
|
||||
},
|
||||
{
|
||||
"widgettype":"Tabular",
|
||||
"id":"billing_tabular",
|
||||
"options":{
|
||||
"width":"100%",
|
||||
"height":"100%",
|
||||
"css":"filler",
|
||||
"data_url":"{{entire_url('/accounting/billing.dspy')}}",
|
||||
"data_params":{
|
||||
"start_date":"{{start_date}}",
|
||||
"end_date":"{{end_date}}"
|
||||
},
|
||||
"editable":false,
|
||||
"page_rows":80,
|
||||
"cache_limit":3,
|
||||
@ -157,6 +134,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
{% endif %}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user