fix(finance): 待分类队列按内部中文 SKU 去重与分流

- 同一内部 SKU 的不同平台 SKU 合并为一行(显示平台 SKU 列表)
- 指定渠道按 internal_sku 批量更新,并生成 internal_sku 规则
- 渠道候选的 internal_sku 优先取中文 manual_sku_key/sku_name
This commit is contained in:
yml2213
2026-11-02 13:32:05 +08:00
parent fbd5f8f74e
commit 03566aee2b
4 changed files with 123 additions and 15 deletions
@@ -1,11 +1,12 @@
import { apiDelete, apiGet, apiPost } from '@/lib/http'
/** 待分类队列(按 SKU 聚合)。 */
/** 待分类队列(按内部 SKU 聚合)。 */
export type PendingChannelGroup = {
provider: string
shop_id: string
sku_code: string
internal_sku: string
sku_name: string
sku_codes: string[]
item_count: number
revenue_fen: number
first_seen_at: string
@@ -94,7 +95,7 @@ export function fetchChannelExceptions(
export function assignChannelBySku(payload: {
provider: string
shopId: string
skuCode: string
internalSku: string
channel: string
note?: string
}) {