From f619ed34a7799a9117b0d4efcf3c0c11e136a9c4 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 13 Jul 2026 16:34:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A0=B7=E5=BC=8F=E7=BB=9F=E4=B8=80=20?= =?UTF-8?q?+=20=E6=9C=88=E4=BB=BD=E4=B8=8B=E6=8B=89=E6=A1=86=E6=89=A9?= =?UTF-8?q?=E5=B1=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 品牌色统一为天机阁标准 #4A6CF7,tailwind.config 扩展完整色阶 - styles.css 新增 :root CSS 变量层(brand 色阶、语义色、圆角/阴影 token) - 全项目 hex/Tailwind 类统一替换为 brand-* CSS 变量(115 处引用) - border-radius/box-shadow 统一使用 token 变量 - 预留 :root[data-theme="dark"] 暗色主题变量占位 - 所有月份下拉框范围从 3 年/15 月扩展至 2020-2027(8 年 96 月) --- static/modules/admin.js | 2 +- static/modules/drawer.js | 2 +- static/modules/finance.js | 53 ++++++----- static/modules/home.js | 4 +- static/modules/overview_finance.js | 6 +- static/modules/overview_plan.js | 6 +- static/modules/performance.js | 6 +- static/modules/plan.js | 53 ++++++----- static/modules/plan_expense.js | 8 +- static/modules/products.js | 8 +- static/modules/projects.js | 10 +- static/modules/proposals.js | 4 +- static/modules/utils.js | 11 +-- static/styles.css | 143 +++++++++++++++++++---------- templates/index.html | 42 +++++++-- 15 files changed, 209 insertions(+), 149 deletions(-) diff --git a/static/modules/admin.js b/static/modules/admin.js index a7ec86b..3576652 100644 --- a/static/modules/admin.js +++ b/static/modules/admin.js @@ -50,7 +50,7 @@ async function loadUserList() { ${esc(u.username)} ${esc(u.display_name)} - ${u.role === 'admin' ? '管理员' : 'OPC负责人'} + ${u.role === 'admin' ? '管理员' : 'OPC负责人'} ${(u.tenants || []).map(t => `${esc(t)}`).join('') || ''} diff --git a/static/modules/drawer.js b/static/modules/drawer.js index f3cc60a..01cfb4d 100644 --- a/static/modules/drawer.js +++ b/static/modules/drawer.js @@ -70,7 +70,7 @@ function openDrawer(resource, id) { ${resource === "proposals" ? `

附件

${fileGroup("proposal", item.id, "", "附件", item.files || [])}
` : ""} ${followupTarget ? `

活动 / 跟进

