|
@ -53,6 +53,7 @@ |
|
|
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true" |
|
|
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true" |
|
|
:allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'"> |
|
|
:allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'"> |
|
|
</count-qty-edit> |
|
|
</count-qty-edit> |
|
|
|
|
|
<balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select> |
|
|
<com-message ref="comMessage"></com-message> |
|
|
<com-message ref="comMessage"></com-message> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
@ -86,6 +87,7 @@ |
|
|
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
|
|
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
|
|
import countQtyEdit from '@/mycomponents/qty/countQtyEdit.vue' |
|
|
import countQtyEdit from '@/mycomponents/qty/countQtyEdit.vue' |
|
|
import jobTop from '@/mycomponents/job/jobTop.vue' |
|
|
import jobTop from '@/mycomponents/job/jobTop.vue' |
|
|
|
|
|
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'receipt_detail', |
|
|
name: 'receipt_detail', |
|
@ -97,7 +99,8 @@ |
|
|
comMessage, |
|
|
comMessage, |
|
|
winScanPackAndLocation, |
|
|
winScanPackAndLocation, |
|
|
countQtyEdit, |
|
|
countQtyEdit, |
|
|
jobTop |
|
|
jobTop, |
|
|
|
|
|
balanceSelect |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -271,10 +274,6 @@ |
|
|
updateData() { |
|
|
updateData() { |
|
|
this.calcHandleQty(); |
|
|
this.calcHandleQty(); |
|
|
}, |
|
|
}, |
|
|
// editConfirm() { |
|
|
|
|
|
// this.calcHandleQty(); |
|
|
|
|
|
// this.scanPopupGetFocus(); |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
openScanPopup() { |
|
|
openScanPopup() { |
|
|
let fromlocationCode = ''; |
|
|
let fromlocationCode = ''; |
|
@ -318,13 +317,29 @@ |
|
|
|
|
|
|
|
|
//明盘 |
|
|
//明盘 |
|
|
getScanResult(result) { |
|
|
getScanResult(result) { |
|
|
|
|
|
if (this.jobContent.isOpenCount) { |
|
|
|
|
|
this.getOpenCountResult(result); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.getUnOpenCountResult(result); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getOpenCountResult(result) { |
|
|
try { |
|
|
try { |
|
|
let that = this; |
|
|
let that = this; |
|
|
that.package = result.package; |
|
|
that.package = result.package; |
|
|
that.label = result.label; |
|
|
that.label = result.label; |
|
|
var item = this.detailSource.find(r => r.itemCode == that.package.itemCode); |
|
|
var item = this.detailSource.find(r => r.itemCode == that.package.itemCode); |
|
|
if (item == undefined) { |
|
|
if (item == undefined) { |
|
|
|
|
|
// this.$refs.comMessage.showQuestionMessage("没有物料【" + that.package.itemCode + |
|
|
|
|
|
// "】的盘点明细,是否继续盘点?", |
|
|
|
|
|
// res => { |
|
|
|
|
|
// if (res) { |
|
|
that.scanByBalance(result); |
|
|
that.scanByBalance(result); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.scanPopupGetFocus(); |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
} else { |
|
|
} else { |
|
|
let subItem = item.subList.find(item => { |
|
|
let subItem = item.subList.find(item => { |
|
|
if (item.packingNumber == that.label.packingNumber && |
|
|
if (item.packingNumber == that.label.packingNumber && |
|
@ -356,6 +371,52 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getUnOpenCountResult(result) { |
|
|
|
|
|
try { |
|
|
|
|
|
let that = this; |
|
|
|
|
|
that.package = result.package; |
|
|
|
|
|
that.label = result.label; |
|
|
|
|
|
var item = this.detailSource.find(r => r.itemCode == that.package.itemCode); |
|
|
|
|
|
if (item == undefined) { |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage("没有物料【" + that.package.itemCode + |
|
|
|
|
|
"】的盘点明细,是否继续盘点?", |
|
|
|
|
|
res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
that.scanByLabel(result); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.scanPopupGetFocus(); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
let subItem = item.subList.find(item => { |
|
|
|
|
|
if (item.packingNumber == that.label.packingNumber && |
|
|
|
|
|
item.batch == that.label.batch && item.scaned == true) { |
|
|
|
|
|
return item; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
if (subItem != undefined) { |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber + |
|
|
|
|
|
"】已经完成盘点,是否要编辑盘点结果?", |
|
|
|
|
|
res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.currentEditItem = subItem; |
|
|
|
|
|
this.$refs.countQtyEdit.openEditPopup(subItem, |
|
|
|
|
|
item.subList); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.scanPopupGetFocus(); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
that.scanByLabel(result); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
this.showErrorMessage(e.message) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//明盘,按库存盘点 |
|
|
scanByBalance(result) { |
|
|
scanByBalance(result) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
if (result.balance.length == 0) { |
|
|
if (result.balance.length == 0) { |
|
@ -380,24 +441,51 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} else if (result.balance.length == 1) { |
|
|
} else if (result.balance.length == 1) { |
|
|
that.balance = result.balance[0]; |
|
|
this.countByBalance(result.balance[0]); |
|
|
that.balance.qty = 0 |
|
|
} else { |
|
|
that.balance.handleQty = Number(that.label.qty); |
|
|
//有多条库存记录 |
|
|
that.balance.balanceQty = that.balance.qty; |
|
|
this.$refs.balanceSelect.openPopup(result.balance); |
|
|
that.balance.stdPackQty = that.package.stdPackQty; |
|
|
|
|
|
that.balance.stdPackUnit = that.package.stdPackUnit; |
|
|
|
|
|
that.$refs.countQtyEdit.openEditPopupShowSeconds(that.balance, |
|
|
|
|
|
null); |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//盲盘,按标签盘点 |
|
|
|
|
|
scanByLabel(result) { |
|
|
|
|
|
let that = this; |
|
|
|
|
|
that.scanPopupLoseFocus() |
|
|
|
|
|
let item = that.package; |
|
|
|
|
|
item.packingNumber = that.label.packingNumber; |
|
|
|
|
|
item.qty = 0 |
|
|
|
|
|
item.handleQty = Number(that.label.qty); |
|
|
|
|
|
item.balanceQty = 0; |
|
|
|
|
|
item.inventoryStatus = "OK"; |
|
|
|
|
|
that.balance = item; |
|
|
|
|
|
that.$refs.countQtyEdit.openEditPopupShowSeconds(item, |
|
|
|
|
|
null); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
selectBalanceItem(balance) { |
|
|
|
|
|
this.countByBalance(balance); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
countByBalance(balance) { |
|
|
|
|
|
this.balance = balance; |
|
|
|
|
|
// this.balance.qty = 0 |
|
|
|
|
|
this.balance.handleQty = Number(this.label.qty); |
|
|
|
|
|
this.balance.balanceQty = this.balance.qty; |
|
|
|
|
|
this.balance.stdPackQty = this.package.stdPackQty; |
|
|
|
|
|
this.balance.stdPackUnit = this.package.stdPackUnit; |
|
|
|
|
|
this.$refs.countQtyEdit.openEditPopupShowSeconds(this.balance, |
|
|
|
|
|
null); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
editConfirm(qty, inventoryStatus, mode) { |
|
|
editConfirm(qty, inventoryStatus, mode) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
//编辑 |
|
|
//编辑 |
|
|
if (mode == 'edit') { |
|
|
if (mode == 'edit') { |
|
|
this.currentEditItem.handleQty = qty; |
|
|
this.currentEditItem.handleQty = qty; |
|
|
this.currentEditItem.inventoryStatus = inventoryStatus; |
|
|
this.currentEditItem.inventoryStatus = inventoryStatus; |
|
|
} else { //新增盘点 |
|
|
} else { |
|
|
|
|
|
//新增盘点 |
|
|
//检查物料号是否存在 |
|
|
//检查物料号是否存在 |
|
|
var detail = that.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) { |
|
@ -433,60 +521,13 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// editConfirm(qty, inventoryStatus, mode) { |
|
|
openEditConfirm() { |
|
|
// let that = this; |
|
|
|
|
|
// var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode); |
|
|
}, |
|
|
|
|
|
|
|
|
// //检查物料号是否存在 |
|
|
unOpenEditConfirm() { |
|
|
// if (detail == undefined) { |
|
|
|
|
|
// //物料号不存在,创建物料号数据添加到列表。设置为已经扫描 |
|
|
}, |
|
|
// that.addNewItemCodeToList(qty, inventoryStatus) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// var itemEditInfo = detail.subList.find(item => { |
|
|
|
|
|
// if (item.packingNumber == that.package.number && |
|
|
|
|
|
// item.batch == that.package.batch && |
|
|
|
|
|
// item.inventoryStatus == inventoryStatus) { |
|
|
|
|
|
// return item; |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
// if (itemEditInfo == undefined) { |
|
|
|
|
|
// //不在任务列表中,提示是否添加到列表 |
|
|
|
|
|
// if (mode == 'edit') { |
|
|
|
|
|
// that.currentEditItem.handleQty = qty; |
|
|
|
|
|
// that.currentEditItem.inventoryStatus = inventoryStatus; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// that.addExistItemCodeToList(detail, qty, inventoryStatus); |
|
|
|
|
|
// } |
|
|
|
|
|
// } else { //已经扫描是否编辑 |
|
|
|
|
|
// if (itemEditInfo.scaned) { |
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// itemEditInfo.scaned = true; |
|
|
|
|
|
// itemEditInfo.handleQty = qty; |
|
|
|
|
|
// itemEditInfo.inventoryStatus = inventoryStatus; |
|
|
|
|
|
// itemEditInfo.balanceQty = that.balance.qty; |
|
|
|
|
|
// itemEditInfo.stdPackQty = that.package.stdPackQty; |
|
|
|
|
|
// itemEditInfo.stdPackUnit = that.package.stdPackUnit; |
|
|
|
|
|
|
|
|
|
|
|
// //编辑后的结果对应到其它明细,当前编辑结果为0 |
|
|
|
|
|
// if (mode == 'edit') { |
|
|
|
|
|
// itemEditInfo.scaned = false; |
|
|
|
|
|
// that.currentEditItem.handleQty = 0; |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// // this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail |
|
|
|
|
|
// // .subList); |
|
|
|
|
|
// that.updateData() |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// setTimeout(r => { |
|
|
|
|
|
// this.calcHandleQty(); |
|
|
|
|
|
// this.scanPopupGetFocus(); |
|
|
|
|
|
// }, 100) |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
editClose() { |
|
|
editClose() { |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
|