From fb319a0af5d947aa154f1d30c937acbed84fadc8 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Mon, 3 Jul 2023 10:21:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8A=E6=88=90=E5=93=81=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E7=89=A9=E6=96=99=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/getData2.js | 6 ++-- .../semi-finished-in-mater-search.vue | 2 -- .../semi-finished-out-mater-search.vue | 31 +++++++++++++++++-- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/config/getData2.js b/src/config/getData2.js index e17958f..5733370 100644 --- a/src/config/getData2.js +++ b/src/config/getData2.js @@ -174,10 +174,12 @@ export const outgetBillType = () => post('api/pda/bcp/out/getBillType', {}) // return res // } // 1.3物料选择页面 -export const outgetMaterial = (code, scode, is) => post('api/pda/bcp/out/getMaterial', { +export const outgetMaterial = (code, scode, is, page, size) => post('api/pda/bcp/out/getMaterial', { material_code: code, struct_code: scode, - is_material: is + is_material: is, + page: page, + size: size }) // 1.4出库点下拉框 export const outgetPoint = () => post('api/pda/bcp/out/getPoint', {}) diff --git a/src/pages/modules/semifinished/semi-finished-in-mater-search.vue b/src/pages/modules/semifinished/semi-finished-in-mater-search.vue index 54451f0..991d32e 100644 --- a/src/pages/modules/semifinished/semi-finished-in-mater-search.vue +++ b/src/pages/modules/semifinished/semi-finished-in-mater-search.vue @@ -86,8 +86,6 @@ export default { this.busy = false this.desc = '' let res = await getMaterial(this.val1, this.page + '', this.size) - this.dataList = [...res.data] - this.dataList = [] this.dataList = [...res.data] if (res.data.length < 30) { diff --git a/src/pages/modules/semifinished/semi-finished-out-mater-search.vue b/src/pages/modules/semifinished/semi-finished-out-mater-search.vue index 7f3b4b5..0175972 100644 --- a/src/pages/modules/semifinished/semi-finished-out-mater-search.vue +++ b/src/pages/modules/semifinished/semi-finished-out-mater-search.vue @@ -26,7 +26,7 @@ -
+
@@ -51,6 +51,7 @@
+
{{desc}}
@@ -65,7 +66,11 @@ export default { isV: '1', dataList: [], pkId: '', - pkObj: {} + pkObj: {}, + page: 1, + size: '30', + busy: false, + desc: '' } }, created () { @@ -74,8 +79,28 @@ export default { methods: { // grid async _outgetMaterial () { - let res = await outgetMaterial(this.val2, this.val1, this.isV) + this.page = 1 + this.busy = false + this.desc = '' + let res = await outgetMaterial(this.val2, this.val1, this.isV, this.page + '', this.size) + this.dataList = [] this.dataList = [...res.data] + if (res.data.length < 30) { + this.busy = true + this.desc = '已加载全部数据' + } + }, + async loadMore () { + this.busy = true + this.page++ + let res = await outgetMaterial(this.val2, this.val1, this.isV, this.page + '', this.size) + this.dataList = [...this.dataList, ...res.data] + if (res.data.length < 30) { + this.busy = true + this.desc = '已加载全部数据' + } else { + this.busy = false + } }, colseUp () { this.$router.push('/semifinishedoutstore')