diff --git a/pages/count/job/countDetail.vue b/pages/count/job/countDetail.vue index a91c833b..375e14b7 100644 --- a/pages/count/job/countDetail.vue +++ b/pages/count/job/countDetail.vue @@ -514,17 +514,17 @@ }); var params = this.setParams() console.log("提交参数", JSON.stringify(params)); - // countJobSubmit(params).then(res => { - // uni.hideLoading() - // if (res.data) { - // this.showCommitSuccessMessage("提交成功
生成盘点记录
" + res.data) - // } else { - // this.showErrorMessage("提交失败[" + res.msg + "]") - // } - // }).catch(error => { - // uni.hideLoading() - // this.showErrorMessage(error) - // }) + countJobSubmit(params).then(res => { + uni.hideLoading() + if (res.data) { + this.showCommitSuccessMessage("提交成功
生成盘点记录
" + res.data) + } else { + this.showErrorMessage("提交失败[" + res.msg + "]") + } + }).catch(error => { + uni.hideLoading() + this.showErrorMessage(error) + }) }, diff --git a/pages/inspect/job/inspectResult.vue b/pages/inspect/job/inspectResult.vue index 7cb69a90..1aa6c8ef 100644 --- a/pages/inspect/job/inspectResult.vue +++ b/pages/inspect/job/inspectResult.vue @@ -338,7 +338,7 @@ }, commit() { - + if (this.jobContent.failedQty == null) { this.showMessage("请输入不合格数量") return @@ -362,23 +362,41 @@ //不合格数量==0、(全部合格)、明细全部合格 if (failedQty == 0) { if (crackQty == 0) { - //报废数==0,直接提交 - this.jobContent.subList.forEach(res => { - res.handleQty = res.qty - res.failedQty = 0; - res.notPassedQty = res.failedQty; - res.crackQty = 0; - res.goodQty = res.qty; - res.failedReason = ""; - res.photos = "" - res.inspectResult = "" - res.toInventoryStatus = "OK" - res.inspectUser = this.$store.state.user.id - }) - - this.jobContent.nextAction = ""; - this.jobContent.goodQty = this.jobContent.receiveQty - this.submitJob(this.jobContent) + if (this.nextAction == "ALL_NOK") { + this.jobContent.subList.forEach(res => { + res.handleQty = res.qty + res.failedQty = res.qty; + res.notPassedQty = res.failedQty; + res.crackQty = 0; + res.goodQty = 0; + res.failedReason = ""; + res.photos = "" + res.inspectResult = "" + res.toInventoryStatus = "NOK" + res.inspectUser = this.$store.state.user.id + }) + this.jobContent.nextAction = this.nextAction; + this.jobContent.goodQty = 0 + this.submitJob(this.jobContent) + }else { + //报废数==0,直接提交 + this.jobContent.subList.forEach(res => { + res.handleQty = res.qty + res.failedQty = 0; + res.notPassedQty = res.failedQty; + res.crackQty = 0; + res.goodQty = res.qty; + res.failedReason = ""; + res.photos = "" + res.inspectResult = "" + res.toInventoryStatus = "OK" + res.inspectUser = this.$store.state.user.id + }) + + this.jobContent.nextAction = ""; + this.jobContent.goodQty = this.jobContent.receiveQty + this.submitJob(this.jobContent) + } } else { //报废数大于0,进入详情 @@ -399,6 +417,7 @@ this.showMessage("请选择下一步动作") return } + //全不合格 if (this.nextAction == "ALL_NOK") { //提交