diff --git a/src/modules/port-schedules/types.ts b/src/modules/port-schedules/types.ts
index 84b95ecc..69850e81 100644
--- a/src/modules/port-schedules/types.ts
+++ b/src/modules/port-schedules/types.ts
@@ -83,6 +83,7 @@ export interface CarrierScheduleNodeFact {
locationName?: string | null
sourceReference?: string | null
rawPayloadHash: string
+ operatorName?: string | null
createdAt?: string | null
}
diff --git a/src/modules/unified-orders/pages/UnifiedOrdersView.fulfillment.test.ts b/src/modules/unified-orders/pages/UnifiedOrdersView.fulfillment.test.ts
index 542d794b..98efa5af 100644
--- a/src/modules/unified-orders/pages/UnifiedOrdersView.fulfillment.test.ts
+++ b/src/modules/unified-orders/pages/UnifiedOrdersView.fulfillment.test.ts
@@ -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')
})
diff --git a/src/modules/unified-orders/pages/UnifiedOrdersView.vue b/src/modules/unified-orders/pages/UnifiedOrdersView.vue
index 4308b759..484dfef5 100644
--- a/src/modules/unified-orders/pages/UnifiedOrdersView.vue
+++ b/src/modules/unified-orders/pages/UnifiedOrdersView.vue
@@ -65,6 +65,8 @@ import { SmartLoadingDialog } from '@/modules/container-loading'
import {
unifiedOrderHistoryActionLabel,
unifiedOrderLoadingStatusLabel,
+ unifiedOrderOverseasReceivingStatusLabel,
+ unifiedOrderPdaTaskStatusLabel,
unifiedOrderReviewStatusLabel,
unifiedOrderStatusLabel,
} from '@/modules/unified-orders/status'
@@ -2674,12 +2676,12 @@ function orderDialogTitle(action: string, inboundCode?: string | null) {
- 装柜计划
- {{ loadingAssociation?.loadingPlanNo || '—' }}
- 柜号
- {{ loadingAssociation?.containerNo || loadingAssociation?.cabinetNo || '—' }}
- - 装柜状态
- {{ loadingAssociation?.loadingStatus || '—' }}
- - PDA状态
- {{ loadingAssociation?.pdaTaskStatus || '—' }}
+ - 装柜状态
- {{ unifiedOrderLoadingStatusLabel(loadingAssociation?.loadingStatus) }}
+ - PDA状态
- {{ unifiedOrderPdaTaskStatusLabel(loadingAssociation?.pdaTaskStatus) }}
- 海外仓
- {{ overseasRelationship?.overseasWarehouse?.warehouseName || '尚未分配海外仓' }}
- - 海外收货状态
- {{ overseasRelationship?.overseasReceivingStatus || '—' }}
+ - 海外收货状态
- {{ unifiedOrderOverseasReceivingStatusLabel(overseasRelationship?.overseasReceivingStatus) }}
- 尾程订单
- {{ overseasRelationship?.taillegOrders.map((item) => item.orderNo).join('、') || '—' }}
- 入库计划
- {{ overseasRelationship?.inboundPlans.map((item) => item.planNo).join('、') || '—' }}
- 托盘码
- {{ overseasRelationship?.palletCodes.join('、') || '—' }}
diff --git a/src/modules/unified-orders/status.test.ts b/src/modules/unified-orders/status.test.ts
index 76f5c272..3133713e 100644
--- a/src/modules/unified-orders/status.test.ts
+++ b/src/modules/unified-orders/status.test.ts
@@ -4,6 +4,8 @@ import {
unifiedOrderFulfillmentStatusLabel,
unifiedOrderHistoryActionLabel,
unifiedOrderLoadingStatusLabel,
+ unifiedOrderOverseasReceivingStatusLabel,
+ unifiedOrderPdaTaskStatusLabel,
unifiedOrderReviewStatusLabel,
unifiedOrderStatusLabel,
} from './status'
@@ -14,13 +16,31 @@ describe('unified order status labels', () => {
expect(unifiedOrderStatusLabel('WAIT_SPLIT')).toBe('待分柜')
expect(unifiedOrderReviewStatusLabel('APPROVED')).toBe('审核通过')
expect(unifiedOrderLoadingStatusLabel('LOADED')).toBe('已配载')
+ expect(unifiedOrderLoadingStatusLabel('COMPLETED')).toBe('装柜完成')
+ expect(unifiedOrderPdaTaskStatusLabel('COMPLETED')).toBe('已完成')
+ expect(unifiedOrderPdaTaskStatusLabel('IN_PROGRESS')).toBe('作业中')
+ expect(unifiedOrderOverseasReceivingStatusLabel('PENDING_ASSIGNMENT')).toBe('待分配')
+ expect(unifiedOrderOverseasReceivingStatusLabel('RECEIVING')).toBe('收货中')
expect(unifiedOrderHistoryActionLabel('DECLARATION_UPDATE')).toBe('客户申报资料变更')
})
+ it.each([
+ ['UNASSIGNED', '未分配'],
+ ['IN_PROGRESS', '作业中'],
+ ['AWAITING_REVIEW', '待人工复核'],
+ ['PROCESSING', '完成处理中'],
+ ['COMPLETION_FAILED', '完成失败'],
+ ['COMPLETED', '已完成'],
+ ])('translates loading-association API task status %s', (status, label) => {
+ expect(unifiedOrderPdaTaskStatusLabel(status)).toBe(label)
+ })
+
it('never exposes unknown backend enums', () => {
expect(unifiedOrderStatusLabel('NEW_ORDER_STATE')).toBe('未知状态')
expect(unifiedOrderReviewStatusLabel('NEW_REVIEW_STATE')).toBe('未知状态')
expect(unifiedOrderLoadingStatusLabel('NEW_LOADING_STATE')).toBe('未知状态')
+ expect(unifiedOrderPdaTaskStatusLabel('NEW_PDA_STATE')).toBe('未知状态')
+ expect(unifiedOrderOverseasReceivingStatusLabel('NEW_RECEIVING_STATE')).toBe('未知状态')
expect(unifiedOrderHistoryActionLabel('NEW_ACTION')).toBe('状态更新')
expect(unifiedOrderFulfillmentRoleLabel('NEW_ROLE')).toBe('未知类型')
expect(unifiedOrderFulfillmentStatusLabel('NEW_FRAGMENT_STATE', 'REMAINDER')).toBe('未知状态')
@@ -30,4 +50,12 @@ describe('unified order status labels', () => {
expect(unifiedOrderFulfillmentStatusLabel(null, 'ACTIVE_REMAINDER')).toBe('当前余量')
expect(unifiedOrderFulfillmentStatusLabel(undefined, 'COMPLETED_FRAGMENT')).toBe('已完成分片')
})
+
+ it('normalizes downstream status codes and keeps missing values empty', () => {
+ expect(unifiedOrderPdaTaskStatusLabel(' completed ')).toBe('已完成')
+ expect(unifiedOrderOverseasReceivingStatusLabel(' pending_assignment ')).toBe('待分配')
+ expect(unifiedOrderLoadingStatusLabel(null)).toBe('—')
+ expect(unifiedOrderPdaTaskStatusLabel(undefined)).toBe('—')
+ expect(unifiedOrderOverseasReceivingStatusLabel(' ')).toBe('—')
+ })
})
diff --git a/src/modules/unified-orders/status.ts b/src/modules/unified-orders/status.ts
index 04d15039..aeb0744a 100644
--- a/src/modules/unified-orders/status.ts
+++ b/src/modules/unified-orders/status.ts
@@ -34,6 +34,42 @@ const loadingStatusLabels: Record = {
COMPLETED: '装柜完成',
}
+const pdaTaskStatusLabels: Record = {
+ UNASSIGNED: '未分配',
+ PENDING: '待领取',
+ CLAIMED: '已领取',
+ LOADING: '作业中',
+ IN_PROGRESS: '作业中',
+ AWAITING_REVIEW: '待人工复核',
+ PROCESSING: '完成处理中',
+ COMPLETION_FAILED: '完成失败',
+ COMPLETED: '已完成',
+}
+
+const overseasReceivingStatusLabels: Record = {
+ PENDING_REVIEW: '待审核',
+ PENDING_ASSIGNMENT: '待分配',
+ ASSIGNED: '待入库',
+ PDA_PENDING: '待入库',
+ PENDING_RECEIPT: '待签收入库',
+ SIGNED: '已签收',
+ RECEIVING: '收货中',
+ PICKING: '拣货中',
+ PENDING_RECONCILIATION: '待差异核对',
+ PARTIAL_INBOUND: '部分入库',
+ PARTIALLY_RECEIVED: '部分入库',
+ WAIT_PDA_RECEIVING: '入库测量中',
+ INBOUND_MEASURING: '入库测量中',
+ WAIT_CUSTOMER_CONFIRMATION: '待客户确认实测',
+ RECEIVED: '已收货',
+ INBOUND_COMPLETED: '全部入库',
+ COMPLETED: '已完成',
+ IN_TRANSIT: '运输中',
+ DESTINATION_ASSIGNED: '已分配目的仓',
+ INBOUND_PLANNED: '已生成入库计划',
+ CANCELLED: '已取消',
+}
+
const historyActionLabels: Record = {
CREATE: '创建订单',
CREATED: '创建订单',
@@ -81,6 +117,14 @@ export function unifiedOrderLoadingStatusLabel(value: string | null | undefined,
return statusLabel(value, loadingStatusLabels, emptyLabel)
}
+export function unifiedOrderPdaTaskStatusLabel(value: string | null | undefined, emptyLabel = '—') {
+ return statusLabel(value, pdaTaskStatusLabels, emptyLabel)
+}
+
+export function unifiedOrderOverseasReceivingStatusLabel(value: string | null | undefined, emptyLabel = '—') {
+ return statusLabel(value, overseasReceivingStatusLabels, emptyLabel)
+}
+
export function unifiedOrderHistoryActionLabel(value: string | null | undefined) {
const action = normalized(value)
if (!action) return '状态更新'
diff --git a/src/styles/adminDensity.test.ts b/src/styles/adminDensity.test.ts
index 8bc3d689..2f43b053 100644
--- a/src/styles/adminDensity.test.ts
+++ b/src/styles/adminDensity.test.ts
@@ -1357,7 +1357,9 @@ describe('approved Admin density ownership', () => {
expect(read('shared/components/DataTable.vue')).toContain('margin-left: var(--cc-list-action-sibling-margin, 8px)')
expect(shared).toContain('.density-actions { --cc-list-action-sibling-margin: 0px;')
expect(read('modules/loading-lists/components/LoadingListsView.vue')).toContain('class="business-page loading-lists-page admin-density"')
- expect(read('modules/loading-lists/components/PalletLabelPrintDialog.vue')).toContain("'admin-density-dialog': dense")
+ const palletPrintDialog = read('modules/loading-lists/components/PalletLabelPrintDialog.vue')
+ expect(palletPrintDialog).toContain("'admin-density-dialog': dense")
+ expect(palletPrintDialog).not.toContain(':data-tone=')
expect(read('modules/container-loading/components/ContainerSimulationCreate.vue')).toContain("'admin-density-dialog': dense")
expect(read('modules/container-loading/components/ContainerSimulationCreate.vue')).toContain('width="min(800px, calc(100vw - 32px))"')
for (const file of ['loading-lists/components/LoadingListDetailDrawer.vue', 'loading-lists/components/PalletLabelPrintDialog.vue', 'container-loading/components/ContainerSimulationCreate.vue']) {