diff --git a/apps/backend/src/services/cost-center/product-catalog-service.ts b/apps/backend/src/services/cost-center/product-catalog-service.ts index c0161286..17949039 100644 --- a/apps/backend/src/services/cost-center/product-catalog-service.ts +++ b/apps/backend/src/services/cost-center/product-catalog-service.ts @@ -655,7 +655,9 @@ export async function getAdminChannelMappingDiagnostics(payload: JsonObject = {} } } - const modes = channel ? [channel] : ['work_order', 'affiliate_dash', 'legacy_platform', 'manual'] + const modes = channel + ? [channel] + : ['work_order', 'affiliate_dash', 'third_party_voucher', 'manual'] // 顺序跑:并行会同时扫 cost_exceptions,实测 4 路并发比串行更慢(I/O 争抢)。 const aggregates: Array<{ groupTotal: number; itemTotal: number }> = [] for (const mode of modes) { @@ -705,7 +707,9 @@ export async function listAdminUnmappedMappingGroups(payload: JsonObject = {}) { // 分组总数单独算:SQL 守卫禁止窗口函数分页(会在 LIMIT 前消费全部候选行)。 // 按履约方式拆开统计:命中索引,单模式约 90ms;「全部」时顺序跑四种模式。 - const modes = channel ? [channel] : ['work_order', 'affiliate_dash', 'legacy_platform', 'manual'] + const modes = channel + ? [channel] + : ['work_order', 'affiliate_dash', 'third_party_voucher', 'manual'] const totals: Array<{ groupTotal: number; itemTotal: number }> = [] for (const mode of modes) { const totalParams = [...params, mode] diff --git a/apps/frontend/src/pages/admin/AdminSalesProfitPage.tsx b/apps/frontend/src/pages/admin/AdminSalesProfitPage.tsx index a51a702c..eff397e5 100644 --- a/apps/frontend/src/pages/admin/AdminSalesProfitPage.tsx +++ b/apps/frontend/src/pages/admin/AdminSalesProfitPage.tsx @@ -48,7 +48,6 @@ const FULFILLMENT_MODE_LABEL: Record = { work_order: '接单平台', affiliate_dash: '自动发货', third_party_voucher: '第三方卡券', - legacy_platform: '历史归档', manual: '人工客服', archived: '历史归档', unclassified: '未分类', diff --git a/apps/frontend/src/pages/admin/cost-center/CostExceptionPanel.tsx b/apps/frontend/src/pages/admin/cost-center/CostExceptionPanel.tsx index 18c9fffb..cd3bad59 100644 --- a/apps/frontend/src/pages/admin/cost-center/CostExceptionPanel.tsx +++ b/apps/frontend/src/pages/admin/cost-center/CostExceptionPanel.tsx @@ -40,7 +40,6 @@ import { CostPreviewModal } from './CostPreviewModal' const FULFILLMENT_MODE_TAG_COLORS: Record = { work_order: 'blue', affiliate_dash: 'green', - legacy_platform: 'default', manual: 'orange', } diff --git a/apps/frontend/src/pages/admin/cost-center/CostPreviewModal.tsx b/apps/frontend/src/pages/admin/cost-center/CostPreviewModal.tsx index 63d51614..ae7f7ddd 100644 --- a/apps/frontend/src/pages/admin/cost-center/CostPreviewModal.tsx +++ b/apps/frontend/src/pages/admin/cost-center/CostPreviewModal.tsx @@ -19,7 +19,6 @@ import { costModelLabel, providerLabel } from './shared' const FULFILLMENT_MODE_LABELS: Record = { work_order: '接单平台', affiliate_dash: '自动发货', - legacy_platform: '历史平台', manual: '人工客服', } diff --git a/apps/frontend/src/pages/admin/cost-center/shared.ts b/apps/frontend/src/pages/admin/cost-center/shared.ts index 804d0a0a..794540a8 100644 --- a/apps/frontend/src/pages/admin/cost-center/shared.ts +++ b/apps/frontend/src/pages/admin/cost-center/shared.ts @@ -129,7 +129,6 @@ export const FULFILLMENT_MODE_LABELS: Record = { work_order: '接单平台', affiliate_dash: '自动发货', third_party_voucher: '第三方卡券', - legacy_platform: '历史归档', manual: '人工客服', archived: '历史归档', unclassified: '未分类', @@ -139,7 +138,6 @@ export const FULFILLMENT_MODE_COLORS: Record = { work_order: 'blue', affiliate_dash: 'green', third_party_voucher: 'cyan', - legacy_platform: 'default', manual: 'orange', archived: 'default', unclassified: 'gold', diff --git a/apps/frontend/src/types/admin/cost-center.ts b/apps/frontend/src/types/admin/cost-center.ts index 6363f8af..8928ca1f 100644 --- a/apps/frontend/src/types/admin/cost-center.ts +++ b/apps/frontend/src/types/admin/cost-center.ts @@ -1,13 +1,7 @@ /** - * 履约渠道:v2 唯一真源是 order_items.fulfillment_channel; - * legacy_platform 仅历史数据兜底显示。 + * 履约渠道:唯一真源是 order_items.fulfillment_channel + fulfillment_status。 */ -export type FulfillmentChannel = - | 'work_order' - | 'affiliate_dash' - | 'third_party_voucher' - | 'legacy_platform' - | 'manual' +export type FulfillmentChannel = 'work_order' | 'affiliate_dash' | 'third_party_voucher' | 'manual' /** 商品来源:由 canonical_sku 前缀推导,空串表示未分类。 */ export type ProductSource = 'affiliate_dash' | 'work_order' | 'third_party_voucher' | 'manual' | '' diff --git a/apps/frontend/src/types/admin/orders.ts b/apps/frontend/src/types/admin/orders.ts index 56573d9f..8d5498c2 100644 --- a/apps/frontend/src/types/admin/orders.ts +++ b/apps/frontend/src/types/admin/orders.ts @@ -12,7 +12,6 @@ export type AdminOrderItemFulfillmentMode = | 'work_order' | 'affiliate_dash' | 'third_party_voucher' - | 'legacy_platform' | 'manual' | 'pending' | 'archived' diff --git a/apps/frontend/src/utils/admin-display.ts b/apps/frontend/src/utils/admin-display.ts index adffea7d..182850de 100644 --- a/apps/frontend/src/utils/admin-display.ts +++ b/apps/frontend/src/utils/admin-display.ts @@ -223,7 +223,6 @@ export function resolveOrderFulfillmentMode(row: { | 'work_order' | 'affiliate_dash' | 'third_party_voucher' - | 'legacy_platform' | 'manual' | 'pending' | 'archived'