|
|
@ -31,7 +31,6 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
|
|
import { |
|
|
|
takeInspectJob, |
|
|
|
cancleTakeInspectJob, |
|
|
@ -105,7 +104,7 @@ |
|
|
|
// } |
|
|
|
this.getDetail(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
//返回首页 |
|
|
|
onNavigationBarButtonTap(e) { |
|
|
@ -181,9 +180,9 @@ |
|
|
|
res.crackQty = 0; |
|
|
|
res.sampleQty = 0; |
|
|
|
res.notPassedQty = 0; |
|
|
|
res.failedReason =""; |
|
|
|
res.failedReason = ""; |
|
|
|
res.photos = "" |
|
|
|
res.inspectResult ="" |
|
|
|
res.inspectResult = "" |
|
|
|
}) |
|
|
|
that.detailSource = getDataSource(that.subList); |
|
|
|
} else { |
|
|
@ -265,9 +264,8 @@ |
|
|
|
this.showMessage("物料号【" + itemCode + "】不在列表中") |
|
|
|
} else { |
|
|
|
var itemDetail = detail.subList.find(r => { |
|
|
|
return r.packingNumber == packingNumber |
|
|
|
&& |
|
|
|
r.batch == batch |
|
|
|
return r.packingNumber == packingNumber && |
|
|
|
r.batch == batch |
|
|
|
}) |
|
|
|
if (itemDetail == undefined) { |
|
|
|
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在列表中") |
|
|
@ -282,7 +280,8 @@ |
|
|
|
']不一致,是否继续上架?', res => { |
|
|
|
if (res) { |
|
|
|
itemDetail.scaned = true; |
|
|
|
itemDetail.handleQty = Number(result.label.qty)>Number(result.balance.qty)?Number(result.balance.qty):Number(result.label.qty); |
|
|
|
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance |
|
|
|
.qty) ? Number(result.balance.qty) : Number(result.label.qty); |
|
|
|
this.calcHandleQty(); |
|
|
|
} else { |
|
|
|
this.scanPopupGetFocus(); |
|
|
@ -290,7 +289,8 @@ |
|
|
|
}); |
|
|
|
} else { |
|
|
|
itemDetail.scaned = true; |
|
|
|
itemDetail.handleQty = Number(result.label.qty)>Number(result.balance.qty)?Number(result.balance.qty):Number(result.label.qty); |
|
|
|
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance.qty) ? Number( |
|
|
|
result.balance.qty) : Number(result.label.qty); |
|
|
|
this.calcHandleQty(); |
|
|
|
} |
|
|
|
} |
|
|
@ -302,12 +302,12 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
commit() { |
|
|
|
this.scanCount = getScanCount(this.subList); |
|
|
|
if( this.scanCount==0){ |
|
|
|
this.showErrorMessage("扫描数为0,请先扫描") |
|
|
|
return; |
|
|
|
} |
|
|
|
commit() { |
|
|
|
this.scanCount = getScanCount(this.subList); |
|
|
|
if (this.scanCount == 0) { |
|
|
|
this.showErrorMessage("扫描数为0,请先扫描") |
|
|
|
return; |
|
|
|
} |
|
|
|
//扫描数量和任务数量相等,直接提交 |
|
|
|
if (this.scanCount == this.subList.length) { |
|
|
|
this.submitJob(); |
|
|
@ -342,7 +342,7 @@ |
|
|
|
if (res.data) { |
|
|
|
this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data, ) |
|
|
|
} else { |
|
|
|
this.showErrorMessage("提交失败"+res.msg) |
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading(); |
|
|
@ -417,7 +417,7 @@ |
|
|
|
detail.notPassedQty = detail.notPassedQty; |
|
|
|
detail.goodQty = detail.qty - detail.failedQty - detail.crackQty; |
|
|
|
detail.inspectUser = this.$store.state.user.id |
|
|
|
|
|
|
|
|
|
|
|
//合格数==样品数,全部合格 |
|
|
|
if (detail.goodQty == detail.qty) { |
|
|
|
detail.toInventoryStatus = "OK" |
|
|
@ -435,18 +435,17 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.jobContent.subList = list |
|
|
|
this.jobContent.nextAction = "PARTIAL_OK"; |
|
|
|
return this.jobContent; |
|
|
|
}, |
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
setTimeout(() => { |
|
|
|
uni.navigateTo({ |
|
|
|
url: './inspectJob' |
|
|
|
}) |
|
|
|
}, 3000) |
|
|
|
uni.navigateTo({ |
|
|
|
url: './inspectJob' |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|