From 6b89f51a0b313535b530f12dc5739f3bd4e978c5 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Tue, 11 Jun 2024 10:01:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=8B=89=E5=8A=A0=E8=BD=BD=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/purchaseReceipt/job/receiptJob.vue | 137 ++++++++++--------- 1 file changed, 72 insertions(+), 65 deletions(-) diff --git a/src/pages/purchaseReceipt/job/receiptJob.vue b/src/pages/purchaseReceipt/job/receiptJob.vue index a6da0528..1966414c 100644 --- a/src/pages/purchaseReceipt/job/receiptJob.vue +++ b/src/pages/purchaseReceipt/job/receiptJob.vue @@ -82,18 +82,18 @@ }, props: { - operation: "receipt" ,//reject 收货 拒绝 - isShowAsn:{ - type: Boolean, - default: true - }, - isShowJob:{ - type: Boolean, - default: true - }, - scanTitle:{ - type: String, - default: '箱标签' + operation: "receipt", //reject 收货 拒绝 + isShowAsn: { + type: Boolean, + default: true + }, + isShowJob: { + type: Boolean, + default: true + }, + scanTitle: { + type: String, + default: '箱标签' } }, @@ -136,10 +136,17 @@ this.detailOptions = getDetailOption(); this.detailGiveupOptions = getDetailGiveupOption(); this.refresh(); - + }, methods: { + onReach() { + //避免多次触发 + if (this.loadingType == 'loading' || this.loadingType == 'nomore') { + return; + } + this.getList("more"); + }, refresh() { this.getList('refresh'); }, @@ -341,65 +348,65 @@ this.$refs.scanPopup.closeScanPopup(); this.openJobDetail(item, item.packingNumber); }, - getScanResult(result) { - + getScanResult(result) { + try { - let filters = [] - if(result.label.barType=="BarCode"){ - // ASN单号 - filters = [{ - column: "asn_number", - action: "==", - value: result.label.code - }] - }else{ - filters = [{ - column: "packingNumber", - action: "==", - value: result.label.packingNumber - }, - { - column: "batch", - action: "==", - value: result.label.batch - }, - // { - // column: "qty", - // action: "==", - // value: result.label.qty - // }, - { - column: "itemCode", - action: "==", - value: result.label.itemCode - }, - // { - // column: "fromLocationCode", - // action: "==", - // value: result.label.fromLocationCode - // } - ] - } - - + let filters = [] + if (result.label.barType == "BarCode") { + // ASN单号 + filters = [{ + column: "asn_number", + action: "==", + value: result.label.code + }] + } else { + filters = [{ + column: "packingNumber", + action: "==", + value: result.label.packingNumber + }, + { + column: "batch", + action: "==", + value: result.label.batch + }, + // { + // column: "qty", + // action: "==", + // value: result.label.qty + // }, + { + column: "itemCode", + action: "==", + value: result.label.itemCode + }, + // { + // column: "fromLocationCode", + // action: "==", + // value: result.label.fromLocationCode + // } + ] + } + + getPurchaseReceiptJobList({ filters: filters, pageNo: 1, pageSize: 100, }).then(res => { let resultList = res.data.list; - if (resultList.length > 0) { - resultList.forEach(item => { - item.title = item.number; - item.selected = false - }) - let list = [] - resultList.forEach(item=>{ - if(!list.find(subItem=>subItem.title==item.title)){ - list.push(item) - } - }) - + if (resultList.length > 0) { + resultList.forEach(item => { + item.title = item.number; + item.selected = false + }) + let list = [] + resultList.forEach(item => { + if (!list.find(subItem => subItem.title == item.title)) { + list.push(item) + } + }) + console.log('list', list) if (list.length > 1) { this.$refs.jobList.openList(list)