From 16d86c76d55eb062fa11ba6272e97379e0496d9d Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 12 六月 2024 14:43:51 +0800
Subject: [PATCH] 检验下单RTS功能修改

---
 src/components/do/b1-ins-order/fiberoptic-config.vue |   94 +++++++++++++++++++++++++++++++++++------------
 1 files changed, 70 insertions(+), 24 deletions(-)

diff --git a/src/components/do/b1-ins-order/fiberoptic-config.vue b/src/components/do/b1-ins-order/fiberoptic-config.vue
index 633a1c2..f44e8fb 100644
--- a/src/components/do/b1-ins-order/fiberoptic-config.vue
+++ b/src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -269,6 +269,14 @@
             </el-col>
           </el-col>
         </el-row>
+        <el-row v-if="bsm3">
+          <el-col class="search_thing" :span="22" style="display: flex;align-items: center;">
+            <div class="search_label"><span class="required-span">* </span>RTS锛�</div>
+            <div class="search_input">
+              <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="bsm3Val"></el-input>
+            </div>
+          </el-col>
+        </el-row>
       </div>
     </el-dialog>
   </div>
@@ -331,7 +339,10 @@
         bsm2Dia: false,
         bsm2Val2: [],
         bsm2Val3: [],
-        sampleIds:[]
+        sampleIds:[],
+        bsm3: false,
+        bsm3Val: null,
+        bsmRow3: null,
       }
     },
     computed: {
@@ -720,8 +731,9 @@
             });
           }
         }
-        if(this.type==1){
-          this.detectionItems.forEach(p => {
+        this.bsmRow3 = []
+        this.detectionItems.forEach(p => {
+          if(this.type==1){
             if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 1) {
               if (p.section.indexOf('[') > -1) {
                 this.bsmRow = this.HaveJson(p)
@@ -742,28 +754,38 @@
             } else if (p.bsm === '1' && p.inspectionItem === '鐔旀帴鎹熻��' && p.state === 1) {
               this.bsm2 = false
             }
-          })
-          if (e.length > 0) {
-            this.sampleList.map(item => {
-              if (this.sampleIds.indexOf(item.id) > -1) {
-                item.insProduct.map(m => {
-                  m.state = 1
-                  return m;
-                })
-              }
-              return item
-            })
-          } else {
-            this.sampleList.map(item => {
-              if (this.sampleIds.indexOf(item.id) > -1) {
-                item.insProduct.map(m => {
-                  m.state = 0
-                  return m;
-                })
-              }
-              return item
-            })
           }
+          if (p.ask.includes('RTS')&&p.state === 1) {
+            p.rts = ''
+            this.bsm3Val = ''
+            this.bsm3 = true
+            this.bsm1Dia = true
+            this.bsmRow3.push(p)
+          }else{
+            this.bsm3 = false
+          }
+        })
+
+        if (e.length > 0) {
+          this.sampleList.map(item => {
+            if (this.sampleIds.indexOf(item.id) > -1) {
+              item.insProduct.map(m => {
+                m.state = 1
+                return m;
+              })
+            }
+            return item
+          })
+        } else {
+          this.sampleList.map(item => {
+            if (this.sampleIds.indexOf(item.id) > -1) {
+              item.insProduct.map(m => {
+                m.state = 0
+                return m;
+              })
+            }
+            return item
+          })
         }
         this.$nextTick(() => {
           this.$refs.productTable.doLayout()
@@ -812,6 +834,16 @@
           }
         }else{
           this.bsm1Dia = false
+        }
+        if (row.ask.includes('RTS')&&row.state === 1) {
+          this.bsmRow3 = null;
+          row.rts = ''
+          this.bsm3Val = ''
+          this.bsm3 = true
+          this.bsm1Dia = true
+          this.bsmRow3 = row
+        }else{
+          this.bsm3 = false
         }
       },
       computationalPairing(n){
@@ -884,6 +916,20 @@
             }
           }
         }
+        if(this.bsm3){
+          if(!this.bsm3Val){
+            this.$message.error('RST蹇呴』濉啓')
+            return
+          }else{
+            if(Array.isArray(this.bsmRow3)){
+              this.bsmRow3.forEach(item=>{
+                item.rts = this.bsm3Val
+              })
+            }else{
+              this.bsmRow3.rts = this.bsm3Val
+            }
+          }
+        }
         done()
       },
       upBsm1(val) {

--
Gitblit v1.9.3