From bd90f6eb94e71a1d251f2417bc876b723979c371 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Thu, 20 Jun 2024 10:06:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E6=96=99=E4=BB=BB=E5=8A=A1=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=88=B0=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/jobList/jobList.vue | 4 ++-- src/mycomponents/scan/winComScan.vue | 1 + src/pages/issue/coms/comScanIssuePack.vue | 4 ++-- src/pages/issue/job/issueDetail.vue | 17 ++++++++++++----- src/pages/issue/job/issueJob.vue | 15 ++++++++------- 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/mycomponents/jobList/jobList.vue b/src/mycomponents/jobList/jobList.vue index 1d966802..d25588cc 100644 --- a/src/mycomponents/jobList/jobList.vue +++ b/src/mycomponents/jobList/jobList.vue @@ -38,10 +38,10 @@ import { onShow } from '@dcloudio/uni-app'; methods:{ openList(list){ this.list = list - this.$refs.listPopup.open('center') }, selectItem(item,index){ + this.$refs.listPopup.close(); this.$emit("selectItem", item); } } @@ -55,7 +55,7 @@ import { onShow } from '@dcloudio/uni-app'; align-items: center; .list{ width: 80%; - max-height:80vh; + max-height:50vh; overflow-y: auto; border-radius: 10px !important; .slot-image{ diff --git a/src/mycomponents/scan/winComScan.vue b/src/mycomponents/scan/winComScan.vue index 63b5b193..481aa733 100644 --- a/src/mycomponents/scan/winComScan.vue +++ b/src/mycomponents/scan/winComScan.vue @@ -205,6 +205,7 @@ getLabelInfo(content, this.headerType, callback => { // uni.hideLoading(); let scanResult = callback; + scanResult.scanMessage=content if (scanResult.success) { that.clear(); // that.getfocus();//不能自动获取焦点 diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue index 09e5fe2a..938f2632 100644 --- a/src/pages/issue/coms/comScanIssuePack.vue +++ b/src/pages/issue/coms/comScanIssuePack.vue @@ -173,7 +173,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js'; this.scanOptions = getDetailEditRemoveOption(); }, methods: { - openScanPopupForJobSimulate(content, jobcontent) { + openScanPopupForJobSimulate(content, jobcontent,scanMessage) { this.issueRecord = []; this.dataContent = content; this.jobContent = jobcontent; @@ -187,7 +187,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js'; if(timer){ clearTimeout(timer) } - this.$refs.comscansimulate.setItemCodeSimulate(item.copyContent) + this.$refs.comscansimulate.setItemCodeSimulate(scanMessage) this.$refs.comscansimulate.clickScanMsg(); }, 500) }, diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue index 4d0c0c1e..960b38c0 100644 --- a/src/pages/issue/job/issueDetail.vue +++ b/src/pages/issue/job/issueDetail.vue @@ -97,7 +97,7 @@ detailOptions: [], scanOptions: [], jobStatus: "", - scanedPackingNumber: '' + scanMessage: '' }; }, @@ -107,7 +107,7 @@ onLoad(option) { this.id = option.id; - this.scanedPackingNumber = option.scaned || ''; + this.scanMessage = option.scanMessage || ''; if (this.id != undefined) { //新建的任务自动接收 if (option.status == "1") { @@ -198,6 +198,12 @@ that.subList = res.data.subList; that.detailSource = getDataSource(that.detailSource, that.subList) + + //任务中已经扫描,模拟扫描赋值 + if(this.scanMessage){ + this.openScanPopupSimulate(this.scanMessage); + + } setTimeout(r => { that.resizeCollapse(); }, 100) @@ -435,6 +441,7 @@ }, afterScan() { + this.resizeCollapse(); this.detailSource.forEach(detail => { let s = ''; detail.Items.forEach(item => { @@ -520,9 +527,9 @@ this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent); }, - // openScanPopupSimulate(){ - // this.$refs.comScanIssuePack.openScanPopupForJobSimulate(this.detailSource, this.jobContent); - // }, + openScanPopupSimulate(scanMessage){ + this.$refs.comScanIssuePack.openScanPopupForJobSimulate(this.detailSource, this.jobContent,scanMessage); + }, closeScanPopup() { this.updateCommitBtn(); diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue index ae213226..c8b086ed 100644 --- a/src/pages/issue/job/issueJob.vue +++ b/src/pages/issue/job/issueJob.vue @@ -21,7 +21,7 @@ - + @@ -232,10 +232,10 @@ }, - openJobDetail(item, packingNumber = '') { + openJobDetail(item, scanMessage = '') { uni.navigateTo({ - url: './issueDetail?id=' + item.masterId + '&status=' + item.status+'&scaned=' + - packingNumber + url: './issueDetail?id=' + item.masterId + '&status=' + item.status+'&scanMessage=' + + scanMessage }); }, @@ -249,7 +249,7 @@ selectItem(item) { this.$refs.scanPopup.closeScanPopup(); - this.openJobDetail(item,item.packingNumber); + this.openJobDetail(item,this.scanMessage); }, swipeClick(e, dataContent) { @@ -371,6 +371,7 @@ sort: 'createTime', by: 'asc' }).then(res => { + this.scanMessage =result.scanMessage let resultList = res.data.list; if (resultList.length > 0) { resultList.forEach(item => { @@ -386,10 +387,10 @@ if (list.length > 1) { this.$refs.jobList.openList(list) } else { - this.selectItem(list[0]) + this.selectItem(list[0],scanMessage) } } else { - this.showMessage('未查找到任务') + this.showMessage("物料号+["result.label.itemCode+"]批次["+result.label.batch+']未查找到任务') } }).catch(error => { this.showMessage(error)