From 5b56f239b34bb557f9127ef85b7eb72b2f0b3b11 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Tue, 14 May 2024 15:56:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...prayIssuleJob.vue => assembleIssueJob.vue} | 52 +- fe/PDA/pages/task/assembleIssueJobDetail.vue | 624 +++++++++++++++ .../task/assembleIssueJobDetailByQty.vue | 551 ++++++++++++++ .../pages/task/assemblingIssueJobDetail.vue | 713 ------------------ ...blingIssueJob.vue => coatingIssuleJob.vue} | 41 +- fe/PDA/pages/task/coatingIssuleJobDetail.vue | 599 +++++++++++++++ .../task/coatingIssuleJobDetailByQty.vue | 585 ++++++++++++++ fe/PDA/pages/task/kittingIssueJob.vue | 3 + fe/PDA/pages/task/kittingIssueJobDetail.vue | 235 ++++-- .../pages/task/kittingIssueJobDetailByQty.vue | 90 ++- fe/PDA/pages/task/sprayIssuleJobDetail.vue | 713 ------------------ 11 files changed, 2618 insertions(+), 1588 deletions(-) rename fe/PDA/pages/task/{sprayIssuleJob.vue => assembleIssueJob.vue} (84%) create mode 100644 fe/PDA/pages/task/assembleIssueJobDetail.vue create mode 100644 fe/PDA/pages/task/assembleIssueJobDetailByQty.vue delete mode 100644 fe/PDA/pages/task/assemblingIssueJobDetail.vue rename fe/PDA/pages/task/{assemblingIssueJob.vue => coatingIssuleJob.vue} (86%) create mode 100644 fe/PDA/pages/task/coatingIssuleJobDetail.vue create mode 100644 fe/PDA/pages/task/coatingIssuleJobDetailByQty.vue delete mode 100644 fe/PDA/pages/task/sprayIssuleJobDetail.vue diff --git a/fe/PDA/pages/task/sprayIssuleJob.vue b/fe/PDA/pages/task/assembleIssueJob.vue similarity index 84% rename from fe/PDA/pages/task/sprayIssuleJob.vue rename to fe/PDA/pages/task/assembleIssueJob.vue index c136c591d..485a21eab 100644 --- a/fe/PDA/pages/task/sprayIssuleJob.vue +++ b/fe/PDA/pages/task/assembleIssueJob.vue @@ -17,7 +17,7 @@ - + @@ -31,9 +31,9 @@ + + \ No newline at end of file diff --git a/fe/PDA/pages/task/assembleIssueJobDetailByQty.vue b/fe/PDA/pages/task/assembleIssueJobDetailByQty.vue new file mode 100644 index 000000000..474b40833 --- /dev/null +++ b/fe/PDA/pages/task/assembleIssueJobDetailByQty.vue @@ -0,0 +1,551 @@ + + + + + + \ No newline at end of file diff --git a/fe/PDA/pages/task/assemblingIssueJobDetail.vue b/fe/PDA/pages/task/assemblingIssueJobDetail.vue deleted file mode 100644 index cb8ff2b44..000000000 --- a/fe/PDA/pages/task/assemblingIssueJobDetail.vue +++ /dev/null @@ -1,713 +0,0 @@ - - - - - - diff --git a/fe/PDA/pages/task/assemblingIssueJob.vue b/fe/PDA/pages/task/coatingIssuleJob.vue similarity index 86% rename from fe/PDA/pages/task/assemblingIssueJob.vue rename to fe/PDA/pages/task/coatingIssuleJob.vue index 6af6d5a45..d3baf022f 100644 --- a/fe/PDA/pages/task/assemblingIssueJob.vue +++ b/fe/PDA/pages/task/coatingIssuleJob.vue @@ -17,7 +17,7 @@ - + @@ -31,9 +31,9 @@ + + \ No newline at end of file diff --git a/fe/PDA/pages/task/coatingIssuleJobDetailByQty.vue b/fe/PDA/pages/task/coatingIssuleJobDetailByQty.vue new file mode 100644 index 000000000..cd196887e --- /dev/null +++ b/fe/PDA/pages/task/coatingIssuleJobDetailByQty.vue @@ -0,0 +1,585 @@ + + + + + + \ No newline at end of file diff --git a/fe/PDA/pages/task/kittingIssueJob.vue b/fe/PDA/pages/task/kittingIssueJob.vue index ec54eaf05..770b07a25 100644 --- a/fe/PDA/pages/task/kittingIssueJob.vue +++ b/fe/PDA/pages/task/kittingIssueJob.vue @@ -133,6 +133,9 @@ if (type === "refresh") { uni.stopPullDownRefresh(); } + res.items.forEach(item=>{ + item.requestNumber =item.kittingRequestNumber + }) var list = res.items; this.loadingType = "loadmore"; if (list == null || list.length == 0) { diff --git a/fe/PDA/pages/task/kittingIssueJobDetail.vue b/fe/PDA/pages/task/kittingIssueJobDetail.vue index d56145e6a..334fdce8c 100644 --- a/fe/PDA/pages/task/kittingIssueJobDetail.vue +++ b/fe/PDA/pages/task/kittingIssueJobDetail.vue @@ -3,11 +3,8 @@ - + + + + @@ -157,11 +157,12 @@ - - - - - + + + + + + @@ -174,6 +175,7 @@ takeKittingIssueJob, cancelTakeKittingIssueJob, finshKittingIssueJob, + getRecommendBalance, balances } from '@/api/index.js'; import { @@ -189,24 +191,27 @@ import comMessage from '@/mycomponents/common/comMessage.vue' import winScanButton from '@/mycomponents/wincom/winScanButton.vue' import winScanButtonTop from '@/mycomponents/wincom/winScanButtonTop.vue' + import winScanButtonBottom from '@/mycomponents/wincom/winScanButtonBottom.vue' + import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue' - import comBalance from '@/mycomponents/common/comBalance.vue' import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue' import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue' import comNumberBox from '@/mycomponents/common/comNumberBox.vue'; import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue'; + import selectClickList from "@/mycomponents/popup/selectClickList.vue" export default { components: { comMessage, winScanButton, winScanButtonTop, + winScanButtonBottom, winMulitScan, - comBalance, comJobScanDetail, winScanByPack, comNumberBox, - winScanLocationCode + winScanLocationCode, + selectClickList }, data() { return { @@ -224,7 +229,8 @@ isPack: true, titleArray: ['箱标签'], jobStatus: "", - toLocationInfo: {} + toLocationInfo: {}, + handleToPackingCodeLocationCode: "" } }, props: { @@ -272,26 +278,47 @@ }) }, methods: { - openScanPopupFrom() { - this.$refs.scanPopupFrom.openScanPopup(); + openScanPopupTo() { + this.$refs.scanPopupTo.openScanPopup(); }, openLocationTo() { this.$refs.locationTo.openScanPopup() }, + openLocationFrom() { + this.$refs.locationFrom.openScanPopup() + }, + + + geFromLocation(locationInfo) { + var current = this.details[0] + if (!current.handledToPackingCode) { + this.showMessage("请先扫描箱码") + return; + } + + if (locationInfo.code != current.handleToPackingCodeLocationCode) { + this.showMessage("扫描来源库位[" + locationInfo.code + "]与箱码[" + current.handledToPackingCode + + "]对应的库位[" + current.handleToPackingCodeLocationCode + "]不一致,请重新扫描") + return; + } + + current.handledFromLocationCode = locationInfo.code + current.handledFromLocationArea = locationInfo.locationArea + current.handledFromLocationGroup = locationInfo.locationGroup + current.handledFromLocationErpCode = locationInfo.locationErpCode + }, + geToLocation(locationInfo) { var current = this.details[0] - if (locationInfo.code != current.transferLibToLocationCode) { - this.showMessage(" 扫描目标库位[" + locationInfo.code + "]与推荐库位[" + this.details[0] - .transferLibToLocationCode + "]不一致,请重新扫描") + if (locationInfo.code != current.recommendToLocationCode) { + this.showMessage(" 扫描目标库位[" + locationInfo.code + "]与推荐目标库位[" + current + .recommendToLocationCode + "]不一致,请重新扫描") return; } current.handledToLocationCode = locationInfo.code current.handledToLocationArea = locationInfo.locationArea current.handledToLocationGroup = locationInfo.locationGroup current.handledToLocationErpCode = locationInfo.locationErpCode - current.handledToWarehouseCode = locationInfo.warehouseCode - current.handledToPackingCode = "" - current.handledToLot = "" }, //加载零件信息 getDetail() { @@ -317,20 +344,20 @@ r => { r.scaned = false; r.scanDate = new Date() - r.handledFromContainerCode = r.transferLibFromContainerCode - r.handledFromPackingCode = r.transferLibFromPackingCode - r.handledFromSupplierBatch = r.transferLibFromSupplierBatch - r.handledFromArriveDate = r.transferLibFromArriveDate - r.handledFromProduceDate = r.transferLibFromProduceDate - r.handledFromExpireDate = r.transferLibFromExpireDate - r.handledFromLot = r.transferLibFromLot - r.handledFromLocationCode = r.transferLibFromLocationCode - r.handledFromLocationArea = r.transferLibFromLocationArea - r.handledFromLocationGroup = r.transferLibFromLocationGroup - r.handledFromLocationErpCode = r.transferLibFromLocationErpCode - r.handledFromWarehouseCode = r.transferLibFromWarehouseCode - r.handledFromQty = r.transferLibFromQty - r.handledToQty = r.handledFromQty + r.handledFromContainerCode = r.recommendFromContainerCode + r.handledFromPackingCode = r.recommendFromPackingCode + r.handledFromSupplierBatch = r.recommendFromSupplierBatch + r.handledFromArriveDate = r.recommendFromArriveDate + r.handledFromProduceDate = r.recommendFromProduceDate + r.handledFromExpireDate = r.recommendFromExpireDate + r.handledFromLot = r.recommendFromLot + // r.handledFromLocationCode = r.recommendFromLocationCode + // r.handledFromLocationArea = r.recommendFromLocationArea + // r.handledFromLocationGroup = r.recommendFromLocationGroup + // r.handledFromLocationErpCode = r.recommendFromLocationErpCode + // r.handledFromWarehouseCode = r.recommendFromWarehouseCode + r.handledFromQty = r.recommendFromQty + // r.handledToQty = r.handledFromQty } ); that.ispending = item.jobStatus === 2; @@ -341,12 +368,11 @@ }) .catch(err => { this.showMessage('未查找到详细信息') - uni.hideLoading(); }); }, - getScanResultFrom(result) { + getScanResultTo(result) { var fromData = result.data; var data = this.details.filter(r => r.itemCode == result.data.itemCode) if (data.length == 0) { @@ -357,52 +383,59 @@ if (res.totalCount > 0) { var balancesItem = res.items[0]; var item = data[0]; - item.handledFromContainerCode = balancesItem.containerCode - item.handledFromPackingCode = balancesItem.packingCode - item.handledFromSupplierBatch = balancesItem.supplierBatch - item.handledFromArriveDate = balancesItem.arriveDate - item.handledFromProduceDate = balancesItem.produceDate - item.handledFromExpireDate = balancesItem.expireDate - item.handledFromLot = balancesItem.lot - item.handledFromLocationCode = balancesItem.locationCode - item.handledFromLocationArea = balancesItem.locationArea - item.handledFromLocationGroup = balancesItem.locationGroup - item.handledFromLocationErpCode = balancesItem.locationErpCode - item.handledFromWarehouseCode = balancesItem.warehouseCode - item.handledFromQty = balancesItem.qty; - item.handledToQty =item.handledFromQty; - this.$forceUpdate() - } - }); + if (balancesItem.lot == item.recommendToLot) { + item.handledToContainerCode = balancesItem.containerCode + item.handledToPackingCode = balancesItem.packingCode + item.handledToSupplierBatch = balancesItem.supplierBatch + item.handledToArriveDate = balancesItem.arriveDate + item.handledToProduceDate = balancesItem.produceDate + item.handledToExpireDate = balancesItem.expireDate + item.handledToLot = balancesItem.lot + item.handledToWarehouseCode = balancesItem.warehouseCode + item.handledToQty = balancesItem.qty + + item.handledFromContainerCode = balancesItem.containerCode + item.handledFromPackingCode = balancesItem.packingCode + item.handledFromSupplierBatch = balancesItem.supplierBatch + item.handledFromArriveDate = balancesItem.arriveDate + item.handledFromProduceDate = balancesItem.produceDate + item.handledFromExpireDate = balancesItem.expireDate + item.handledFromLot = balancesItem.lot + item.handledFromWarehouseCode = balancesItem.warehouseCode + item.handledFromQty = balancesItem.qty + item.handleToPackingCodeLocationCode = balancesItem.locationCode + } else { + showConfirmMsg("箱码[" + fromData.code + "]的批次[" + balancesItem.lot + "]与推荐目标批次[" + item + .recommendToLot + "]不一致,是否继续发料", res => { + if (res) { + item.handledToContainerCode = balancesItem.containerCode + item.handledToPackingCode = balancesItem.packingCode + item.handledToSupplierBatch = balancesItem.supplierBatch + item.handledToArriveDate = balancesItem.arriveDate + item.handledToProduceDate = balancesItem.produceDate + item.handledToExpireDate = balancesItem.expireDate + item.handledToLot = balancesItem.lot + item.handledToWarehouseCode = balancesItem.warehouseCode + item.handledToQty = balancesItem.qty + + item.handledFromContainerCode = balancesItem.containerCode + item.handledFromPackingCode = balancesItem.packingCode + item.handledFromSupplierBatch = balancesItem.supplierBatch + item.handledFromArriveDate = balancesItem.arriveDate + item.handledFromProduceDate = balancesItem.produceDate + item.handledFromExpireDate = balancesItem.expireDate + item.handledFromLot = balancesItem.lot + item.handledFromWarehouseCode = balancesItem.warehouseCode + item.handledFromQty = balancesItem.qty + item.handleToPackingCodeLocationCode = balancesItem.locationCode + } + }) + + } - }, - getScanResultTo(result) { - var fromData = result.data; - var data = this.details.filter(r => r.itemCode == result.data.itemCode) - if (data.length == 0) { - this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中") - return; - } - this.getBalance(result, res => { - if (res.totalCount > 0) { - var balancesItem = res.items[0]; - var item = data[0]; - item.handledToContainerCode = balancesItem.containerCode - item.handledToPackingCode = balancesItem.packingCode - item.handledToSupplierBatch = balancesItem.supplierBatch - item.handledToArriveDate = balancesItem.arriveDate - item.handledToProduceDate = balancesItem.produceDate - item.handledToExpireDate = balancesItem.expireDate - item.handledToLot = balancesItem.lot - item.handledToLocationCode = balancesItem.locationCode - item.handledToLocationArea = balancesItem.locationArea - item.handledToLocationGroup = balancesItem.locationGroup - item.handledToLocationErpCode = balancesItem.locationErpCode - item.handledToWarehouseCode = balancesItem.warehouseCode - item.handledToQty = balancesItem.qty - this.$forceUpdate() + this.$forceUpdate() } }); @@ -441,6 +474,36 @@ }); }, + recommend() { + var itemCode = this.details[0].itemCode + var productLine = this.details[0].prodLine + if (!itemCode) { + this.showMessage("物料为空") + return; + } + if (!productLine) { + this.showMessage("生产线为空") + return; + } + + uni.showLoading({ + title: "加载中", + mask: true + }) + + getRecommendBalance(itemCode, productLine, true).then(res => { + uni.hideLoading() + if (res.length > 0) { + this.$refs.selectPopup.openScanPopup(res) + } else { + this.showMessage("暂无推荐库存") + } + }).catch(error => { + uni.hideLoading() + this.showMessage(error) + }) + }, + // //接收 receive(callback) { let params = { @@ -462,12 +525,16 @@ this.showMessage('该任务没有要上架的零件'); return; } - if (!that.details[0].handledFromPackingCode) { + if (!that.details[0].handledToPackingCode) { this.showMessage('请先扫描箱码'); return; } if (!that.details[0].handledToLocationCode) { - this.showMessage('请先扫描库位'); + this.showMessage('请先扫描目标库位'); + return; + } + if (!that.details[0].handledFromLocationCode) { + this.showMessage('请先扫描来源库位'); return; } that.finsh(); @@ -482,6 +549,7 @@ mask: true }); let params = that.details[0]; + // console.log("提交",JSON.stringify(params)) finshKittingIssueJob(that.id, params.id, params) .then(res => { uni.hideLoading(); @@ -496,6 +564,7 @@ }, clear() { + this.handleToPackingCodeLocationCode = "" this.getDetail(); }, showMessage(message) { diff --git a/fe/PDA/pages/task/kittingIssueJobDetailByQty.vue b/fe/PDA/pages/task/kittingIssueJobDetailByQty.vue index d7d1d1b08..87628229b 100644 --- a/fe/PDA/pages/task/kittingIssueJobDetailByQty.vue +++ b/fe/PDA/pages/task/kittingIssueJobDetailByQty.vue @@ -97,6 +97,10 @@ + + + + @@ -126,8 +130,7 @@ - - + @@ -143,8 +146,8 @@ takeKittingIssueJob, cancelTakeKittingIssueJob, finshKittingIssueJob, - balances, - getCountByItemCode + getCountByItemCode, + getRecommendBalance } from '@/api/index.js'; import { getJobStatuStyle, @@ -159,7 +162,7 @@ import comMessage from '@/mycomponents/common/comMessage.vue' import winScanButtonLeft from '@/mycomponents/wincom/winScanButtonLeft.vue' import winScanButtonTop from '@/mycomponents/wincom/winScanButtonTop.vue' - import winScanButtonbottom from '@/mycomponents/wincom/winScanButtonbottom.vue' + import winScanButtonBottom from '@/mycomponents/wincom/winScanButtonBottom.vue' import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue' import comBalance from '@/mycomponents/common/comBalance.vue' import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue' @@ -167,20 +170,22 @@ import comNumberBox from '@/mycomponents/common/comNumberBox.vue'; import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue'; import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue' - + import selectClickList from "@/mycomponents/popup/selectClickList.vue" + export default { components: { comMessage, winScanButtonLeft, winScanButtonTop, - winScanButtonbottom, + winScanButtonBottom, winMulitScan, comBalance, comJobScanDetail, winScanByPack, comNumberBox, winScanLocationCode, - winScanByProductCode + winScanByProductCode, + selectClickList }, data() { return { @@ -188,12 +193,7 @@ datacontent: {}, details: [], toLocation: '', - scrollTop: 0, - old: { - scrollTop: 0 - }, ispending: false, - balancesItem: null, allCount: 0, scanCount:0, isPack: true, @@ -328,6 +328,7 @@ //查找收容数 getCountByItemCode(that.details[0].itemCode).then(res => { if (res) { + uni.hideLoading(); var qty = res.qty; this.shouRongCount = qty; this.details[0].tempHandledToQty = qty; @@ -337,10 +338,11 @@ this.showMessage("没有查找到[" + that.details[0].itemCode + "]的收容数") } }).catch(error => { + uni.hideLoading(); this.showMessage(error) }) } - uni.hideLoading(); + }) .catch(err => { this.showMessage('未查找到详细信息') @@ -362,36 +364,42 @@ }, - //查询库存记录 - getBalance(result, callback) { + recommend(){ + var itemCode =this.details[0].itemCode + var productLine =this.details[0].prodLine + if(!itemCode){ + this.showMessage("物料为空") + return; + } + if(!productLine){ + this.showMessage("生产线为空") + return; + } + uni.showLoading({ - title: '扫描中...', + title: "加载中", mask: true }) - let params = { - pageSize: 1000, - pageIndex: 1, - packingCode: result.data.code, - // itemCode: result.data.itemCode, - // lot: result.data.lot, - // inventoryStatus: 2, //库存状态默认2 - // locationTypes: [2, 3], - // sortBy: 'PackingCode asc' - - }; - balances(params) - .then(res => { - if (res.totalCount === 0) { - this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); - } else { - callback(res); - } - uni.hideLoading(); - }) - .catch(err => { - this.showScanMessage(err.message); - uni.hideLoading(); - }); + + getRecommendBalance(itemCode,productLine,false).then(res=>{ + uni.hideLoading() + if (res.length > 0) { + var list = []; + list = res.Result; + list.forEach(res => { + res.label = res.PLAN_NO; + res.value = res.SHIFT_CODE + }) + this.$refs.selectPopup.openScanPopup(list) + } + + else { + this.showMessage("推荐列表为0") + } + }).catch(error=>{ + uni.hideLoading() + this.showMessage(error) + }) }, // //接收 diff --git a/fe/PDA/pages/task/sprayIssuleJobDetail.vue b/fe/PDA/pages/task/sprayIssuleJobDetail.vue deleted file mode 100644 index 46c31aa46..000000000 --- a/fe/PDA/pages/task/sprayIssuleJobDetail.vue +++ /dev/null @@ -1,713 +0,0 @@ - - - - - -