修改bug
This commit is contained in:
@@ -140,10 +140,10 @@ export default {
|
||||
init(obj) {
|
||||
// console.log(productionLineId);
|
||||
console.log(obj);
|
||||
this.visible = true;
|
||||
this.visible = true
|
||||
// if(obj.id)
|
||||
if (obj) {
|
||||
this.dataForm.id = obj.id ? obj.id : ""
|
||||
this.dataForm.id = obj.id || null;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields()
|
||||
@@ -154,13 +154,16 @@ export default {
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
this.dataForm.inspectionDetIdList = res.data
|
||||
this.dataForm.productionLineId = obj.productionLineId
|
||||
this.getWorksectionList(obj.productionLineId)
|
||||
this.dataForm.sectionId = obj.sectionId
|
||||
})
|
||||
}
|
||||
if (this.dataForm.id) {
|
||||
console.log(1111);
|
||||
this.urlOptions.infoURL(obj.id).then(response => {
|
||||
this.dataForm.id = response.data.id
|
||||
this.dataForm.productionLineId = response.data.productionLineId
|
||||
this.dataForm.sectionId = response.data.sectionId
|
||||
|
||||
// if (this.setData) {
|
||||
// this.setDataForm()
|
||||
// }
|
||||
@@ -261,10 +264,10 @@ export default {
|
||||
this.$emit('update', this.dataForm);
|
||||
},
|
||||
|
||||
async getCode(url) {
|
||||
const response = await this.$axios(url);
|
||||
return response.data;
|
||||
},
|
||||
// async getCode(url) {
|
||||
// const response = await this.$axios(url);
|
||||
// return response.data;
|
||||
// },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-08 13:46:17
|
||||
* @LastEditTime: 2024-01-16 14:59:33
|
||||
* @LastEditTime: 2024-01-22 15:29:53
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -92,13 +92,13 @@
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最小值"
|
||||
:rules="[{ required: true, message: '最小值', trigger: 'blur' }]">
|
||||
>
|
||||
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.minValue"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最大值"
|
||||
:rules="[{ required: true, message: '最大值', trigger: 'blur' }]">
|
||||
>
|
||||
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.maxValue"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -257,6 +257,7 @@ export default {
|
||||
methods: {
|
||||
judgeValue(val, minValue, maxValue, index) {
|
||||
if (val >= minValue && val <= maxValue) {
|
||||
console.log(val)
|
||||
this.dataForm.checkValueList[index].showIcon = true
|
||||
this.dataForm.checkValueList[index].isStandard = true
|
||||
} else {
|
||||
@@ -483,6 +484,7 @@ export default {
|
||||
minValue: ele.minValue
|
||||
}
|
||||
})
|
||||
console.log(valueList);
|
||||
getQualityHotMaterialDetList({
|
||||
mainId: response.data.id
|
||||
}).then((result) => {
|
||||
@@ -490,7 +492,7 @@ export default {
|
||||
return {
|
||||
name: ele.checkName,
|
||||
id: ele.id,
|
||||
checkDetId: ele.id,
|
||||
checkDetId: ele.checkDetId,
|
||||
checkValue: ele.checkValue,
|
||||
maxValue:null,
|
||||
minValue: null
|
||||
@@ -501,28 +503,31 @@ export default {
|
||||
return {
|
||||
mainId: ele.mainId,
|
||||
id: ele.id,
|
||||
checkDetId: ele.id,
|
||||
checkDetId: ele.checkDetId,
|
||||
checkValue: ele.checkValue,
|
||||
isStandard: true,
|
||||
showIcon: false,
|
||||
}
|
||||
})
|
||||
valueList.forEach((ele, index) => {
|
||||
if (this.ingredientList[index].checkDetId >= ele.checkDetId) {
|
||||
this.ingredientList[index].minValue = ele.minValue
|
||||
this.ingredientList[index].maxValue = ele.maxValue
|
||||
}
|
||||
})
|
||||
valueList.forEach((ele,index) => {
|
||||
console.log(ele);
|
||||
if (this.dataForm.checkValueList[index].checkDetId >= ele.checkDetId && this.dataForm.checkValueList[index].checkValue >= ele.minValue && this.dataForm.checkValueList[index].checkValue <= ele.maxValue) {
|
||||
this.dataForm.checkValueList[index].showIcon = true
|
||||
this.dataForm.checkValueList[index].isStandard = true
|
||||
} else {
|
||||
this.dataForm.checkValueList[index].showIcon = true
|
||||
this.dataForm.checkValueList[index].isStandard = false
|
||||
this.ingredientList.forEach((ele, i) => {
|
||||
valueList.forEach((item, index) => {
|
||||
if (ele.checkDetId == item.checkDetId) {
|
||||
this.ingredientList[i].minValue = item.minValue
|
||||
this.ingredientList[i].maxValue = item.maxValue
|
||||
}
|
||||
// })
|
||||
})
|
||||
})
|
||||
valueList.forEach((ele, index) => {
|
||||
this.dataForm.checkValueList.forEach((item, i) => {
|
||||
if (ele.checkDetId == item.checkDetId && item.checkValue >= ele.minValue && item.checkValue <= ele.maxValue) {
|
||||
console.log(1111)
|
||||
item.showIcon = true
|
||||
item.isStandard = true
|
||||
} else {
|
||||
item.showIcon = true
|
||||
item.isStandard = false
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
@@ -53,8 +53,9 @@ const tableProps = [
|
||||
label: '取样人'
|
||||
},
|
||||
{
|
||||
prop: 'appearance',
|
||||
label: '是否合格'
|
||||
prop: 'checkResult',
|
||||
label: '是否合格',
|
||||
filter: (val) => val == false ? '不合格' : '合格' ,
|
||||
},
|
||||
{
|
||||
prop: 'materialGrade',
|
||||
|
||||
Reference in New Issue
Block a user