feat: preview container inbound plans
This commit is contained in:
@@ -212,6 +212,64 @@ export interface ConvertContainerInboundPlanPayload {
|
||||
sourceContainerBookingId: string
|
||||
}
|
||||
|
||||
export type ContainerInboundPlanPreviewReadiness = 'READY' | 'PLANNED' | 'BLOCKED'
|
||||
|
||||
export interface ContainerInboundPlanPreviewOrderDto {
|
||||
customerId: string
|
||||
customerName: string | null
|
||||
orderId: string
|
||||
businessOrderNo: string
|
||||
inboundCode: string | null
|
||||
orderType: string
|
||||
destinationType: 'FBA' | 'ONE_CLICK_DROPSHIP' | 'PRIVATE_ADDRESS'
|
||||
destinationWarehouseId: string | null
|
||||
destinationWarehouseCode: string | null
|
||||
destinationWarehouseName: string | null
|
||||
packageCount: number
|
||||
volumeCbm: number
|
||||
suggestedPalletCount: number | null
|
||||
plannedPalletCount: number | null
|
||||
existingPlanNo: string | null
|
||||
planStatus: string | null
|
||||
orderVersion: number
|
||||
readiness: ContainerInboundPlanPreviewReadiness
|
||||
blockers: string[]
|
||||
}
|
||||
|
||||
export interface ContainerInboundPlanPreviewGroupDto {
|
||||
destinationType: 'FBA' | 'ONE_CLICK_DROPSHIP' | 'PRIVATE_ADDRESS'
|
||||
destinationWarehouseId: string | null
|
||||
destinationWarehouseCode: string | null
|
||||
destinationWarehouseName: string | null
|
||||
orderCount: number
|
||||
pendingOrderCount: number
|
||||
pendingPalletCount: number
|
||||
existingPlannedPalletCount: number
|
||||
suggestedPalletCount: number
|
||||
plannedPalletCount: number
|
||||
orders: ContainerInboundPlanPreviewOrderDto[]
|
||||
}
|
||||
|
||||
export interface ContainerInboundPlanPreviewDto {
|
||||
sourceContainerBookingId: string
|
||||
containerNo: string | null
|
||||
overseasWarehouseId: string | null
|
||||
overseasWarehouseCode: string | null
|
||||
overseasWarehouseName: string | null
|
||||
snapshotVersion: number
|
||||
snapshotHash: string
|
||||
totalOrderCount: number
|
||||
readyOrderCount: number
|
||||
blockedOrderCount: number
|
||||
pendingOrderCount: number
|
||||
pendingPalletCount: number
|
||||
existingPlannedPalletCount: number
|
||||
totalSuggestedPalletCount: number
|
||||
totalPlannedPalletCount: number
|
||||
ready: boolean
|
||||
groups: ContainerInboundPlanPreviewGroupDto[]
|
||||
}
|
||||
|
||||
export type ManualNodeCode =
|
||||
| 'DOMESTIC_CUSTOMS_COMPLETED'
|
||||
| 'ESTIMATED_DEPARTURE'
|
||||
@@ -394,6 +452,14 @@ export async function changeContainerReceivingWarehouse(
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
export async function getContainerInboundPlanPreview(sourceContainerBookingId: string) {
|
||||
const response = await overseasHttp.get<ApiEnvelope<ContainerInboundPlanPreviewDto>, ApiEnvelope<ContainerInboundPlanPreviewDto>>(
|
||||
'/platform/v1/last-leg/inbound-plans/container-preview',
|
||||
{ params: { sourceContainerBookingId } },
|
||||
)
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
export async function convertLastMileContainerToInboundPlans(payload: ConvertContainerInboundPlanPayload) {
|
||||
const response = await overseasHttp.post<ApiEnvelope<InboundPlanDetailDto[]>, ApiEnvelope<InboundPlanDetailDto[]>>(
|
||||
'/platform/v1/last-leg/inbound-plans/convert-container', payload,
|
||||
|
||||
Reference in New Issue
Block a user