diff --git a/backend/flask_app.py b/backend/flask_app.py index e39ccee..dc526d9 100644 --- a/backend/flask_app.py +++ b/backend/flask_app.py @@ -377,6 +377,9 @@ def bootstrap(): "monthly_revenue": revenue_month, "monthly_net_profit": revenue_month - cost_month, "upcoming_products": len([x for x in products if x["status"] in ["规划中", "设计中", "开发中", "测试中"]]), + "total_projects": len(operations), + "total_proposals": len(proposals), + "total_products": len(products), # Extended finance metrics "signed_amount": signed_amount, "signed_annual": signed_annual, diff --git a/static/app.js b/static/app.js index 8ae98f2..454f8bf 100644 --- a/static/app.js +++ b/static/app.js @@ -115,16 +115,14 @@ function renderHome() { const tblCard = (title, rows) => card(`

${title}

${rows.map(([label, value]) => ``).join("")}
${label}${value}
`, "p-4"); document.querySelector("#home").innerHTML = `
-
+
${[ - ["P0 客户数", m.p0_customers, "projects"], - ["跟进中销售机会", m.active_sales, "projects"], - ["已签约执行项目", m.execution_projects, "projects"], - ["有风险项目", m.risk_projects, "projects"], - ["本月收入", money(m.monthly_revenue), "finance"], + ["重点项目", m.total_projects, "projects"], + ["业务方案", m.total_proposals, "proposals"], + ["产品版本", m.total_products, "products"], + ["本月确收", money(m.monthly_revenue), "finance"], + ["本月毛利", money(m.monthly_gross || m.monthly_net_profit), "finance"], ["本月净利", money(m.monthly_net_profit), "finance"], - ["即将上线版本", m.upcoming_products, "products"], - ["已签约未执行", money(m.signed_not_executed), "finance"], ].map(([label, value, tab]) => ``).join("")}
${tblCard("合同金额", rows1)}${tblCard("确收金额", rows2)}${tblCard("确收毛利", rows3)}