diff --git a/static/modules/finance.js b/static/modules/finance.js
index 7845112..c2462de 100644
--- a/static/modules/finance.js
+++ b/static/modules/finance.js
@@ -116,7 +116,7 @@ function renderFinance() {
const finHeaderBase = `视图:${toolDateSelect}`;
const finAddBtn = ``;
- const finFilterTabs = `
${finFilterTabs}
@@ -246,7 +246,6 @@ function renderFinance() {
return `
`;
}
const isUnsigned = state.finFilter === '待签约';
- const filterPfs = state.finFilter === 'all' ? pfs : pfs.filter(x => x.status === state.finFilter);
const METRIC_CARDS = [
{ label: '签约金额', value: ctx => moneyWan(ctx.signTotal), color: 'text-slate-700' },
{ label: '已确收', hideUnsigned: true, value: ctx => moneyWan(ctx.sumRev), color: 'text-blue-700' },
@@ -332,7 +331,7 @@ function renderFinance() {
};
if (state.finView === 'monthly') {
- const allPfs = filterPfs;
+ const allPfs = pfs.filter(x => x.status === state.finFilter);
const now = new Date();
const defaultMonth = now.getFullYear() + "-" + String(now.getMonth() + 1).padStart(2, "0");
if (!state.finMonth) state.finMonth = defaultMonth;
@@ -359,7 +358,7 @@ function renderFinance() {
}
if (state.finView === 'quarterly') {
- const allPfs = filterPfs;
+ const allPfs = pfs.filter(x => x.status === state.finFilter);
const qRanges = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]];
const now = new Date();
if (state.finQuarter === undefined) {
@@ -405,7 +404,7 @@ function renderFinance() {
expense.forEach(e => { cost += parseFloat(e.cost || 0) || 0; paid += parseFloat(e.paid || 0) || 0; });
return { rev: Math.round(rev), payment: Math.round(payment), cost: Math.round(cost), paid: Math.round(paid), gross: Math.round(gross) };
};
- const allPfs = filterPfs;
+ const allPfs = pfs.filter(x => x.status === state.finFilter);
let sumRev = 0, sumPay = 0, sumCost = 0, sumPaid = 0, sumGross = 0;
const rows = [];
allPfs.forEach(pf => {
diff --git a/templates/index.html b/templates/index.html
index 5568bfe..a1889f6 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -76,7 +76,7 @@
-
OPC Manager v1.0.0.15
+
OPC Manager v1.0.0.16