|
|
@@ -1,21 +1,33 @@
|
|
|
<template>
|
|
|
<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:120upx;text-align:center;">
|
|
|
- <text>{{searchTypeName}}</text><text class="iconfont iconsanjiao_xia"></text>
|
|
|
+ <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>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="input-wrap_box">
|
|
|
+ <view class="select-dn_bx">
|
|
|
+ <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="search-bar">
|
|
|
- <app-search-module v-model="searchText" placeholder="请输入" @input="searchFn" />
|
|
|
- </view>
|
|
|
- <view style="float:right">
|
|
|
- <button class="admin-button-com middle blue" style="margin-right:8upx;" @click="selectStaffFn()">员工</button>
|
|
|
- <button class="admin-button-com middle blue" style="margin-right:8upx;" @click="debtChangeFn()">赊账单</button>
|
|
|
- <button class="admin-button-com middle blue" @click="cancelFn()">清空搜索</button>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view> <AppSearchModule placeholder="这里搜索" @input="searchFn"/> </view>
|
|
|
+ <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%" />
|
|
|
<view class="list-wrap">
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
<view class="list" v-for="(item, index) in list.data" :key="index" @click="$util.pageTo({ url: '/admin/order/detail', query: { id: item.id } })" >
|
|
|
@@ -99,6 +111,8 @@ import NotLogin from "@/components/not-login";
|
|
|
import {getStaffList} from '@/api/staff'
|
|
|
import AppSearchModule from "@/components/module/app-search"
|
|
|
import { cancelExpressOrder } from '@/api/shop-express'
|
|
|
+import DateSelect from "@/components/module/dateSelect";
|
|
|
+import { getList } from "@/api/member";
|
|
|
export default {
|
|
|
name: "order-list",
|
|
|
components: {
|
|
|
@@ -106,7 +120,8 @@ export default {
|
|
|
AppTabs,
|
|
|
AppWrapperEmpty,
|
|
|
NotLogin,
|
|
|
- AppSearchModule
|
|
|
+ AppSearchModule,
|
|
|
+ DateSelect
|
|
|
},
|
|
|
mixins: [list],
|
|
|
data () {
|
|
|
@@ -120,7 +135,11 @@ export default {
|
|
|
searchTypeName:'价格',
|
|
|
searchType:0,
|
|
|
searchOption:['价格', '单号','手机','名称'],
|
|
|
- refreshPage:0
|
|
|
+ refreshPage:0,
|
|
|
+ showSearch:false,
|
|
|
+ searchList:[],
|
|
|
+ showSearch:false,
|
|
|
+ customId:0
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh () {
|
|
|
@@ -171,11 +190,29 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- searchFn(e) {
|
|
|
- this.resetList();
|
|
|
- this.searchText = e;
|
|
|
+ getCustom(item){
|
|
|
+ this.showSearch = false
|
|
|
+ this.customId = item.id
|
|
|
+ this.resetList()
|
|
|
this.getOrderList()
|
|
|
},
|
|
|
+ searchFn(e) {
|
|
|
+ let that = this
|
|
|
+ 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 = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
reduceOrderStock(item){
|
|
|
this.$util.pageTo({url:'/admin/billing/index2?customId='+item.customId+'&orderId='+item.id+'&reduceStock=1'})
|
|
|
},
|
|
|
@@ -303,9 +340,34 @@ export default {
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.app-content {
|
|
|
- padding-top: 120upx;
|
|
|
+ padding-top: 100upx;
|
|
|
padding-bottom: 1px;
|
|
|
+ .app-tabs {
|
|
|
+ position: fixed;
|
|
|
+ /* 手机mobile屏幕小于1000px */
|
|
|
+ @media screen and (max-width: 1100px) {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ z-index: 9;
|
|
|
+ }
|
|
|
+ .input-wrap_box {
|
|
|
+ background-color: #fff;
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ z-index: 10;
|
|
|
+ @media screen and (max-width: 1100px) {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ height: 100upx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 30upx;
|
|
|
+ & > view:nth-child(2) {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
.list-wrap {
|
|
|
+ padding-top: 115upx;
|
|
|
.list {
|
|
|
padding: 0 30upx;
|
|
|
background-color: #fff;
|