diff --git a/src/modules/unified-orders/api/unifiedOrders.test.ts b/src/modules/unified-orders/api/unifiedOrders.test.ts index 775219de..dbecd22a 100644 --- a/src/modules/unified-orders/api/unifiedOrders.test.ts +++ b/src/modules/unified-orders/api/unifiedOrders.test.ts @@ -69,11 +69,11 @@ describe('unified orders API contract', () => { it('normalizes C02 row IDs and keeps inboundId for measurement routing', async () => { vi.mocked(http.get).mockResolvedValue({ data: { - records: [{ orderId: '90001', tenantId: '208', inboundId: '77', inboundVersion: 3, mainStatus: 'WAIT_MEASURE', customerRemark: '客户备注', latestInternalNote: '最新内部备注', measurement: null, preload: null, loading: null, delivery: null, transport: null }], + records: [{ orderId: '90001', tenantId: '208', inboundId: '77', inboundVersion: 3, mainStatus: 'WAIT_MEASURE', recommendedPalletType: 'STANDARD', locationCodes: 'A0-01, B2-03', customerRemark: '客户备注', latestInternalNote: '最新内部备注', measurement: null, preload: null, loading: null, delivery: null, transport: null }], page: 1, size: 20, total: 1, pages: 1, } }) await expect(listPlatformUnifiedOrders({ page: 1, size: 20 })).resolves.toMatchObject({ - records: [{ orderId: '90001', tenantId: '208', inboundId: '77', inboundVersion: 3, customerRemark: '客户备注', latestInternalNote: '最新内部备注' }], + records: [{ orderId: '90001', tenantId: '208', inboundId: '77', inboundVersion: 3, recommendedPalletType: 'STANDARD', locationCodes: 'A0-01, B2-03', customerRemark: '客户备注', latestInternalNote: '最新内部备注' }], }) }) diff --git a/src/modules/unified-orders/api/unifiedOrders.ts b/src/modules/unified-orders/api/unifiedOrders.ts index a8f3270b..1f5c7223 100644 --- a/src/modules/unified-orders/api/unifiedOrders.ts +++ b/src/modules/unified-orders/api/unifiedOrders.ts @@ -105,6 +105,9 @@ export interface UnifiedOrderResource { taxMode?: string | null fullContainer?: boolean | null customsInspection?: boolean | null + recommendedPalletType?: string | null + locationCodes?: string | null + /** Legacy aliases retained while older order responses are still deployed. */ totalPalletCount?: number | null chargeableVolumeCbm?: number | null volumetricWeightKg?: number | null @@ -317,6 +320,9 @@ function normalizeRow(raw: UnifiedOrderResource): UnifiedOrderResource { inboundId: id(raw.inboundId), inboundVersion: nullableInteger(raw.inboundVersion), totalPackageCount: nullableInteger(raw.totalPackageCount), + totalPalletCount: nullableInteger(raw.totalPalletCount), + recommendedPalletType: raw.recommendedPalletType ?? null, + locationCodes: raw.locationCodes ?? raw.location ?? null, measurement: raw.measurement ? { ...raw.measurement, actualGrossWeightKg: numberValue(raw.measurement.actualGrossWeightKg), diff --git a/src/modules/unified-orders/pages/UnifiedOrdersView.vue b/src/modules/unified-orders/pages/UnifiedOrdersView.vue index 9339a712..250d246c 100644 --- a/src/modules/unified-orders/pages/UnifiedOrdersView.vue +++ b/src/modules/unified-orders/pages/UnifiedOrdersView.vue @@ -230,8 +230,8 @@ const columns: DataTableColumn[] = [ { key: 'chargeableWeightKg', prop: 'chargeableWeightKg', label: '计费毛重', minWidth: 120, slotName: 'field' }, { key: 'totalVolumeCbm', prop: 'totalVolumeCbm', label: '总体积(m³)', minWidth: 120, slotName: 'field' }, { key: 'chargeableVolumeCbm', prop: 'chargeableVolumeCbm', label: '计费体积(m³)', minWidth: 130, slotName: 'field' }, - { key: 'totalPalletCount', prop: 'totalPalletCount', label: '总托盘数', minWidth: 110, slotName: 'field' }, - { key: 'location', prop: 'location', label: '库位位置', minWidth: 130, slotName: 'field' }, + { key: 'recommendedPalletType', prop: 'recommendedPalletType', label: '推荐托盘类型', minWidth: 130, slotName: 'field' }, + { key: 'locationCodes', prop: 'locationCodes', label: '库位位置', minWidth: 130, slotName: 'field' }, { key: 'volumetricWeightKg', prop: 'volumetricWeightKg', label: '总材积重', minWidth: 120, slotName: 'field' }, { key: 'totalNetWeightKg', prop: 'totalNetWeightKg', label: '总净重(T.K.NW)', minWidth: 140, slotName: 'field' }, { key: 'destinationType', prop: 'destinationType', label: '目的仓类型', minWidth: 130, slotName: 'field' }, @@ -877,7 +877,7 @@ onMounted(() => {
是否整柜
{{ firstLegContainerModeLabel(detail.order.order?.containerMode) }}
商检验
{{ displayBoolean(detail.order.order?.customsInspection) }}
总箱数
{{ detail.summary.totalPackageCount ?? '—' }} 箱
-
总托盘数
{{ detail.summary.totalPalletCount ?? '—' }}
+
推荐托盘类型
{{ detail.summary.recommendedPalletType || '—' }}
总毛重
{{ formatNumber(cargoTotal(detail.order.cargoes, 'grossWeightKg') ?? detail.summary.measurement?.actualGrossWeightKg) }} kg
总净重
{{ formatNumber(cargoTotal(detail.order.cargoes, 'netWeightKg')) }} kg
总体积
{{ formatNumber(cargoTotal(detail.order.cargoes, 'volumeCbm') ?? detail.summary.measurement?.actualVolumeCbm, 3) }} m³
@@ -885,7 +885,7 @@ onMounted(() => {
计费体积
{{ formatNumber(detail.summary.chargeableVolumeCbm, 3) }} m³
总材积重
{{ formatNumber(detail.summary.volumetricWeightKg) }} kg
总材积量
{{ formatNumber(detail.summary.volumetricWeightKg) }}
-
库位位置
{{ detail.summary.location || '—' }}
+
库位位置
{{ detail.summary.locationCodes || '—' }}
创建时间
{{ formatDate(detail.summary.createdAt) }}
入库完成时间
{{ formatDate(detail.summary.inboundCompletedAt) }}
测量完成时间
{{ formatDate(detail.summary.measurementCompletedAt || detail.summary.measurement?.completedAt) }}