' +
'
' +
'
' +
- '
费用记录' + filtered.length + '
' +
- '
总费用' + money(totalAmount) + '
' +
- '
已发生金额' + money(totalIncurred) + '
' +
+ '
费用记录' + filtered.length + '
' +
+ '
总费用' + money(totalAmount) + '
' +
+ '
已发生金额' + money(totalIncurred) + '
' +
'
' +
modal +
'
| 费用类型 | 月份 | 金额 | 已发生金额 | 费用说明 |
' + tableRows + '
' +
diff --git a/static/modules/finance.js b/static/modules/finance.js
index 1a429c7..bfdb0b7 100644
--- a/static/modules/finance.js
+++ b/static/modules/finance.js
@@ -111,9 +111,9 @@ function renderFinance() {
const qLabels2 = ["Q1 (1-3月)","Q2 (4-6月)","Q3 (7-9月)","Q4 (10-12月)"];
const toolMonthSelect = allMonths.map(m => '
').join("");
const toolQuarterSelect = qLabels2.map((l,i) => '
').join("");
- const toolDateSelect = state.finView==='monthly'?'
月份:':state.finView==='quarterly'?'
季度:':'';
+ const toolDateSelect = state.finView==='monthly'?'
月份:':state.finView==='quarterly'?'
季度:':'';
- const finHeaderBase = `
视图:${toolDateSelect}`;
+ const finHeaderBase = `
视图:${toolDateSelect}`;
const finAddBtn = `
`;
const finFilterTabs = `
`;
@@ -296,7 +296,7 @@ function renderFinance() {
const subtitle = isUnsigned
? '合同 → 毛利 → 成本 → 项目利润'
: '合同 → 确收 → 毛利 → 成本 → 项目利润 → 回款 → 已付 → 现金流 → 执行率 → 毛利率 → 回款率 → 付款率';
- return card(`
${cards.map(([l, v, c]) => '
' + l + '' + v + '
').join("")}
`, "p-4") +
+ return card(`
${cards.map(([l, v, c]) => '
' + l + '' + v + '
').join("")}
`, "p-4") +
card(`
项目财务明细
${subtitle}
`, "p-4");
};
@@ -379,6 +379,7 @@ function renderFinance() {
const gross = sumBudget(pf, "gross");
const cost = sumExpense(pf, "cost");
const paid = sumExpense(pf, "paid");
+ if (!rev && !payment && !cost && !paid && !gross) return;
sumRev += rev; sumPay += payment; sumCost += cost; sumPaid += paid; sumGross += gross;
rows.push(isUnsigned ? tdRowUnsigned(pf, cost, gross) : tdRow(pf, rev, payment, cost, paid, gross));
});
diff --git a/static/modules/home.js b/static/modules/home.js
index bcae3df..09cf137 100644
--- a/static/modules/home.js
+++ b/static/modules/home.js
@@ -105,15 +105,14 @@ function renderHome() {
}
document.querySelector("#home").innerHTML = `
-
- 筛选:
-
-
+ ${state.tenant === "总工作台" ? "" : `
+ ${[
+ ["项目管理", m.total_projects, "finance"],
+ ["重点工作与台账", m.total_proposals, "projects"],
+ ["业务方案", m.total_products, "proposals"],
+ ["产品迭代", m.upcoming_products, "products"],
+ ].map(([label, value, tab]) => ``).join("")}
+
`}
${card(`
部门经营情况
| 指标 | 年度累计 | 上季度累计 | 上月累计 | 本季度累计 | 季环比 | 本月累计 | 月环比 |
${(() => {
var d = [
diff --git a/static/modules/utils.js b/static/modules/utils.js
index 64bf31b..c6d511a 100644
--- a/static/modules/utils.js
+++ b/static/modules/utils.js
@@ -9,7 +9,7 @@ const state = {
selectedProject: null,
taskQuery: "",
taskView: localStorage.getItem("opc-task-view") || "detail",
- finView: localStorage.getItem("opc-fin-view") || "overview",
+ finView: "overview",
proposalTab: "standard",
chart: null,
chart2: null,
@@ -196,7 +196,6 @@ window.switchTab = switchTab;
window.setFinView = (view) => {
state.finView = view;
- localStorage.setItem("opc-fin-view", view);
renderFinance();
};
window.switchFinFilter = (filter) => {
diff --git a/templates/index.html b/templates/index.html
index 570b54c..6ddb3df 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -76,7 +76,7 @@
-
OPC Manager v1.0.0.3
+
OPC Manager v1.0.0.4