feat(cost-center): 渠道映射改为诊断优先,新增未归一队列
- 顶部统计卡:标准商品 / 映射 / 未归一订单项 / 未归一 SKU 组 - 新增「未归一」队列:按来源+店铺+平台SKU+履约方式聚合,行内建映射并预填 - 目录表从 7 列精简到 4 列,匹配方式移入展开明细 - 回填订单项后自动把已归一的 product_mapping_missing 异常收口 - 新增 /cost-center/mappings/diagnostics 与 /mappings/unmapped,按履约方式拆分聚合避免全表扫描
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { apiDelete, apiGet, apiPatch, apiPost } from '@/lib/http'
|
||||
import type {
|
||||
ChannelMappingDiagnostics,
|
||||
ChannelProductMapping,
|
||||
ChannelProductMappingListResult,
|
||||
CostCenterOptions,
|
||||
@@ -27,6 +28,7 @@ import type {
|
||||
ProductCatalogListResult,
|
||||
TemplateProductBootstrapPreview,
|
||||
TemplateProductBootstrapResult,
|
||||
UnmappedMappingGroupListResult,
|
||||
} from '@/types/admin'
|
||||
|
||||
export function fetchAdminCostCenterOverview() {
|
||||
@@ -130,6 +132,17 @@ export function fetchAdminChannelProductMappings(params?: Record<string, unknown
|
||||
return apiGet<ChannelProductMappingListResult>('/api/v1/admin/cost-center/mappings', params)
|
||||
}
|
||||
|
||||
export function fetchAdminChannelMappingDiagnostics(params?: Record<string, unknown>) {
|
||||
return apiGet<ChannelMappingDiagnostics>('/api/v1/admin/cost-center/mappings/diagnostics', params)
|
||||
}
|
||||
|
||||
export function fetchAdminUnmappedMappingGroups(params?: Record<string, unknown>) {
|
||||
return apiGet<UnmappedMappingGroupListResult>(
|
||||
'/api/v1/admin/cost-center/mappings/unmapped',
|
||||
params,
|
||||
)
|
||||
}
|
||||
|
||||
export function createAdminChannelProductMapping(payload: Record<string, unknown>) {
|
||||
return apiPost<{ mapping: ChannelProductMapping }>('/api/v1/admin/cost-center/mappings', payload)
|
||||
}
|
||||
@@ -153,6 +166,7 @@ export function deleteAdminChannelProductMapping(mappingId: number) {
|
||||
export function backfillAdminProductMappings(payload: Record<string, unknown>) {
|
||||
return apiPost<{
|
||||
updatedCount: number
|
||||
resolvedExceptionCount: number
|
||||
limit: number
|
||||
batches: number
|
||||
remainingCount: number
|
||||
|
||||
Reference in New Issue
Block a user