|
|
|
@@ -115,16 +115,14 @@ function renderHome() {
|
|
|
|
const tblCard = (title, rows) => card(`<h3 class="text-sm font-bold text-slate-700 mb-3">${title}</h3><table class="w-full text-sm"><tbody>${rows.map(([label, value]) => `<tr class="border-b border-slate-100 last:border-0"><td class="py-2 pr-4 text-slate-500">${label}</td><td class="py-2 text-right font-semibold text-slate-800">${value}</td></tr>`).join("")}</tbody></table>`, "p-4");
|
|
|
|
const tblCard = (title, rows) => card(`<h3 class="text-sm font-bold text-slate-700 mb-3">${title}</h3><table class="w-full text-sm"><tbody>${rows.map(([label, value]) => `<tr class="border-b border-slate-100 last:border-0"><td class="py-2 pr-4 text-slate-500">${label}</td><td class="py-2 text-right font-semibold text-slate-800">${value}</td></tr>`).join("")}</tbody></table>`, "p-4");
|
|
|
|
document.querySelector("#home").innerHTML = `
|
|
|
|
document.querySelector("#home").innerHTML = `
|
|
|
|
<div class="grid gap-5">
|
|
|
|
<div class="grid gap-5">
|
|
|
|
<div class="grid grid-cols-4 gap-3">
|
|
|
|
<div class="grid grid-cols-6 gap-3">
|
|
|
|
${[
|
|
|
|
${[
|
|
|
|
["P0 客户数", m.p0_customers, "projects"],
|
|
|
|
["重点项目", m.total_projects, "projects"],
|
|
|
|
["跟进中销售机会", m.active_sales, "projects"],
|
|
|
|
["业务方案", m.total_proposals, "proposals"],
|
|
|
|
["已签约执行项目", m.execution_projects, "projects"],
|
|
|
|
["产品版本", m.total_products, "products"],
|
|
|
|
["有风险项目", m.risk_projects, "projects"],
|
|
|
|
["本月确收", money(m.monthly_revenue), "finance"],
|
|
|
|
["本月收入", money(m.monthly_revenue), "finance"],
|
|
|
|
["本月毛利", money(m.monthly_gross || m.monthly_net_profit), "finance"],
|
|
|
|
["本月净利", money(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]) => `<button class="metric-card" onclick="switchTab('${tab}')"><span class="flex items-center gap-2 text-xs text-slate-500"><i data-lucide="gauge"></i>${label}</span><strong class="mt-2 block text-2xl">${value}</strong></button>`).join("")}
|
|
|
|
].map(([label, value, tab]) => `<button class="metric-card" onclick="switchTab('${tab}')"><span class="flex items-center gap-2 text-xs text-slate-500"><i data-lucide="gauge"></i>${label}</span><strong class="mt-2 block text-2xl">${value}</strong></button>`).join("")}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="grid grid-cols-3 gap-5">${tblCard("合同金额", rows1)}${tblCard("确收金额", rows2)}${tblCard("确收毛利", rows3)}</div>
|
|
|
|
<div class="grid grid-cols-3 gap-5">${tblCard("合同金额", rows1)}${tblCard("确收金额", rows2)}${tblCard("确收毛利", rows3)}</div>
|
|
|
|
|