From acfbb4c54e74fd15a2426c7561e4ba9ba6997337 Mon Sep 17 00:00:00 2001 From: b2894lxlx <517289602@qq.com> Date: Sat, 17 Oct 2026 08:31:27 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E8=BF=90=E8=BE=93?= =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E5=8C=B9=E9=85=8D=E6=97=A5=E6=9C=9F=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E4=B8=8E=E5=AE=8C=E6=88=90=E5=AF=B9=E8=B4=A6=E7=96=91?= =?UTF-8?q?=E4=BC=BC=E9=87=8D=E5=A4=8D=E8=AF=AF=E5=88=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .../transport-reconciliation-editor.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/views/settlement/components/transport-reconciliation-editor.vue b/src/views/settlement/components/transport-reconciliation-editor.vue index bcee540..4351b68 100644 --- a/src/views/settlement/components/transport-reconciliation-editor.vue +++ b/src/views/settlement/components/transport-reconciliation-editor.vue @@ -1278,10 +1278,13 @@ export default { delete snapshot._externalKey; delete snapshot.feeItems; snapshot.feeItemsJson = row.feeItemsJson || JSON.stringify(row.feeItems || {}); + snapshot.actualDepartureTime = this.normalizeExternalDateTime(row.actualDepartureTime); + snapshot.actualCompletionTime = this.normalizeExternalDateTime(row.actualCompletionTime); return snapshot; }); }, serializeExternalRows() { + const duplicateIds = new Set(this.duplicateRows.map(row => String(row.id))); return this.externalDetails.map(row => { const snapshot = { ...row }; delete snapshot._sourceRows; @@ -1290,6 +1293,7 @@ export default { snapshot.feeItemsJson = row.feeItemsJson || JSON.stringify(row.feeItems || {}); snapshot.actualDepartureTime = this.normalizeExternalDateTime(row.actualDepartureTime); snapshot.actualCompletionTime = this.normalizeExternalDateTime(row.actualCompletionTime); + snapshot.suspectedDuplicate = duplicateIds.has(String(row.id)); return snapshot; }); }, @@ -1336,6 +1340,11 @@ export default { } }, async handleComplete() { + const unmatchedInternal = this.internalDetails.filter(item => item.matchResult !== 'matched').length; + const unmatchedExternal = this.externalDetails.filter(item => item.matchStatus !== 'matched').length; + if (this.duplicateRows.length || unmatchedInternal || unmatchedExternal) { + return this.$message.warning('所有内外部账单明细必须一一匹配且不存在疑似重复'); + } if ( Number(this.form.differenceCount || 0) !== 0 || Number(this.form.differenceQuantity || 0) !== 0 || @@ -1694,8 +1703,11 @@ export default { }, normalizeExternalDateTime(value) { if (!value) return null; - const text = String(value); - return text.length === 10 ? `${text}T00:00:00` : text; + const text = String(value).trim(); + if (!text) return null; + const date = this.$dayjs(text); + if (date.isValid()) return date.format('YYYY-MM-DD HH:mm:ss'); + return text.length === 10 ? `${text} 00:00:00` : text.replace('T', ' '); }, refreshLocalStats() { const internalQuantity = this.internalDetails.reduce(