From 63ddffb12a1f0bd265b603d6f9974d76f04bf999 Mon Sep 17 00:00:00 2001 From: mac Date: Sat, 11 Jul 2026 15:27:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=A8finance/plan=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E5=99=A8=E6=8E=A7=E5=88=B6=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增setFinYear/setPlanYear等年份/季度/月度/视图切换函数 - 新增switchFinFilter/switchPlanFilter tab切换函数 - 新增setPlanStatusFilter状态筛选函数 - 版本号 v1.2.0.31 --- static/modules/finance.js | 7 +++++++ static/modules/plan.js | 8 ++++++++ templates/index.html | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/static/modules/finance.js b/static/modules/finance.js index 139f218..d3c052f 100644 --- a/static/modules/finance.js +++ b/static/modules/finance.js @@ -1248,3 +1248,10 @@ function renderOverviewCharts(data) { state.finChart4 = new Chart(c4, Object.assign({}, iconf, { data: { labels: labels, datasets: [{ label: "利润", data: data.map(function(x) { return x.gross || 0; }), borderColor: "#6366f1", backgroundColor: "rgba(99,102,241,0.06)", fill: true, tension: 0.3 }] } })); } }; + +// ====== 筛选器控制函数 ====== +window.switchFinFilter = (f) => { state.finFilter = f; renderFinance(); }; +window.setFinView = (v) => { state.finView = v; renderFinance(); }; +window.setFinYear = (y) => { state.finYear = parseInt(y); renderFinance(); }; +window.setFinQuarter = (q) => { state.finView = 'quarterly'; state.finQuarter = q; renderFinance(); }; +window.setFinMonth = (m) => { state.finView = 'monthly'; state.finMonth = m; renderFinance(); }; diff --git a/static/modules/plan.js b/static/modules/plan.js index b18bc13..2c269eb 100644 --- a/static/modules/plan.js +++ b/static/modules/plan.js @@ -1356,3 +1356,11 @@ window.planInlineUpdate = async (pfId, field, value) => { toast("更新失败:" + error.message, "error"); } }; + +// ====== 筛选器控制函数 ====== +window.switchPlanFilter = (f) => { state.planFilter = f; renderPlan(); }; +window.setPlanView = (v) => { state.planView = v; renderPlan(); }; +window.setPlanYear = (y) => { state.planYear = parseInt(y); renderPlan(); }; +window.setPlanQuarter = (q) => { state.planView = 'quarterly'; state.planQuarter = q; renderPlan(); }; +window.setPlanMonth = (m) => { state.planView = 'monthly'; state.planMonth = m; renderPlan(); }; +window.setPlanStatusFilter = (f) => { state.planStatusFilter = f; renderPlan(); }; diff --git a/templates/index.html b/templates/index.html index dfd44a7..58793b3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -84,7 +84,7 @@
-

OPC Manager v1.2.0.30

+

OPC Manager v1.2.0.31

科普 OPC 工作台