325 lines
7.2 KiB
Vue
325 lines
7.2 KiB
Vue
<template>
|
|
<view class="conts">
|
|
<view class="top">
|
|
<view class="navbar">{{$t('customer.title')}}</view>
|
|
<view class="topSearch">
|
|
<view class="left">
|
|
<u-search v-model="value5" bgColor="#fff" search-icon="" :show-action="false" :placeholder="$t('customer.inputhd')"></u-search>
|
|
<view @click="searchCli" class="search">
|
|
<image src="/static/image/customer/search1.png" mode=""></image>
|
|
</view>
|
|
</view>
|
|
<view class="right">
|
|
<image src="/static/image/customer/search.png" @click="show = true" mode=""></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="list">
|
|
<view class="contents" v-for="(item, index) in datalist" :key="index" >
|
|
<view class="" @click="godetile(item)">
|
|
<view class="top">
|
|
<view class="">2025.03.11 12:00</view>
|
|
<view class="tag">{{$t('followup')}}</view>
|
|
</view>
|
|
<u-divider text="" :hairline="true"></u-divider>
|
|
<view class="cont">
|
|
<view class="title">
|
|
<view class=""><text class="name">刘德华</text><text class="phone">138****2264</text></view>
|
|
<view class="ststus">初步接触</view>
|
|
</view>
|
|
<view class="info"><text class="sex">男</text> | <text class="addr">迪拜</text><text class="type">越野车</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="desc1">
|
|
<view class="" @click="callPhone(item)"><image src="/static/image/customer/phone.png" mode=""></image> {{$t('call')}}</view>
|
|
<view class="" @click="editClick(item)"><image src="/static/image/customer/edit.png" mode=""></image> {{$t('followup')}}</view>
|
|
<view class="" @click="delClick(item)"><image src="/static/image/customer/trash.png" mode=""></image> {{$t('delete')}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-picker :show="show" :columns="columns" @cancel="cancel" @confirm="confirm" title="客户筛选" keyName="label"></u-picker>
|
|
<u-popup :show="showts" :closeOnClickOverlay="false" :round="20" mode="center">
|
|
<view class="popupcontent">
|
|
<view class="title">{{$t('prompt')}}</view>
|
|
<view class="text">
|
|
{{$t('deletemsg')}}
|
|
</view>
|
|
</view>
|
|
<view class="cent">
|
|
<view class="btn1" @click="showts = !showts">{{$t('cancel')}}</view>
|
|
<view class="btn" @click="showts = !showts">{{$t('confirm')}}</view>
|
|
</view>
|
|
</u-popup>
|
|
<movable-area class="movable-area">
|
|
<movable-view class="movable-view" :x="x" :y="y" direction="all">
|
|
<view class="index" @tap="addcustomer">
|
|
<image src="/static/image/customer/add.png" mode="widthFix">
|
|
</view>
|
|
</movable-view>
|
|
</movable-area>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
// import { request,showToast } from '@/api/apiT.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
x: 300, //x坐标
|
|
y: 550, //y坐标
|
|
value5:'',
|
|
show:false,
|
|
showts:false,
|
|
columns:[
|
|
[{
|
|
label: '当天跟进客户',
|
|
id: 1
|
|
}, {
|
|
label: '近三天跟进客户',
|
|
id: 2
|
|
}, {
|
|
label: '近七天跟进客户',
|
|
id: 3
|
|
}]
|
|
],
|
|
datalist:[
|
|
{id:1,phone:'17839087603'},
|
|
{id:2,phone:'18437931136'},
|
|
{id:3,phone:'18339827479'},
|
|
{id:4,phone:'17839087603'}
|
|
],
|
|
}
|
|
},
|
|
onLoad() {
|
|
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
|
|
this.x = windowWidth-70
|
|
this.y = windowHeight-25
|
|
},
|
|
methods: {
|
|
searchCli(){
|
|
|
|
},
|
|
close() {
|
|
// console.log('close');
|
|
this.show= false
|
|
},
|
|
confirm(e) {
|
|
// console.log('confirm', e);
|
|
this.show = false
|
|
},
|
|
cancel() {
|
|
// console.log('cancel');
|
|
this.show = false
|
|
},
|
|
godetile(item){
|
|
console.log(item)
|
|
uni.navigateTo({
|
|
url: '/pages/customer/detile'
|
|
});
|
|
},
|
|
// 拨打电话
|
|
callPhone(item) {
|
|
var phoneNumber= item.phone
|
|
if (!phoneNumber) {
|
|
uni.showToast({
|
|
title: '请输入电话号码',
|
|
icon: 'none',
|
|
});
|
|
return;
|
|
}
|
|
|
|
uni.makePhoneCall({
|
|
phoneNumber: phoneNumber,
|
|
success: () => {
|
|
console.log('拨打电话成功');
|
|
},
|
|
fail: (err) => {
|
|
console.log('拨打电话失败', err);
|
|
},
|
|
});
|
|
},
|
|
editClick(item){
|
|
uni.navigateTo({
|
|
url: '/pages/customer/followup'
|
|
});
|
|
},
|
|
delClick(item){
|
|
this.showts=true
|
|
},
|
|
addcustomer(){
|
|
uni.navigateTo({
|
|
url: '/pages/customer/add'
|
|
});
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
uni-page-body {
|
|
background-color: #F6F6F6 !important;
|
|
}
|
|
.conts{
|
|
background-image: url("/static/image/customer/bg.png");
|
|
background-size: 100%;
|
|
background-repeat: no-repeat;
|
|
}
|
|
.navbar{
|
|
height: 44px;
|
|
line-height: 44px;
|
|
text-align: center;
|
|
color: #fff;
|
|
font-size: 32rpx;
|
|
}
|
|
.topSearch {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 10px 15px 5px;
|
|
.left {
|
|
position: relative;
|
|
width: 88%;
|
|
}
|
|
|
|
.right {
|
|
flex: 1;
|
|
text-align: right;
|
|
image{
|
|
width: 24px;
|
|
height: 20px;
|
|
margin-top: 5px;
|
|
}
|
|
}
|
|
.search{
|
|
background: linear-gradient(to right, #3471FF, #6776FF);
|
|
color: white;
|
|
border-radius: 20px;
|
|
padding: 6px 16px 2px;
|
|
text-align: center;
|
|
position: absolute;
|
|
top: 2px;
|
|
right: 5px;
|
|
font-size: 12px;
|
|
image{
|
|
width: 16px;
|
|
height: 16px;
|
|
|
|
}
|
|
}
|
|
}
|
|
.list{
|
|
padding: 15px;
|
|
overflow: auto;
|
|
height: calc(100vh-140px);
|
|
.contents{
|
|
background-color: #FFFFFF;
|
|
border-radius: 10px;
|
|
margin-bottom: 10px;
|
|
.top{
|
|
padding: 10px 15px 0px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
.tag{
|
|
background: #3471FF;
|
|
color: white;
|
|
border-radius: 10px 0px 0px 10px;
|
|
padding: 3px 10px;
|
|
margin-right: -15px;
|
|
}
|
|
}
|
|
.cont{
|
|
padding: 0px 15px 10px;
|
|
font-size: 24rpx;
|
|
.title{
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
color: #222222;
|
|
.name{
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
margin-right: 10px;
|
|
}
|
|
.phone{
|
|
font-size: 28rpx;
|
|
}
|
|
}
|
|
.ststus{
|
|
color: #666666;
|
|
}
|
|
.info,.desc{
|
|
color: #78758E;
|
|
line-height: 26px;
|
|
}
|
|
.sex{
|
|
margin-right: 5px;
|
|
}
|
|
.addr{
|
|
margin-left: 5px;
|
|
}
|
|
.type{
|
|
margin-left: 5px;
|
|
color: #3471FF;
|
|
}
|
|
}
|
|
}
|
|
.desc1{
|
|
padding: 0px 15px 10px;
|
|
color: #3471FF;
|
|
display: flex;
|
|
justify-content: right;
|
|
view{
|
|
margin-left:15px;
|
|
}
|
|
image{
|
|
width: 14px;
|
|
height: 14px;
|
|
// vertical-align: sub;
|
|
margin-right: 5px;
|
|
}
|
|
}
|
|
}
|
|
.popupcontent{
|
|
text-align: center;
|
|
padding: 10px 40px 20px;
|
|
.title{
|
|
font-size: 18px;
|
|
color: #333333;
|
|
line-height: 60px;
|
|
}
|
|
.text{
|
|
color: #666666;
|
|
font-size: 16px;
|
|
}
|
|
}
|
|
.cent{
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-around;
|
|
padding: 0px 10px 20px;
|
|
text-align: center;
|
|
.btn1{
|
|
background-color: #F6F6F6;
|
|
border: 1px solid #F6F6F6;
|
|
color: #333333;
|
|
border-radius: 50px;
|
|
width: 46%;
|
|
margin: 10px 0px 20px;
|
|
height: 40px;
|
|
line-height: 40px;
|
|
}
|
|
.btn{
|
|
background-color: #3471FF;
|
|
color: white;
|
|
border-radius: 50px;
|
|
width: 46%;
|
|
margin: 10px 0px 20px;
|
|
height: 40px;
|
|
line-height: 40px;
|
|
}
|
|
}
|
|
|
|
</style>
|