feat: complete customer overseas business flows

This commit is contained in:
2026-09-04 12:41:58 +08:00
parent 2a7e042420
commit 0957324fb0
18 changed files with 840 additions and 38 deletions
@@ -0,0 +1,73 @@
import { overseasApiRequest } from '@/api/overseasHttp'
export interface PageResult<T> { records: T[]; page: number; size: number; total: number; pages: number }
export interface InboundPlanQuery {
page: number
size: number
planNo?: string
inboundCode?: string
status?: string
destinationWarehouseCode?: string
appointmentStatus?: string
dispatchStatus?: string
createdFrom?: string
createdTo?: string
}
export interface InboundPlanSummary {
planNo: string
inboundCode: string
orderType: string | null
warehouseCode: string | null
warehouseName: string | null
fbaWarehouseCode: string | null
packageCount: number
pickedPackageCount: number
volumeCbm: number | null
palletCount: number
status: string
appointmentNo: string | null
appointmentStatus: string | null
appointmentAt: string | null
expectedLoadingAt: string | null
dispatchStatus: string | null
createdAt: string
version: number
}
export interface InboundPlanLine {
inboundCode: string
fbaWarehouseCode: string | null
destinationWarehouseCode: string | null
destinationWarehouseName: string | null
volumeCbm: number
requiredPackageCount: number
plannedPalletCount: number
}
export interface InboundPlanPallet {
palletNo: string
destinationWarehouseCode: string | null
destinationWarehouseName: string | null
capacityCbm: number
allocatedVolumeCbm: number
}
export interface InboundPlanDetail {
planNo: string
containerNo: string | null
status: string
lineCount: number
palletCount: number
totalVolumeCbm: number
expectedPackageCount: number
pickedPackageCount: number
lines: InboundPlanLine[]
pallets: InboundPlanPallet[]
version: number
}
export async function listInboundPlans(params: InboundPlanQuery) {
const result = await overseasApiRequest<PageResult<InboundPlanSummary>>({ method: 'GET', url: '/merchant/v1/last-leg/inbound-plans', params })
return { ...result, page: Number(result.page), size: Number(result.size), total: Number(result.total), pages: Number(result.pages) }
}
export function getInboundPlan(planNo: string) {
return overseasApiRequest<InboundPlanDetail>({ method: 'GET', url: `/merchant/v1/last-leg/inbound-plans/${encodeURIComponent(planNo)}` })
}