From 80fbe70ab79bdf335cde2319a05483f452191128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Fri, 22 May 2026 13:07:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(wms/coil/info):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=A4=A9=E6=95=B0=E8=AE=A1=E7=AE=97=E7=9A=84?= =?UTF-8?q?=E6=88=AA=E6=AD=A2=E6=97=A5=E6=9C=9F=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根据卷料状态切换使用当前时间或出库时间作为计算截止日期 --- klp-ui/src/views/wms/coil/info.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/klp-ui/src/views/wms/coil/info.vue b/klp-ui/src/views/wms/coil/info.vue index ace8d90d..6e20f7d9 100644 --- a/klp-ui/src/views/wms/coil/info.vue +++ b/klp-ui/src/views/wms/coil/info.vue @@ -1249,8 +1249,14 @@ export default { const inboundTime = this.getInboundTime(); if (!inboundTime) return 0; const inboundDate = new Date(inboundTime); - const today = new Date(); - const diffTime = today.getTime() - inboundDate.getTime(); + let endDate; + if (this.coilInfo.status == 1) { + endDate = new Date(this.coilInfo.exportTime); + } else { + endDate = new Date(); + } + // const today = new Date(); + const diffTime = endDate.getTime() - inboundDate.getTime(); const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24)); return Math.max(0, diffDays); },