From 48e2bd6cbc919349c65d7f83974b98ba5723c139 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 5 Sep 2024 17:15:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E4=B8=8A=E6=9E=B6=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E6=89=AB=E6=8F=8F=E9=A1=B5=E9=9D=A22024/7/8=2014:26:2?= =?UTF-8?q?0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scan/winScanPackAndLocation.vue | 4 +- src/pages/index/index.vue | 2 +- src/pages/issue/coms/comScanIssuePack.vue | 7 +- src/pages/login/index.vue | 18 +- .../package/record/overPackageRecord.vue | 4 +- .../purchaseReceipt/job/receiptDetail.vue | 11 +- src/pages/putaway/job/putawayJob.vue | 1 + src/pages/query/location.vue | 139 +++-- .../components/uni-combox/uni-combox.vue | 552 +++++++++--------- 9 files changed, 402 insertions(+), 336 deletions(-) diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue index ad705a04..e1c0d657 100644 --- a/src/mycomponents/scan/winScanPackAndLocation.vue +++ b/src/mycomponents/scan/winScanPackAndLocation.vue @@ -10,7 +10,7 @@ - 来源库位 + 来源库位 - - + + - + 总数 : {{ totalCount }} @@ -175,56 +175,104 @@ const getDetailList = (pageNo, pageSize, type) => { showMessage(error) }) } +const getExpectin = (pageNo, pageSize, type) => { + uni.showLoading({ + title: '加载中...', + mask: true + }) + + if (type === 'refresh') { + pageNo.value = 1 + dataList.value = [] + } -const setShowList = (list) => { - const resultlist = [] - list.forEach((res) => { - const temp = resultlist.find((res1) => res1.itemCode == res.itemCode) - if (temp == undefined) { - const data = { - itemCode: res.itemCode, - qty: Number(res.qty), - uom: res.uom, - list: [] + const params = { + pageNo: pageNo.value, + pageSize, + filters: [ + { + column: 'locationCode', + action: '==', + value: locationCode.value } - var item = { - packingNumber: res.packingNumber, - batch: res.batch, - uom: res.uom, - qty: Number(res.qty), - inventoryStatus: res.inventoryStatus + ] + } + + getExpectInByLocationCode(params) + .then((res) => { + uni.hideLoading() + if (type === 'refresh') { + uni.stopPullDownRefresh() } - data.list.push(item) - resultlist.push(data) - } else { - temp.qty = calc.add(temp.qty, res.qty) - var item = { - packingNumber: res.packingNumber, - batch: res.batch, - uom: res.uom, - qty: Number(res.qty), - inventoryStatus: res.inventoryStatus + const { list } = res.data + totalCount.value = res.data.total + loadingType.value = 'loadmore' + if (list == null || list.length == 0) { + loadingType.value = 'nomore' + return } - temp.list.push(item) - } - }) - return resultlist + dataList.value = type === 'refresh' ? list : dataList.value.concat(list) + pageNo.value++ + }) + .catch((error) => { + uni.hideLoading() + showMessage(error) + }) } -const ontabtap = (e) => { - const index = e.target.dataset.current || e.currentTarget.dataset.current - tabIndex.value = index - getContentByTab(tabIndex.value) +const getExpectOut = (pageNo, pageSize, type) => { + uni.showLoading({ + title: '加载中...', + mask: true + }) + + if (type === 'refresh') { + pageNo.value = 1 + dataList.value = [] + } + + const params = { + pageNo: pageNo.value, + pageSize, + filters: [ + { + column: 'locationCode', + action: '==', + value: locationCode.value + } + ] + } + + getExpectOutByLocationCode(params) + .then((res) => { + uni.hideLoading() + if (type === 'refresh') { + uni.stopPullDownRefresh() + } + const { list } = res.data + totalCount.value = res.data.total + loadingType.value = 'loadmore' + if (list == null || list.length == 0) { + loadingType.value = 'nomore' + return + } + dataList.value = type === 'refresh' ? list : dataList.value.concat(list) + pageNo.value++ + }) + .catch((error) => { + uni.hideLoading() + showMessage(error) + }) } -const getContentByTab = (index, pageNo, pageSize) => { +const getContentByTab = (index, pageNo, pageSize, type) => { if (index === 0) { - getSummary(pageNo, pageSize) + getSummary(pageNo, pageSize, type) } else if (index === 1) { - getDetailList(pageNo, pageSize) + getDetailList(pageNo, pageSize, type) } else if (index === 2) { - dataIn.value = balances.value + getExpectin(pageNo, pageSize, type) } else if (index == 3) { - dataOut.value = balances.value + getExpectin(pageNo, pageSize, type) } } @@ -242,12 +290,7 @@ const afterCloseMessage = () => { } const tabChange = (index) => { tabIndex.value = index - paging.value.reload(true) -} -const queryList = (pageNo, pageSize) => { - if (locationCode.value != '') { - getContentByTab(tabIndex.value, pageNo, pageSize) - } + getContentByTab(index, pageNo.value, pageSize.value, 'refresh') } diff --git a/src/uni_modules/uni-combox/components/uni-combox/uni-combox.vue b/src/uni_modules/uni-combox/components/uni-combox/uni-combox.vue index fe3b2d6c..01a61335 100644 --- a/src/uni_modules/uni-combox/components/uni-combox/uni-combox.vue +++ b/src/uni_modules/uni-combox/components/uni-combox/uni-combox.vue @@ -1,297 +1,295 @@ -