This commit is contained in:
2026-09-15 12:35:46 +08:00
parent ca90b0bc75
commit 47f2bfdd23
14 changed files with 239 additions and 30 deletions
@@ -87,12 +87,13 @@ describe('last-mile order overseas API', () => {
it('uses the manual inbound-plan endpoint with the complete form and idempotency evidence', async () => {
vi.mocked(overseasHttp.post).mockResolvedValue({ code: '200', message: 'success', data: {} })
const payload = { orderId: '190000000000000099', customerId: '190000000000000001', expectedOrderVersion: 4,
plannedArrivalDate: '2026-09-08', palletCount: 8, palletType: 'STANDARD' as const,
palletCount: 8, palletType: 'STANDARD' as const,
assigned: false, mergeRequired: false, urgent: true, remark: '加急' }
await createManualInboundPlan(payload, 'plan-key-1')
expect(overseasHttp.post).toHaveBeenCalledWith('/platform/v1/last-leg/inbound-plans/manual', payload,
{ headers: { 'Idempotency-Key': 'plan-key-1' } })
expect(payload).not.toHaveProperty('inboundCode')
expect(payload).not.toHaveProperty('plannedArrivalDate')
expect(payload).not.toHaveProperty('plannedWarehouseId')
expect(payload).not.toHaveProperty('plannedWarehouseCode')
expect(payload).not.toHaveProperty('plannedWarehouseName')
@@ -294,7 +294,6 @@ export interface ManualInboundPlanPayload {
customerId: string
orderId: string
expectedOrderVersion: number
plannedArrivalDate: string
palletCount: number
palletType: 'STANDARD' | 'WOOD' | 'PAPER'
assigned: boolean