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 6851b19e..7eb84b5d 100644 --- a/mycomponents/item/itemQty.vue +++ b/mycomponents/item/itemQty.vue @@ -4,9 +4,9 @@ - + + :isShowRecommendQty='showRecommendQty' :handleQty="Number(handleQty)" :isShowStdPack="showStdPack" :isShowStatus="false"> + :handleQty="dataContent.handleQty" showItemQty="TRUE"> + + - - diff --git a/pages/count/job/countDetail.vue b/pages/count/job/countDetail.vue index 69009a0d..bd732f71 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/productionReceipt/job/productionReceiptDetail.vue b/pages/productionReceipt/job/productionReceiptDetail.vue index 5d150d08..2c6bef2f 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/transfer/coms/comReceiptDetailCard.vue b/pages/transfer/coms/comReceiptDetailCard.vue index f9ace0a0..dfd52c54 100644 --- a/pages/transfer/coms/comReceiptDetailCard.vue +++ b/pages/transfer/coms/comReceiptDetailCard.vue @@ -3,7 +3,7 @@ diff --git a/pages/unPlanned/coms/comReceiptDetailCard.vue b/pages/unPlanned/coms/comReceiptDetailCard.vue index f9ace0a0..265261e7 100644 --- a/pages/unPlanned/coms/comReceiptDetailCard.vue +++ b/pages/unPlanned/coms/comReceiptDetailCard.vue @@ -3,14 +3,15 @@ - + @@ -18,8 +19,7 @@ - + @@ -91,7 +91,8 @@ this.detailOptions = getDetailOption(); } if (this.scanOptions.length == 0) { - this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty,this.settingParam.allowModifyLocation) + this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam + .allowModifyLocation) } }, @@ -101,45 +102,45 @@ this.detail(item) } else if (e.content.text == "编辑") { this.edit(item) - } else if (e.content.text == "库位") { + } else if (e.content.text == "库位") { this.showLocation(item) } else if (e.content.text == "移除") { this.remove(item) } }, edit(item) { - this.editItem = item; - this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty,item.labelQty); - }, - showLocation(item) { - this.locatonItem =item; - this.$refs.scanLocationCode.openScanPopup(); - }, - //扫描源库位 - getLocation(location, code) { - this.locatonItem.toLocationCode =code; - this.$emit('updateData') - }, - - detail(item) { - this.showItem = item; - this.$refs.detailInfoPopup.openPopup(item) - }, - remove(item) { - this.$refs.message.showQuestionMessage("确定移除扫描信息?", - res => { - if (res) { - item.scaned = false - item.handleQty = null - this.$forceUpdate() - this.$emit('remove', item) - } - }); - }, - confirm(qty) { - this.editItem.handleQty = qty; - this.$emit('updateData') - } + this.editItem = item; + this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty); + }, + showLocation(item) { + this.locatonItem = item; + this.$refs.scanLocationCode.openScanPopup(); + }, + //扫描源库位 + getLocation(location, code) { + this.locatonItem.toLocationCode = code; + this.$emit('updateData') + }, + + detail(item) { + this.showItem = item; + this.$refs.detailInfoPopup.openPopup(item) + }, + remove(item) { + this.$refs.message.showQuestionMessage("确定移除扫描信息?", + res => { + if (res) { + item.scaned = false + item.handleQty = null + this.$forceUpdate() + this.$emit('remove', item) + } + }); + }, + confirm(qty) { + this.editItem.handleQty = qty; + this.$emit('updateData') + } } } diff --git a/static/config.json b/static/config.json index 2b2e6eed..9563e130 100644 --- a/static/config.json +++ b/static/config.json @@ -18,7 +18,7 @@ "request_url": { "name": "request_url", - "value": "http://192.168.0.158:12080/admin-api", + "value": "http://dev.ccwin-in.com:25100/api/admin-api", "dev2": "http://192.168.0.157:12080/admin-api", "chefang": "http://192.168.0.176:12080/admin-api", "chenxinming": "http://192.179.0.230:12080/admin-api",