|
|
@ -243,11 +243,7 @@ |
|
|
|
// }, |
|
|
|
|
|
|
|
submit() { |
|
|
|
let params = this.setParams() |
|
|
|
if(!params.subList||params.subList.length==0){ |
|
|
|
this.showErrorMessage("请扫描您需要提交的发料任务") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
@ -264,13 +260,13 @@ |
|
|
|
|
|
|
|
//使用在途库,不查询管理模式 |
|
|
|
if (this.jobContent.useOnTheWayLocation == 'TRUE') { |
|
|
|
// this.submitJob(); |
|
|
|
this.submitJob(); |
|
|
|
} else { |
|
|
|
//获取管理模式,封装参数 |
|
|
|
getManagementPrecisions(itemCodes, locationCode, res => { |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
// this.submitJob(); |
|
|
|
this.submitJob(); |
|
|
|
} else { |
|
|
|
uni.hideLoading(); |
|
|
|
this.showErrorMessage(res.message); |
|
|
@ -281,6 +277,11 @@ |
|
|
|
|
|
|
|
submitJob() { |
|
|
|
var params = this.setParams() |
|
|
|
if(!params.subList||params.subList.length==0){ |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage("请扫描您需要提交的发料任务") |
|
|
|
return |
|
|
|
} |
|
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
issueJobSubmit(params).then(res => { |
|
|
@ -342,8 +343,8 @@ |
|
|
|
// .packingNumber; |
|
|
|
// record.toBatch = r.batch; |
|
|
|
// } else { |
|
|
|
var info = |
|
|
|
getPackingNumberAndBatch( |
|
|
|
debugger |
|
|
|
var info = getPackingNumberAndBatch( |
|
|
|
this.managementList, r |
|
|
|
.itemCode, |
|
|
|
r.packingNumber, r |
|
|
@ -399,15 +400,18 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
updateData(record) { |
|
|
|
console.log('updateData',record) |
|
|
|
console.log('this.detailSource',this.detailSource) |
|
|
|
|
|
|
|
let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode); |
|
|
|
let item = requestLocation.Items.find(r => r.itemCode == record.itemCode); |
|
|
|
let itemHandleQty = 0; |
|
|
|
|
|
|
|
if (item != undefined) { |
|
|
|
item.Locations.forEach(l => { |
|
|
|
let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b |
|
|
|
.packingNumber == null || b.packingNumber == '') && b.batch == |
|
|
|
record.batch); |
|
|
|
let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b.packingNumber == null || b.packingNumber == '') && b.batch == record.batch); |
|
|
|
let handleQty = 0; |
|
|
|
|
|
|
|
if (batch != undefined) { |
|
|
|
batch.Records.forEach(res => { |
|
|
|
handleQty = calc.add(handleQty,res.qty) |
|
|
|