|
|
@@ -66,6 +66,7 @@
|
|
|
size="mini"
|
|
|
v-model="it.allReportWeight"
|
|
|
type="number"
|
|
|
+ @input="blurWeight(it, $index, yyIdx)"
|
|
|
></el-input>
|
|
|
</div>
|
|
|
|
|
|
@@ -150,6 +151,7 @@
|
|
|
size="mini"
|
|
|
v-model="it.allReportWeight"
|
|
|
type="number"
|
|
|
+ @input="blurWeight2(it, $index, yyIdx)"
|
|
|
></el-input>
|
|
|
</div>
|
|
|
|
|
|
@@ -295,13 +297,14 @@
|
|
|
prop="deviceId"
|
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
- <!-- <el-select
|
|
|
+ <el-select
|
|
|
class="content_num"
|
|
|
v-model="row.deviceId"
|
|
|
filterable
|
|
|
placeholder="请选择"
|
|
|
@change="(e) => selectVal(e, row, $index)"
|
|
|
size="mini"
|
|
|
+ :disabled="isDetails"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in deviceList"
|
|
|
@@ -310,8 +313,8 @@
|
|
|
:key="item.id || item.instanceId"
|
|
|
>
|
|
|
</el-option>
|
|
|
- </el-select> -->
|
|
|
- {{ row.deviceName || row.extInfo.deviceName }}
|
|
|
+ </el-select>
|
|
|
+ <!-- {{ row.deviceName || row.extInfo.deviceName }} -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
@@ -327,6 +330,7 @@
|
|
|
class="content_num"
|
|
|
v-model="row.extInfo.heatNumber"
|
|
|
placeholder="请输入炉次号"
|
|
|
+ :disabled="isDetails"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -379,6 +383,9 @@
|
|
|
},
|
|
|
singleReport: {
|
|
|
default: null
|
|
|
+ },
|
|
|
+ index: {
|
|
|
+ default: null
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -387,6 +394,7 @@
|
|
|
immediate: true,
|
|
|
deep: true,
|
|
|
handler(newVal) {
|
|
|
+ console.log('cccccc',newVal)
|
|
|
this.deviceList = newVal;
|
|
|
this.changeHeatNumber();
|
|
|
}
|
|
|
@@ -431,19 +439,36 @@
|
|
|
this.stepsList = res;
|
|
|
});
|
|
|
},
|
|
|
+ selectVal(e, item, idx) {
|
|
|
+ let obj = this.deviceList.find((f) => f.id == e);
|
|
|
+
|
|
|
+ this.$set(
|
|
|
+ this.list[idx],
|
|
|
+ 'deviceName',
|
|
|
+ obj.name + '-' + obj.codeNumber
|
|
|
+ );
|
|
|
+ this.$set(
|
|
|
+ this.list[idx]['extInfo'],
|
|
|
+ 'heatNumber',
|
|
|
+ obj.extInfo.heatNumber
|
|
|
+ );
|
|
|
+ },
|
|
|
|
|
|
changeHeatNumber() {
|
|
|
this.deviceList.forEach((f) => {
|
|
|
- this.list.forEach((o) => {
|
|
|
+ this.list.forEach((o,index) => {
|
|
|
if (
|
|
|
o.deviceId &&
|
|
|
f.instanceId == o.deviceId &&
|
|
|
this.deviceList.length > 1
|
|
|
) {
|
|
|
- o.extInfo.heatNumber = f.extInfo.heatNumber;
|
|
|
+ // o.extInfo.heatNumber = f.extInfo.heatNumber;
|
|
|
+ this.$set(this.list[index].extInfo,'heatNumber',f.extInfo.heatNumber)
|
|
|
this.$forceUpdate();
|
|
|
} else if (this.deviceList.length == 1) {
|
|
|
- o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
|
|
|
+ o['deviceId'] = this.deviceList[0].id;
|
|
|
+ // o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
|
|
|
+ this.$set(this.list[index].extInfo,'heatNumber',this.deviceList[0].extInfo.heatNumber)
|
|
|
this.$forceUpdate();
|
|
|
}
|
|
|
});
|
|
|
@@ -476,13 +501,11 @@
|
|
|
this.list[idx].extInfo.batchReportInfo.forEach((m) => {
|
|
|
count = count + Number(m.allFeedQuantity || 0);
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
let count2 = 0
|
|
|
this.list[idx].extInfo.notBatchReportInfo.forEach(m => {
|
|
|
count2 = count2 + Number(m.allFeedQuantity || 0)
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
|
|
|
if (Number(count + count2) > this.list[idx].feedQuantity) {
|
|
|
this.$set(
|
|
|
@@ -493,7 +516,21 @@
|
|
|
this.$forceUpdate();
|
|
|
|
|
|
this.$message.info('投料数不能大于投料数量');
|
|
|
+ this.$emit('countNumPl',this.list,this.index)
|
|
|
+ }else{
|
|
|
+ this.$emit('countNumPl',this.list,this.index)
|
|
|
}
|
|
|
+
|
|
|
+ },
|
|
|
+ blurWeight(it, idx, yyIdx) {
|
|
|
+ let value = it.allReportWeight;
|
|
|
+ value = value.replace(/\./g, '');
|
|
|
+ this.$set(
|
|
|
+ this.list[idx].extInfo.batchReportInfo[yyIdx],
|
|
|
+ 'allReportWeight',
|
|
|
+ value
|
|
|
+ );
|
|
|
+ this.$emit('countNumPl',this.list,this.index)
|
|
|
},
|
|
|
|
|
|
blurNum2(it, idx, yyIdx) {
|
|
|
@@ -515,8 +552,6 @@
|
|
|
count2 = count2 + Number(m.allFeedQuantity || 0)
|
|
|
})
|
|
|
|
|
|
-
|
|
|
-
|
|
|
if (Number(count + count2) > this.list[idx].feedQuantity) {
|
|
|
this.$set(
|
|
|
this.list[idx].extInfo.notBatchReportInfo[yyIdx],
|
|
|
@@ -524,13 +559,27 @@
|
|
|
0
|
|
|
);
|
|
|
this.$forceUpdate();
|
|
|
-
|
|
|
this.$message.info('投料数不能大于投料数量');
|
|
|
+
|
|
|
+ this.$emit('countNumPl',this.list,this.index)
|
|
|
+ }else{
|
|
|
+ this.$emit('countNumPl',this.list,this.index)
|
|
|
}
|
|
|
},
|
|
|
+ blurWeight2(it, idx, yyIdx) {
|
|
|
+ let value = it.allReportWeight;
|
|
|
+ value = value.replace(/\./g, '');
|
|
|
+ this.$set(
|
|
|
+ this.list[idx].extInfo.notBatchReportInfo[yyIdx],
|
|
|
+ 'allReportWeight',
|
|
|
+ value
|
|
|
+ );
|
|
|
+ this.$emit('countNumPl',this.list,this.index)
|
|
|
+ },
|
|
|
|
|
|
handDel3(idx, yyIdx) {
|
|
|
this.list[idx].extInfo.batchReportInfo.splice(yyIdx, 1);
|
|
|
+ this.$emit('countNumPl',this.list,this.index)
|
|
|
},
|
|
|
|
|
|
selectName(value, idx, yyIdx) {
|
|
|
@@ -558,6 +607,7 @@
|
|
|
|
|
|
handDel4(idx, yyIdx) {
|
|
|
this.list[idx].extInfo.notBatchReportInfo.splice(yyIdx, 1);
|
|
|
+ this.$emit('countNumPl',this.list,this.index)
|
|
|
},
|
|
|
|
|
|
|