|
|
@@ -1,31 +1,34 @@
|
|
|
<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:37upx;margin-bottom:10upx;">{{item.name}}</view>
|
|
|
- <view style="font-size:29upx;">
|
|
|
- {{item.visitTime?item.visitTime.substr(5,11):''}}
|
|
|
- <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 10000" style="margin-left:20upx;color:green;">没有下过单</text>
|
|
|
- <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 7" style="margin-left:20upx;color:green;">超1周未下单</text>
|
|
|
- <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 30" style="margin-left:20upx;color:green;">超1个月未下单</text>
|
|
|
- <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 180" style="margin-left:20upx;color:green;">超半年未下单</text>
|
|
|
- <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 365" style="margin-left:20upx;color:green;">超1年未下单</text>
|
|
|
+ <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:37upx;margin-bottom:10upx;">{{item.name}}</view>
|
|
|
+ <view style="font-size:29upx;color:#999999;">
|
|
|
+ {{item.visitTime?item.visitTime.substr(5,11):''}}
|
|
|
+ <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 10000" style="margin-left:20upx;color:green;">没有下过单</text>
|
|
|
+ <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 7" style="margin-left:20upx;color:green;">超1周未下单</text>
|
|
|
+ <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 30" style="margin-left:20upx;color:green;">超1个月未下单</text>
|
|
|
+ <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 180" style="margin-left:20upx;color:green;">超半年未下单</text>
|
|
|
+ <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 365" style="margin-left:20upx;color:green;">超1年未下单</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </block>
|
|
|
</block>
|
|
|
- </block>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="input-wrap_box">
|
|
|
<view class="select-dn_bx">
|
|
|
<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
|
|
|
</view>
|
|
|
- <view> <AppSearchModule placeholder="搜索客户" @input="searchFn"/> </view>
|
|
|
- <button class="admin-button-com middle" @click="getScanOrder()" style="margin-left:15upx;">扫码</button>
|
|
|
- <button class="admin-button-com middle" @click="selectStaffFn()" style="margin-left:15upx;margin-right:15upx;">员工</button>
|
|
|
+ <button class="admin-button-com middle" @click="changeSearchStyle()">{{searchStyle==0?'客户':'编号'}}</button>
|
|
|
+ <view class="search-container">
|
|
|
+ <AppSearchModule placeholder="填写" v-model="searchText" @input="searchFn"/>
|
|
|
+ </view>
|
|
|
+ <button class="admin-button-com middle" @click="getScanOrder()">扫码</button>
|
|
|
+ <button class="admin-button-com middle" @click="selectStaffFn()">员工</button>
|
|
|
<button class="admin-button-com middle" @click="cancelFn()">清空</button>
|
|
|
</view>
|
|
|
<app-tabs :tabs="tabs" class="app-tabs" :isFixed="false" :top="50" :currentTab="tabIndex" :height="100" @change="change" itemWidth="20%" />
|
|
|
@@ -131,16 +134,16 @@ export default {
|
|
|
tabs: [ { name: "全部", value: 0 }, { name: "待付款", value: 0 }, { name: "待发货", value: 0 }, { name: "配送中", value: 0 }, { name: "已完成", value: 0 } ],
|
|
|
staffList:[],
|
|
|
shopAdminId:0,
|
|
|
- searchText:'',
|
|
|
refreshPage:0,
|
|
|
showSearch:false,
|
|
|
searchList:[],
|
|
|
- showSearch:false,
|
|
|
customId:0,
|
|
|
searchTime:'',
|
|
|
startTime:'',
|
|
|
endTime:'',
|
|
|
- repeat:-1
|
|
|
+ repeat:-1,
|
|
|
+ searchStyle:0,//0客户 1编号
|
|
|
+ searchText:''
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh () {
|
|
|
@@ -180,6 +183,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getCustom(item){
|
|
|
+ console.log(item)
|
|
|
this.showSearch = false
|
|
|
this.customId = item.id
|
|
|
this.resetList()
|
|
|
@@ -194,19 +198,24 @@ export default {
|
|
|
},
|
|
|
searchFn(e) {
|
|
|
let that = this
|
|
|
- if(that.$util.isEmpty(e)){
|
|
|
- that.showSearch = false
|
|
|
- that.searchList = []
|
|
|
+ if(this.searchStyle == 0){
|
|
|
+ if(that.$util.isEmpty(e)){
|
|
|
+ that.showSearch = false
|
|
|
+ that.searchList = []
|
|
|
+ }else{
|
|
|
+ getList({ page:1,name:e,type:0}).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 = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}else{
|
|
|
- getList({ page:1,name:e,type:0}).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 = []
|
|
|
- }
|
|
|
- })
|
|
|
+ this.resetList()
|
|
|
+ this.getOrderList()
|
|
|
}
|
|
|
},
|
|
|
reduceOrderStock(item){
|
|
|
@@ -224,6 +233,10 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ changeSearchStyle(){
|
|
|
+ this.searchStyle = this.searchStyle ==0 ? 1 : 0
|
|
|
+ this.showSearch = false
|
|
|
+ },
|
|
|
getScanOrder(){
|
|
|
this.repeat = this.repeat == -1 ? 1 : -1
|
|
|
this.resetList()
|
|
|
@@ -269,7 +282,8 @@ export default {
|
|
|
searchText:this.searchText,
|
|
|
page: this.list.page,
|
|
|
customId:this.customId,
|
|
|
- repeat:this.repeat
|
|
|
+ repeat:this.repeat,
|
|
|
+ searchStyle:this.searchStyle
|
|
|
}).then(res => {
|
|
|
this.completes(res);
|
|
|
if (this.$util.isEmpty(res.data)){
|
|
|
@@ -362,8 +376,20 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
padding: 0 20upx;
|
|
|
- & > view:nth-child(2) {
|
|
|
+ gap: 10upx;
|
|
|
+
|
|
|
+ .select-dn_bx {
|
|
|
+ flex-shrink: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .search-container {
|
|
|
flex: 1;
|
|
|
+ min-width: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ button {
|
|
|
+ flex-shrink: 0;
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
}
|
|
|
.list-wrap {
|