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 => ({