|
@@ -11,6 +11,7 @@
|
|
|
<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
|
|
|
<text style="align-self: center;font-size: 35rpx;color: darkslategray;">物料号:</text>
|
|
|
<text style="align-self: center;font-size: 35rpx;word-wrap: break-word;width: 200px;font-weight: bold;">{{deliverDtlMd.materialCode}}</text>
|
|
|
+ <text :class="deliverDtlMd.keyFlag ? 'keyFlagRed' : 'keyFlagGray'" style="align-self: center;">{{deliverDtlMd.keyFlag ? '★' : '■'}}</text>
|
|
|
</view>
|
|
|
<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;margin-top: 5px;margin-bottom: 5px;">
|
|
|
<text style="align-self: center;font-size: 35rpx;color: darkslategray;">物料名称:</text>
|
|
@@ -34,11 +35,12 @@
|
|
|
</view>
|
|
|
<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
|
|
|
<text style="align-self: center;font-size: 35rpx;color: darkslategray;width: 230rpx;">合格数量:</text>
|
|
|
- <input class="uni-input" type="number" style="margin-right: 5px;color: blue;font-size: 40rpx;font-weight: bold;" v-model="checkOkQty" placeholder="请输合格数量" />
|
|
|
+ <input v-if="!deliverDtlMd.keyFlag" class="uni-input" type="number" style="margin-right: 5px;color: blue;font-size: 40rpx;font-weight: bold;" v-model="checkOkQty" placeholder="请输合格数量" />
|
|
|
+ <input v-if="deliverDtlMd.keyFlag" class="uni-input" disabled="true" type="number" style="margin-right: 5px;color: blue;font-size: 40rpx;font-weight: bold;" v-model="checkOkQty" />
|
|
|
</view>
|
|
|
<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
|
|
|
<text style="align-self: center;font-size: 35rpx;color: red;width: 230rpx;">不合格数量:</text>
|
|
|
- <input class="uni-input" type="number" style="margin-right: 5px;color: red;font-size: 40rpx;font-weight: bold;" v-model="checkNgQty" placeholder="请输不合格数量" />
|
|
|
+ <input class="uni-input" type="number" style="margin-right: 5px;color: red;font-size: 40rpx;font-weight: bold;" v-model="checkNgQty" @input="onKeyInput" placeholder="请输不合格数量" />
|
|
|
</view>
|
|
|
<button type="primary" style="margin-top: 20px;" @click="resetCondition">重 置</button>
|
|
|
<button type="primary" style="margin-top: 20px;" @click="submitResult">质检结果提交</button>
|
|
@@ -62,7 +64,12 @@
|
|
|
onLoad() {
|
|
|
uni.$once('sendDeliverDtlData', (data) => {
|
|
|
this.deliverDtlMd = data
|
|
|
- this.checkOkQty = data.sumQty - data.sumCheckQty
|
|
|
+ if(this.deliverDtlMd.keyFlag) {
|
|
|
+ this.checkOkQty = 1
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.checkOkQty = data.sumQty - data.sumCheckQty
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
@@ -92,6 +99,10 @@
|
|
|
})
|
|
|
return;
|
|
|
}
|
|
|
+ uni.showLoading({
|
|
|
+ title: "正在提交数据...",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
let tmpMd = this.deliverDtlMd;
|
|
|
tmpMd.DeliverNo = this.deliverNo;
|
|
|
tmpMd.MaterialSpec = this.materialSpecCode;
|
|
@@ -110,11 +121,13 @@
|
|
|
uni.navigateBack({
|
|
|
url: '/pages/Inspect/inspectDtlNew',
|
|
|
success: () => {
|
|
|
+ uni.hideLoading()
|
|
|
uni.$emit('CallSapDeliverDtlQueryFunc',null);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
else {
|
|
|
+ uni.hideLoading()
|
|
|
uni.showToast({
|
|
|
title: '提交数据失败!' + retData.data.msg,
|
|
|
icon: 'none',
|
|
@@ -123,6 +136,7 @@
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
+ uni.hideLoading()
|
|
|
uni.showToast({
|
|
|
title: '接口异常!' + retData.retMsg,
|
|
|
icon: 'none',
|
|
@@ -154,8 +168,31 @@
|
|
|
setTimeout(() => {
|
|
|
this.foucusIndex = 0;
|
|
|
}, 150)
|
|
|
- this.checkOkQty = this.deliverDtlMd.sumQty - this.deliverDtlMd.sumCheckQty
|
|
|
+ if(this.deliverDtlMd.keyFlag) {
|
|
|
+ this.checkOkQty = 1
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.checkOkQty = this.deliverDtlMd.sumQty - this.deliverDtlMd.sumCheckQty
|
|
|
+ }
|
|
|
this.checkNgQty = 0
|
|
|
+ },
|
|
|
+ onKeyInput(event) {
|
|
|
+ if(this.deliverDtlMd.keyFlag) {
|
|
|
+ if(Number(this.checkNgQty) > 1) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '关键件的不合格数量不能大于1,录入错误!',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 1000
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(Number(this.checkNgQty) == 1) {
|
|
|
+ this.checkOkQty = 0
|
|
|
+ }
|
|
|
+ if(Number(this.checkNgQty) == 0) {
|
|
|
+ this.checkOkQty = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -163,4 +200,10 @@
|
|
|
|
|
|
<style lang="scss">
|
|
|
@import '@/common/uni-nvue.css';
|
|
|
+ .keyFlagRed {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+ .keyFlagGray {
|
|
|
+ color: lightgray;
|
|
|
+ }
|
|
|
</style>
|