Browse Source

feat(market): 添加客户查重功能

- 在市场线索模块新增客户查重功能
- 实现客户列表接口,用于查重查询
- 添加查重弹出层组件,展示查重结果
- 优化客户信息展示样式,增加意向等级图标
- 修复拨打电话功能,使用正确的电话号码字段
master
liutong 12 months ago
parent
commit
7829e6db11
  1. 9
      api/market.js
  2. 277
      pages/market/clue/add_clues.vue
  3. 2
      pages/market/clue/index.vue
  4. BIN
      static/images/index/zan_wu.png

9
api/market.js

@ -100,6 +100,15 @@ export default {
}) })
}, },
//客户列表-- 查重
clientList(data = {}) {
let url = '/member/client_list'
return http.get(url, data).then(res => {
return res;
})
},

277
pages/market/clue/add_clues.vue

@ -3,9 +3,9 @@
<view class="assemble"> <view class="assemble">
<view class="search_box"> <view class="search_box">
<view class="input_box"> <view class="input_box">
<input type="text" v-model="keyword" placeholder="请输入客户名称"> <input type="text" v-model="student_name" placeholder="请输入客户名称">
</view> </view>
<view class="btn">查重</view> <view class="btn" @click="clientList()">查重</view>
</view> </view>
<view class="form-style"> <view class="form-style">
<fui-form ref="form" top="0" :model="formData" :show="false"> <fui-form ref="form" top="0" :model="formData" :show="false">
@ -180,6 +180,79 @@
<fui-picker :linkage='linkage' :options="options" :layer="1" :show="show" @change="change" <fui-picker :linkage='linkage' :options="options" :layer="1" :show="show" @change="change"
@cancel="cancel"></fui-picker> @cancel="cancel"></fui-picker>
<!-- 查重弹出层-->
<fui-bottom-popup :show="showDuplicateCheck" @close="closeDuplicateCheck">
<view class="fui-scroll__wrap">
<view class="title_box">
<view></view>
<view class="title">查重结果</view>
<view class="close" @tap="closeDuplicateCheck">
<fui-icon name="close" :size="48"></fui-icon>
</view>
</view>
<scroll-view scroll-y class="section_ul">
<!--暂无数据时展示-->
<view class="not_list" v-if="clientUserList.length == 0">
<image src="@/static/images/index/zan_wu.png" class="img"></image>
<view class="title">暂无重复客户</view>
</view>
<!--数据列表-->
<view class="ul" v-else>
<view class="li" v-for="(v,k) in clientUserList" :key="k">
<view class="left_box" @click="openViewClueInfo(v)">
<view class="box_1">
<image
class="img"
src="@/static/images/index/myk.png"></image>
<view class="name">{{v.student_name}}</view>
<view class="tag">{{ v.is_status == 1 ? '试听' : '成交' }}</view>
</view>
<view class="box_2">
<view class="left">
<view class="name">首选联系人{{v.contact_name}}</view>
<!-- <view class="call">妈妈</view>-->
</view>
</view>
<view class="box_3">
<view class="left">
{{ $util.formatToDateTime((v.follow && v.follow.follow_up_time || ''), 'm-d H:i') }} 跟进
</view>
<view class="right">
<image
v-if="['A+','A','A-'].includes(v.follow && v.follow.initial_customer_intent || '')"
src="@/static/images/index/intention3.png"
class="img"
></image>
<image
v-else-if="['B+','B','B-'].includes(v.follow && v.follow.initial_customer_intent || '')"
src="@/static/images/index/intention2.png"
class="img"
></image>
<image
v-else
src="@/static/images/index/intention1.png"
class="img"
></image>
<view>意向{{ v.follow && v.follow.initial_customer_intent || '' }}</view>
</view>
</view>
</view>
<view class="right_box">
<image class="img" src="@/static/images/index/message.png" @click="openViewMyMessage(v)"></image>
<image class="img" src="@/static/images/index/phone.png" @click="dialTel(v)"></image>
</view>
</view>
</view>
</scroll-view>
</view>
</fui-bottom-popup>
</view> </view>
</template> </template>
@ -378,8 +451,6 @@ export default {
}], }],
keyword: '',//
//
result_customer_source: '',// result_customer_source: '',//
options_customer_source: [ options_customer_source: [
{ {
@ -416,7 +487,12 @@ export default {
options_area: [], options_area: [],
// //
userInfo:{} userInfo:{},
//
student_name:'',//
clientUserList:[],//
showDuplicateCheck:false,//
} }
}, },
onShow() { onShow() {
@ -528,6 +604,68 @@ export default {
this.options_customer_tags = arr this.options_customer_tags = arr
}, },
//##### #####
//--
async clientList(){
if(!this.student_name){
uni.showToast({
title: '请输入检索关键字',
icon: 'none'
})
return
}
this.clientUserList = []
let param = {
student_name:this.student_name
}
let res = await marketApi.clientList(param)
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
console.log('查重',res)
this.clientUserList = res.data
this.openDuplicateCheck()
},
//
openDuplicateCheck(){
this.showDuplicateCheck = true
},
//
closeDuplicateCheck(e){
this.showDuplicateCheck = false
},
//-
openViewClueInfo(item) {
let id = item.id
uni.navigateTo({
url: `/pages/market/clue/clue_info?id=${id}`
})
},
//-
openViewMyMessage(item) {
let user_id = item.user_id
uni.navigateTo({
url: `/pages/common/my_message?user_id=${user_id}`
})
},
//
dialTel(item) {
let tel = item.student_phone
uni.makePhoneCall({
phoneNumber: tel
})
},
// //
@ -849,4 +987,133 @@ export default {
margin: 50rpx auto 120rpx; margin: 50rpx auto 120rpx;
width: 92%; width: 92%;
} }
//
.fui-scroll__wrap{
height: 60vh;
.title_box{
padding: 10rpx 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
.title{
font-size: 28rpx;
color: #101010;
}
}
.section_ul{
margin-bottom: 100rpx;
height: 98%;
.not_list{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.img{
width: 112rpx;
height: 112rpx;
}
.title{
padding: 0;
margin-top: 10rpx;
color: #101010;
font-size: 28rpx;
text-align: center;
}
}
.ul{
padding: 26rpx;
padding-bottom: 100rpx;
display: flex;
flex-direction: column;
.li{
margin-bottom: 26rpx;
padding: 26rpx;
display: flex;
justify-content: space-between;
gap: 10rpx;
border-radius: 18rpx;
background-color: rgba(67,69,68,1);
color: #fff;
font-size: 28rpx;
border: 0rpx solid rgba(121,121,121,1);
.left_box{
width: 80%;
display: flex;
flex-direction: column;
gap: 20rpx;
.box_1 {
display: flex;
align-items: center;
.img {
width: 48rpx;
height: 48rpx;
border-right: 50%;
}
.name{
margin-left: 20rpx;
}
.tag{
margin-left: 20rpx;
width: 84rpx;
height: 32rpx;
line-height: 28rpx;
border-radius: 0rpx 20rpx 20rpx 20rpx;
background-color: rgba(236,128,141,0.3);
color: rgba(240,90,90,1);
font-size: 20rpx;
text-align: center;
border: 0rpx solid rgba(121,121,121,1);
}
}
.box_2{
display: flex;
justify-content: space-between;
align-items: center;
.left{
display: flex;
align-items: flex-end;
.name{
font-size: 28rpx;
}
.call{
margin-left: 10rpx;
font-size: 24rpx;
color: #ba7b30;
}
}
}
.box_3{
display: flex;
gap: 30rpx;
.left{}
.right{
display: flex;
align-items: center;
gap: 10rpx;
.img{
width: 16rpx;
height: 16rpx;
border-right: 50%;
}
}
}
}
.right_box{
width: 25%;
display: flex;
justify-content: space-between;
align-items: center;
.img{
width: 70rpx;
height: 70rpx;
border-radius: 50%;
}
}
}
}
}
}
</style> </style>

2
pages/market/clue/index.vue

@ -320,7 +320,7 @@ export default {
// //
dialTel(item) { dialTel(item) {
let tel = item.phone let tel = item.student_phone
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: tel phoneNumber: tel
}) })

BIN
static/images/index/zan_wu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 B

Loading…
Cancel
Save