From b9e6b361bdb8cd26b9768602734b3a078dcdee26 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 31 七月 2024 12:18:14 +0800
Subject: [PATCH] 修改检验任务bug

---
 src/components/do/b1-ins-order/add.vue |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 6ca49cf..650f2f4 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -2063,15 +2063,30 @@
       upProductSelect(selection, row) {
         this.bsm1DiaList = []
         row.state = row.state == 1 ? 0 : 1
-        if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1) {
+        let arr = this.productList.filter(m=>m.state==1&&row.section.includes(m.section)&&m.ask&&m.section.indexOf('[')==-1)
+        if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1&&arr.length==0) {
           if (row.section.indexOf('[') > -1) {
             row.bsmRow = this.HaveJson(row)
           }
           row.bsm1 = true
           this.bsm1DiaList.push(row)
           this.bsm1DiaAll = true
-        } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0) {
+        } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0&&arr.length==0) {
           row.bsm1 = false
+        }else if(arr.length>0){
+          row.bsmRow = this.HaveJson(row)
+          let section = arr[0].section
+          let arr0 = JSON.parse(row.section)
+          let arr1 = JSON.parse(row.ask)
+          let arr2 = JSON.parse(row.manHour)
+          let arr3 = JSON.parse(row.price)
+          let arr4 = JSON.parse(row.tell)
+          let index = arr0.indexOf(section)
+          row.section = section
+          row.ask = arr1[index]
+          row.manHour = arr2[index]
+          row.price = arr3[index]
+          row.tell = arr4[index]
         }
         if (row.bsm === '1' && row.inspectionItem === '鍏夌氦鎺ュご鎹熻��' && this.sampleList.length > 1 && row.state === 1&&!this.isBsm2Val2) {
           this.bsm2 = true

--
Gitblit v1.9.3