From 2c6c0ead131ba23511e5f55552c610d3f2f2a764 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期五, 31 五月 2024 15:45:36 +0800
Subject: [PATCH] 光纤配置数据存储和回显

---
 src/components/do/b1-ins-order/add.vue |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 91011c5..d8cd2c6 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -672,6 +672,7 @@
         filters: [],
         formType: [],
         configShow: false,
+        sampleId: null
       }
     },
     watch: {
@@ -870,6 +871,7 @@
           this.addObj.custom = selects.name
           this.addObj.code = selects.code
           this.addObj.phone = selects.phone
+          this.addObj.companyId = selects.departId
         })
       },
       searchFilter() {
@@ -1052,6 +1054,11 @@
         })
       },
       rowClick(row, column, event) {
+        this.sampleId = row.id
+        if(this.active!==1){
+          this.sampleIds = []
+          this.sampleIds.push(row.id)
+        }
         this.productList = row.insProduct
         setTimeout(() => {
           this.productList.forEach(a => {
@@ -1320,11 +1327,29 @@
         return row[property] === value;
       },
       openConfig(){
-        if(this.sampleIds.length===0){
-          this.$message.error("鏈�夋嫨鏍峰搧")
-          return
+        if(this.active===1){
+          if(this.sampleIds.length===0){
+            this.$message.error("鏈�夋嫨鏍峰搧")
+            return
+          }
+          this.configShow = true
+        }else{
+          if(this.sampleId === null){
+            this.$message.error('鏈�変腑鏍峰搧')
+            return
+          }
+          this.$axios.post(this.$api.insBushing.selectBushingBySampleId,{
+            sampleId: this.sampleId
+          }).then(res=>{
+            for(var i in this.sampleList){
+              if(this.sampleList[i].id = this.sampleId){
+                this.sampleList[i].bushing = res.data
+                break
+              }
+            }
+            this.configShow = true
+          })
         }
-        this.configShow = true
       }
     }
   }

--
Gitblit v1.9.3