|
@ -380,12 +380,12 @@ |
|
|
|
|
|
|
|
|
editConfirm(qty, inventoryStatus, mode) { |
|
|
editConfirm(qty, inventoryStatus, mode) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
var detail = this.detailSource.find(r => r.itemCode == that.package.itemCode); |
|
|
var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode); |
|
|
|
|
|
|
|
|
//检查物料号是否存在 |
|
|
//检查物料号是否存在 |
|
|
if (detail == undefined) { |
|
|
if (detail == undefined) { |
|
|
//物料号不存在,创建物料号数据添加到列表。设置为已经扫描 |
|
|
//物料号不存在,创建物料号数据添加到列表。设置为已经扫描 |
|
|
this.addNewItemCodeToList(result) |
|
|
that.addNewItemCodeToList() |
|
|
} else { |
|
|
} else { |
|
|
var itemEditInfo = detail.subList.find(item => { |
|
|
var itemEditInfo = detail.subList.find(item => { |
|
|
if (item.packingNumber == that.package.number && |
|
|
if (item.packingNumber == that.package.number && |
|
@ -397,23 +397,23 @@ |
|
|
|
|
|
|
|
|
if (itemEditInfo == undefined) { |
|
|
if (itemEditInfo == undefined) { |
|
|
//不在任务列表中,提示是否添加到列表 |
|
|
//不在任务列表中,提示是否添加到列表 |
|
|
this.addExistItemCodeToList(detail); |
|
|
that.addExistItemCodeToList(detail, qty, inventoryStatus); |
|
|
} else { |
|
|
} else { |
|
|
itemEditInfo.scaned = true; |
|
|
itemEditInfo.scaned = true; |
|
|
itemEditInfo.handleQty = qty; |
|
|
itemEditInfo.handleQty = qty; |
|
|
itemEditInfo.balanceQty = this.balance.qty; |
|
|
itemEditInfo.balanceQty = that.balance.qty; |
|
|
itemEditInfo.stdPackQty = this.package.stdPackQty; |
|
|
itemEditInfo.stdPackQty = that.package.stdPackQty; |
|
|
itemEditInfo.stdPackUnit = this.package.stdPackUnit; |
|
|
itemEditInfo.stdPackUnit = that.package.stdPackUnit; |
|
|
this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail |
|
|
this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail |
|
|
.subList); |
|
|
.subList); |
|
|
this.updateData() |
|
|
that.updateData() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//如果是编辑,移除之前的盘点结果 |
|
|
//如果是编辑,移除之前的盘点结果 |
|
|
if (mode == 'edit') { |
|
|
if (mode == 'edit') { |
|
|
this.currentEditItem.handleQty = 0; |
|
|
that.currentEditItem.handleQty = 0; |
|
|
this.currentEditItem.scaned = false; |
|
|
that.currentEditItem.scaned = false; |
|
|
this.currentEditItem = {}; |
|
|
that.currentEditItem = {}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
setTimeout(r => { |
|
|
setTimeout(r => { |
|
@ -449,7 +449,7 @@ |
|
|
//检查物料号是否存在 |
|
|
//检查物料号是否存在 |
|
|
if (detail == undefined) { |
|
|
if (detail == undefined) { |
|
|
//物料号不存在,创建物料号数据添加到列表。设置为已经扫描 |
|
|
//物料号不存在,创建物料号数据添加到列表。设置为已经扫描 |
|
|
this.addNewItemCodeToList(result) |
|
|
this.addNewItemCodeToList() |
|
|
} else { |
|
|
} else { |
|
|
//物料号存在,查询是否在任务列表中 |
|
|
//物料号存在,查询是否在任务列表中 |
|
|
itemEditInfo = detail.subList.find(item => { |
|
|
itemEditInfo = detail.subList.find(item => { |
|
@ -514,7 +514,8 @@ |
|
|
res => { |
|
|
res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
detail.qty = calc.add(detail.qty, detail.qty) |
|
|
detail.qty = calc.add(detail.qty, detail.qty) |
|
|
let newDetail = this.createAddDetailInfo(this.balance, this.package); // |
|
|
//this.balance, this.package, |
|
|
|
|
|
let newDetail = this.createAddDetailInfo(); // |
|
|
detail.subList.push(newDetail); |
|
|
detail.subList.push(newDetail); |
|
|
this.updateData() |
|
|
this.updateData() |
|
|
|
|
|
|
|
@ -522,46 +523,45 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
createAddItemInfo(balance, pack) { |
|
|
createAddItemInfo() { |
|
|
let item = { |
|
|
let item = { |
|
|
itemCode: pack.itemCode, |
|
|
itemCode: this.package.itemCode, |
|
|
itemName: pack.itemName, |
|
|
itemName: this.package.itemName, |
|
|
stdPackQty: pack.stdPackQty, |
|
|
stdPackQty: this.package.stdPackQty, |
|
|
stdPackUnit: pack.stdPackUnit, |
|
|
stdPackUnit: this.package.stdPackUnit, |
|
|
qty: Number(balance.qty), |
|
|
qty: Number(qty), |
|
|
handleQty: 0, |
|
|
handleQty: 0, |
|
|
uom: pack.uom, |
|
|
uom: pack.uom, |
|
|
subList: [], |
|
|
subList: [], |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
return item; |
|
|
return item; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
createAddDetailInfo(balance, pack) { |
|
|
createAddDetailInfo() { |
|
|
var detail = { |
|
|
var detail = { |
|
|
id: "0", |
|
|
id: "0", |
|
|
scaned: true, |
|
|
scaned: true, |
|
|
countDetailNumber: "", |
|
|
countDetailNumber: "", |
|
|
ownerCode: balance.ownerCode, |
|
|
ownerCode: this.balance.ownerCode, |
|
|
packingNumber: pack.number, |
|
|
packingNumber: pack.number, |
|
|
containerNumber: balance.containerNumber, |
|
|
containerNumber: this.balance.containerNumber, |
|
|
batch: pack.batch, |
|
|
batch: pack.batch, |
|
|
inventoryStatus: balance.inventoryStatus, |
|
|
inventoryStatus:this. balance.inventoryStatus, |
|
|
itemCode: pack.itemCode, |
|
|
itemCode: this.package.itemCode, |
|
|
itemName: pack.itemName, |
|
|
itemName: this.package.itemName, |
|
|
itemDesc1: pack.itemDesc1, |
|
|
itemDesc1: this.package.itemDesc1, |
|
|
itemDesc2: pack.itemDesc2, |
|
|
itemDesc2: this.package.itemDesc2, |
|
|
projectCode: "", |
|
|
projectCode: "", |
|
|
qty: 0, |
|
|
qty: 0, |
|
|
handleQty: balance.qty, |
|
|
handleQty: this.balance.qty, |
|
|
uom: balance.uom, |
|
|
uom: balance.uom, |
|
|
number: this.jobContent.number, |
|
|
number: this.jobContent.number, |
|
|
remark: "", |
|
|
remark: "", |
|
|
countQty: balance.qty, |
|
|
countQty: this.balance.qty, |
|
|
balanceQty: balance.qty, |
|
|
balanceQty:this. balance.qty, |
|
|
fromLocationCode: balance.locationCode, |
|
|
fromLocationCode: this.balance.locationCode, |
|
|
stdPackQty: pack.stdPackQty, |
|
|
stdPackQty: this.package.stdPackQty, |
|
|
stdPackUnit: pack.stdPackUnit, |
|
|
stdPackUnit: this.package.stdPackUnit, |
|
|
creator: this.$store.state.user.id |
|
|
creator: this.$store.state.user.id |
|
|
} |
|
|
} |
|
|
return detail; |
|
|
return detail; |
|
|