|
@@ -20,32 +20,78 @@
|
|
|
prop="qualitySchemeTemplateCode"
|
|
prop="qualitySchemeTemplateCode"
|
|
|
align="center"
|
|
align="center"
|
|
|
>
|
|
>
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
|
|
|
+ {{ scope.row.qualitySchemeTemplateCode }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="质检方案名称"
|
|
label="质检方案名称"
|
|
|
prop="qualitySchemeTemplateName"
|
|
prop="qualitySchemeTemplateName"
|
|
|
align="center"
|
|
align="center"
|
|
|
- ></el-table-column>
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
|
|
|
+ {{ scope.row.qualitySchemeTemplateName }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="质检类型"
|
|
label="质检类型"
|
|
|
prop="categoryLevelClassName"
|
|
prop="categoryLevelClassName"
|
|
|
align="center"
|
|
align="center"
|
|
|
- ></el-table-column>
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
|
|
|
+ {{ scope.row.categoryLevelClassName }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="质检项编码"
|
|
label="质检项编码"
|
|
|
prop="inspectionCode"
|
|
prop="inspectionCode"
|
|
|
align="center"
|
|
align="center"
|
|
|
- ></el-table-column>
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
|
|
|
+ {{ scope.row.inspectionCode }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="质检项名称"
|
|
label="质检项名称"
|
|
|
prop="inspectionName"
|
|
prop="inspectionName"
|
|
|
align="center"
|
|
align="center"
|
|
|
- ></el-table-column>
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
|
|
|
+ {{ scope.row.inspectionName }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="工艺参数"
|
|
label="工艺参数"
|
|
|
prop="defaultValue"
|
|
prop="defaultValue"
|
|
|
align="center"
|
|
align="center"
|
|
|
>
|
|
>
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <!-- <span :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
|
|
|
+ {{ scope.row.defaultValue }}
|
|
|
|
|
+ </span> -->
|
|
|
|
|
+ <div style="display: flex; justify-content: center" :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
|
|
|
+ <span>{{ scope.row.symbol }}</span>
|
|
|
|
|
+ <span v-if="scope.row.textType == 3">
|
|
|
|
|
+ {{ scope.row.minValue }}-{{ scope.row.maxValue }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+
|
|
|
|
|
+ <span v-else>
|
|
|
|
|
+ <span>{{ scope.row.defaultValue }}</span>
|
|
|
|
|
+ </span>
|
|
|
|
|
+
|
|
|
|
|
+ {{ scope.row.unitName }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="质检工具" prop="" align="center">
|
|
<el-table-column label="质检工具" prop="" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -65,6 +111,8 @@
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
<el-input
|
|
|
|
|
+ :class="scope.row.qualityResults === 2 ? 'warn' : ''"
|
|
|
|
|
+ @blur="(e) => inputResultContent(e, scope.row)"
|
|
|
v-model="scope.row.qualityResultContent"
|
|
v-model="scope.row.qualityResultContent"
|
|
|
placeholder="请输入内容"
|
|
placeholder="请输入内容"
|
|
|
:disabled="type == 'detail'"
|
|
:disabled="type == 'detail'"
|
|
@@ -234,16 +282,19 @@
|
|
|
this.tableData = [];
|
|
this.tableData = [];
|
|
|
this.rowIndex = index;
|
|
this.rowIndex = index;
|
|
|
this.type = type;
|
|
this.type = type;
|
|
|
|
|
+ console.log(list, 'list +++++++++');
|
|
|
// console.log(list, 'lklllllllllllllllllkkkkkkkkkkkkkkkkkkkkk', list[0].qualityResults);
|
|
// console.log(list, 'lklllllllllllllllllkkkkkkkkkkkkkkkkkkkkk', list[0].qualityResults);
|
|
|
//如果质检项qualitySampleTemplateList只有一条数据且质检结果是让步接收
|
|
//如果质检项qualitySampleTemplateList只有一条数据且质检结果是让步接收
|
|
|
if (list[0].qualitySampleTemplateList.length == 1) {
|
|
if (list[0].qualitySampleTemplateList.length == 1) {
|
|
|
for (let i = 0; i < list[0].qualitySampleTemplateList.length; i++) {
|
|
for (let i = 0; i < list[0].qualitySampleTemplateList.length; i++) {
|
|
|
- list[0].qualitySampleTemplateList[i].qualityResults =
|
|
|
|
|
- list[0].qualityResults;
|
|
|
|
|
|
|
+ list[0].qualitySampleTemplateList[i].qualityResults = list[0]
|
|
|
|
|
+ .qualityResults
|
|
|
|
|
+ ? list[0].qualityResults
|
|
|
|
|
+ : 1;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
this.tableData = JSON.parse(JSON.stringify(list));
|
|
this.tableData = JSON.parse(JSON.stringify(list));
|
|
|
- console.log( this.tableData,'33333333333333333');
|
|
|
|
|
|
|
+ console.log(this.tableData, '33333333333333333');
|
|
|
|
|
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
},
|
|
},
|
|
@@ -265,7 +316,33 @@
|
|
|
});
|
|
});
|
|
|
return getQualityValue;
|
|
return getQualityValue;
|
|
|
},
|
|
},
|
|
|
|
|
+ inputResultContent(e, row) {
|
|
|
|
|
+ console.log(row, 'row row row');
|
|
|
|
|
+ console.log(e, 'eeeeeeeee');
|
|
|
|
|
+ if (row.textType == '1') {
|
|
|
|
|
+ if (row.qualityResultContent != row.defaultValue) {
|
|
|
|
|
+ this.$set(row, 'qualityResults', 2);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$set(row, 'qualityResults', 1);
|
|
|
|
|
+ }
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (row.textType == '3') {
|
|
|
|
|
+ let num = Number(row.qualityResultContent)
|
|
|
|
|
+ if(num == NaN){
|
|
|
|
|
+ this.$set(row, 'qualityResults', 2);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(num,'num')
|
|
|
|
|
+ if(num >= Number(row.minValue) && num <= Number(row.maxValue)){
|
|
|
|
|
+ this.$set(row, 'qualityResults', 1);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$set(row, 'qualityResults', 2);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ console.log(row, 'row 11111111111');
|
|
|
|
|
+ },
|
|
|
handleClose() {
|
|
handleClose() {
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
|
},
|
|
},
|
|
@@ -284,3 +361,12 @@
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
|
+ ::v-deep .warn {
|
|
|
|
|
+ color: red;
|
|
|
|
|
+ .el-input__inner {
|
|
|
|
|
+ color: red;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|