licp
2024-07-01 c6334d29171e1d3edf2d10a01ab2489fbdd310c8
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -1251,8 +1251,10 @@
              })
            })
            if (item.v.ps != undefined && item.v.ps.value == '结论') {
              if (this.currentSample.insProduct.find(m => m.id == item.i)) {
              try {
                if (this.currentSample.insProduct.find(m => m.id == item.i)) {
                let ask = this.currentSample.insProduct.find(m => m.id == item.i).ask?this.currentSample.insProduct.find(m => m.id == item.i).ask.split('&'):null;
                console.log(comValue)
                let res = Object.values(comValue)[0]
                let comp = []
                console.log(res, ask)
@@ -1303,6 +1305,10 @@
                }
                this.saveInsContext()
              }
              } catch (error) {
              }
            } else {
              let comResult = ''
              try {
@@ -1409,26 +1415,34 @@
              //     }
              //     break;
              // }
              list.forEach(a => {
                if (a[0].r == item.r && comResult !== '') {
                  for (var b in a) {
                    if (a[b].c == item.c) {
                      try{
                        let val = parseFloat(comResult.toFixed(3))
                        a[b].v.v = isNaN(val) ? '' : val
                      }catch(e){
                        a[b].v.v = comResult
              try {
                list.forEach(a => {
                  if (a[0].r == item.r && comResult !== '') {
                    for (var b in a) {
                      if (a[b].c == item.c) {
                        try{
                          let val = parseFloat(comResult.toFixed(3))
                          a[b].v.v = isNaN(val) ? '' : val
                        }catch(e){
                          a[b].v.v = comResult
                        }
                        break
                      }
                      break
                    }
                  }
                }
              })
              this.changeInput(comResult, `${id}-${item.r}-${item.c}-${pId}`) //改变最终值
                })
                this.changeInput(comResult, `${id}-${item.r}-${item.c}-${pId}`) //改变最终值
              } catch (error) {
              }
            }
          }
        })
        this.getCurrentInsProduct(pId)
        try {
          this.getCurrentInsProduct(pId)
        } catch (error) {
        }
      },
      getCurrentInsProduct(pId) {
        if (!this.tableList[0].insProductResult) {
@@ -1743,15 +1757,17 @@
        return
      },
      saveInsContext() {
        this.$axios.post(this.$api.insOrderPlan.saveInsContext, {
          param: JSON.stringify(this.param)
        }).then(res => {
          if (res.code == 201) {
            this.$message.error('保存失败')
            return
          }
          this.$message.success('已保存')
        })
        if(this.param){
          this.$axios.post(this.$api.insOrderPlan.saveInsContext, {
            param: JSON.stringify(this.param)
          }).then(res => {
            if (res.code == 201) {
              this.$message.error('保存失败')
              return
            }
            this.$message.success('已保存')
          })
        }
      },
      changeEquip(val, n) {
        for (let i in this.equipOptions) {