diff --git a/client/src/pages/StoreDetailPage.tsx b/client/src/pages/StoreDetailPage.tsx index 0b8610a..90f907f 100644 --- a/client/src/pages/StoreDetailPage.tsx +++ b/client/src/pages/StoreDetailPage.tsx @@ -107,6 +107,25 @@ export function StoreDetailPage() { const quadrant = action?.management_quadrant || '' const quadrantInfo = quadrantDesc[quadrant] + // 公司均值 + const companyAvg = { daily_rev: 20144, bill: 36.8, discount: 20.5, margin: 71.5, member: 15.9, repeat: 37.0, delivery: 36.1, combo: 20.6, items: 4.05 } + + // 偏差项明细 + const deviations: { label: string; store: number; company: number; unit: string; good: 'high' | 'low' }[] = [ + { label: '日均营收', store: Number(risk?.avg_daily_received) || 0, company: companyAvg.daily_rev, unit: '元', good: 'high' }, + { label: '客单价', store: Number(risk?.avg_bill_value) || 0, company: companyAvg.bill, unit: '元', good: 'high' }, + { label: '优惠率', store: Number(risk?.discount_rate_pct) || 0, company: companyAvg.discount, unit: '%', good: 'low' }, + { label: '毛利率', store: Number(risk?.theoretical_margin_pct) || 0, company: companyAvg.margin, unit: '%', good: 'high' }, + { label: '会员占比', store: Number(risk?.member_bill_share_pct) || 0, company: companyAvg.member, unit: '%', good: 'high' }, + { label: '复购率', store: Number(action?.repeat_rate_pct) || 0, company: companyAvg.repeat, unit: '%', good: 'high' }, + { label: '外卖占比', store: Number(action?.delivery_bill_share_pct) || 0, company: companyAvg.delivery, unit: '%', good: 'low' }, + { label: '成本差异率', store: Number(action?.variance_to_theoretical_pct) || 0, company: 20, unit: '%', good: 'low' }, + ] + const problemDeviations = deviations.filter(d => { + const diff = d.store - d.company + return d.good === 'high' ? diff < 0 : diff > 0 + }) + return (

{quadrantInfo}

+
+

象限定位依据:

+
+ 日均营收 + {Number(risk?.avg_daily_received || 0).toFixed(0)}元 vs 中位数 18642元 +
+
+ 毛利率 + {Number(risk?.theoretical_margin_pct || 0).toFixed(1)}% vs 中位数 70.0% +
+ {action?.benchmark_score && ( +
+ 综合基准分 + {Number(action.benchmark_score).toFixed(1)}分 +
+ )} +
)} @@ -158,6 +209,11 @@ export function StoreDetailPage() { 行动优先级:{action.action_priority} {action.problem_combination && 问题:{action.problem_combination}} {action.business_type && {action.business_type}} + {action?.variance_level && ( + + 成本差异:{action.variance_to_theoretical_pct}% ({action.variance_level}) + + )} )}