fix: 修复利润机会池播报文案口径错误和承诺值硬编码
问题1(口径错误): - BusinessReportDialog 用整体贡献率(10.96%)对比标准门店贡献率目标(10%) - 10.96%→10% 是下降不是提升,逻辑矛盾 - 移除错误的贡献率对比,与 BossPage 口径一致 问题2(承诺值硬编码): - "30天承诺值≥150万元" 硬编码,但 totalOpportunity 仅15.3万,差10倍 - 改为动态计算:承诺值 = 理论月度机会 × 80%(考虑项目重叠和促销弹性) - 同步修复 BossPage.tsx 中相同问题 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -324,7 +324,7 @@ export function BossPage() {
|
||||
|
||||
{/* ②b 利润机会池 */}
|
||||
{profitOpp.length > 0 && (
|
||||
<CollapsibleSection title="利润机会池" subtitle={`理论月度机会合计 ${formatCurrency(totalOpportunity)} · 30天承诺值 ≥ 150万元 · 点击展开详情`}>
|
||||
<CollapsibleSection title="利润机会池" subtitle={`理论月度机会合计 ${formatCurrency(totalOpportunity)} · 30天承诺值 ≥ ${formatCurrency(Math.max(Math.round(totalOpportunity * 0.8), 0))} · 点击展开详情`}>
|
||||
<div className="space-y-2">
|
||||
{[...profitOpp].sort((a: any, b: any) => Number(b.opportunity || 0) - Number(a.opportunity || 0)).map((o: any, i: number) => {
|
||||
const opp = Number(o.opportunity || 0)
|
||||
@@ -341,8 +341,7 @@ export function BossPage() {
|
||||
<span className="text-sm font-medium">30天整改目标</span>
|
||||
</div>
|
||||
<p className="mt-1 text-xs text-muted-foreground">
|
||||
理论月度机会合计 {formatCurrency(totalOpportunity)},考虑项目重叠和促销弹性,经营承诺值取 <span className="font-bold text-purple-600">≥ 150万元</span>。
|
||||
标准门店贡献率目标从 7.29% 提升至约 10%。
|
||||
理论月度机会合计 {formatCurrency(totalOpportunity)},考虑项目重叠和促销弹性,经营承诺值取 <span className="font-bold text-purple-600">≥ {formatCurrency(Math.max(Math.round(totalOpportunity * 0.8), 0))}</span>。
|
||||
</p>
|
||||
</div>
|
||||
</CollapsibleSection>
|
||||
|
||||
Reference in New Issue
Block a user