feat(cost-center): 第三方卡券渠道归一与采购价配置

- 归一新增 tpv:<SKU> 直达,卡券单无需手工映射
- 成本配置/总览/异常支持 third_party_voucher 与 archived 维度
- 新增卡券采购价面板,写入 sys_third_party_voucher_cost
- 修正 man: 商品改价误用不存在的 sys_manual_cost
This commit is contained in:
yml2213
2026-10-31 19:52:32 +08:00
parent 0ce3c8fa97
commit f4e0c47744
16 changed files with 264 additions and 40 deletions
@@ -48,6 +48,11 @@ const SCOPES: Array<{ key: CostScope; label: string; hint: string }> = [
label: '接单平台',
hint: '需要打手接单履约的商品;成本以打手报酬为主,按接单模板配价。',
},
{
key: 'third_party_voucher',
label: '第三方卡券',
hint: '只统计渠道:不建任务、不发领取页;成本按商品采购价版本核算。',
},
{
key: 'manual',
label: '人工客服',
@@ -104,7 +109,9 @@ export default function CostCenterShell() {
const scopeHint = SCOPES.find((item) => item.key === scope)?.hint ?? ''
const productSourceFilter = scope === 'all' ? undefined : scope
const fulfillmentModeFilter =
scope === 'all' ? undefined : (scope as 'affiliate_dash' | 'work_order' | 'manual')
scope === 'all'
? undefined
: (scope as 'affiliate_dash' | 'work_order' | 'third_party_voucher' | 'manual')
const mappingsApplicable = scope === 'all' || scope === 'work_order'
return (