From 3388478917443ab8192c5be2db28fbef8b3cfc5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Wed, 24 Jul 2024 14:13:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/productOrder/productionScheduling.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw-ui/src/views/mes/productOrder/productionScheduling.vue b/hw-ui/src/views/mes/productOrder/productionScheduling.vue index ce72958..f8fb80f 100644 --- a/hw-ui/src/views/mes/productOrder/productionScheduling.vue +++ b/hw-ui/src/views/mes/productOrder/productionScheduling.vue @@ -996,20 +996,20 @@ export default { let planBeginTime = planDateRange[0] let planEndTime = planDateRange[1] // 检查当前对象的 planEndTime 不为空,且不是最后一个对象 - if (this.arrangeType === 1 && planEndTime != null && i < data.length - 1) { - let date = new Date(planEndTime); // 将 planEndTime 转为日期对象 - date.setDate(date.getDate() + 1); // 日期加一天 - if (data.length > i){ - let nextTime = parseTime(date); - data[i + 1].planDateRange[0] = nextTime; // 设置下一个对象的 planBeginTime + // if (this.arrangeType === 1 && planEndTime != null && i < data.length - 1) { + // let date = new Date(planEndTime); // 将 planEndTime 转为日期对象 + // date.setDate(date.getDate() + 1); // 日期加一天 + // if (data.length > i){ + // let nextTime = parseTime(date); + // data[i + 1].planDateRange[0] = nextTime; // 设置下一个对象的 planBeginTime // console.log(planDateRange[0], planDateRange[1],data[i + 1].productOrderId) // console.log(i,data[i + 1].planDateRange[0], this.productOrderList[i + 1].planDateRange[0]) // if (data[i + 1].planDateRange[1] < data[i + 1].planDateRange[0]){ // data[i + 1].planDateRange[1] = data[i + 1].planDateRange[0] // } - } - } + // } + // } // 如果 planBeginTime 和 planEndTime 不为空,计算它们之间的天数差异并保存到当前项 if (planBeginTime != null && planEndTime != null) { item.duration = this.calculateDaysDifference(planBeginTime, planEndTime);