diff --git a/common/style/new_style.css b/common/style/new_style.css index f7f1c40c..0ff8e4ab 100644 --- a/common/style/new_style.css +++ b/common/style/new_style.css @@ -2439,7 +2439,7 @@ button[disabled] { font-size: 38rpx; } -.text_stock { +.text_balance { font-size: 36rpx; } diff --git a/mycomponents/item/itemQty.vue b/mycomponents/item/itemQty.vue index 12da2d8a..4a6904fa 100644 --- a/mycomponents/item/itemQty.vue +++ b/mycomponents/item/itemQty.vue @@ -4,9 +4,11 @@ + + + :handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack"> + :handleQty="dataContent.handleQty" :showBalanceQty="true"> + + - - diff --git a/pages/count/job/countDetail.vue b/pages/count/job/countDetail.vue index c56d690c..38fd4f7b 100644 --- a/pages/count/job/countDetail.vue +++ b/pages/count/job/countDetail.vue @@ -53,6 +53,7 @@ + @@ -86,6 +87,7 @@ import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import countQtyEdit from '@/mycomponents/qty/countQtyEdit.vue' import jobTop from '@/mycomponents/job/jobTop.vue' + import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' export default { name: 'receipt_detail', @@ -97,7 +99,8 @@ comMessage, winScanPackAndLocation, countQtyEdit, - jobTop + jobTop, + balanceSelect }, data() { return { @@ -271,10 +274,6 @@ updateData() { this.calcHandleQty(); }, - // editConfirm() { - // this.calcHandleQty(); - // this.scanPopupGetFocus(); - // }, openScanPopup() { let fromlocationCode = ''; @@ -318,13 +317,29 @@ //明盘 getScanResult(result) { + if (this.jobContent.isOpenCount) { + this.getOpenCountResult(result); + } else { + this.getUnOpenCountResult(result); + } + }, + + getOpenCountResult(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.scanByBalance(result); + // } else { + // this.scanPopupGetFocus(); + // } + // }) } else { let subItem = item.subList.find(item => { 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) { let that = this; if (result.balance.length == 0) { @@ -380,24 +441,51 @@ } }) } else if (result.balance.length == 1) { - that.balance = result.balance[0]; - that.balance.qty = 0 - that.balance.handleQty = Number(that.label.qty); - that.balance.balanceQty = that.balance.qty; - that.balance.stdPackQty = that.package.stdPackQty; - that.balance.stdPackUnit = that.package.stdPackUnit; - that.$refs.countQtyEdit.openEditPopupShowSeconds(that.balance, - null); + this.countByBalance(result.balance[0]); + } else { + //有多条库存记录 + this.$refs.balanceSelect.openPopup(result.balance); } }, + //盲盘,按标签盘点 + 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) { let that = this; //编辑 if (mode == 'edit') { this.currentEditItem.handleQty = qty; this.currentEditItem.inventoryStatus = inventoryStatus; - } else { //新增盘点 + } else { + //新增盘点 //检查物料号是否存在 var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode); if (detail == undefined) { @@ -433,60 +521,13 @@ }, - // editConfirm(qty, inventoryStatus, mode) { - // let that = this; - // var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode); - - // //检查物料号是否存在 - // 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) - // } - // }, + openEditConfirm() { + + }, + + unOpenEditConfirm() { + + }, editClose() { this.scanPopupGetFocus(); diff --git a/pages/inventoryMove/coms/comMoveRecordCard.vue b/pages/inventoryMove/coms/comMoveRecordCard.vue index 33f75af0..7410aa18 100644 --- a/pages/inventoryMove/coms/comMoveRecordCard.vue +++ b/pages/inventoryMove/coms/comMoveRecordCard.vue @@ -6,7 +6,7 @@ diff --git a/pages/productionReceipt/job/productionReceiptDetail.vue b/pages/productionReceipt/job/productionReceiptDetail.vue index 9bd8015e..e724635b 100644 --- a/pages/productionReceipt/job/productionReceiptDetail.vue +++ b/pages/productionReceipt/job/productionReceiptDetail.vue @@ -247,7 +247,11 @@ getScanResult(result) { try { - var supplierCode = result.package.supplierCode + var supplierCode = result.label.supplierCode; + if (supplierCode == '' || supplierCode == undefined) { + this.showErrorMessage("标签中未解析到供应商信息,请重新扫描") + return; + } var packingNumber = result.balance.packingNumber; var batch = result.balance.batch; var qty = result.balance.qty; @@ -275,37 +279,39 @@ let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { - if(this.jobContent.allowModifyInventoryStatus=="TRUE"){ - this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + + if (this.jobContent.allowModifyInventoryStatus == "TRUE") { + this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + + itemStatus + ']不一致,是否继续上架?', res => { if (res) { itemDetail.scaned = true; itemDetail.supplierCode = supplierCode - itemDetail.handleQty = Number(result.balance.qty) + itemDetail.handleQty = Number(result.balance.qty) itemDetail.toInventoryStatus = result.balance.inventoryStatus; itemDetail.balance = result.balance; - itemDetail.balance.balanceQty = Number(result.balance.qty) - itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) + itemDetail.balance.balanceQty = Number(result.balance.qty) + itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) itemDetail.balance.stdPackUnit = result.package.stdPackUnit this.calcHandleQty(); } else { this.scanPopupGetFocus(); } }); - }else { - this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + + } else { + this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + + itemStatus + ']不一致,不允许转移!', res => { this.scanPopupGetFocus(); }); } - + } else { itemDetail.scaned = true; itemDetail.supplierCode = supplierCode - itemDetail.handleQty = Number(result.balance.qty) + itemDetail.handleQty = Number(result.balance.qty) itemDetail.toInventoryStatus = result.balance.inventoryStatus; itemDetail.balance = result.balance; - itemDetail.balance.balanceQty = Number(result.balance.qty) + itemDetail.balance.balanceQty = Number(result.balance.qty) itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) itemDetail.balance.stdPackUnit = result.package.stdPackUnit this.calcHandleQty(); @@ -428,7 +434,6 @@ detail.toBatch = info.batch; detail.toContainerNumber = ""; detail.toLocationCode = this.toLocationCode; - subList.push(detail) } }) diff --git a/pages/productionReturn/coms/comReturnRecord.vue b/pages/productionReturn/coms/comReturnRecord.vue index 0f8d156a..093d9a17 100644 --- a/pages/productionReturn/coms/comReturnRecord.vue +++ b/pages/productionReturn/coms/comReturnRecord.vue @@ -5,7 +5,7 @@