style(成本排行): 对齐报价来源行与主系统展示
报价单标签弱化、销售价与单位成本用分隔符、毛利率只保留一处;仍不含二期铅笔改价。
This commit is contained in:
@@ -27,7 +27,7 @@ describe('成本排行只读报价单展示', () => {
|
||||
expect(types).toContain('sale_price_targets');
|
||||
expect(page).toContain('quoteMin');
|
||||
expect(page).toContain('quoteMax');
|
||||
expect(page).toContain("t('finance.cost.rank.sourceQuote'");
|
||||
expect(page).toContain("t('finance.cost.rank.sourceQuoteLabel'");
|
||||
expect(page).toContain("target.closest('input, button, a, label')");
|
||||
expect(page).toContain("setExpandedSkuCode((cur) => (cur === sku.sku_code ? null : sku.sku_code))");
|
||||
expect(page).not.toContain("t('finance.cost.rank.grossAmt')\n }`}");
|
||||
|
||||
@@ -147,6 +147,7 @@ export const finance: MessageDict = {
|
||||
'cost.rank.sales': 'Sales ¥{amount}',
|
||||
'cost.rank.unitCost': 'Unit cost ¥{amount}',
|
||||
'cost.rank.marginPct': 'Margin {pct}%',
|
||||
'cost.rank.sourceQuoteLabel': 'Quote',
|
||||
'cost.rank.sourceQuote': 'Quote sale price {price}',
|
||||
'cost.rank.quoteSheets': 'Quote sheets',
|
||||
'cost.rank.quoteNearSale': ' (quote cost ≈ sale price)',
|
||||
|
||||
@@ -147,6 +147,7 @@ export const finance: MessageDict = {
|
||||
'cost.rank.sales': 'Jual ¥{amount}',
|
||||
'cost.rank.unitCost': 'Biaya satuan ¥{amount}',
|
||||
'cost.rank.marginPct': 'Margin {pct}%',
|
||||
'cost.rank.sourceQuoteLabel': 'Penawaran',
|
||||
'cost.rank.sourceQuote': 'Harga jual penawaran {price}',
|
||||
'cost.rank.quoteSheets': 'Lembar penawaran',
|
||||
'cost.rank.quoteNearSale': ' (biaya kuota ≈ harga jual)',
|
||||
|
||||
@@ -147,6 +147,7 @@ export const finance: MessageDict = {
|
||||
'cost.rank.sales': '销售 ¥{amount}',
|
||||
'cost.rank.unitCost': '单位成本 ¥{amount}',
|
||||
'cost.rank.marginPct': '毛利率 {pct}%',
|
||||
'cost.rank.sourceQuoteLabel': '报价单',
|
||||
'cost.rank.sourceQuote': '报价单 销售价 {price}',
|
||||
'cost.rank.quoteSheets': '报价单',
|
||||
'cost.rank.quoteNearSale': '(报价成本≈售价)',
|
||||
|
||||
@@ -2748,16 +2748,20 @@ export const CostAccountingPanel: React.FC<CostAccountingPanelProps> = ({
|
||||
</div>
|
||||
<div className="app-foreground-muted flex flex-wrap items-center gap-x-4 gap-y-1 text-xs mt-1">
|
||||
{quoteRange ? (
|
||||
<span className="app-foreground">
|
||||
{t('finance.cost.rank.sourceQuote', { price: quoteRange })}
|
||||
</span>
|
||||
<>
|
||||
<span className="app-foreground-muted text-[10px] leading-none">
|
||||
{t('finance.cost.rank.sourceQuoteLabel')}
|
||||
</span>
|
||||
<span>{t('finance.cost.col.salePrice')} {quoteRange}</span>
|
||||
<span>· {t('finance.cost.rank.unitCost', { amount: rankUnitCost.toFixed(2) })}</span>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<span>{t('finance.cost.rank.purchase', { amount: rankPurchaseAmount.toLocaleString() })}</span>
|
||||
<span>{t('finance.cost.rank.sales', { amount: sku.sales_amount.toLocaleString() })}</span>
|
||||
<span>{t('finance.cost.rank.unitCost', { amount: rankUnitCost.toFixed(2) })}</span>
|
||||
</>
|
||||
)}
|
||||
<span>{t('finance.cost.rank.unitCost', { amount: rankUnitCost.toFixed(2) })}</span>
|
||||
<span className="app-foreground font-medium">
|
||||
{t('finance.cost.rank.marginPct', { pct: rankMarginPct.toFixed(1) })}
|
||||
{marginApproxZero ? t('finance.cost.rank.quoteNearSale') : ''}
|
||||
|
||||
Reference in New Issue
Block a user