-
${(item.followups || []).map((f) => `
${esc(f.follower)} · ${esc(f.follow_up_method)}${esc(f.followed_at)}
${f.next_action ? `

下一步:${text(f.next_action)}

` : ""}
`).join("")}
+
${(item.followups || []).map((f) => `
${esc(f.follower)} · ${esc(f.follow_up_method)}${esc(f.followed_at)}
${f.next_action ? `

下一步:${text(f.next_action)}

` : ""}
`).join("")}
diff --git a/static/modules/finance.js b/static/modules/finance.js index 1e7863a..eae9f68 100644 --- a/static/modules/finance.js +++ b/static/modules/finance.js @@ -78,7 +78,7 @@ function renderFinance() { if (isRevView) { const rev = b.rev || 0; const gross = b.gross || 0; - return `${rev ? money(rev) : '—'}
${gross ? money(gross) : '—'}`; + return `${rev ? money(rev) : '—'}
${gross ? money(gross) : '—'}`; } else { const payment = b.payment || 0; const cost = b.cost || 0; @@ -89,7 +89,7 @@ function renderFinance() { if (isRevView) { const totalRev = pf.total_rev || 0; const totalGross = pf.total_gross || 0; - return `${totalRev ? money(totalRev) : '—'}
${totalGross ? money(totalGross) : '—'}`; + return `${totalRev ? money(totalRev) : '—'}
${totalGross ? money(totalGross) : '—'}`; } else { let totalPayment = 0, totalCost = 0; try { JSON.parse(pf.budget_data || "[]").forEach(b => { totalPayment += parseFloat(b.payment||0)||0; totalCost += parseFloat(b.cost||0)||0; }); } catch (e) {} @@ -97,7 +97,7 @@ function renderFinance() { } })(); const sm = pf.sign_month || ""; - const signMonthCell = `${sm || '—'}`; + const signMonthCell = `${sm || '—'}`; return `${esc(pf.customer_name)}${signMonthCell}${money(pf.sign_amount)}${mCols}${totalCol}`; }; @@ -113,7 +113,7 @@ function renderFinance() { const activeQ = state.finQuarter !== undefined ? state.finQuarter : Math.floor(nowD.getMonth() / 3); const activeMonths = qMonths[activeQ]; const yearOpts = [2024,2025,2026,2027]; - const finHeaderBase = `
年份:||季度:${qLabels.map((q,i) => ``).join('')}|月度:${activeMonths.map(m => { const ms = `${state.finYear}-${String(m).padStart(2,'0')}`; return ``; }).join('')}
`; + const finHeaderBase = `
年份:||季度:${qLabels.map((q,i) => ``).join('')}|月度:${activeMonths.map(m => { const ms = `${state.finYear}-${String(m).padStart(2,'0')}`; return ``; }).join('')}
`; const finAddBtn = ``; const isOverviewMode = false; @@ -158,7 +158,7 @@ function renderFinance() {
-
业务类型
${fmTypes.map(t => ``).join("")}
+
业务类型
${fmTypes.map(t => ``).join("")}
diff --git a/static/modules/plan.js b/static/modules/plan.js index 1d09786..e530739 100644 --- a/static/modules/plan.js +++ b/static/modules/plan.js @@ -76,7 +76,7 @@ function renderPlan() { if (isRevView) { const rev = b.rev || 0; const gross = b.gross || 0; - return `${rev ? money(rev) : '—'}
${gross ? money(gross) : '—'}`; + return `${rev ? money(rev) : '—'}
${gross ? money(gross) : '—'}`; } else { const payment = b.payment || 0; const cost = b.cost || 0; @@ -87,7 +87,7 @@ function renderPlan() { if (isRevView) { const totalRev = pf.total_rev || 0; const totalGross = pf.total_gross || 0; - return `${totalRev ? money(totalRev) : '—'}
${totalGross ? money(totalGross) : '—'}`; + return `${totalRev ? money(totalRev) : '—'}
${totalGross ? money(totalGross) : '—'}`; } else { let totalPayment = 0, totalCost = 0; try { JSON.parse(pf.budget_data || "[]").forEach(b => { totalPayment += parseFloat(b.payment||0)||0; totalCost += parseFloat(b.cost||0)||0; }); } catch (e) {} @@ -95,7 +95,7 @@ function renderPlan() { } })(); const sm = pf.sign_month || ""; - const signMonthCell = `${sm || '—'}`; + const signMonthCell = `${sm || '—'}`; return `${esc(pf.customer_name)}${esc(pf.weight || "20%")}${esc(pf.project_type || "待签约")}${signMonthCell}${money(pf.sign_amount)}${mCols}${totalCol}`; }; @@ -111,7 +111,7 @@ function renderPlan() { const activeQ = state.planQuarter !== undefined ? state.planQuarter : Math.floor(nowD.getMonth() / 3); const activeMonths = qMonths[activeQ]; const yearOpts = [2024,2025,2026,2027]; - const finHeaderBase = `
|年份:||季度:${qLabels.map((q,i) => ``).join('')}|月度:${activeMonths.map(m => { const ms = `${state.planYear}-${String(m).padStart(2,'0')}`; return ``; }).join('')}
`; + const finHeaderBase = `
|年份:||季度:${qLabels.map((q,i) => ``).join('')}|月度:${activeMonths.map(m => { const ms = `${state.planYear}-${String(m).padStart(2,'0')}`; return ``; }).join('')}
`; const finAddBtn = ``; const isOverviewMode = false; @@ -157,7 +157,7 @@ function renderPlan() {
-
业务类型
${fmTypes.map(t => ``).join("")}
+
业务类型
${fmTypes.map(t => ``).join("")}