From 5bd09c184b597bb98c9233679fe069418ff1b0f9 Mon Sep 17 00:00:00 2001 From: zhang_li Date: Mon, 14 Apr 2025 08:54:36 +0800 Subject: [PATCH] =?UTF-8?q?asn=E6=94=B6=E8=B4=A7=E5=8D=A1=E9=A1=BF?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/package/packageList.vue | 3 +- .../job/purchaseReceiptAsnDetail.vue | 59 ++++++++++++++++++- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/src/mycomponents/package/packageList.vue b/src/mycomponents/package/packageList.vue index 627c650a..74f4224d 100644 --- a/src/mycomponents/package/packageList.vue +++ b/src/mycomponents/package/packageList.vue @@ -15,7 +15,7 @@ - + diff --git a/src/pages/purchaseReceipt/job/purchaseReceiptAsnDetail.vue b/src/pages/purchaseReceipt/job/purchaseReceiptAsnDetail.vue index 5248baaa..ec9f7f7e 100644 --- a/src/pages/purchaseReceipt/job/purchaseReceiptAsnDetail.vue +++ b/src/pages/purchaseReceipt/job/purchaseReceiptAsnDetail.vue @@ -8,7 +8,7 @@ - + @@ -19,6 +19,7 @@ + @@ -113,6 +114,8 @@ toLocationCode: '', scanPackList: [], //记录扫描包装 packNumberList: [], //记录所有包装 + loadingType: "nomore", + isDown:false }; }, onLoad(option) { @@ -133,6 +136,9 @@ this.scanPackList.push(i) } }) + cur.pageNo=1 + cur.pageSize=20 + cur.showPackList = cur.packList.slice((cur.pageNo - 1) * cur.pageSize,cur.pageNo * cur.pageSize) this.packNumberList = [...cur.packList] }) }) @@ -143,7 +149,58 @@ }) }) }, + + onPullDownRefresh() { + this.refresh(); + }, methods: { + getDetail() { + var that = this; + uni.showLoading({ + title: "加载中....", + mask: true + }); + getPurchaseReceiptJobDetail(this.id).then(res => { + uni.hideLoading(); + if (res.data == null) { + that.showMessage('未获取到详情'); + } else { + if (res.data.subList.length > 0) { + + } else { + that.showMessage('列表数据为0'); + } + } + }).catch(error => { + uni.hideLoading() + this.showErrorMessage(error) + }) + }, + scrolltolower() { + this.loadingType = "loading"; + console.log(this.isDown) + if(this.isDown)return; + this.isDown = true + this.detailSource.forEach(item => { + item.subList.forEach(cur => { + cur.pageNo++ + const list = cur.packList.slice((cur.pageNo - 1) * cur.pageSize,cur.pageNo * cur.pageSize) + if(list.length>0){ + this.loadingType = "loading"; + }else { + this.loadingType = "nomore"; + return; + } + console.log(this.loadingType) + cur.showPackList=[...cur.showPackList,...list] + setTimeout(()=>{ + this.isDown = false + },1000) + }) + }) + this.updateData('child') + + }, openScanPopup() { // 第一个参数是库位查精度,第二个参数是判断是否走包装信息接口 this.$refs.scanPopup.openScanPopup(this.jobToLocationCode, true);