shish 2 سال پیش
والد
کامیت
71b9963628
1فایلهای تغییر یافته به همراه13 افزوده شده و 3 حذف شده
  1. 13 3
      ghsApp/src/pagesPurchase/supplier.vue

+ 13 - 3
ghsApp/src/pagesPurchase/supplier.vue

@@ -108,7 +108,8 @@ export default {
 				}
 			],
       info:{},
-      search:''
+      search:'',
+      T:null
     }
   },
 	onShow(){
@@ -172,8 +173,17 @@ export default {
       this.getGHSList()
     },
     searchFn(e) {
-      this.search = e
-      this.getGHSList()
+      if (this.$util.isEmpty(e)){
+        return false
+      }
+      let that = this
+      if(this.T != null){
+        clearTimeout(this.T)
+      }
+      this.T = setTimeout(function(){
+        that.search = e
+        that.getGHSList()
+      },400)
     },
     getGHSList() {
       let location = this.tabs[this.tabIndex].key