From c02a3ebf5b4338710c4f9ae231d72cf591dfb97f Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期一, 02 十二月 2024 11:28:04 +0800
Subject: [PATCH] 1.修改 批量派发 没绑定工艺路线的单子,显示在最前面
---
src/views/produceManager/workOrder.vue | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/views/produceManager/workOrder.vue b/src/views/produceManager/workOrder.vue
index 6c3f8e7..1b5e651 100644
--- a/src/views/produceManager/workOrder.vue
+++ b/src/views/produceManager/workOrder.vue
@@ -3475,10 +3475,11 @@
})
const { data: res } = await BatchSearchRouteStep(data)
+ const R = [...res.filter(i => i.children.length === 0), ...res.filter(i => i.children.length > 0)]
this.formData3 = []
this.multipleSelection.forEach((item, index) => {
- item.stepname = res[index].children.length > 0 ? res[index].children[0].stepname : ''
- console.log(item.stepname)
+ item.stepname = R[index].children.length > 0 ? R[index].children[0].stepname : ''
+ // console.log(item.stepname)
// if (item.stepname) {
this.formData3.push({
'mesorderstus': item.status,
@@ -3487,7 +3488,7 @@
'mesordercode': item.wo_code,
'partcode': item.partcode,
'mesqty': item.plan_qty,
- 'routecode': res[index].children.length > 0 ? res[index].children[0].routecode : '',
+ 'routecode': R[index].children.length > 0 ? R[index].children[0].routecode : '',
'wkshopcode': item.wkshp_code,
'wkshopname': item.wkshp_name,
'partname': item.partname,
@@ -3495,7 +3496,7 @@
'planstartdate': item.plan_startdate,
'planenddate': item.plan_enddate,
'orderlev': item.piroque,
- children: res[index].children.length > 0 ? res[index].children : [],
+ children: R[index].children.length > 0 ? R[index].children : [],
is_steprice: false,
'is_aps': '',
--
Gitblit v1.9.3