shish 1 рік тому
батько
коміт
f6e0b0e28c
1 змінених файлів з 49 додано та 25 видалено
  1. 49 25
      ghsApp/src/admin/home/order.vue

+ 49 - 25
ghsApp/src/admin/home/order.vue

@@ -1,12 +1,31 @@
 <template>
 <template>
   <view class="app-main app-content">
   <view class="app-main app-content">
+
+    <view style="position:fixed;top:100upx;background-color:white;z-index:999999;height:auto;font-size:33upx;color:#333333;width:100%;">
+    <view style="width:80%;border:1upx solid #CCCCCC;margin:0 auto;padding:10upx 0 0 20upx;overflow: scroll;" v-if="showSearch">
+      <block v-if="!$util.isEmpty(searchList)">
+        <block v-for="(item, index) in searchList" :key="index">
+          <view style="margin-bottom:30upx;" @click="getCustom(item)">
+            <view style="font-size:36upx;margin-bottom:8upx;">{{item.name}}</view>
+            <view style="font-size:28upx;">
+              {{item.visitTime?item.visitTime.substr(5,11):''}}
+                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 10000" style="font-size:24upx;margin-left:20upx;color:green;">没有下过单</text>
+                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 7" style="font-size:24upx;margin-left:20upx;color:green;">超1周未下单</text>
+                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 30" style="font-size:24upx;margin-left:20upx;color:green;">超1个月未下单</text>
+                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 180" style="font-size:24upx;margin-left:20upx;color:green;">超半年未下单</text>
+                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 365" style="font-size:24upx;margin-left:20upx;color:green;">超1年未下单</text>
+            </view>
+          </view>
+        </block>
+      </block>
+    </view>
+    </view>
+
     <view class="input-wrap_box">
     <view class="input-wrap_box">
 
 
-      <view @click="changeType" style="font-size:30upx;margin-right:10upx;color:#666666">
-        <text>{{searchTypeName}}</text>
-        <i class="iconfont iconsanjiao_xia"></i>
+      <view>
+        <button class="admin-button-com big blue" style="width:110upx;margin-right:18upx;" @click="">名称</button>
       </view>
       </view>
-
       <view> <AppSearchModule placeholder="这里搜索" @input="searchFn"/> </view>
       <view> <AppSearchModule placeholder="这里搜索" @input="searchFn"/> </view>
 
 
       <view class="select-dn_bx">
       <view class="select-dn_bx">
@@ -66,6 +85,7 @@ import DropShopSelect from "@/components/module/shopSelect";
 import OrderItem from "./components/OrderItem";
 import OrderItem from "./components/OrderItem";
 import DateSelect from "@/components/module/dateSelect";
 import DateSelect from "@/components/module/dateSelect";
 import { IMGHOST } from '@/config'
 import { IMGHOST } from '@/config'
+import { getList } from "@/api/member";
 export default {
 export default {
   name: "order",
   name: "order",
   components: {
   components: {
@@ -92,7 +112,6 @@ export default {
       fhLabelShow:false,
       fhLabelShow:false,
       isScanEnv:false,
       isScanEnv:false,
     	orderId:'',
     	orderId:'',
-      seekVal: "",
       isShow: false, //是否显选择时间段
       isShow: false, //是否显选择时间段
       customizationTime: [], //时间段
       customizationTime: [], //时间段
       customizationTimeType: "", //时间段
       customizationTimeType: "", //时间段
@@ -140,7 +159,10 @@ export default {
       endTime:'',
       endTime:'',
       fromDetail:{status:1},
       fromDetail:{status:1},
       currentInfo:{},
       currentInfo:{},
-      currentTitle:''
+      currentTitle:'',
+      searchList:[],
+      showSearch:false,
+      customId:0
     };
     };
   },
   },
   onPullDownRefresh() {
   onPullDownRefresh() {
@@ -299,21 +321,6 @@ export default {
         }
         }
       })
       })
     },
     },
-    changeType(){
-      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()
-        }
-      })
-    },
     selectDateFn(val) {
     selectDateFn(val) {
       this.searchTime = val.searchTime
       this.searchTime = val.searchTime
       this.startTime = val.startTime
       this.startTime = val.startTime
@@ -322,8 +329,26 @@ export default {
       this.getOrderList();
       this.getOrderList();
     },
     },
     searchFn(e) {
     searchFn(e) {
-      this.resetList();
-      this.seekVal = e;
+      let that = this
+      if(that.$util.isEmpty(e)){
+        that.showSearch = false
+        that.searchList = []     
+      }else{
+        getList({ page:1,name:e}).then((res) => {
+            if (!that.$util.isEmpty(res.data) && !that.$util.isEmpty(res.data.list)){
+              that.showSearch = true
+              that.searchList = res.data.list
+            }else{
+              that.showSearch = false
+              that.searchList = []
+            }
+        })
+      }
+    },
+    getCustom(item){
+      this.showSearch = false
+      this.customId = item.id
+      this.resetList()
       this.getOrderList()
       this.getOrderList()
     },
     },
     getOrderList() {
     getOrderList() {
@@ -332,15 +357,14 @@ export default {
         startTime: this.startTime,
         startTime: this.startTime,
         endTime: this.endTime,
         endTime: this.endTime,
         status: this.tabs[this.tabIndex].id,
         status: this.tabs[this.tabIndex].id,
-        name: this.seekVal,
         page: this.list.page,
         page: this.list.page,
         searchType:this.searchType,
         searchType:this.searchType,
+        customId:this.customId
       }).then((res) => {
       }).then((res) => {
         this.completes(res);
         this.completes(res);
         if (this.$util.isEmpty(res.data)){
         if (this.$util.isEmpty(res.data)){
           return false
           return false
         }
         }
-
         this.tabs[this.tabIndex].value = res.data.totalNum;
         this.tabs[this.tabIndex].value = res.data.totalNum;
       });
       });
     },
     },