diff --git a/hw-ui/src/views/mes/productOrder/productionScheduling.vue b/hw-ui/src/views/mes/productOrder/productionScheduling.vue
index 6bcbdb1..a1ede3d 100644
--- a/hw-ui/src/views/mes/productOrder/productionScheduling.vue
+++ b/hw-ui/src/views/mes/productOrder/productionScheduling.vue
@@ -54,6 +54,16 @@
>关闭
+
+
+ {{ dict.label }}
+
+
+
@@ -86,7 +96,7 @@
-
+
@@ -98,6 +108,7 @@
{{ parseTime(scope.row.releaseTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
{
- const { productOrderId, planBeginTime, planEndTime, children } = item;
- result.push({ productOrderId, planBeginTime, planEndTime });
+ const {productOrderId, planBeginTime, planEndTime, children} = item;
+ result.push({productOrderId, planBeginTime, planEndTime});
+ if (planBeginTime != null && planEndTime != null) {
+ item.duration = this.calculateDaysDifference(planBeginTime, planEndTime);
+ }
+ if (this.arrangeType === 1 && planEndTime != null){
+ const date = new Date(planEndTime);
+ date.setDate(date.getDate() + 1);
+ children.forEach(item => {
+ item.planBeginTime = parseTime(date);
+ })
+ }
if (children) {
result = result.concat(this.extractFields(children));
}
});
return result;
},
+ //计算两个时间相减得出的天数
+ calculateDaysDifference(date1, date2) {
+ // 将字符串转换为日期对象
+ const dateObj1 = new Date(date1);
+ const dateObj2 = new Date(date2);
+ // 计算时间差,得到毫秒数
+ const timeDifference = dateObj2 - dateObj1;
+ return timeDifference / (1000 * 60 * 60 * 24);
+ },
/** 展开/折叠操作 */
toggleExpandAll() {
this.refreshTable = false;