From df8c5f9bad7e495e905c2d75889671f5a08ec7da Mon Sep 17 00:00:00 2001 From: zhang_li Date: Mon, 16 Jun 2025 14:55:04 +0800 Subject: [PATCH] =?UTF-8?q?YT-2751=E7=9B=98=E7=82=B9=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=95=B0=E6=8D=AE200=E6=9D=A1=E7=9A=84=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=A9=BA=E7=99=BD=EF=BC=8C=E5=8D=A1=E9=A1=BF?= =?UTF-8?q?YT-2747WMS-=E7=9B=98=E7=82=B9PDA=E6=96=B9=E5=BC=8F=E6=89=AB?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E5=9C=A8=E6=89=AB=E6=8F=8F=E7=AE=B1=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=90=8E=EF=BC=8C=E6=89=8B=E6=8C=81=E5=8F=AA=E7=BB=99?= =?UTF-8?q?=E4=B8=89=E7=A7=92=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E7=AE=A1=E4=BF=AE=E6=94=B9=E6=98=AF=E5=90=A6=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=EF=BC=8C=E6=89=8B=E6=8C=81=E9=83=BD=E4=BC=9A=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=8F=90=E4=BA=A4=EF=BC=8C=E9=9C=80=E8=A6=81=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E6=8E=89=E8=AF=BB=E7=A7=92=E8=87=AA=E5=8A=A8=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/request2.js | 4 +- src/mycomponents/qty/countQtyEdit.vue | 6 +- src/pages/count/job/countLightDetail.vue | 101 ++++++++++++++++------- 3 files changed, 77 insertions(+), 34 deletions(-) diff --git a/src/api/request2.js b/src/api/request2.js index 7ba5f0b3..b483df7f 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -386,12 +386,12 @@ export function getBalanceByContainerNumber(params) { * @param {*} header version * 获取标签设置信息 */ -export function getLabelByHeader(header, version) { +export async function getLabelByHeader(header, version) { var params = { header: header, version: version, } - return request({ + return await request({ url: baseApi + "/wms/labeltype/getDetailsByHeader", method: "get", data: params, diff --git a/src/mycomponents/qty/countQtyEdit.vue b/src/mycomponents/qty/countQtyEdit.vue index dff58d3d..b2529e2c 100644 --- a/src/mycomponents/qty/countQtyEdit.vue +++ b/src/mycomponents/qty/countQtyEdit.vue @@ -187,7 +187,7 @@ // this.allQty = Number(this.dataContent.qty) // this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty); // this.detailList = detailList - this.showConfirmCountdown = false; + this.c = false; this.mode = 'edit'; setTimeout(res => { this.$refs.popup.open('bottom') @@ -198,12 +198,12 @@ //新增时弹出 openEditPopupShowSeconds(item, detailList) { this.initData(item, detailList); - this.showConfirmCountdown = true; + this.showConfirmCountdown = false; this.mode = 'add'; setTimeout(res => { this.$refs.popup.open('bottom') }, 500) - this.startTimer() + clearInterval(this.timer) }, initData(item, detailList) { diff --git a/src/pages/count/job/countLightDetail.vue b/src/pages/count/job/countLightDetail.vue index 58f9c0cd..c5aad2ca 100644 --- a/src/pages/count/job/countLightDetail.vue +++ b/src/pages/count/job/countLightDetail.vue @@ -17,28 +17,27 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + - + @@ -49,12 +48,12 @@ + :isHavePackNumber="true" :pdaCountBalanceQuery="true" :isShowHistory="false" + @getCountScanResult='getCountScanResult'> + :allowEditStatus="false" :isShowBalance="true" > @@ -125,6 +124,7 @@ jobContent: {}, //任务内容 subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 + showDataList: [], balance: {}, //库存余额 currentEditItem: {}, mainItem: {}, @@ -134,14 +134,27 @@ dataList: [], managementList: [], isOpen: false, - manageMode: "" - + manageMode: "", + pageSize: 10, + currentPage: 1, + timer:null, + loadingType:'loading' }; }, - onLoad(option) { + async onLoad(option) { this.id = option.id; if (this.id) { - this.getDetail(); + await this.getDetail(); + this.timer = setInterval(()=>{ + if (this.showDataList.length == this.dataList.length) { + + this.loadingType='loadingType' + return + } + console.log(22) + this.currentPage += 1; + },1000) + } uni.$on('refreshData', (data) => { // 调用刷新数据的方法 @@ -154,6 +167,11 @@ goHome(); } }, + onUnload(){ + if(this.timer){ + clearInterval(this.timer) + } + }, //拦截返回按钮事件 onBackPress(e) { //已经接收但是没提交任务 @@ -162,13 +180,29 @@ return true; } }, - + onReachBottom() { + + }, mounted() { }, - computed() {}, + computed: { + showTableData() { + if (this.dataList.length > this.pageSize) { + const array = this.dataList.slice( + (this.currentPage - 1) * this.pageSize, + this.currentPage * this.pageSize + ) + this.showDataList = this.showDataList.concat(array) + return this.showDataList + } else { + clearInterval(this.timer) + return this.dataList + } + } + }, methods: { filterList(originalList) { var resultList = [] @@ -200,13 +234,13 @@ } return manageMode }, - getDetail() { + async getDetail() { var that = this; uni.showLoading({ title: "加载中....", mask: true }); - getCountJobDetail(that.id).then(async res => { + await getCountJobDetail(that.id).then(async res => { uni.hideLoading(); if (res.data == null) { that.showMessage('未获取到详情'); @@ -229,7 +263,16 @@ this.showErrorMessage(error) }) }, + // 用假分页处理渲染卡顿问题 + // showTableData (){ + + // }, + scrolltolower() { + this.currentPage += 1; + console.log(this.currentPage) + console.log(this.showTableData) + }, refreshData(returnData) { if (returnData.recordList.length == 0) { if (this.manageMode == "BY_BATCH") {