优化履约待办分桶与补载体扫描

This commit is contained in:
yml
2026-11-14 19:49:54 +08:00
parent e97932dcdf
commit b03599eca7
17 changed files with 629 additions and 81 deletions
@@ -1,5 +1,7 @@
import { apiDelete, apiGet, apiPost } from '@/lib/http'
export type FulfillmentQueueBucket = 'actionable' | 'configuration' | 'operator_review' | 'terminal'
/** 待分类队列(按内部 SKU 聚合)。 */
export type PendingChannelGroup = {
group_key: string
@@ -12,6 +14,7 @@ export type PendingChannelGroup = {
sku_codes: string[]
pending_reasons: string[]
pending_subreasons: string[]
queue_buckets: FulfillmentQueueBucket[]
configured_channels: string[]
locked_item_count: number
item_count: number
@@ -43,6 +46,7 @@ export type PendingChannelGroupListResult = {
total: number
page: number
pageSize: number
bucketCounts: Record<FulfillmentQueueBucket, number>
}
/** 渠道规则(L1)。 */
@@ -230,6 +234,7 @@ export function fetchPendingChannelGroups(
pageSize?: number
keyword?: string
issueCategory?: string
queueBucket?: FulfillmentQueueBucket
} = {},
) {
return apiGet<PendingChannelGroupListResult>('/api/v1/admin/fulfillment/pending', params)
@@ -302,11 +307,16 @@ export function unlockPendingChannelGroup(payload: {
groupKey?: string
internalSku?: string
issueCategory?: string
queueBucket?: FulfillmentQueueBucket
}) {
return apiPost<{ updated: number }>('/api/v1/admin/fulfillment/pending/unlock', payload)
}
export function deletePendingChannelGroup(payload: { groupKey: string; issueCategory?: string }) {
export function deletePendingChannelGroup(payload: {
groupKey: string
issueCategory?: string
queueBucket?: FulfillmentQueueBucket
}) {
return apiPost<DeletePendingChannelGroupResult>(
'/api/v1/admin/fulfillment/pending/delete',
payload,
@@ -319,6 +329,7 @@ export function assignChannelByInternalSku(payload: {
mappedInternalSku?: string
channel: string
issueCategory?: string
queueBucket?: FulfillmentQueueBucket
note?: string
}) {
return apiPost<{