|
|
@ -244,7 +244,7 @@ |
|
|
|
this.showErrorMessage("物料【" + itemCode + "】已经扫描") |
|
|
|
return |
|
|
|
} |
|
|
|
if(qty>result.balance.qty){ |
|
|
|
if(detail.qty>result.balance.qty){ |
|
|
|
this.showErrorMessage("物料【" + itemCode + "】库存不足") |
|
|
|
return |
|
|
|
} |
|
|
@ -269,10 +269,6 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
submitJob() { |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
// var params = this.setParams() |
|
|
|
issueJobEopSubmit(this.detailSource).then(res => { |
|
|
|
uni.hideLoading() |
|
|
@ -387,11 +383,11 @@ |
|
|
|
return |
|
|
|
} |
|
|
|
let index = 0 |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
await this.recursion(index) |
|
|
|
if(this.str1){ |
|
|
|
console.log(this.str1) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
async recursion(index){ |
|
|
|
let filters = [] |
|
|
@ -413,7 +409,7 @@ |
|
|
|
await getBalanceByFilter(params).then(res => { |
|
|
|
const balance = res.data.list[0] |
|
|
|
if(this.detailSource.subList[index].qty>balance.qty){ |
|
|
|
this.str1 += "物料【" + itemCode + "】、" |
|
|
|
this.str1 += "物料【" + this.detailSource.subList[index].itemCode + "】、" |
|
|
|
} |
|
|
|
index++; |
|
|
|
if(index < this.detailSource.subList.length){ |
|
|
@ -421,7 +417,8 @@ |
|
|
|
}else{ |
|
|
|
if(this.str1){ |
|
|
|
this.str1 = this.str1.substring(0,this.str1.length - 1) |
|
|
|
this.showErrorMessage(`${str1}库存不足`) |
|
|
|
this.showErrorMessage(`${this.str1}库存不足`) |
|
|
|
uni.hideLoading() |
|
|
|
}else{ |
|
|
|
this.submitJob() |
|
|
|
} |
|
|
@ -480,6 +477,7 @@ |
|
|
|
}, |
|
|
|
openScanPopup() { |
|
|
|
this.$refs.scanPopup.openScanPopupForJob(this.jobContent); |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}, |
|
|
|
|
|
|
|
closeScanPopup() { |
|
|
|