licp
2024-07-31 b9e6b361bdb8cd26b9768602734b3a078dcdee26
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