feat(overseas): select stock transfer sources and follow relabel

This commit is contained in:
2026-10-04 21:19:11 +08:00
parent d3a2671fd7
commit 939cc11d7b
9 changed files with 574 additions and 2 deletions
@@ -84,6 +84,23 @@ export interface WarehouseTransferDetailDto extends WarehouseTransferSummaryDto
relabelBindings: WarehouseTransferRelabelBindingDto[]
customerConfirmedAt?: string | null
actualShipAt?: string | null
sourceOrders?: Array<{ lastlegOrderId: string; lastlegOrderNo?: string | null; inboundOrderId: string; inboundCode?: string | null }>
allocations?: Array<{ inventoryPositionId: string; inboundOrderId: string; inboundCode?: string | null; palletId: string; palletNo?: string | null; packageCount: number; status: string; destinationInventoryPositionId?: string | null; skuCode?: string | null }>
}
export interface AllocateWarehouseTransferPayload {
idempotencyKey: string
allocations: Array<{ inventoryPositionId: string; palletId: string; packageCount: number }>
}
/** The caller must use confirmed source positions, never aggregate inventory rows. */
export async function allocateWarehouseTransfer(customerId: string, transferNo: string, payload: AllocateWarehouseTransferPayload) {
const response = await http.post<ApiEnvelope<WarehouseTransferDetailDto>, ApiEnvelope<WarehouseTransferDetailDto>>(
`/platform/v1/last-leg/warehouse-transfers/${encodeURIComponent(transferNo)}/allocations`,
payload,
{ params: { customerId } },
)
return unwrapApiResponse(response)
}
export async function listWarehouseTransfers(customerId: string, query: WarehouseTransferQuery) {