diff --git a/static/modules/finance.js b/static/modules/finance.js index f28ed1a..40cef25 100644 --- a/static/modules/finance.js +++ b/static/modules/finance.js @@ -1,5 +1,7 @@ // finance.js — 经营管理(财务)模块 +const moneyInt = (v) => `${Math.round(Number(v || 0)).toLocaleString("zh-CN")} 元`; + function renderFinance() { const pfs = state.data.projectFinances || []; const ops = state.data.operations || []; @@ -102,10 +104,10 @@ function renderFinance() { document.querySelector("#finance").innerHTML = `
- ${[["已签项目","" + signed.length,"file-sign"],["签约金额",money(sumSign),"coins"],["流程项目","" + inContract.length,"file-clock"],["流程金额",money(sumContract),"clock"],["待签项目","" + pending.length,"file-question"],["待签金额",money(sumPending),"hourglass"]].map(([l,v,icon]) => `
${l}${v}
`).join("")} + ${[["已签项目","" + signed.length,"file-check-2"],["签约金额",moneyInt(sumSign),"coins"],["流程项目","" + inContract.length,"file-clock"],["流程金额",moneyInt(sumContract),"clock"],["待签项目","" + pending.length,"file-question"],["待签金额",moneyInt(sumPending),"hourglass"]].map(([l,v,icon]) => `
${l}${v}
`).join("")}
- ${[["本月确收",money(thisMonthRev),"trending-up"],["本月毛利",money(thisMonthGross),"percent"],["本月回款",money(monthPayment),"wallet"],["本月费用",money(monthCost),"receipt"],["本月现金流",money(monthCashflow),"repeat"]].map(([l,v,icon]) => `
${l}${v}
`).join("")} + ${[["本月确收",moneyInt(thisMonthRev),"trending-up"],["本月毛利",moneyInt(thisMonthGross),"percent"],["本月回款",moneyInt(monthPayment),"wallet"],["本月费用",moneyInt(monthCost),"receipt"],["本月现金流",moneyInt(monthCashflow),"repeat"]].map(([l,v,icon]) => `
${l}${v}
`).join("")}