From 43be043dc3871bbf938fb952f3a6ff4a7bf708ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?walkdoggo=2Eyeh=5F=E8=91=89=E5=82=B3=E8=80=80?= Date: Wed, 25 Nov 2026 08:08:34 +0000 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=95=B7=E9=A0=81=E9=A1=AF=E7=A4=BA?= =?UTF-8?q?=E4=BA=BA=E5=93=A1=E7=95=B0=E5=8B=95=E5=8D=80=E5=A1=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01VDJVpPiGiWjJP1yVvvGhzQ --- scope-ui.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scope-ui.js b/scope-ui.js index e23b301..b295f44 100644 --- a/scope-ui.js +++ b/scope-ui.js @@ -161,6 +161,14 @@ // 區塊:沿用主看板的底色(CODA 藍、發票琥珀、組別綠灰),前後深淺交錯。 const block = (kind, title, body) => `
${title}
${body}
`; + + // 人員異動:只給姓名和生效月份。不分離職或轉調,也不說轉調去哪,部長只需要知道編制什麼時候變。 + function changesTable(list) { + const rows = list.map(c => `${esc(c.name)}${c.kind === 'leave' ? '離開本部門' : '加入本部門'}${esc(c.month)}`).join(''); + return `
${rows}
姓名異動生效月份
+
已經排定、HR 還沒更新的異動。上面的數字已經照這些算了。
`; + } + function deptCard(d, data, simOpen) { const showCost = d.groups.some(g => typeof g.totalCost === 'number'); const groupsRows = d.groups.map(g => g.missing ? `${esc(g.group)}目前沒有資料` : @@ -177,6 +185,7 @@ ${kpi(d.multiplier?.company ? `倍率(${esc(d.multiplier.company)}全公司)` : '部門倍率', times(d.multiplier?.value), '部門內部成本(P+A+G,不含外包)÷ A 成本 × 人薪倍率')} `)} ${d.invoice?.indicators ? block('inv2', '發票佔比怎麼來的', indicatorsBlock(d)) : ''} + ${d.changes && d.changes.length ? block('chg', '人員異動', changesTable(d.changes)) : ''} ${block('people', '人力', `
${d.headcount ? kpi('人數', `${d.headcount.total} 人`, headcountText(d.headcount)) : ''} ${typeof d.totalCost === 'number' ? kpi('部門總人力成本(年)', money(d.totalCost), '正職年薪 × 人薪倍率 + 外包 × 外包倍率,不含實習生') : ''}