1. i18n/zh/msg.txt: 补全所有缺失的英文翻译 2. dashboards.py: 新增 get_financial_summary(period) 平台级财务汇总 3. init.py: 注册 api_financial_summary + 导入 4. sect_currency.ui: 饼图改为累计/当年/当月/当天 收入/成本/毛利柱状图 5. 新增 api/financial_summary.dspy + api/financial_chart.dspy
33 lines
1.8 KiB
XML
33 lines
1.8 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {"width": "100%", "gap": "8px"},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {"gap": "4px"},
|
|
"subwidgets": [
|
|
{"widgettype": "Button", "id": "btn_all", "options": {"label": "累计", "i18n": true}},
|
|
{"widgettype": "Button", "id": "btn_year", "options": {"label": "当年", "i18n": true}},
|
|
{"widgettype": "Button", "id": "btn_month", "options": {"label": "当月", "i18n": true}},
|
|
{"widgettype": "Button", "id": "btn_today", "options": {"label": "当天", "i18n": true}}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "ChartBar",
|
|
"id": "financial_chart",
|
|
"options": {
|
|
"height": "180px",
|
|
"data_url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=all",
|
|
"nameField": "metric",
|
|
"valueFields": ["value"]
|
|
}
|
|
}
|
|
],
|
|
"binds": [
|
|
{"wid": "btn_all", "event": "click", "actiontype": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=all"}},
|
|
{"wid": "btn_year", "event": "click", "actiontype": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=year"}},
|
|
{"wid": "btn_month", "event": "click", "actiontype": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=month"}},
|
|
{"wid": "btn_today", "event": "click", "actiontype": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=today"}}
|
|
]
|
|
}
|