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); },