|
|
@@ -8,7 +8,7 @@
|
|
|
|
|
|
|
|
|
<view class="material ">
|
|
|
-
|
|
|
+
|
|
|
|
|
|
<view class="content_table">
|
|
|
|
|
|
@@ -50,7 +50,7 @@
|
|
|
<view class="rx ww55 ">
|
|
|
<view class="lable lable150 rx-cc ">合格品数量</view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="item.workReportInfo.formedNum" @blur="blurNum" :disabled="isDetails"
|
|
|
+ <input class="uni-input" v-model="item.workReportInfo.formedNum" :disabled="isDetails"
|
|
|
@input="blurNum" type="digit"></input>
|
|
|
<view class="unit">{{item.unit}}</view>
|
|
|
</view>
|
|
|
@@ -59,7 +59,8 @@
|
|
|
<view class="rx ww45">
|
|
|
<view class="lable rx-cc ww80">重量</view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="item.workReportInfo.formedWeight" type="digit" :disabled="isDetails"></input>
|
|
|
+ <input class="uni-input" v-model="item.workReportInfo.formedWeight" type="digit"
|
|
|
+ :disabled="isDetails"></input>
|
|
|
<view class="unit">{{item.weightUnit}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -74,8 +75,8 @@
|
|
|
|
|
|
<view class="lable lable150 rx-cc ">不合格数量</view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="not.notFormedNum" type="digit" @blur="blurNum" :disabled="isDetails"
|
|
|
- @input="notForme"></input>
|
|
|
+ <input class="uni-input" v-model="not.notFormedNum" type="digit" @blur="blurNum"
|
|
|
+ :disabled="isDetails" @input="notForme"></input>
|
|
|
<view class="unit">{{item.unit}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -83,7 +84,8 @@
|
|
|
<view class="rx ww45">
|
|
|
<view class="lable rx-cc ww80">重量</view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="not.notFormedWeight" type="digit" :disabled="isDetails"></input>
|
|
|
+ <input class="uni-input" v-model="not.notFormedWeight" type="digit"
|
|
|
+ :disabled="isDetails"></input>
|
|
|
<view class="unit">{{item.weightUnit}}</view>
|
|
|
|
|
|
<view class="penalize" v-if='!isDetails'
|
|
|
@@ -100,17 +102,17 @@
|
|
|
</view>
|
|
|
|
|
|
<view class='content_table' v-for="(item,index) in palletList" :key='index'>
|
|
|
- <view class="item" @click="handleType" v-if="!isDetails">
|
|
|
+ <view class="item" @click="handleType" v-if="!isDetails">
|
|
|
<view class="lable rx-cc">舟皿类型</view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="item.categoryLevelName" ></input>
|
|
|
+ <input class="uni-input" v-model="item.categoryLevelName"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="item" @click="handleType" v-if="isDetails">
|
|
|
+
|
|
|
+ <view class="item" @click="handleType" v-if="isDetails">
|
|
|
<view class="lable rx-cc">舟皿类型</view>
|
|
|
<view class="content ">
|
|
|
- {{item.name}}
|
|
|
+ {{item.name}}
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -120,10 +122,10 @@
|
|
|
<view class="lable rx-cc">舟皿名称</view>
|
|
|
<view class="content ">
|
|
|
<zxz-uni-data-select :localdata="boatList" v-model="item.categoryId" dataValue='id'
|
|
|
- format='{name}-{code}' dataKey="code" filterable :clear='false' v-if="!isDetails"
|
|
|
+ format='{name}-{code}' dataKey="code" filterable :clear='false' v-if="!isDetails"
|
|
|
@change='inputChange'></zxz-uni-data-select>
|
|
|
-
|
|
|
- <view v-if="isDetails">{{item.code }} </view>
|
|
|
+
|
|
|
+ <view v-if="isDetails">{{item.code }} </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -137,7 +139,7 @@
|
|
|
<view class="item">
|
|
|
<view class="lable rx-cc">舟皿数量</view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="item.quantity" type='digit' :disabled="isDetails"></input>
|
|
|
+ <input class="uni-input" v-model="item.quantity" type='digit' :disabled="isDetails"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -214,12 +216,12 @@
|
|
|
|
|
|
if (this.isDetails) {
|
|
|
this.notFormedList = this.notFormedList.map(m => {
|
|
|
-
|
|
|
- return {
|
|
|
- notFormedNum:Number(m.quantity),
|
|
|
- notFormedWeight: m.weight,
|
|
|
- ...m
|
|
|
- }
|
|
|
+
|
|
|
+ return {
|
|
|
+ notFormedNum: Number(m.quantity),
|
|
|
+ notFormedWeight: m.weight,
|
|
|
+ ...m
|
|
|
+ }
|
|
|
|
|
|
})
|
|
|
}
|
|
|
@@ -290,31 +292,44 @@
|
|
|
|
|
|
let total = Number(this.item.workReportInfo.formedNum) + Number(this.notFormedList[0].notFormedNum)
|
|
|
this.$emit('modeNum', total)
|
|
|
- // if (this.item.singleWeight) {
|
|
|
- let weight = Number(this.item.workReportInfo.formedNum) * Number(this.item.singleWeight) * Number(this
|
|
|
- .item.weightMultiple)
|
|
|
- weight = parseFloat(weight.toFixed(2))
|
|
|
- this.$set(this.item.workReportInfo, 'formedWeight', weight)
|
|
|
- this.$forceUpdate()
|
|
|
- // } else {
|
|
|
- // uni.showToast({
|
|
|
- // title: '没有单重,维护主数据净重',
|
|
|
- // })
|
|
|
- // }
|
|
|
+
|
|
|
+
|
|
|
+ if (this.item.formedNumLast > 0 && Number(this.item.workReportInfo.formedNum)) {
|
|
|
+
|
|
|
+ this.$set(this.notFormedList[0], 'notFormedNum', this.item.formedNumLast - Number(this.item
|
|
|
+ .workReportInfo.formedNum))
|
|
|
+ this.notForme()
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ let weight = Number(this.item.workReportInfo.formedNum) * Number(this.item.singleWeight) * Number(this
|
|
|
+ .item.weightMultiple)
|
|
|
+ weight = parseFloat(weight.toFixed(2))
|
|
|
+ this.$set(this.item.workReportInfo, 'formedWeight', weight)
|
|
|
+
|
|
|
+
|
|
|
+ this.$forceUpdate()
|
|
|
+
|
|
|
},
|
|
|
|
|
|
notForme() {
|
|
|
- // if (this.item.singleWeight) {
|
|
|
- let weight = Number(this.notFormedList[0].notFormedNum) * Number(this.item.singleWeight) * Number(this
|
|
|
- .item.weightMultiple)
|
|
|
- weight = parseFloat(weight.toFixed(2))
|
|
|
- this.$set(this.notFormedList[0], 'notFormedWeight', weight)
|
|
|
- this.$forceUpdate()
|
|
|
- // } else {
|
|
|
- // uni.showToast({
|
|
|
- // title: '没有单重,维护主数据净重',
|
|
|
- // })
|
|
|
- // }
|
|
|
+
|
|
|
+ let weight = Number(this.notFormedList[0].notFormedNum) * Number(this.item.singleWeight) * Number(this
|
|
|
+ .item.weightMultiple)
|
|
|
+ weight = parseFloat(weight.toFixed(2))
|
|
|
+ this.$set(this.notFormedList[0], 'notFormedWeight', weight)
|
|
|
+
|
|
|
+
|
|
|
+ if (this.item.formedNumLast > 0 && Number(this.notFormedList[0].notFormedNum)) {
|
|
|
+ this.$set(this.item.workReportInfo, 'formedNum', this.item.formedNumLast - Number(this.notFormedList[0].notFormedNum))
|
|
|
+ this.blurNum()
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ this.$forceUpdate()
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
}
|