|
|
@ -51,8 +51,8 @@ |
|
|
|
<view class="uni-label">不合格数量</view> |
|
|
|
</view> |
|
|
|
<view class="pda-list-cell-db"> |
|
|
|
<uni-easyinput :inputBorder="true" type="number" placeholder="请输入数字" |
|
|
|
v-model="jobContent.failedQty" @blur="failedQtyConfirm" class="count-input"> |
|
|
|
<uni-easyinput :inputBorder="true" type="number" placeholder="请输入数字" v-model="jobContent.failedQty" |
|
|
|
@blur="failedQtyConfirm" class="count-input"> |
|
|
|
</uni-easyinput> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -85,8 +85,8 @@ |
|
|
|
<view class="uni-label">最终不合格</view> |
|
|
|
</view> |
|
|
|
<view class="pda-list-cell-db"> |
|
|
|
<uni-easyinput placeholder="待计算" type="number" :disabled="true" |
|
|
|
v-model="jobContent.notPassedQty" class="count-input"> |
|
|
|
<uni-easyinput placeholder="待计算" type="number" :disabled="true" v-model="jobContent.notPassedQty" |
|
|
|
class="count-input"> |
|
|
|
</uni-easyinput> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -311,7 +311,8 @@ |
|
|
|
this.jobContent.notPassedQty = failedQty |
|
|
|
} else if (this.nextAction == "ALL_NOK") { |
|
|
|
//最终不合格数量=收货数量-报废数量 |
|
|
|
this.jobContent.notPassedQty = Number(this.jobContent.receiveQty)-Number(this.jobContent.crackQty==null?0:this.jobContent.crackQty) |
|
|
|
this.jobContent.notPassedQty = Number(this.jobContent.receiveQty) - Number(this.jobContent |
|
|
|
.crackQty == null ? 0 : this.jobContent.crackQty) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -342,24 +343,38 @@ |
|
|
|
|
|
|
|
//不合格数量==0、(全部合格)、明细全部合格 |
|
|
|
if (failedQty == 0) { |
|
|
|
//直接提交 |
|
|
|
if (crackQty == 0) { |
|
|
|
//报废数==0,直接提交 |
|
|
|
this.jobContent.subList.forEach(res => { |
|
|
|
res.handleQty = res.qty |
|
|
|
res.failedQty = 0; |
|
|
|
res.notPassedQty = 0; |
|
|
|
res.crackQty = 0; |
|
|
|
res.goodQty = this.jobContent.receiveQty; |
|
|
|
res.toInventoryStatus = res.inventoryStatus |
|
|
|
res.goodQty = res.qty; |
|
|
|
res.failedReason = ""; |
|
|
|
res.photos = "" |
|
|
|
res.inspectResult = "" |
|
|
|
res.toInventoryStatus = "OK" |
|
|
|
res.inspectUser = this.$store.state.user.id |
|
|
|
}) |
|
|
|
|
|
|
|
this.jobContent.nextAction = this.nextAction; |
|
|
|
this.jobContent.nextAction = ""; |
|
|
|
this.jobContent.goodQty = this.jobContent.receiveQty |
|
|
|
this.submitJob(this.jobContent) |
|
|
|
|
|
|
|
} else { |
|
|
|
//报废数大于0,进入详情 |
|
|
|
//进入下一页面 |
|
|
|
uni.navigateTo({ |
|
|
|
url: './inspectDetail?id=' + this.id + |
|
|
|
'&status=' + this.status + |
|
|
|
'&failedQty=' + this.jobContent.failedQty + |
|
|
|
'&crackQty=' + this.jobContent.crackQty |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
//不合格数量>0 |
|
|
|
//下一步动作 |
|
|
|
if (this.nextAction == null) { |
|
|
@ -371,17 +386,18 @@ |
|
|
|
//提交 |
|
|
|
this.jobContent.subList.forEach(res => { |
|
|
|
res.handleQty = res.qty |
|
|
|
res.failedQty = this.jobContent.receiveQty; |
|
|
|
res.notPassedQty = this.jobContent.receiveQty; |
|
|
|
res.failedQty = res.qty; |
|
|
|
res.notPassedQty = res.qty; |
|
|
|
res.crackQty = 0; |
|
|
|
res.goodQty = 0; |
|
|
|
res.toInventoryStatus = "NOK" |
|
|
|
res.failedReason = ""; |
|
|
|
res.photos = "" |
|
|
|
res.inspectResult = "" |
|
|
|
res.toInventoryStatus = "NOK" |
|
|
|
re.inspectUser = this.$store.state.user.id |
|
|
|
}) |
|
|
|
this.jobContent.nextAction = this.nextAction; |
|
|
|
this.jobContent.goodQty = 0 |
|
|
|
this.submitJob(this.jobContent) |
|
|
|
//部分合格 |
|
|
|
} else if (this.nextAction == "PARTIAL_OK") { |
|
|
@ -392,7 +408,7 @@ |
|
|
|
'&failedQty=' + this.jobContent.failedQty + |
|
|
|
'&crackQty=' + this.jobContent.crackQty |
|
|
|
}); |
|
|
|
//全检===全部合格 |
|
|
|
//全检 生成全检任务 |
|
|
|
} else if (this.nextAction == "FULL_INSPECT") { |
|
|
|
//提交 |
|
|
|
this.jobContent.subList.forEach(res => { |
|
|
@ -400,17 +416,20 @@ |
|
|
|
res.failedQty = 0; |
|
|
|
res.notPassedQty = 0; |
|
|
|
res.crackQty = 0; |
|
|
|
res.goodQty = this.jobContent.receiveQty; |
|
|
|
res.toInventoryStatus = res.inventoryStatus |
|
|
|
res.goodQty = res.qty; |
|
|
|
res.failedReason = ""; |
|
|
|
res.photos = "" |
|
|
|
res.inspectResult = "" |
|
|
|
res.toInventoryStatus = "OK" |
|
|
|
res.inspectUser = this.$store.state.user.id |
|
|
|
}) |
|
|
|
this.jobContent.goodQty = this.jobContent.receiveQty |
|
|
|
this.jobContent.nextAction = this.nextAction; |
|
|
|
this.submitJob(this.jobContent) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
submitJob(params) { |
|
|
|
uni.showLoading({ |
|
|
@ -421,7 +440,13 @@ |
|
|
|
inspectJobSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data, ) |
|
|
|
var hint=""; |
|
|
|
if(this.jobContent.nextAction=="FULL_INSPECT"){ |
|
|
|
hint ="提交成功<br>生成到货检验任务" + res.data |
|
|
|
}else { |
|
|
|
hint ="提交成功<br>生成到货检验记录" + res.data |
|
|
|
} |
|
|
|
this.showCommitSuccessMessage(hint) |
|
|
|
} else { |
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
} |
|
|
@ -440,8 +465,7 @@ |
|
|
|
}, |
|
|
|
showErrorMessage(message) { |
|
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
|
|
if (res) { |
|
|
|
} |
|
|
|
if (res) {} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|