diff --git a/src/pages/finance/FinanceOverview.tsx b/src/pages/finance/FinanceOverview.tsx index ef58b1b..f248aa5 100644 --- a/src/pages/finance/FinanceOverview.tsx +++ b/src/pages/finance/FinanceOverview.tsx @@ -229,7 +229,8 @@ const StatCard: React.FC<{ icon: React.ElementType; title: string; value: string; - hint: string; + /** 补充说明(2026-10-19 起经营总览不再展示小字 ⇒ 不传即不渲染) */ + hint?: string; onActivate?: () => void; ariaLabel?: string; }> = ({ icon: Icon, title, value, hint, onActivate, ariaLabel }) => ( @@ -243,7 +244,7 @@ const StatCard: React.FC<{

{title}

{value}

-

{hint}

+ {hint ?

{hint}

: null}
@@ -285,7 +286,6 @@ export const FinanceOverview: React.FC = () => { customerCode: String(searchParams.get('customer_code') || '').trim(), }); const [rangeError, setRangeError] = useState(''); - const dateFieldShortLabel = t(`finance.dateField.${dateField}`); useLegacyTabRedirect('/finance', { margin: 'margin' }); const tabSegment = useTabChildSegment('/finance'); @@ -424,10 +424,6 @@ export const FinanceOverview: React.FC = () => { applyToolbarRange(null); }; - const rangeLabel = stats.dateFrom && stats.dateTo - ? `${stats.dateFrom} ~ ${stats.dateTo}` - : t('finance.range.recentDays', { days: stats.windowDays }); - const handleRenameCostBucket = async (bucket: FinanceStats['costBuckets'][number]) => { if (!bucket.catKey) { notify(t('finance.rename.unsupported')); @@ -455,12 +451,6 @@ export const FinanceOverview: React.FC = () => { } }; - const hasAnyData = - stats.weekRevenue > 0 || - stats.receivableTotal > 0 || - stats.payableTotal > 0 || - stats.costBuckets.length > 0; - const activeDateFrom = dateFrom || stats.dateFrom || appliedRange.dateFrom; const activeDateTo = dateTo || stats.dateTo || appliedRange.dateTo; @@ -675,23 +665,12 @@ export const FinanceOverview: React.FC = () => { ) ) : ( <> - {!loading && !hasAnyData && ( -
- {t('finance.empty')} -
- )} -
navigate(marginNavigateUrl())} icon={DollarSign} title={t('finance.kpi.margin')} value={`¥${formatMoney(stats.weekGross)}`} - hint={ - stats.weekRevenue > 0 - ? t('finance.kpi.marginHint', { pct: stats.grossMarginPct.toFixed(1) }) - : t('finance.kpi.noOrders', { range: rangeLabel }) - } ariaLabel={t('finance.kpi.openMargin')} /> { icon={CreditCard} title={t('finance.kpi.revenue')} value={`¥${formatMoney(stats.weekRevenue)}`} - hint={ - stats.receivablePendingCount > 0 - ? t('finance.kpi.revenueHintPending', { - dateField: dateFieldShortLabel, - amount: formatMoney(stats.receivableTotal), - count: stats.receivablePendingCount, - }) - : t('finance.kpi.revenueHint', { - dateField: dateFieldShortLabel, - amount: formatMoney(stats.receivableTotal), - }) - } ariaLabel={t('finance.kpi.openReceivable')} /> { icon={TrendingUp} title={t('finance.kpi.allCost')} value={`¥${formatMoney(stats.periodAllCost)}`} - hint={t('finance.kpi.allCostHint', { - dateField: dateFieldShortLabel, - range: rangeLabel, - })} ariaLabel={t('finance.kpi.openCosts')} /> {stats.customerRebateCost > 0 && ( @@ -738,7 +701,6 @@ export const FinanceOverview: React.FC = () => { icon={Percent} title={t('finance.kpi.customerRebate')} value={`¥${formatMoney(stats.customerRebateCost)}`} - hint="" ariaLabel={t('finance.kpi.openCosts')} /> )} @@ -747,14 +709,6 @@ export const FinanceOverview: React.FC = () => { icon={PieChart} title={t('finance.kpi.netProfit')} value={`¥${formatMoney(stats.netProfit)}`} - hint={ - stats.weekRevenue > 0 - ? t('finance.kpi.netProfitHint', { - pct: stats.netProfitMarginPct.toFixed(1), - formula: stats.netProfitFormula, - }) - : t('finance.kpi.netProfitEmpty') - } ariaLabel={t('finance.kpi.openNetProfit')} />
@@ -773,7 +727,6 @@ export const FinanceOverview: React.FC = () => {

{mod.label}

-

{mod.description}

@@ -788,13 +741,6 @@ export const FinanceOverview: React.FC = () => {

{t('finance.structure.title')}

-

- {t('finance.structure.hint', { dateField: dateFieldShortLabel, range: rangeLabel })} - {stats.periodAllCost > 0 - ? t('finance.structure.total', { amount: formatMoney(stats.periodAllCost) }) - : ''} - {t('finance.structure.renameHint')} -

= ({ ); const cycleCode = React.useMemo(() => dateRangeToCycleCode(dateFrom, dateTo), [dateFrom, dateTo]); const rangeLabel = React.useMemo(() => `${dateFrom} ~ ${dateTo}`, [dateFrom, dateTo]); - const dateFieldShortLabel = - dateField === 'created_at' - ? t('finance.cost.date.order') - : dateField === 'inbound' - ? t('finance.cost.date.inbound') - : t('finance.cost.date.delivery'); // 从财务概览等带 date_from/date_to/date_field 跳入时,仅随 URL 同步(避免与本地改区间竞态) React.useEffect(() => { @@ -2467,9 +2461,6 @@ export const CostAccountingPanel: React.FC = ({ maximumFractionDigits: 2, })}

-

- {t('finance.cost.kpi.totalCostHint', { dateField: dateFieldShortLabel, range: rangeLabel, count: costDetails.length })} -

= ({ maximumFractionDigits: 2, })}

-

- {structureTotal > 0 && overviewLedgerPurchase > 0 - ? t('finance.cost.kpi.purchaseShare', { pct: ((overviewLedgerPurchase / structureTotal) * 100).toFixed(1) }) - : ''} - {t('finance.cost.kpi.purchaseHint')} -

= ({ : safeAmount(aggregation?.indirect_fixed, 0) ).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}

-

- {structureTotal > 0 && fixedCostStructureAmount > 0 - ? t('finance.cost.kpi.purchaseShare', { pct: ((fixedCostStructureAmount / structureTotal) * 100).toFixed(1) }) - : ''} - {t('finance.cost.kpi.fixedHint')} -

{aggregation ? ( = ({

{aggregation.negative_margin_orders}

-

{t('finance.cost.kpi.negMarginHint')}

) : null}
@@ -2539,9 +2517,6 @@ export const CostAccountingPanel: React.FC = ({ {t('finance.cost.structure.title')} -

- {t('finance.cost.structure.hint')} -

{costStructureEntries.length > 0 ? (
{costStructureEntries.map((entry) => { @@ -2618,14 +2593,6 @@ export const CostAccountingPanel: React.FC = ({ {t('finance.cost.rank.title')} -

- {t('finance.cost.rank.hint')} - {skuRankExpanded - ? t('finance.cost.rank.expanded', { count: skuCostDetails.length }) - : t('finance.cost.rank.collapsed', { - dir: skuRankSortDir === 'desc' ? t('finance.cost.rank.dirHigh') : t('finance.cost.rank.dirLow'), - })} -

{t('finance.cost.free.countTitle')}

{freeCostStatusCounts.posted}

-

{t('finance.cost.free.countHint')}

{/* 付款拆分(同一时间范围/筛选口径,来自后端 payment_amounts):只是把已入账拆成已付款/未付款笔数 */}
@@ -2927,7 +2892,6 @@ export const CostAccountingPanel: React.FC = ({

{freeCostStatusTabTitle(freeCostStatusFilter, t)}

-

{t('finance.cost.free.byEntryDay')}

@@ -3422,9 +3386,6 @@ export const CostAccountingPanel: React.FC = ({ > {marginSummary.aggregation.gross_margin_pct.toFixed(1)}%

-

- {t('finance.cost.kpi.negMarginCount', { count: marginSummary.aggregation.negative_margin_orders })} -

@@ -3560,9 +3521,6 @@ export const CostAccountingPanel: React.FC = ({ {dim.label} ))} -

- {t('finance.cost.margin.detailHint')} -

@@ -4022,9 +3980,6 @@ export const CostAccountingPanel: React.FC = ({ {activeTab === 'sku' && (
-

- {t('finance.cost.sku.intro')} -

diff --git a/src/pages/finance/costAccounting/CostRootCausePanel.tsx b/src/pages/finance/costAccounting/CostRootCausePanel.tsx index 570fca9..10ee1e8 100644 --- a/src/pages/finance/costAccounting/CostRootCausePanel.tsx +++ b/src/pages/finance/costAccounting/CostRootCausePanel.tsx @@ -99,9 +99,6 @@ export const CostRootCausePanel: React.FC = ({

{t('finance.cost.root.title')}

-

- {t('finance.cost.root.subtitle')} -