zouyu
2023-11-02 01d8a6ab2837c934969b5cacb915207116268447
src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -177,8 +177,8 @@
                <el-table-column prop="userName" label="检验员"></el-table-column>
                <el-table-column prop="judgeState" label="检验结论">
                  <template slot-scope="scope">
                    <el-tag type="success" v-if="scope.row.judgeState == 1">合格</el-tag>
                    <el-tag type="danger" v-else-if="scope.row.judgeState == 0">不合格</el-tag>
                    <el-tag type="success" v-if="scope.row.testState == '1'">合格</el-tag>
                    <el-tag type="danger" v-else-if="scope.row.testState == '0'">不合格</el-tag>
                  </template>
                </el-table-column>
                <el-table-column  label="操作">
@@ -339,6 +339,19 @@
          })
        }
      },
      checkTestState(){
          let resultVal = '1'
          this.list.forEach(item=>{
              if(item.children){
                if(obj.testState == 0){
                    resultVal = '0'
                }
              }
          })
          this.resultVal = resultVal
          this.conclusionTable[0].testState = resultVal
          sessionStorage.setItem("raw-resultVal-"+this.dataForm.id,resultVal)
      },
      showDialog(){
        let pro = this.list.filter(item => {
          return item.testState == 0;
@@ -363,7 +376,7 @@
            this.dialogVisible = false
          }
        });
        this.init()
        this.checkTestState()
      },
      addTeatValueColumn(){
        this.empiricalValueAdd = this.empiricalValueAdd + 1;
@@ -396,7 +409,6 @@
        }
      },
      updateTestValue(row,index){
        console.log(row,index)
        if(row.rpId == null || row.testValueList[index]==null){
          return
        }
@@ -457,7 +469,7 @@
              code: data.code,
              name: data.name,
              userName: Array.from(new Set(userNameList)).join(','),
              judgeState: this.resultVal==null?null:this.resultVal
              testState: this.resultVal==null?null:this.resultVal
            }]
          }).catch(error=>{
            this.$message.error("获取失败",error)