hengmei-two/pagesB/customerList/customerList.vue

118 lines
4.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'客户列表'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30">
<view class="radius20 fon28 col3 mar-sx20">
<view class="disac">
<view @tap="openXial" class="disjbac width100 radius10 pad-zy20 xialak posir">
<view class="" style="color: #B3B3B3;">{{category}}</view>
<image :class="isZhuan?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<!-- 下拉列表 -->
<view v-if="isZhuan" class="posia bacf radius10 xial-box">
<view class="pad-zy20 xial-item-box">
<view @tap="chooseXia(indexl)" :class="xialCurrent==indexl?'pcol':''" v-for="(iteml,indexl) in xialone" :key="indexl">{{iteml}}</view>
</view>
</view>
</view>
<view class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</view>
</view>
</view>
<!-- 列表 -->
<view class="dis bacf radius10 pad20 mar-x20 posir" v-for="(item,index) in dataList" :key="index">
<image class="mar-y20 flexs" :src="item.imgSrc" style="width: 98rpx;height: 98rpx;" mode="aspectFill"></image>
<view class="fon24 col3 width100">
<view class="bold disjbac">
<view class="fon28 clips1">{{item.name}}</view>
<view class="flexs">来源{{item.come}}</view>
</view>
<view style="margin: 15rpx 0;">联系方式{{item.phone}}</view>
<view>客服{{item.customer || '暂无'}}</view>
<view class="col80 disjbac" style="margin: 15rpx 0 0 0;">
<view>{{item.time}}</view>
<view class="col3">{{item.qudao}}</view>
</view>
</view>
<view @tap="fenCustomer" class="posia colf fon24 radius10 tc customer-btn" style="right: 20rpx;bottom: 50rpx;" v-if="item.customer==''" :style="{background:publicColor}">分配客服</view>
</view>
<!-- 弹框 -->
<pu-po :category="xialtList" @chooseXiaT="chooseXiaT" :isXiala="true" :isShowT="isShowT" :clearVal="'暂不分配'" :comfrimVal="'立即分配'" @comfirmev="comfirmev" @cancleev="isShowT=false"></pu-po>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
</view>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//主题颜色
category:'',
dataList:[
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第一渠道'},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第一渠道'},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'',time:'2021-07-15 14:25',qudao:''},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第二渠道'},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第二渠道'},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第二渠道'},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第二渠道'},
],
showTop:false,
isShowT:false,
isXiala:true,
isZhuan:false,
xialCurrent:0,
xialone:['全部','顾客分享'],
xialtList:['许嵩','周星驰','周星驰','周星驰','周星驰','许嵩','周星驰','周星驰','周星驰']
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//触底事件
for (let i = 0; i < 4; i++) {
let obj = {imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第二渠道'}
this.dataList.push(obj)
}
},
onLoad() {
this.category = this.xialone[0]
},
methods: {
fenCustomer(){//分配弹框调起事件
console.log('分配客服调起弹框');
this.isShowT = true
},
backTop(){//回到顶部事件
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
comfirmev(){//立即分配执行事件
console.log('立即分配');
this.isShowT = false
},
openXial(){
this.isZhuan = !this.isZhuan
console.log('开启下拉');
},
chooseXia(index){
this.xialCurrent = index
this.category = this.xialone[index]
},
chooseXiaT(e){
console.log(e);
}
}
}
</script>
<style>
</style>