This commit is contained in:
2026-10-20 14:00:49 +08:00
parent 3879a47673
commit 5679b156ca
28 changed files with 803 additions and 515 deletions
@@ -12,6 +12,15 @@ export interface RelabelOrderQuery {
}
export interface CreateRelabelItemPayload {
sourceInventoryBalanceId?: string
sourceInventoryPositionId?: string
sourceInboundOrderId?: string
returnCartonId?: string
cartonMark: string
fbaCartonMark?: string
destinationFbaWarehouseCode?: string
operationType: 'CARTON_LABEL' | 'SKU_LABEL' | 'CARTON_AND_SKU'
skuItems: Array<{ skuCode: string; newSkuCode: string; quantity: number; remark?: string }>
skuCode: string
productNameZh: string
totalPackageCount: number
@@ -30,9 +39,9 @@ export interface CreateRelabelItemPayload {
export interface CreateRelabelPayload {
customerOrderNo: string
operationWarehouseId?: string
/** @deprecated compatibility alias for older platform fixtures */
overseasWarehouseId?: string
operationWarehouseId: string
deliveryMethod?: 'TRUCK' | 'EXPRESS' | 'PICKUP' | 'AMAZON_PICKUP' | 'CUSTOMER_PICKUP'
printShippingLabel?: boolean
labelDeadline: string
contactName: string
contactPhone: string
@@ -131,6 +140,7 @@ export interface RelabelDetailDto {
}
export interface RelabelQuantity {
sourceUnitCounts?: Record<string, number | string> | null
labelPieceCount: number | string | null
cartonCount: number | string | null
skuCount: number | string
@@ -140,6 +150,10 @@ export interface RelabelQuantity {
targetPalletCount: number | string | null
}
export interface RelabelQuantityTotals {
knownSourcePalletCount?: number | string
unknownSourcePalletOrders?: number | string
knownTargetPalletCount?: number | string
unknownTargetPalletOrders?: number | string
orderCount: number | string
skuCount: number | string
knownLabelPieceCount: number | string
@@ -148,6 +162,26 @@ export interface RelabelQuantityTotals {
unknownCartonOrders: number | string
orders: Record<string, RelabelQuantity>
}
export interface RelabelInventoryCandidate {
inventoryBalanceId?: string | null
inboundOrderId?: string | null
inboundOrderNo: string
inboundCode?: string
skuCode: string
productNameZh: string
availablePackages: number | string
sourceType: string
returnCartonId?: string | null
cartonMark?: string | null
cartonAvailablePackages?: number | string
cartonSkuItems?: Array<{ skuCode: string; quantity: number }>
positions: Array<{ positionId: string; palletNo: string; availablePackages: number | string }>
}
/** 候选归属和可用量由服务端决定,长整型来源ID按字符串原样提交。 */
export async function listRelabelInventoryCandidates(customerId: string, operationWarehouseId: string) {
const response = await http.get<ApiEnvelope<RelabelInventoryCandidate[]>, ApiEnvelope<RelabelInventoryCandidate[]>>('/platform/v1/last-leg/relabel-applications/inventory-candidates', { params: { customerId, operationWarehouseId } })
return unwrapApiResponse(response)
}
/** 汇总同一筛选下全部单据,不以当前页合计代替。 */
export async function getRelabelQuantities(query: RelabelOrderQuery) {
const response = await http.get<ApiEnvelope<RelabelQuantityTotals>, ApiEnvelope<RelabelQuantityTotals>>('/platform/v1/last-leg/relabel-applications/quantity-summary', { params: query })