|
|
@@ -1,12 +1,31 @@
|
|
|
<template>
|
|
|
<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 @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> <AppSearchModule placeholder="这里搜索" @input="searchFn"/> </view>
|
|
|
|
|
|
<view class="select-dn_bx">
|
|
|
@@ -66,6 +85,7 @@ import DropShopSelect from "@/components/module/shopSelect";
|
|
|
import OrderItem from "./components/OrderItem";
|
|
|
import DateSelect from "@/components/module/dateSelect";
|
|
|
import { IMGHOST } from '@/config'
|
|
|
+import { getList } from "@/api/member";
|
|
|
export default {
|
|
|
name: "order",
|
|
|
components: {
|
|
|
@@ -92,7 +112,6 @@ export default {
|
|
|
fhLabelShow:false,
|
|
|
isScanEnv:false,
|
|
|
orderId:'',
|
|
|
- seekVal: "",
|
|
|
isShow: false, //是否显选择时间段
|
|
|
customizationTime: [], //时间段
|
|
|
customizationTimeType: "", //时间段
|
|
|
@@ -140,7 +159,10 @@ export default {
|
|
|
endTime:'',
|
|
|
fromDetail:{status:1},
|
|
|
currentInfo:{},
|
|
|
- currentTitle:''
|
|
|
+ currentTitle:'',
|
|
|
+ searchList:[],
|
|
|
+ showSearch:false,
|
|
|
+ customId:0
|
|
|
};
|
|
|
},
|
|
|
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) {
|
|
|
this.searchTime = val.searchTime
|
|
|
this.startTime = val.startTime
|
|
|
@@ -322,8 +329,26 @@ export default {
|
|
|
this.getOrderList();
|
|
|
},
|
|
|
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()
|
|
|
},
|
|
|
getOrderList() {
|
|
|
@@ -332,15 +357,14 @@ export default {
|
|
|
startTime: this.startTime,
|
|
|
endTime: this.endTime,
|
|
|
status: this.tabs[this.tabIndex].id,
|
|
|
- name: this.seekVal,
|
|
|
page: this.list.page,
|
|
|
searchType:this.searchType,
|
|
|
+ customId:this.customId
|
|
|
}).then((res) => {
|
|
|
this.completes(res);
|
|
|
if (this.$util.isEmpty(res.data)){
|
|
|
return false
|
|
|
}
|
|
|
-
|
|
|
this.tabs[this.tabIndex].value = res.data.totalNum;
|
|
|
});
|
|
|
},
|