diff --git a/data.json b/data.json index 37d91c8..429929f 100644 --- a/data.json +++ b/data.json @@ -1,6 +1,6 @@ { "title": "King · 当月 Campaign 表现", - "generated_at": "2026-08-27T15:26:33+08:00", + "generated_at": "2026-08-27T15:50:27+08:00", "timezone": "Asia/Shanghai", "period": { "start": "2026-08-01", @@ -29,7 +29,7 @@ "completion": { "revenue": 27.47, "gp": 19.52, - "gp_rate": 71.05 + "gp_rate": null }, "time_progress_percent": 83.87, "month_days": 31, @@ -1196,6 +1196,6 @@ "performance_cost": "Cost 取 Sands Report 2.0 的 Cost 合计,需本地抓取", "performance_gp": "GP = Revenue − Cost;GP rate = GP ÷ Revenue × 100", "performance_target": "Target 来自 Oversea FY2627 Monthly FFR 表 King 行", - "performance_completion": "完成率 = 实际 ÷ Target × 100;Target 为整月目标" + "performance_completion": "完成率 = 实际 ÷ Target × 100,仅用于 Revenue 与 GP;GP rate 为比率,只看与目标的百分点差距" } } \ No newline at end of file diff --git a/index.html b/index.html index f3d9530..2c98928 100644 --- a/index.html +++ b/index.html @@ -232,10 +232,17 @@ function renderPerformance(){ const color=diff>=0?'#23a673':'#e4568b'; return `${diff>=0?'+':''}${num(diff,2)} pt`; }; + /* 比率不做完成率,只看与目标的百分点差距 */ + const ratePoints=(actualRate,targetRate)=>{ + if(!ok(actualRate)||!ok(targetRate))return '—'; + const diff=Number(actualRate)-Number(targetRate); + const color=diff>=0?'#23a673':'#e4568b'; + return `${diff>=0?'+':''}${num(diff,2)} pt`; + }; const rows=[ ['Revenue',usd(target.revenue),usd(actual.revenue),pct(done.revenue),gap(done.revenue)], ['GP',usd(target.gp),usd(actual.gp),pct(done.gp),gap(done.gp)], - ['GP rate',pct(target.gp_rate),pct(actual.gp_rate),pct(done.gp_rate),'—'] + ['GP rate',pct(target.gp_rate),pct(actual.gp_rate),'—',ratePoints(actual.gp_rate,target.gp_rate)] ]; $('perfRows').innerHTML=rows.map(row=>`