From c09e858fe674ea768248798ca86cf4b90cdff09d Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期三, 31 七月 2024 15:07:38 +0800
Subject: [PATCH] 检验下单的时候遇到光纤接头损耗的特殊项目需要弹框填写,现在因为别的地方改动这里受到了影响

---
 src/components/do/b1-inspect-order-plan/Inspection.vue |   38 +++++++++++++++++++++++++++++---------
 1 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index fb42e85..125ee7e 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -322,7 +322,7 @@
         </div>
       </div>
       <div class="center-box" id="nav" v-loading="tableLoading" v-if="!tableLists.find(m=>m.templateId==currentTable)||(tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('鐑惊鐜�')&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('娓╁崌璇曢獙'))">
-        <table border="1" class="tables" cellpadding="10" v-for="(item,index) in tableList" :key="index">
+        <table border="1" class="tables" cellpadding="10" v-for="(item,index) in tableList" :key="index+currentTable">
           <tbody>
             <tr v-for="(m,i) in item.arr" :key="i">
               <td :id='item.templateId+"-"+n.i+"-"+n.r+"-"+n.c' v-for="(n,j) in m" :key="j"
@@ -1052,8 +1052,10 @@
         if (val0 != null && val1 != val0) {
           this.tableLists.forEach((m, i) => {
             if (m.templateId == val1) {
-              this.tableList = null;
-              this.tableList = [(this.tableLists[i])];
+              // this.tableList = null;
+              // this.tableList = [(this.tableLists[i])];
+              this.$delete(this.tableList, 0)
+              this.$set(this.tableList, 0, this.tableLists[i])
               this.handleTableData()
             }
           })
@@ -1205,7 +1207,11 @@
       },
       // 娓╁害寰幆---寮�濮�
       changeItem(row){
-        if(row.value0&&row.value1){
+        if(row.value0&&!row.value1){
+          this.$set(row,'comValue',Number(row.value0).toFixed(3))
+        }else if(!row.value0&&row.value1){
+          this.$set(row,'comValue',Number(row.value1).toFixed(3))
+        }else if(row.value0&&row.value1){
           this.$set(row,'comValue',((Number(row.value0)+Number(row.value1))/2).toFixed(3))
         }else{
           return
@@ -2359,7 +2365,8 @@
             comparisonList:this.comparisonList,
             currentSample:this.currentSample,
             PROJECT:this.PROJECT,
-            param:this.param
+            param:this.param,
+            currentTable:this.currentTable
           }));
         } catch (error) {
           console.log(444,error);
@@ -2705,6 +2712,14 @@
           this.$message.error("璇锋寚瀹氬鏍镐汉鍛�")
           return
         }
+        if(!this.otherForm.humidity){
+          this.$message.error("璇疯緭鍏ユ箍搴�")
+          return
+        }
+        if(!this.otherForm.temperature){
+          this.$message.error("璇疯緭鍏ユ俯搴�")
+          return
+        }
         this.addVerifyDia = false
         this.submitLoading = true;
         this.$axios.post(this.$api.insOrderPlan.checkSubmitPlan, {
@@ -2717,8 +2732,7 @@
                 orderId: this.orderId,
                 laboratory: this.sonLaboratory,
                 verifyUser: this.verifyUser,
-                entrustCode: this.insOrder.entrustCode,
-                sampleCode: this.currentSample.sampleCode
+                entrustCode: this.insOrder.entrustCode
               }).then(res => {
                 if (res.code === 200) {
                   this.$message.success("鎿嶄綔鎴愬姛")
@@ -2787,7 +2801,8 @@
             this.worker.postMessage(JSON.stringify({
               type: 'saveData',
               tableList:this.tableList,
-              param:this.param
+              param:this.param,
+              currentTable:this.currentTable
             }));
           }
         }catch (error) {
@@ -2799,7 +2814,9 @@
           if (this.equipOptions[i].value === val) {
             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',this.equipOptions[i].label)
                 this.param[n.i].equipValue[i1].isItADataAcquisitionDevice = this.equipOptions[i].isItADataAcquisitionDevice
               }
@@ -2822,11 +2839,14 @@
       getAuthorizedPerson() {
         this.$axios.get(this.$api.user.getUserMenu).then(res => {
           let data = []
+          let userName = JSON.parse(localStorage.getItem("user")).name;
           res.data.forEach(a => {
-            data.push({
+            if(a.name !== userName) {
+              data.push({
               label: a.name,
               value: a.id
             })
+            }
           })
           this.personList = data
         })

--
Gitblit v1.9.3