|
|
@ -49,7 +49,7 @@ |
|
|
|
takeIssueJob, |
|
|
|
cancleTakeIssueJob, |
|
|
|
getIssueJobDetail, |
|
|
|
issueJobSubmit, |
|
|
|
issueJobEopSubmit, |
|
|
|
issueCheck, |
|
|
|
getBalanceByFilter |
|
|
|
} from '@/api/request2.js'; |
|
|
@ -250,6 +250,7 @@ |
|
|
|
} |
|
|
|
detail.scaned = true |
|
|
|
} |
|
|
|
this.continueScan() |
|
|
|
}, |
|
|
|
|
|
|
|
//继续扫描 |
|
|
@ -261,52 +262,16 @@ |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
submit() { |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
//目前任务只到一个库位 |
|
|
|
var itemCodes = [] |
|
|
|
let locationCode = this.toLocationCode |
|
|
|
this.detailSource.forEach(toLocation => { |
|
|
|
itemCodes.push(toLocation.itemCode) |
|
|
|
}) |
|
|
|
|
|
|
|
//获取管理模式,封装参数 |
|
|
|
getManagementPrecisions(itemCodes, locationCode, res => { |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
this.submitJob(); |
|
|
|
} else { |
|
|
|
uni.hideLoading(); |
|
|
|
this.showErrorMessage(res.message); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
scanPopupGetFocus (){ |
|
|
|
if (this.$refs.scanPopup ) { |
|
|
|
this.$refs.scanPopup.packGetFocus(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
submitJob() { |
|
|
|
var params = this.setParams() |
|
|
|
|
|
|
|
// if (!params.subList || params.subList.length == 0) { |
|
|
|
// uni.hideLoading() |
|
|
|
// this.showErrorMessage("请扫描您需要提交的发料任务") |
|
|
|
// return |
|
|
|
// } |
|
|
|
const isTrue = params.subList.some(item=>{ |
|
|
|
return item.recordList.some(cur=>cur.scaned) == true |
|
|
|
}) |
|
|
|
|
|
|
|
if(!isTrue){ |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage("请扫描您需要提交的发料任务") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
console.log("提交参数", params); |
|
|
|
issueJobSubmit(params).then(res => { |
|
|
|
debugger |
|
|
|
// var params = this.setParams() |
|
|
|
issueJobEopSubmit(this.detailSource).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
this.showCommitSuccessMessage("提交成功\n生成发料记录\n" + res.data) |
|
|
@ -451,7 +416,7 @@ |
|
|
|
this.str1 = this.str1.substring(0,this.str1.length - 1) |
|
|
|
this.showErrorMessage(`${str1}库存不足`) |
|
|
|
}else{ |
|
|
|
this.submit() |
|
|
|
this.submitJob() |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
@ -511,7 +476,7 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
closeScanPopup() { |
|
|
|
// this.updateCommitBtn(); |
|
|
|
this.$refs.scanPopup.closeScanPopup() |
|
|
|
}, |
|
|
|
confirmFromLocation(fromLocationCodeParams){ |
|
|
|
this.fromLocationCode = fromLocationCodeParams |
|
|
|