shish 3 лет назад
Родитель
Сommit
146c75a450
1 измененных файлов с 25 добавлено и 4 удалено
  1. 25 4
      hdApp/src/admin/home/order.vue

+ 25 - 4
hdApp/src/admin/home/order.vue

@@ -2,8 +2,13 @@
   <view class="app-main app-content">
     <app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" :height="100" @change="change" itemWidth="20%" />
 		<view class="input-wrap" >
+
+      <view @click="setSearchType" style="font-size:30upx;margin-right:10upx;color:#666666;display:inline-block;width:100upx;">
+        <text>{{searchTypeName}}</text><i class="iconfont iconsanjiao_xia"></i>
+      </view>
+
 			<view class="search-bar">
-				<app-search-module v-model="py" placeholder="订单编号" @input="searchFn" />
+				<app-search-module v-model="py" placeholder="请输入" @input="searchFn" />
 			</view>
 			<view style="float:right">
       <button class="admin-button-com middle blue" style="margin-right:10upx;" @click="selectStaffFn()">员工</button>
@@ -93,7 +98,10 @@ export default {
       staffList:[],
       shopAdminId:0,
       searchText:'',
-      debt:2
+      debt:2,
+      searchTypeName:'价格',
+      searchType:0,
+      searchOption:['价格', '单号','手机']
     };
   },
   onPullDownRefresh () {
@@ -133,6 +141,18 @@ export default {
     })
   },
   methods: {
+    setSearchType(){
+      let that = this
+      uni.showActionSheet({
+        itemList: that.searchOption,
+        success: function (respond) {
+          let currentIndex = respond.tapIndex
+          that.searchType = currentIndex
+          that.searchTypeName = that.searchOption[currentIndex]
+          that.searchFn()
+        }
+      })
+    },
     searchFn(e) {
       this.resetList();
       this.searchText = e;
@@ -192,7 +212,8 @@ export default {
         shopAdminId:this.shopAdminId,
         searchText:this.searchText,
         debt:this.debt,
-        page: this.list.page
+        page: this.list.page,
+        searchType:this.searchType
       }).then(res => {
         this.completes(res);
         if (this.$util.isEmpty(res.data)){
@@ -343,7 +364,7 @@ export default {
   height:110upx;
   .search-bar {
     display:inline-block;
-    width:350upx;
+    width:280upx;
   }
 }
 </style>