|
@ -143,7 +143,7 @@ |
|
|
label: {}, |
|
|
label: {}, |
|
|
fromInventoryStatuses: "", |
|
|
fromInventoryStatuses: "", |
|
|
packageInfo: {}, |
|
|
packageInfo: {}, |
|
|
toLocationAreaTypeList:[] |
|
|
toLocationAreaTypeList: [] |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -197,7 +197,7 @@ |
|
|
that.fromInventoryStatuses = this.jobContent.outInventoryStatuses |
|
|
that.fromInventoryStatuses = this.jobContent.outInventoryStatuses |
|
|
that.toLocation = that.dataContent[0]; |
|
|
that.toLocation = that.dataContent[0]; |
|
|
that.toLocationCode = that.dataContent[0].toLocationCode; |
|
|
that.toLocationCode = that.dataContent[0].toLocationCode; |
|
|
that.toLocationAreaTypeList=getDirectoryItemArray(this.jobContent.toAreaTypes) |
|
|
that.toLocationAreaTypeList = getDirectoryItemArray(this.jobContent.toAreaTypes) |
|
|
// that.fromLocationList = that.getFromLocationList(); |
|
|
// that.fromLocationList = that.getFromLocationList(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -231,7 +231,7 @@ |
|
|
let location = this.fromLocationList.find(r => r == fromlocation) |
|
|
let location = this.fromLocationList.find(r => r == fromlocation) |
|
|
if (location == undefined) { |
|
|
if (location == undefined) { |
|
|
this.fromLocationCode = '' |
|
|
this.fromLocationCode = '' |
|
|
this.showErrorMessage('发料库位【' + fromlocation + '】不存在',res=>{ |
|
|
this.showErrorMessage('发料库位【' + fromlocation + '】不存在', res => { |
|
|
this.getfocus(); |
|
|
this.getfocus(); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -250,9 +250,9 @@ |
|
|
let item = this.toLocation.Items.find(r => r.itemCode == result.package.itemCode); |
|
|
let item = this.toLocation.Items.find(r => r.itemCode == result.package.itemCode); |
|
|
if (!item) { |
|
|
if (!item) { |
|
|
this.showErrorMessage('扫描物料代码不属于该任务', |
|
|
this.showErrorMessage('扫描物料代码不属于该任务', |
|
|
res => { |
|
|
res => { |
|
|
this.getfocus(); |
|
|
this.getfocus(); |
|
|
}); |
|
|
}); |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (result.package.packUnit !== item.packUnit) { |
|
|
if (result.package.packUnit !== item.packUnit) { |
|
@ -417,7 +417,9 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectBalanceItem(balance) { |
|
|
selectBalanceItem(balance) { |
|
|
this.afterGetBalance(this.label, balance, this.packageInfo); |
|
|
if(balance){ |
|
|
|
|
|
this.afterGetBalance(this.label, balance, this.packageInfo); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
afterGetBalance(label, balance, packageInfo) { |
|
|
afterGetBalance(label, balance, packageInfo) { |
|
@ -431,7 +433,7 @@ |
|
|
that.fromLocationCode = balance.locationCode; |
|
|
that.fromLocationCode = balance.locationCode; |
|
|
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode); |
|
|
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode); |
|
|
//如果库存余额中的库位与任务推荐的不一致 |
|
|
//如果库存余额中的库位与任务推荐的不一致 |
|
|
if (fromLocation != undefined) { |
|
|
if (fromLocation && !fromLocation.isNewAdd) { |
|
|
let batch = fromLocation.Batchs.find(r => r.batch == lot); |
|
|
let batch = fromLocation.Batchs.find(r => r.batch == lot); |
|
|
if (batch != undefined) { |
|
|
if (batch != undefined) { |
|
|
if (batch.Records == undefined) { |
|
|
if (batch.Records == undefined) { |
|
@ -487,8 +489,24 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
let locaion = that.createLocationInfo(label, balance, packageInfo); |
|
|
|
|
|
item.Locations.push(locaion); |
|
|
if (this.jobContent.allowModifyLocation == "TRUE") { |
|
|
|
|
|
this.showQuestionMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode + |
|
|
|
|
|
"】与推荐的库位不一致,是否要继续发料?", res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
let locaion = that.createLocationInfo(label, balance, packageInfo); |
|
|
|
|
|
item.Locations.push(locaion); |
|
|
|
|
|
this.getfocus(); |
|
|
|
|
|
that.$emit("afterScan"); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode + |
|
|
|
|
|
"】与推荐的库位不一致,不允许继续发料?") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
this.showErrorMessage(e.stack, |
|
|
this.showErrorMessage(e.stack, |
|
@ -506,6 +524,7 @@ |
|
|
qty: balance.qty, |
|
|
qty: balance.qty, |
|
|
uom: balance.uom, |
|
|
uom: balance.uom, |
|
|
handleQty: 0, |
|
|
handleQty: 0, |
|
|
|
|
|
isNewAdd: true, |
|
|
Batchs: [] |
|
|
Batchs: [] |
|
|
} |
|
|
} |
|
|
let batch = this.createBatchInfo(label, balance, packageInfo); |
|
|
let batch = this.createBatchInfo(label, balance, packageInfo); |
|
|