licp
2024-08-02 b572bdc7da9c6c47df9be5939f5d3280f2127546
src/components/do/b1-ins-order/add.vue
@@ -961,7 +961,7 @@
          entity: {
            orderBy: {
              field: 'id',
              order: 'asc'
              order: 'desc'
            }
          },
          isIndex: true,
@@ -2082,6 +2082,7 @@
          this.sampleIds.push(row.id)
        }
        this.productList = row.insProduct
        this.productList0 = JSON.parse(JSON.stringify(this.productList))
        setTimeout(() => {
          this.productList.forEach(a => {
            if (a.state == 1) this.toggleSelection(a)
@@ -2257,7 +2258,8 @@
            name: this.templateName,
            thing: JSON.stringify({
              addObj: this.addObj,
              sampleList: this.sampleList
              sampleList: this.sampleList,
              selectTree:this.selectTree
            })
          }, {
            headers: {
@@ -2282,6 +2284,7 @@
          let obj = JSON.parse(res.data)
          this.addObj = obj.addObj;
          this.sampleList = obj.sampleList;
          this.selectTree = obj.selectTree
        })
      },
      delSampleAndProduct() {
@@ -2325,10 +2328,12 @@
          this.isAskOnlyRead = false
        }
        this.getProductLoad = true
        let selectTreeList = this.selectTree.split(" - ")
        selectTreeList[selectTreeList.length - 1] = this.addObj.model
        this.$axios.post(this.$api.standardTree.selectStandardProductList, {
          model: row.model + '-' + row.modelNum,
          model: this.addObj.model + '-' + row.modelNum,
          standardMethodListId: val,
          factory: this.selectTree,
          factory: selectTreeList.join(" - "),
        }, {
          headers: {
            'Content-Type': 'application/json'
@@ -2666,15 +2671,18 @@
        }
      },
      upBsmAll (item) {
        let sections = JSON.parse(item.bsmRow.section);
        let asks = JSON.parse(item.bsmRow.ask);
        let tells = JSON.parse(item.bsmRow.tell);
        let manHours = JSON.parse(item.bsmRow.manHour);
        let prices = JSON.parse(item.bsmRow.price);
        // console.log(1111,item,this.bsm1DiaList)
        for (let i =0;i<this.bsm1DiaList.length;i++){
          this.bsm1DiaList[i].bsm1Val = item.bsm1Val
          let sections = JSON.parse(this.bsm1DiaList[i].bsmRow.section);
          let asks = JSON.parse(this.bsm1DiaList[i].bsmRow.ask);
          let tells = JSON.parse(this.bsm1DiaList[i].bsmRow.tell);
          let manHours = JSON.parse(this.bsm1DiaList[i].bsmRow.manHour);
          let prices = JSON.parse(this.bsm1DiaList[i].bsmRow.price);
        for (var a in sections) {
          if (item.bsm1Val === sections[a]) {
            if (this.bsm1DiaList[i].bsm1Val === sections[a]) {
            this.productList.forEach(p => {
              if (p.id === item.bsmRow.id) {
                if (p.id === this.bsm1DiaList[i].bsmRow.id) {
                p.section = sections[a]
                p.ask = asks[a]
                p.tell = tells[a]
@@ -2685,6 +2693,9 @@
            break
          }
        }
        }
        this.changeProductList0()
        this.currentMethod.insProduct = this.productList0
      },
      beforeClose(done) {
        // if (this.bsm1) {