统一履约状态和节点日志展示并整理装柜与尾程界面

This commit is contained in:
2026-10-28 16:56:32 +08:00
parent a52a6620fc
commit d990637b38
20 changed files with 270 additions and 43 deletions
@@ -510,16 +510,45 @@ describe('UnifiedOrdersView downstream fulfillment detail', () => {
expect(wrapper.text()).not.toContain('新增关联')
})
it('renders actual loading and overseas business identifiers inside order detail', async () => {
it.each([
{
loadingStatus: 'LOADING', pdaTaskStatus: 'IN_PROGRESS', overseasReceivingStatus: 'RECEIVING',
expectedStatuses: { 装柜状态: '配载中', PDA状态: '作业中', 海外收货状态: '收货中' },
},
{
loadingStatus: 'LOADING', pdaTaskStatus: 'UNASSIGNED', overseasReceivingStatus: 'RECEIVING',
expectedStatuses: { 装柜状态: '配载中', PDA状态: '未分配', 海外收货状态: '收货中' },
},
{
loadingStatus: 'LOADING', pdaTaskStatus: 'PROCESSING', overseasReceivingStatus: 'RECEIVING',
expectedStatuses: { 装柜状态: '配载中', PDA状态: '完成处理中', 海外收货状态: '收货中' },
},
{
loadingStatus: 'LOADING', pdaTaskStatus: 'COMPLETION_FAILED', overseasReceivingStatus: 'RECEIVING',
expectedStatuses: { 装柜状态: '配载中', PDA状态: '完成失败', 海外收货状态: '收货中' },
},
{
loadingStatus: 'COMPLETED', pdaTaskStatus: 'COMPLETED', overseasReceivingStatus: 'PENDING_ASSIGNMENT',
expectedStatuses: { 装柜状态: '装柜完成', PDA状态: '已完成', 海外收货状态: '待分配' },
},
{
loadingStatus: 'NEW_LOADING_STATE', pdaTaskStatus: 'NEW_PDA_STATE', overseasReceivingStatus: 'NEW_RECEIVING_STATE',
expectedStatuses: { 装柜状态: '未知状态', PDA状态: '未知状态', 海外收货状态: '未知状态' },
},
{
loadingStatus: null, pdaTaskStatus: null, overseasReceivingStatus: null,
expectedStatuses: { 装柜状态: '—', PDA状态: '—', 海外收货状态: '—' },
},
])('renders actual loading and overseas business identifiers with Chinese statuses ($loadingStatus/$pdaTaskStatus)', async ({ loadingStatus, pdaTaskStatus, overseasReceivingStatus, expectedStatuses }) => {
vi.mocked(getLoadingAssociationSummary).mockResolvedValue({
inboundId: '7001', inboundCode: 'NYEXX2608310001', loadingPlanId: '9001', loadingPlanNo: 'LP-260831-001',
containerBookingId: '9002', cabinetNo: 'CAB-260831-001', containerNo: 'MSCU1234567', loadingStatus: 'LOADING',
taskId: '9003', pdaTaskStatus: 'IN_PROGRESS', coLoadGroupId: null, coLoadGroupNo: null, items: [],
containerBookingId: '9002', cabinetNo: 'CAB-260831-001', containerNo: 'MSCU1234567', loadingStatus,
taskId: '9003', pdaTaskStatus, coLoadGroupId: null, coLoadGroupNo: null, items: [],
})
vi.mocked(getOverseasInboundCodeRelationship).mockResolvedValue({
inboundCode: 'NYEXX2608310001', found: true, customer: null,
overseasWarehouse: { warehouseId: '9004', warehouseCode: 'LAX', warehouseName: '洛杉矶海外仓' },
overseasReceivingStatus: 'RECEIVING', taillegOrders: [{ orderNo: 'LL-260831-001' }],
overseasReceivingStatus, taillegOrders: [{ orderNo: 'LL-260831-001' }],
inboundPlans: [{ planNo: 'IP-260831-001' }], palletCodes: ['PLT-LAX-001'],
inventory: [{ skuCode: 'SKU-001', packageCount: 2 }],
})
@@ -532,6 +561,9 @@ describe('UnifiedOrdersView downstream fulfillment detail', () => {
expect(wrapper.text()).toContain('LL-260831-001')
expect(wrapper.text()).toContain('IP-260831-001')
expect(wrapper.text()).toContain('PLT-LAX-001')
const facts = Object.fromEntries(wrapper.findAll('.subsequent-fulfillment .fulfillment-facts > div')
.map(item => [item.get('dt').text(), item.get('dd').text()]))
expect(facts).toMatchObject(expectedStatuses)
expect(wrapper.text()).not.toContain('9001')
expect(wrapper.text()).not.toContain('9004')
})