|
@@ -175,7 +175,12 @@
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="8" v-if="pageName == 'QualityInspection'||pageName == 'productionRecords'">
|
|
|
|
|
|
|
+ <el-col
|
|
|
|
|
+ :span="8"
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ pageName == 'QualityInspection' || pageName == 'productionRecords'
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<el-form-item label="供应商" required prop="supplierName">
|
|
<el-form-item label="供应商" required prop="supplierName">
|
|
|
<el-input
|
|
<el-input
|
|
|
clearable
|
|
clearable
|
|
@@ -579,7 +584,7 @@
|
|
|
minWidth: 120
|
|
minWidth: 120
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: this.pageName == 'qualityTestRecords' ? '描述' : '数量',
|
|
|
|
|
|
|
+ label: '值',
|
|
|
prop: 'num',
|
|
prop: 'num',
|
|
|
minWidth: 120,
|
|
minWidth: 120,
|
|
|
slot: 'num'
|
|
slot: 'num'
|
|
@@ -753,19 +758,45 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
setValue() {
|
|
setValue() {
|
|
|
- if (this.pageName == 'productionRecords' && this.title == '报工') {
|
|
|
|
|
|
|
+ if (this.title == '报工') {
|
|
|
this.addForm.detailList.forEach((item, index) => {
|
|
this.addForm.detailList.forEach((item, index) => {
|
|
|
- if (item.paramValue == '用煤量') {
|
|
|
|
|
- let num1 = this.addForm.detailList.find(
|
|
|
|
|
- (item1) => item1.paramValue == '用水量'
|
|
|
|
|
- )?.num;
|
|
|
|
|
- console.log(num1, 'num1');
|
|
|
|
|
- let num = 0;
|
|
|
|
|
- if (num1) {
|
|
|
|
|
- num = (62 / 600) * num1;
|
|
|
|
|
|
|
+ if (this.pageName == 'productionRecords') {
|
|
|
|
|
+ if (item.paramValue == '用煤量') {
|
|
|
|
|
+ let num1 = this.addForm.detailList.find(
|
|
|
|
|
+ (item1) => item1.paramValue == '用水量'
|
|
|
|
|
+ )?.num;
|
|
|
|
|
+ console.log(num1, 'num1');
|
|
|
|
|
+ let num = 0;
|
|
|
|
|
+ if (num1) {
|
|
|
|
|
+ num = (62 / 600) * num1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.addForm.detailList[index],
|
|
|
|
|
+ 'num',
|
|
|
|
|
+ parseFloat(num.toFixed(5))
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.pageName == 'qualityTestRecords') {
|
|
|
|
|
+ if (item.paramValue == '检测干度值-干度') {
|
|
|
|
|
+ let num1 = this.addForm.detailList.find(
|
|
|
|
|
+ (item1) => item1.paramValue == '检测干度值-给水'
|
|
|
|
|
+ )?.num;
|
|
|
|
|
+ let num2 = this.addForm.detailList.find(
|
|
|
|
|
+ (item1) => item1.paramValue == '检测干度值-炉水'
|
|
|
|
|
+ )?.num;
|
|
|
|
|
+ let num = 0;
|
|
|
|
|
+ if (num1 && num2) {
|
|
|
|
|
+ num = (num2 - num1) / num2;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- this.$set(this.addForm.detailList[index], 'num', parseFloat(num.toFixed(5)));
|
|
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.addForm.detailList[index],
|
|
|
|
|
+ 'num',
|
|
|
|
|
+ parseFloat(num.toFixed(5)) * 100
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|