diff --git a/src/modules/inbounds/components/InboundTaskList.test.ts b/src/modules/inbounds/components/InboundTaskList.test.ts index b5dc5b9c..8ebeb2d2 100644 --- a/src/modules/inbounds/components/InboundTaskList.test.ts +++ b/src/modules/inbounds/components/InboundTaskList.test.ts @@ -165,6 +165,15 @@ describe('InboundTaskList measurement scope', () => { expect(source).toContain("if (!value) return '—'") }) + it('shows the expected arrival as a date in both measurement and review lists', () => { + const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8') + + expect(source).toContain("date.toLocaleDateString('zh-CN')") + expect(source).toContain('{{ formatDateOnly((row as InboundOrderSummary).expectedArrivalAt) }}') + expect(source).toContain('{{ formatDate((row as InboundOrderSummary).measureCompletedAt) }}') + expect(source).not.toContain('{{ formatDate((row as InboundOrderSummary).expectedArrivalAt) }}') + }) + it('renders first-leg business types with the shared Chinese labels', () => { const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8') diff --git a/src/modules/inbounds/components/InboundTaskList.vue b/src/modules/inbounds/components/InboundTaskList.vue index b24a674c..8fa394a3 100644 --- a/src/modules/inbounds/components/InboundTaskList.vue +++ b/src/modules/inbounds/components/InboundTaskList.vue @@ -119,6 +119,12 @@ function formatDate(value: string | null | undefined) { return Number.isNaN(date.getTime()) ? value : date.toLocaleString('zh-CN', { hour12: false }) } +function formatDateOnly(value: string | null | undefined) { + if (!value) return '—' + const date = new Date(value) + return Number.isNaN(date.getTime()) ? value : date.toLocaleDateString('zh-CN') +} + function dateParam(value: string | undefined, end = false) { return value ? `${value}T${end ? '23:59:59' : '00:00:00'}` : undefined } @@ -381,7 +387,7 @@ onBeforeUnmount(() => { disposed = true; requestSerial += 1; optionsRequestSeria {{ text((row as InboundOrderSummary).inboundCode) }} {{ inboundStatusLabel((row as InboundOrderSummary).processStatus, inboundProcessStatusLabels) }} {{ inboundStatusLabel((row as InboundOrderSummary).measureReviewStatus, inboundReviewStatusLabels) }} - {{ formatDate((row as InboundOrderSummary).expectedArrivalAt) }} + {{ formatDateOnly((row as InboundOrderSummary).expectedArrivalAt) }} {{ text((row as InboundOrderSummary).warehouseName) }} {{ text((row as InboundOrderSummary).deliveryWarehouseName) }}