shish 5 سال پیش
والد
کامیت
a14067e0b0
2فایلهای تغییر یافته به همراه28 افزوده شده و 3 حذف شده
  1. 27 3
      ghsApp/src/admin/home/order.vue
  2. 1 0
      ghsApp/src/components/module/app-search.vue

+ 27 - 3
ghsApp/src/admin/home/order.vue

@@ -7,8 +7,14 @@
     </view>
     </view>
 
 
     <view class="input-wrap_box">
     <view class="input-wrap_box">
+
+      <view @click="setSearchType" style="font-size:30rpx;margin-right:10rpx;color:#666666">
+      <text>{{searchTypeName}}</text>
+      <i class="iconfont iconsanjiao_xia"></i>
+      </view>
+
       <view>
       <view>
-        <AppSearchModule placeholder="请输入客户名称,支持拼音首字母" @search="searchFn"/>
+        <AppSearchModule placeholder="请输入客户名称,支持拼音首字母" @input="searchFn"/>
       </view>
       </view>
 
 
       <view class="select-dn_bx">
       <view class="select-dn_bx">
@@ -183,6 +189,8 @@ export default {
         categoryId: "",
         categoryId: "",
         usageId: "",
         usageId: "",
       },
       },
+      searchType:0,
+      searchTypeName:'客户',
     };
     };
   },
   },
   onPullDownRefresh() {
   onPullDownRefresh() {
@@ -224,6 +232,21 @@ export default {
 
 
   },
   },
   methods: {
   methods: {
+    setSearchType(){
+      let that = this
+      uni.showActionSheet({
+        itemList: ['搜索类型:', '客户', '编号'],
+        success: function (respond) {
+          let currentIndex = respond.tapIndex
+          if(currentIndex == 0){
+            return false
+          }
+          that.searchType = Number(currentIndex) - 1
+          that.searchTypeName = that.searchType == 0 ? '客户' : '编号'
+          that.searchFn()
+        }
+      })
+    },
     selectTime(type) {
     selectTime(type) {
       (this.customizationTime = [time, time]),
       (this.customizationTime = [time, time]),
         (this.customizationTimeType = type),
         (this.customizationTimeType = type),
@@ -416,6 +439,7 @@ export default {
         status: this.tabs[this.tabIndex].id,
         status: this.tabs[this.tabIndex].id,
         name: this.seekVal,
         name: this.seekVal,
         page: this.list.page,
         page: this.list.page,
+        searchType:this.searchType,
       }).then((res) => {
       }).then((res) => {
         this.completes(res);
         this.completes(res);
         if (this.$util.isEmpty(res.data)){
         if (this.$util.isEmpty(res.data)){
@@ -497,7 +521,7 @@ page{
   padding-bottom: 1px;
   padding-bottom: 1px;
 	overflow: hidden;
 	overflow: hidden;
   .select-dn_bx {
   .select-dn_bx {
-    padding-left: 48px;
+    padding-left: 18px;
   }
   }
   .app-tabs {
   .app-tabs {
     position: fixed;
     position: fixed;
@@ -514,7 +538,7 @@ page{
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     padding: 0 30px;
     padding: 0 30px;
-    & > view:nth-child(1) {
+    & > view:nth-child(2) {
       flex: 1;
       flex: 1;
     }
     }
   }
   }

+ 1 - 0
ghsApp/src/components/module/app-search.vue

@@ -110,6 +110,7 @@ export default {
 			});
 			});
 		},
 		},
 		inputEmptyFn(e) {
 		inputEmptyFn(e) {
+			return
 			this.search = '';
 			this.search = '';
 			this.$emit("input", this.search);
 			this.$emit("input", this.search);
 		}
 		}