From 0f4721247723cd7c77429442f263399e37592884 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Fri, 4 Sep 2026 15:06:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/inbounds/components/InboundTaskList.test.ts | 9 +++++++++ src/modules/inbounds/components/InboundTaskList.vue | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) 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) }}