From b2a6d73bacbe673b46ef8dfe7d5bbf18b5a2233b Mon Sep 17 00:00:00 2001 From: weicw1996 Date: Fri, 16 Oct 2026 12:10:47 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E8=BF=90=E5=8D=95=E6=98=8E=E7=BB=86=E9=87=8D=E8=BD=BD=E5=90=8E?= =?UTF-8?q?=E5=AE=9E=E9=99=85/=E9=A2=84=E8=AE=A1=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=88=97=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 明细接口返回运单实体字段 startDate/endDate/estimatedStartTime/estimatedEndTime, 明细表与编辑回填按导入列字段名 actualStartDate 等读取,重载后统一在 normalizeDetailRow 对齐。 --- .../business/components/waybill-import-dialog.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/views/business/components/waybill-import-dialog.vue b/src/views/business/components/waybill-import-dialog.vue index 3645750..5db574c 100644 --- a/src/views/business/components/waybill-import-dialog.vue +++ b/src/views/business/components/waybill-import-dialog.vue @@ -1348,11 +1348,23 @@ const formatOptionalNumber = value => { const normalized = normalizeOptionalImportNumber(value); return normalized === null || normalized === undefined ? '' : normalized; }; +// 明细接口返回运单实体字段 startDate/endDate/estimatedStartTime/estimatedEndTime, +// 而明细表与编辑回填按导入列字段名 actualStartDate 等读取,重载后在此对齐,否则实际/预计时间列为空。 +const detailDateAliases = { + actualStartDate: 'startDate', + actualEndDate: 'endDate', + planStartDate: 'estimatedStartTime', + planEndDate: 'estimatedEndTime', +}; const normalizeDetailRow = row => { const next = { ...(row || {}) }; OPTIONAL_NUMBER_PROPS.forEach(prop => { next[prop] = formatOptionalNumber(next[prop]); }); + Object.entries(detailDateAliases).forEach(([prop, source]) => { + if (String(next[prop] ?? '').trim()) return; + if (String(next[source] ?? '').trim()) next[prop] = next[source]; + }); return next; }; const normalizeImportRow = row => ({