From d05b7f26de4e0f9114729a6162e5a757ecf77fcf Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期一, 05 八月 2024 10:41:31 +0800
Subject: [PATCH] 检验下单添加字段:company

---
 src/components/do/b1-inspect-order-plan/Inspection.vue |   42 +++++++++++++++++++++++++++++++++++++-----
 1 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 9608259..e857853 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -1301,10 +1301,10 @@
                     if(str0==str){
                       maxNum = num
                     }
-                    if(data[i][j].equipName&&data[i][j].equipValue){
-                      if(!m.v.v){
-                        this.changeEquip(data[i][j].equipValue,m)
-                      }
+                  }
+                  if(data[i][j].equipName&&data[i][j].equipValue&&m.v&&m.v.ps&&m.v.ps.value=='璁惧缂栫爜'&&str0==str){
+                    if(!m.v.v){
+                      this.changeEquip(data[i][j].equipValue,m,data[i][j].equipName)
                     }
                   }
                 })
@@ -1358,6 +1358,7 @@
           this.$message.error('璇烽�夋嫨闇�瑕侀噰闆嗙殑鏁版嵁')
           return
         }
+        this.getDataIndex.sort((a, b) => a - b);
         for (let i=0;i<this.getData.length;i++){
           for(let j=0;j<this.getData[i].child.length;j++){
             let arr = []
@@ -1512,6 +1513,23 @@
                       ]
                       obj.value0 = insValue[0].v
                       obj.value1 = insValue[1].v
+                    }else if(insValue&&insValue.length==1){
+                      this.param[obj.id].insValue = [
+                        {
+                          i:obj.id,
+                          v:{
+                            v:insValue[0].v
+                          }
+                        },
+                        {
+                          i:obj.id,
+                          v:{
+                            v:''
+                          }
+                        }
+                      ]
+                      obj.value0 = insValue[0].v
+                      obj.value1 = ''
                     }
                     break;
                   case 'comValue':
@@ -3047,11 +3065,15 @@
           console.log(999,error);
         }
       },
-      changeEquip(val, n) {
+      changeEquip(val, n,v) {
+        this.$set(n.v,'v',val)
         this.tableList[0].arr.forEach((item,index)=>{
           item.forEach((m,i)=>{
             if(this.param[m.i]){
               this.param[m.i].state = 1
+            }
+            if(m.i==n.i&&m.v.ps&&m.v.ps.value=='璁惧鍚嶇О'&&v){
+              this.$set(m.v,'v',v)
             }
           })
         })
@@ -3060,6 +3082,16 @@
             delete this.param[i]
           }
         }
+        if(val&&v){
+          for (let i1 in this.param[n.i].equipName) {
+            if (this.param[n.i].equipName[i1].i === n.i && this.param[n.i].equipName[i1].r === n.r) {
+              this.$delete(this.param[n.i].equipValue[i1].v,'v')
+              this.$set(this.param[n.i].equipValue[i1].v,'v',val)
+              this.$delete(this.param[n.i].equipName[i1].v,'v')
+              this.$set(this.param[n.i].equipName[i1].v,'v',v)
+            }
+          }
+        }
         for (let i in this.equipOptions) {
           if (this.equipOptions[i].value === val) {
             for (let i1 in this.param[n.i].equipName) {

--
Gitblit v1.9.3