|
|
@@ -51,7 +51,7 @@
|
|
|
<view class="lable lable150 rx-cc ">合格品数量</view>
|
|
|
<view class="content content_num">
|
|
|
<input class="uni-input" v-model="item.workReportInfo.formedNum" :disabled="true"
|
|
|
- type="digit"></input>
|
|
|
+ type="digit"></input>
|
|
|
<view class="unit">{{ item.unit }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -76,14 +76,11 @@
|
|
|
<view class="lable lable150 rx-cc ">不合格数量</view>
|
|
|
<view class="content content_num">
|
|
|
<!-- //详情 -->
|
|
|
- <input class="uni-input" v-model="item.workReportInfo.notFormedNum" type="digit" :disabled="isDetails"
|
|
|
-
|
|
|
- @input="changeNum"></input>
|
|
|
-
|
|
|
- <input class="uni-input" v-model="not.notFormedNum" type="number"
|
|
|
-
|
|
|
- ></input>
|
|
|
- <!-- @input="changeNum(not)" -->
|
|
|
+ <input class="uni-input" v-model="item.workReportInfo.notFormedNum" type="digit"
|
|
|
+ :disabled="isDetails" @input="changeNum"></input>
|
|
|
+
|
|
|
+ <input class="uni-input" v-model="not.notFormedNum" type="number"></input>
|
|
|
+ <!-- @input="changeNum(not)" -->
|
|
|
<view class="unit">{{ item.unit }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -92,9 +89,9 @@
|
|
|
<view class="lable rx-cc ww80">重量</view>
|
|
|
<view class="content content_num">
|
|
|
<input class="uni-input" v-model="item.workReportInfo.notFormedWeight" type="digit"
|
|
|
- :disabled="isDetails" ></input>
|
|
|
+ :disabled="isDetails"></input>
|
|
|
<input class="uni-input" v-model="not.notFormedWeight" type="digit"
|
|
|
- :disabled="isDetails" ></input>
|
|
|
+ :disabled="isDetails"></input>
|
|
|
<view class="unit">{{ item.weightUnit }}</view>
|
|
|
|
|
|
<!-- <view class="penalize" v-if='!isDetails'
|
|
|
@@ -110,15 +107,17 @@
|
|
|
<view class="lable lable150 rx-cc ">报工备注</view>
|
|
|
<view class="content content_num" style="width: 100%;">
|
|
|
<input class="uni-input" v-model="item.workReportInfo.remark" :disabled="isDetails"
|
|
|
- type="text"></input>
|
|
|
+ type="text"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="rx ww45 ">
|
|
|
+ <!-- -->
|
|
|
+
|
|
|
+ <view class="rx ww45 " v-if="clientEnvironmentId==2" >
|
|
|
<view class="lable ww80 rx-cc ">批次号</view>
|
|
|
<view class="content content_num" style="width: 100%;">
|
|
|
{{ item.batchNo }}
|
|
|
- <input class="uni-input" v-model="item.workReportInfo.remark" :disabled="isDetails"
|
|
|
- type="text"></input>
|
|
|
+ <input class="uni-input" v-model="batchNo" @input="batchNoNew" :disabled="isDetails"
|
|
|
+ type="text"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -168,6 +167,7 @@ export default {
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
+ batchNo:'',
|
|
|
notFormedList: [],
|
|
|
clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
|
|
|
.clientEnvironmentId, // *1 主环境-601环境 2 soll-索尔环境 3 tg-碳谷环境
|
|
|
@@ -193,9 +193,13 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
+ batchNoNew(e) {
|
|
|
+
|
|
|
+ this.item.workReportInfo.batchNo = this.item.batchNo + e.target.value;
|
|
|
|
|
|
+ },
|
|
|
setFormedNum(num) {
|
|
|
-
|
|
|
+
|
|
|
|
|
|
this.item.workReportInfo.formedNum = num
|
|
|
|
|
|
@@ -229,26 +233,26 @@ export default {
|
|
|
},
|
|
|
|
|
|
blurNum(value) {
|
|
|
- console.log(num,'6666666666666');
|
|
|
+ console.log(num, '6666666666666');
|
|
|
|
|
|
let total = 0;
|
|
|
//匹配非数字
|
|
|
- let val=value.formedNum;
|
|
|
- let reg = new RegExp("([^0-9]*)","g");
|
|
|
+ let val = value.formedNum;
|
|
|
+ let reg = new RegExp("([^0-9]*)", "g");
|
|
|
let ma = val.match(reg);
|
|
|
//如果有非数字,替换成""
|
|
|
- if(ma.length>0){
|
|
|
- for(let k in ma){
|
|
|
- if(ma[k]!=""){
|
|
|
- val = val.replace(ma[k],0);
|
|
|
+ if (ma.length > 0) {
|
|
|
+ for (let k in ma) {
|
|
|
+ if (ma[k] != "") {
|
|
|
+ val = val.replace(ma[k], 0);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//可以为0,但不能以0开头
|
|
|
- if(val.startsWith("0")&&val.length>1){
|
|
|
- val = val.substring(1,val.length);
|
|
|
+ if (val.startsWith("0") && val.length > 1) {
|
|
|
+ val = val.substring(1, val.length);
|
|
|
}
|
|
|
- value.formedNum=val;
|
|
|
+ value.formedNum = val;
|
|
|
|
|
|
if (this.item.currentTaskDiagram.isFirstTask) {
|
|
|
|
|
|
@@ -275,7 +279,7 @@ export default {
|
|
|
title: '合格品数量不能大于投料数量'
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -319,8 +323,8 @@ export default {
|
|
|
this.$refs.modelRef.setNum(num)
|
|
|
},
|
|
|
notForme() {
|
|
|
- console.log(num,'77777777777777');
|
|
|
- let weight = Number(this.notFormedList[0].notFormedNum||0) * Number(this.item.singleWeight) * Number(this
|
|
|
+ console.log(num, '77777777777777');
|
|
|
+ let weight = Number(this.notFormedList[0].notFormedNum || 0) * Number(this.item.singleWeight) * Number(this
|
|
|
.item.weightMultiple)
|
|
|
if (this.item.singleWeightUnit == 'G' || this.item.singleWeightUnit == 'g' || this.item.singleWeightUnit ==
|
|
|
'克') {
|
|
|
@@ -338,7 +342,7 @@ export default {
|
|
|
.notFormedNum))
|
|
|
|
|
|
|
|
|
- let weight = Number(this.item.workReportInfo?.formedNum||0) * Number(this.item.singleWeight) * Number(this
|
|
|
+ let weight = Number(this.item.workReportInfo?.formedNum || 0) * Number(this.item.singleWeight) * Number(this
|
|
|
.item.weightMultiple)
|
|
|
if (this.item.singleWeightUnit == 'G' || this.item.singleWeightUnit == 'g' || this.item
|
|
|
.singleWeightUnit == '克') {
|
|
|
@@ -357,23 +361,23 @@ export default {
|
|
|
},
|
|
|
|
|
|
changeNum(value) {
|
|
|
-
|
|
|
+
|
|
|
// 不合格数量
|
|
|
let val = value.notFormedNum;
|
|
|
//匹配非数字
|
|
|
- let reg = new RegExp("([^0-9]*)","g");
|
|
|
+ let reg = new RegExp("([^0-9]*)", "g");
|
|
|
let ma = val.match(reg);
|
|
|
//如果有非数字,替换成""
|
|
|
- if(ma.length>0){
|
|
|
- for(let k in ma){
|
|
|
- if(ma[k]!=""){
|
|
|
- val = val.replace(ma[k],"0");
|
|
|
+ if (ma.length > 0) {
|
|
|
+ for (let k in ma) {
|
|
|
+ if (ma[k] != "") {
|
|
|
+ val = val.replace(ma[k], "0");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//可以为0,但不能以0开头
|
|
|
- if(val.startsWith("0")&&val.length>1){
|
|
|
- val = val.substring(1,val.length);
|
|
|
+ if (val.startsWith("0") && val.length > 1) {
|
|
|
+ val = val.substring(1, val.length);
|
|
|
}
|
|
|
|
|
|
// this.$set(this.item.workReportInfo, 'formedNum', val)
|
|
|
@@ -384,7 +388,7 @@ export default {
|
|
|
|
|
|
let total = Number(this.item.workReportInfo.formedNum) + Number(this.notFormedList[0].notFormedNum)
|
|
|
|
|
|
-
|
|
|
+
|
|
|
console.log(total);
|
|
|
|
|
|
this.$emit('modeNum', total)
|