feat(fulfillment): 建立履约统一状态视图与分类队列

This commit is contained in:
yml2213
2026-11-05 20:13:34 +08:00
parent e8b76b3b73
commit ed450fac79
12 changed files with 1783 additions and 179 deletions
@@ -18,6 +18,24 @@ export type PendingChannelGroup = {
revenue_fen: number
first_seen_at: string
last_seen_at: string
issue_breakdown: Array<{
issue_code: string
issue_category: string
item_count: number
locked_item_count: number
retryable: boolean
auto_retryable: boolean
owner_role: string
}>
retryable_item_count: number
retryable_unlocked_item_count: number
auto_retryable_item_count: number
auto_retryable_unlocked_item_count: number
config_issue_item_count: number
manual_review_item_count: number
after_sales_item_count: number
system_issue_item_count: number
oldest_age_minutes: number
}
export type PendingChannelGroupListResult = {
@@ -208,6 +226,7 @@ export function fetchPendingChannelGroups(
page?: number
pageSize?: number
keyword?: string
issueCategory?: string
} = {},
) {
return apiGet<PendingChannelGroupListResult>('/api/v1/admin/fulfillment/pending', params)
@@ -268,6 +287,7 @@ export function retryPendingCarriers(payload: {
internalSku: string
retryInactiveCarrier?: boolean
includeLocked?: boolean
issueCodes?: string[]
}) {
return apiPost<PendingCarrierRetryResult>(
'/api/v1/admin/fulfillment/pending/retry-carriers',
@@ -275,11 +295,15 @@ export function retryPendingCarriers(payload: {
)
}
export function unlockPendingChannelGroup(payload: { groupKey?: string; internalSku?: string }) {
export function unlockPendingChannelGroup(payload: {
groupKey?: string
internalSku?: string
issueCategory?: string
}) {
return apiPost<{ updated: number }>('/api/v1/admin/fulfillment/pending/unlock', payload)
}
export function deletePendingChannelGroup(payload: { groupKey: string }) {
export function deletePendingChannelGroup(payload: { groupKey: string; issueCategory?: string }) {
return apiPost<DeletePendingChannelGroupResult>(
'/api/v1/admin/fulfillment/pending/delete',
payload,
@@ -291,6 +315,7 @@ export function assignChannelByInternalSku(payload: {
internalSku: string
mappedInternalSku?: string
channel: string
issueCategory?: string
note?: string
}) {
return apiPost<{