From eaddb48660d45bc497e676ab8860dfb7ddc87571 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Mon, 21 Oct 2024 13:33:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E7=94=9F=E4=BA=A7=E9=A2=86=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PDA/pages.json | 4 +- fe/PDA/pages/task/unProducePickDetail.vue | 292 +++++++------ fe/PDA/pages/task/unProducePickWipDetail.vue | 413 ++++++++++-------- fe/PDA/pages/task/unProduceReturnDetail.vue | 1 - .../pages/task/unProduceReturnWipDetail.vue | 57 ++- 5 files changed, 423 insertions(+), 344 deletions(-) diff --git a/fe/PDA/pages.json b/fe/PDA/pages.json index b98d67049..8f44b0a55 100644 --- a/fe/PDA/pages.json +++ b/fe/PDA/pages.json @@ -556,7 +556,7 @@ "path": "pages/task/unProducePickDetail", "style": { "navigationBarTitleText": "非生产领料详情", - "enablePullDownRefresh": true + "enablePullDownRefresh": false } }, { @@ -570,7 +570,7 @@ "path": "pages/task/unProducePickWipDetail", "style": { "navigationBarTitleText": "非生产领料(线边)详情", - "enablePullDownRefresh": true + "enablePullDownRefresh": false } }, diff --git a/fe/PDA/pages/task/unProducePickDetail.vue b/fe/PDA/pages/task/unProducePickDetail.vue index 9f611cd67..135f15553 100644 --- a/fe/PDA/pages/task/unProducePickDetail.vue +++ b/fe/PDA/pages/task/unProducePickDetail.vue @@ -12,77 +12,79 @@ - - - - - - {{ item.itemCode }} - - {{ item.itemName }} - {{ item.itemDesc1 }} - - - - - - - 数量 - - - - - - - ({{item.uom}}) - - - - - 箱码 - - - - - {{ item.handledPackingCode }} - - - - - 批次 - - - - {{item.handledLot }} - - - - 来源库位 - - - - - {{ item.handledFromLocationCode }} - - - - + + + + + + + + {{ item.itemCode }} + + {{ item.itemName }} + {{ item.itemDesc1 }} + + + + + + + 数量 + + + + + + + ({{item.uom}}) + + + + + 箱码 + + + + + {{ item.handledPackingCode }} + + + + + 批次 + + + + {{item.handledLot }} + + + + 来源库位 + + + + + {{ item.handledFromLocationCode }} + + + + + + + + - - - - - - - - + + + @@ -117,7 +119,8 @@ getCurrDateTimeAndT, scanSuccessAudio, scanFailedAudio, - guid + guid, + getRemoveOption } from '@/common/basic.js'; import comMessage from '@/mycomponents/common/comMessage.vue' import winScanButton from '@/mycomponents/wincom/winScanButton.vue' @@ -142,8 +145,8 @@ return { id: "", datacontent: {}, - details: [], - facDetails: [], + details: [], //实际 + facDetails: [],//推荐 toLocation: '', scrollTop: 0, old: { @@ -157,6 +160,8 @@ scanCount: 0, isPack: true, titleArray: ['箱标签'], + options:[], + recommendQty:0 } }, @@ -173,6 +178,7 @@ }, onLoad(param) { this.id = param.id; + this.options = getRemoveOption(); if (param.jobStatus == 1) { this.receive((callback => { this.getDetail(); @@ -215,6 +221,23 @@ }) }, methods: { + swipeClick(e, item, index) { + let { + content + } = e; + if (content.text === '移除') { + uni.showModal({ + title: '提示', + content: '是否移除选择的行?', + success: res => { + if (res.confirm) { + this.details.splice(index, 1) + } + } + }); + } + }, + openScanPopup() { // if (this.allCount === this.scanCount) { // this.showMessage("零件已经全部扫描完成"); @@ -238,8 +261,10 @@ getUnProducePickDetail(params) .then(item => { that.datacontent = item; - that.details = item.details; + that.facDetails=item.facDetails + that.details = []; uni.hideLoading(); + }) .catch(err => { this.showMessage('未查找到详细信息') @@ -248,18 +273,17 @@ }, showRecommend() { - this.$refs.recommendList.openScanPopup(this.details) - + this.$refs.recommendList.openScanPopup(this.facDetails) }, getScanResult(result) { - this.currentItem =result; - //扫描的物料是否在任务列表中 - let item = this.details.find(r => r.itemCode == result.data.itemCode); + this.currentItem = result; + //扫描的ERP料号是否在任务列表中 + let item = this.facDetails.find(r => r.itemCode == result.data.itemCode); //在任务列表中 if (item) { //校验箱码是否已经扫描 - let scanItem = this.facDetails.find(r => r.handledPackingCode == result.data.code); + let scanItem = this.details.find(r => r.handledPackingCode == result.data.code); if (scanItem) { scanFailedAudio() this.showMessage('扫描箱码[' + result.data.code + "]已经在列表中,请勿重复扫描") @@ -269,11 +293,18 @@ this.balancesItem = res.items[0]; if (this.balancesItem) { var addItem = this.setItemInfo(result, this.balancesItem) - - if( item.recommendFromLocationErpCode !=addItem.handledFromLocationErpCode){ + if (item.recommendFromLocationErpCode != addItem.handledFromLocationErpCode) { this.showMessage('扫描箱码[' + result.data.code + "]的ERP储位与推荐的不在同一个ERP储位") - }else { - this.facDetails.push(addItem) + } else { + if(item.recommendPackingCode!= result.data.code){ + showConfirmMsg("扫描的箱码[" + result.data.code+"]与任务中的箱码["+item.recommendPackingCode+"]不一致,是否添加到列表中",res=>{ + if(res){ + this.details.unshift(addItem) + } + }) + }else { + this.details.unshift(addItem) + } } } } else { @@ -285,7 +316,7 @@ } else { scanFailedAudio() //不在任务列表中提示 - this.showMessage('扫描的物料[' + result.data.itemCode + "]不在推荐任务列表中") + this.showMessage('扫描的ERP料号[' + result.data.itemCode + "]不在推荐任务列表中") } @@ -384,52 +415,21 @@ }); }, - setBalanceInfo(item, balanceItem) { - item.scaned = true; - item.scanDate = new Date() //增加扫描信息属性 - item.fromLocationCode = balanceItem.locationCode; - item.fromLocationErpCode = balanceItem.locationErpCode; - item.toLocationCode = item.locationCode; - item.toLocationErpCode = item.locationErpCode; - - //实际库存数量 - item.handledContainerCode = balanceItem.containerCode; - item.handledPackingCode = balanceItem.packingCode; - item.handledBatch = balanceItem.batch; - item.handledLot = balanceItem.lot; - - item.defaultHandleQty = balanceItem.qty > item.recommendQty ? item.recommendQty : balanceItem - .qty; - item.handledQty = balanceItem.qty > item.recommendQty ? item.recommendQty : balanceItem.qty; - item.handledFromLocationCode = balanceItem.locationCode; - item.handledFromLocationArea = balanceItem.locationArea; - item.handledFromLocationGroup = balanceItem.locationGroup; - item.handledFromLocationErpCode = balanceItem.locationErpCode; - item.handledFromWarehouseCode = balanceItem.warehouseCode; - - item.toLocationArea = balanceItem.locationArea; - item.toLocationGroup = balanceItem.locationGroup; - item.toLocationErpCode = balanceItem.locationErpCode; - - //当前扫描标签的信息 - item.scanItemCode = this.currentScanLebel.data.itemCode; - item.scanPackingCode = this.currentScanLebel.data.code; - item.scanLot = this.currentScanLebel.data.lot; - - item.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage - .userName_CN; - item.uom = balanceItem.uom; - - this.details.sort(compareDesc('scanDate')); //按扫描信息排 - this.$forceUpdate(); - }, selectedBalanceItem(balanceItem) { - var addItem = this.setItemInfo(this.currentItem, this.balancesItem) - if( item.recommendFromLocationErpCode !=addItem.handledFromLocationErpCode){ - this.showMessage('扫描箱码[' + this.currentItem.data.code + "]的ERP储位与推荐的不在同一个ERP储位") - }else { - this.facDetails.push(addItem) + var addItem = this.setItemInfo(result, this.balancesItem) + if (item.recommendFromLocationErpCode != addItem.handledFromLocationErpCode) { + this.showMessage('扫描箱码[' + result.data.code + "]的ERP储位与推荐的不在同一个ERP储位") + } else { + if(item.recommendPackingCode!= result.data.code){ + showConfirmMsg("扫描的箱码[" + result.data.code+"]与任务中的箱码["+item.recommendPackingCode+"]不一致,是否添加到列表中",res=>{ + if(res){ + this.details.unshift(addItem) + } + }) + }else { + this.details.unshift(addItem) + } } }, @@ -453,7 +453,23 @@ this.showMessage('扫描列表为0,请先扫描'); return; } - this.finsh(); + var hint = "" + this.details.forEach(res => { + var temp = this.facDetails.find(fac => { + if (res.itemCode == fac.itemCode) { + return fac + } + }) + if (temp && temp.recommendQty < res.handledQty) { + hint += "ERP料号[" + res.itemCode + "]箱码[" + res.handledPackingCode + "]扫描数量["+res.handledQty+"]大于推荐的数量["+temp.recommendQty+"]" + } + }) + if (hint) { + this.showMessage(hint); + } else { + this.finsh(); + } + }, @@ -469,16 +485,14 @@ that.datacontent.completeTime = getCurrDateTime(); that.datacontent.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage .userName_CN; - that.datacontent.facDetails = that.facDetails; + that.datacontent.details = that.details; let params = JSON.stringify(that.datacontent); console.log(params) - return finshUnProducePickJob(that.id, params) .then(res => { uni.hideLoading(); if (res != null) { that.showCommitSuccessMessage(); - that.backJobList(1000); } }) .catch(err => { @@ -518,7 +532,7 @@ }, calcScanCount() { - this.scanCount = this.details.filter(r => r.scaned === true).length; + this.scanCount = this.facDetails.filter(r => r.scaned === true).length; this.closeScanPopup(); }, @@ -537,9 +551,6 @@ } }, - closeScanMessage() { - this.scanPopupGetFocus(); - }, scanPopupGetFocus() { this.$refs.scanPopup.getfocus(); @@ -567,13 +578,14 @@ qtyChanged(value, item, index) { if (value <= 0) { this.showMessage('领料数量不能小于或等于0') - item.handledQty = item.defaultHandleQty + item.handledQty = this.currentItem.data.qty this.$refs['comNumberBox_' + index][0].setValue(item.handledQty); - } else if (value > item.defaultHandleQty) { - item.handledQty = item.defaultHandleQty - this.showMessage("实际领料数量不能大于申请数量") - this.$refs['comNumberBox_' + index][0].setValue(item.handledQty); - } + } + // else if (value > this.currentItem.data.qty) { + // item.handledQty = this.currentItem.data.qty + // this.showMessage("实际领料数量不能大于申请数量") + // this.$refs['comNumberBox_' + index][0].setValue(item.handledQty); + // } }, } } diff --git a/fe/PDA/pages/task/unProducePickWipDetail.vue b/fe/PDA/pages/task/unProducePickWipDetail.vue index 916e442bf..44df71b3d 100644 --- a/fe/PDA/pages/task/unProducePickWipDetail.vue +++ b/fe/PDA/pages/task/unProducePickWipDetail.vue @@ -3,85 +3,79 @@ - + + + + + + + + + + + + {{ item.itemCode }} + + {{ item.itemName }} + {{ item.itemDesc1 }} + + + + + + + 数量 + + + + + + + ({{item.uom}}) + + + + + 来源库位 + + + + + + {{ item.handledFromLocationCode }} + + + + + - - - - - {{ item.itemCode }} - - {{ item.itemName }} - {{ item.itemDesc1 }} - - - - - - - - - 推荐 - 实际 - - - 来源库位 - - {{ item.recommendFromLocationCode }} - - - - - {{ item.handledFromLocationCode }} - - - - - - - - - - - 数量 - - {{item.recommendQty}} - ({{item.uom}}) - - - - - - ({{item.uom}}) - - - - - + + + + + + + + - - - - - - ; - - - + + + + @@ -95,18 +89,19 @@ + - + + @afterCloseScanMessage='closeScanMessage' @afterClose="closeScanMessage">