From fcb2979f5e97c840a16e5f1b3b0e4692e554e81b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Thu, 23 Mar 2023 19:36:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E5=8D=95=E6=8D=AE=E4=B8=AD=E5=95=86?= =?UTF-8?q?=E5=93=81=E7=9A=84=E6=90=9C=E7=B4=A2=E6=A1=86=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?500=E6=AF=AB=E7=A7=92=E7=9A=84=E5=BB=B6=E8=BF=9F=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/jeecgbiz/JSelectList.vue | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/jshERP-web/src/components/jeecgbiz/JSelectList.vue b/jshERP-web/src/components/jeecgbiz/JSelectList.vue index 5a85932e..ab3ed6ac 100644 --- a/jshERP-web/src/components/jeecgbiz/JSelectList.vue +++ b/jshERP-web/src/components/jeecgbiz/JSelectList.vue @@ -57,6 +57,7 @@ ids: "", names: "", materialData: [], + setTimeFlag: null } }, mounted() { @@ -74,7 +75,7 @@ methods: { initComp(name) { if(this.kind === 'material') { - this.names = name?name:'输入条码或名称' + this.names = name?name:'请输入条码或名称' } else { this.names = name } @@ -83,11 +84,17 @@ this.$refs.selectModal.showModal() }, handleSearch(value) { - getMaterialByParam({q: value}).then((res) => { - if (res && res.code === 200) { - this.materialData = res.data - } - }) + let that = this + if(this.setTimeFlag != null){ + clearTimeout(this.setTimeFlag); + } + this.setTimeFlag = setTimeout(()=>{ + getMaterialByParam({q: value}).then((res) => { + if (res && res.code === 200) { + that.materialData = res.data + } + }) + },500) }, handleChange(value) { this.$emit("change", value)