|
|
@@ -11,7 +11,7 @@
|
|
|
<view class="content_table">
|
|
|
|
|
|
|
|
|
- <view class="item rx-sc" v-if="Object.prototype.hasOwnProperty.call(item, 'product')">
|
|
|
+ <view class="item rx-sc" v-if="Object.prototype.hasOwnProperty.call(item, 'product')">
|
|
|
<view class="rx ">
|
|
|
<view class="lable lable220 rx-cc ">投料数量</view>
|
|
|
<view class="content">
|
|
|
@@ -67,14 +67,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item rx-sc" v-for="(not,notIndex) in notFormedList" :key='notIndex'>
|
|
|
+ <view class="item rx-sc" v-for="(not,notIndex) in notFormedList" :key='notIndex'>
|
|
|
|
|
|
<view class="rx ww55 ">
|
|
|
|
|
|
<view class="lable lable150 rx-cc ">不合格数量</view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="not.notFormedNum" type="digit"
|
|
|
- :disabled="isDetails" @input="changeNum"></input>
|
|
|
+ <input class="uni-input" v-model="not.notFormedNum" type="digit" :disabled="isDetails"
|
|
|
+ @input="changeNum"></input>
|
|
|
<view class="unit">{{item.unit}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -110,7 +110,7 @@
|
|
|
<script>
|
|
|
export default {
|
|
|
props: {
|
|
|
- item: {
|
|
|
+ objItem: {
|
|
|
type: Object,
|
|
|
default: () => {}
|
|
|
},
|
|
|
@@ -128,14 +128,22 @@
|
|
|
},
|
|
|
|
|
|
watch: {
|
|
|
-
|
|
|
+ objItem: {
|
|
|
+ immediate: true,
|
|
|
+ deep: true,
|
|
|
+ handler(newVal) {
|
|
|
+ this.item = newVal
|
|
|
+ if(this.item.workReportInfo.formedNum) {
|
|
|
+ this.blurNum()
|
|
|
+ }
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+ },
|
|
|
notFormed: {
|
|
|
immediate: true,
|
|
|
deep: true,
|
|
|
handler(newVal) {
|
|
|
-
|
|
|
this.notFormedList = newVal
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -144,7 +152,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
|
|
|
-
|
|
|
+ item: {},
|
|
|
notFormedList: []
|
|
|
|
|
|
}
|
|
|
@@ -189,7 +197,8 @@
|
|
|
this.$emit('modeNum', total)
|
|
|
|
|
|
|
|
|
- if (this.item.product[0] && this.item.product[0].feedQuantity > 0 && Number(this.item.workReportInfo.formedNum)) {
|
|
|
+ if (this.item.product[0] && this.item.product[0].feedQuantity > 0 && Number(this.item.workReportInfo
|
|
|
+ .formedNum)) {
|
|
|
|
|
|
this.$set(this.notFormedList[0], 'notFormedNum', this.item.product[0].feedQuantity - Number(this.item
|
|
|
.workReportInfo.formedNum))
|
|
|
@@ -201,7 +210,7 @@
|
|
|
let weight = Number(this.item.workReportInfo.formedNum) * Number(this.item.singleWeight) * Number(this
|
|
|
.item.weightMultiple)
|
|
|
|
|
|
- if (['G', 'g', '克' ].includes(this.item.singleWeightUnit)) {
|
|
|
+ if (['G', 'g', '克'].includes(this.item.singleWeightUnit)) {
|
|
|
weight = parseFloat((weight / 1000).toFixed(2))
|
|
|
} else {
|
|
|
weight = parseFloat(weight.toFixed(2))
|
|
|
@@ -218,7 +227,8 @@
|
|
|
|
|
|
let weight = Number(this.notFormedList[0].notFormedNum) * Number(this.item.singleWeight) * Number(this
|
|
|
.item.weightMultiple)
|
|
|
- if (this.item.singleWeightUnit == 'G' || this.item.singleWeightUnit == 'g' || this.item.singleWeightUnit == '克') {
|
|
|
+ if (this.item.singleWeightUnit == 'G' || this.item.singleWeightUnit == 'g' || this.item.singleWeightUnit ==
|
|
|
+ '克') {
|
|
|
weight = parseFloat((weight / 1000).toFixed(2))
|
|
|
} else {
|
|
|
weight = parseFloat(weight.toFixed(2))
|
|
|
@@ -227,7 +237,8 @@
|
|
|
|
|
|
|
|
|
if (this.item.product[0].feedQuantity > 0 && Number(this.notFormedList[0].notFormedNum)) {
|
|
|
- this.$set(this.item.workReportInfo, 'formedNum', this.item.product[0].feedQuantity - Number(this.notFormedList[0]
|
|
|
+ this.$set(this.item.workReportInfo, 'formedNum', this.item.product[0].feedQuantity - Number(this
|
|
|
+ .notFormedList[0]
|
|
|
.notFormedNum))
|
|
|
|
|
|
|
|
|
@@ -248,7 +259,7 @@
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
changeNum() {
|
|
|
this.notForme()
|
|
|
// this.blurNum()
|