From 53bed16f9a6220d9af7269fd55003558f6252c30 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Sun, 9 Oct 2022 17:30:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=A9=E6=96=99=E5=8A=A0?= =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/getData2.js | 3 ++- src/pages/proj/SearchMater.vue | 48 ++++++++++++++++++++++++++++------ 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/src/config/getData2.js b/src/config/getData2.js index 1c52505..2bdefac 100644 --- a/src/config/getData2.js +++ b/src/config/getData2.js @@ -47,7 +47,8 @@ export const bindingConfirm = (code, vcode, status, is) => post('api/pda/binding /** 盘点管理 */ // 1.1查询物料 -export const queryMaterial = (page, size) => post('api/pda/check/queryMaterial', { +export const queryMaterial = (bar, page, size) => post('api/pda/check/queryMaterial', { + searchbar: bar, page: page, size: size }) diff --git a/src/pages/proj/SearchMater.vue b/src/pages/proj/SearchMater.vue index 02c3d73..cf3be87 100644 --- a/src/pages/proj/SearchMater.vue +++ b/src/pages/proj/SearchMater.vue @@ -2,6 +2,17 @@
+
+
+
物料编码
+
+ +
+
+ +
+
+
@@ -45,6 +56,7 @@ export default { }, data () { return { + val1: '', dataList: [], page: 1, size: '10', @@ -54,18 +66,20 @@ export default { pkObj: {} } }, - created () { - this._queryMaterial() - }, + // created () { + // this._queryMaterial() + // }, methods: { - async _queryMaterial () { + async searchList () { + this.dataList = [] + this.pkId = '' + this.pkObj = {} this.page = 1 + this.size = '10' this.busy = false this.desc = '' - let res = await queryMaterial(this.page + '', this.size) + let res = await queryMaterial(this.val1, this.page + '', this.size) if (res.code === '1') { - this.dataList = [] - this.pkId = '' this.dataList = [...res.result.content] if (res.result.content.length < 10) { this.busy = true @@ -76,10 +90,28 @@ export default { this.desc = res.desc } }, + // async _queryMaterial () { + // this.page = 1 + // this.busy = false + // this.desc = '' + // let res = await queryMaterial(this.page + '', this.size) + // if (res.code === '1') { + // this.dataList = [] + // this.pkId = '' + // this.dataList = [...res.result.content] + // if (res.result.content.length < 10) { + // this.busy = true + // this.desc = '已加载全部数据' + // } + // } else { + // this.Dialog(res.desc) + // this.desc = res.desc + // } + // }, async loadMore () { this.busy = true this.page++ - let res = await queryMaterial(this.page + '', this.size) + let res = await queryMaterial(this.val1, this.page + '', this.size) if (res.code === '1') { this.dataList = [...this.dataList, ...res.result.content] if (res.result.content.length < 10) {