value
2024-05-31 2c6c0ead131ba23511e5f55552c610d3f2f2a764
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
      }
    }
  }