|
@@ -50,8 +50,8 @@
|
|
|
<view class="rx ww55 ">
|
|
<view class="rx ww55 ">
|
|
|
<view class="lable lable150 rx-cc ">合格品数量</view>
|
|
<view class="lable lable150 rx-cc ">合格品数量</view>
|
|
|
<view class="content content_num">
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="item.workReportInfo.formedNum" @blur="blurNum" @input="blurNum"
|
|
|
|
|
- type="digit"></input>
|
|
|
|
|
|
|
+ <input class="uni-input" v-model="item.workReportInfo.formedNum" @blur="blurNum" :disabled="isDetails"
|
|
|
|
|
+ @input="blurNum" type="digit"></input>
|
|
|
<view class="unit">{{item.unit}}</view>
|
|
<view class="unit">{{item.unit}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -59,7 +59,7 @@
|
|
|
<view class="rx ww45">
|
|
<view class="rx ww45">
|
|
|
<view class="lable rx-cc ww80">重量</view>
|
|
<view class="lable rx-cc ww80">重量</view>
|
|
|
<view class="content content_num">
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="item.workReportInfo.formedWeight" type="digit"></input>
|
|
|
|
|
|
|
+ <input class="uni-input" v-model="item.workReportInfo.formedWeight" type="digit" :disabled="isDetails"></input>
|
|
|
<view class="unit">{{item.weightUnit}}</view>
|
|
<view class="unit">{{item.weightUnit}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -68,18 +68,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="rx ww55 ">
|
|
|
|
|
|
|
|
<view class="lable lable150 rx-cc ">不合格数量</view>
|
|
<view class="lable lable150 rx-cc ">不合格数量</view>
|
|
|
<view class="content content_num">
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="not.notFormedNum" type="digit" @blur="blurNum"></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 class="unit">{{item.unit}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -87,33 +83,34 @@
|
|
|
<view class="rx ww45">
|
|
<view class="rx ww45">
|
|
|
<view class="lable rx-cc ww80">重量</view>
|
|
<view class="lable rx-cc ww80">重量</view>
|
|
|
<view class="content content_num">
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="not.notFormedWeight" type="digit"></input>
|
|
|
|
|
|
|
+ <input class="uni-input" v-model="not.notFormedWeight" type="digit" :disabled="isDetails"></input>
|
|
|
<view class="unit">{{item.weightUnit}}</view>
|
|
<view class="unit">{{item.weightUnit}}</view>
|
|
|
|
|
|
|
|
<view class="penalize" v-if='!isDetails'
|
|
<view class="penalize" v-if='!isDetails'
|
|
|
:style="{ background: not.warehouseId ? '#FFA07A' : ''}" @click="penalize">处置</view>
|
|
:style="{ background: not.warehouseId ? '#FFA07A' : ''}" @click="penalize">处置</view>
|
|
|
<view class="penalize" v-if='isDetails'
|
|
<view class="penalize" v-if='isDetails'
|
|
|
:style="{ background: not.warehouseId ? '#FFA07A' : ''}"
|
|
:style="{ background: not.warehouseId ? '#FFA07A' : ''}"
|
|
|
- @click="handleView(item.warehouseName)">查看</view>
|
|
|
|
|
|
|
+ @click="handleView(isDetails ? not.warehouseName : item.warehouseName)">查看</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class='content_table' v-for="(item,index) in palletList" :key='index'>
|
|
<view class='content_table' v-for="(item,index) in palletList" :key='index'>
|
|
|
- <view class="item" @click="handleType">
|
|
|
|
|
|
|
+ <view class="item" @click="handleType" v-if="!isDetails">
|
|
|
<view class="lable rx-cc">舟皿类型</view>
|
|
<view class="lable rx-cc">舟皿类型</view>
|
|
|
<view class="content content_num">
|
|
<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="lable rx-cc">舟皿类型</view>
|
|
|
|
|
+ <view class="content ">
|
|
|
|
|
+ {{item.name}}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -123,8 +120,10 @@
|
|
|
<view class="lable rx-cc">舟皿名称</view>
|
|
<view class="lable rx-cc">舟皿名称</view>
|
|
|
<view class="content ">
|
|
<view class="content ">
|
|
|
<zxz-uni-data-select :localdata="boatList" v-model="item.categoryId" dataValue='id'
|
|
<zxz-uni-data-select :localdata="boatList" v-model="item.categoryId" dataValue='id'
|
|
|
- format='{name}-{code}' dataKey="code" filterable :clear='false'
|
|
|
|
|
|
|
+ format='{name}-{code}' dataKey="code" filterable :clear='false' v-if="!isDetails"
|
|
|
@change='inputChange'></zxz-uni-data-select>
|
|
@change='inputChange'></zxz-uni-data-select>
|
|
|
|
|
+
|
|
|
|
|
+ <view v-if="isDetails">{{item.code }} </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -138,7 +137,7 @@
|
|
|
<view class="item">
|
|
<view class="item">
|
|
|
<view class="lable rx-cc">舟皿数量</view>
|
|
<view class="lable rx-cc">舟皿数量</view>
|
|
|
<view class="content content_num">
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="item.quantity" type='digit'></input>
|
|
|
|
|
|
|
+ <input class="uni-input" v-model="item.quantity" type='digit' :disabled="isDetails"></input>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -191,7 +190,7 @@
|
|
|
immediate: true,
|
|
immediate: true,
|
|
|
deep: true,
|
|
deep: true,
|
|
|
handler(newVal) {
|
|
handler(newVal) {
|
|
|
- console.log(newVal)
|
|
|
|
|
|
|
+
|
|
|
this.notFormedList = newVal
|
|
this.notFormedList = newVal
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -213,6 +212,18 @@
|
|
|
|
|
|
|
|
this.getTreeList()
|
|
this.getTreeList()
|
|
|
|
|
|
|
|
|
|
+ if (this.isDetails) {
|
|
|
|
|
+ this.notFormedList = this.notFormedList.map(m => {
|
|
|
|
|
+
|
|
|
|
|
+ return {
|
|
|
|
|
+ notFormedNum:Number(m.quantity),
|
|
|
|
|
+ notFormedWeight: m.weight,
|
|
|
|
|
+ ...m
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
|
@@ -276,12 +287,13 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
blurNum() {
|
|
blurNum() {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
let total = Number(this.item.workReportInfo.formedNum) + Number(this.notFormedList[0].notFormedNum)
|
|
let total = Number(this.item.workReportInfo.formedNum) + Number(this.notFormedList[0].notFormedNum)
|
|
|
this.$emit('modeNum', total)
|
|
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))
|
|
|
|
|
|
|
+ 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.$set(this.item.workReportInfo, 'formedWeight', weight)
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
|
} else {
|
|
} else {
|
|
@@ -290,6 +302,20 @@
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ 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: '没有单重,维护主数据净重',
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|