Browse Source

refactor(market): 重构市场模块线索相关页面

- 修改 apiRoute.js,添加新的资源共享详情接口
- 重构 clue_info.vue 页面,适配新的数据结构
- 更新 index.vue 页面,调整线索列表和详情的显示逻辑
-优化用户体验,统一意向等级的显示方式
master
liutong 10 months ago
parent
commit
ec08e2f581
  1. 9
      api/apiRoute.js
  2. 80
      pages/market/clue/clue_info.vue
  3. 16
      pages/market/clue/index.vue

9
api/apiRoute.js

@ -160,6 +160,15 @@ export default {
return res;
})
},
//销售端-资源共享-详情(客户资源详情)
xs_resourceSharingInfo(data = {}) {
let url = '/resourceSharing/info'
return http.get(url, data).then(res => {
return res;
})
},

80
pages/market/clue/clue_info.vue

@ -9,31 +9,34 @@
<view class="course_box">
<view class="course_box_top">
<view class="course_box_top_top">
<!-- <image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>-->
<view class="name">{{ clientInfo.student_name }}</view>
<image class="pic" src="@/static/images/index/myk.png"></image>
<view class="name">{{ clientInfo.customerResource.name }}</view>
</view>
<view class="course_box_top_below">
<view class="course_box_top_below-left">
<view>{{ clientInfo.follow.follow_up_time}} 跟进</view>
<view>{{ $util.formatToDateTime((clientInfo.customerResource.updated_at || ''),'m-d H:i') }} 跟进</view>
<view style="display: flex;align-items: center;">
<view style="padding-left: 30rpx;">
<image v-if="clientInfo.follow.initial_customer_intent == 'A'"
<image v-if="clientInfo.customerResource.initial_intent == 'high'"
src="@/static/images/index/lvs.png" class="drop-image-x"></image>
<image v-else-if="clientInfo.follow.initial_customer_intent == 'B'"
<image v-else-if="clientInfo.customerResource.initial_intent == 'medium'"
src="@/static/images/index/intention2.png" class="drop-image-x"></image>
<image v-else="clientInfo.follow.initial_customer_intent == 'C'"
src="@/static/images/index/intention1.png" class="drop-image-x"></image>
<image
v-else
src="@/static/images/index/intention1.png"
class="drop-image-x">
</image>
</view>
<view class="title-x">意向{{ clientInfo.follow.initial_customer_intent }}</view>
<view class="title-x">意向{{ clientInfo.customerResource.initial_intent_name }}</view>
</view>
</view>
<view class="course_box_top_below-right">
<view v-if="clientInfo.is_zdgz == 1">
<image src="@/static/images/index/star.png" class="drop-image-star"></image>
</view>
<view class="title-x">重点关注</view>
<!-- <view v-if="clientInfo.customerResource.is_zdgz == 1">-->
<!-- <image src="@/static/images/index/star.png" class="drop-image-star"></image>-->
<!-- </view>-->
<!-- <view class="title-x">重点关注</view>-->
</view>
</view>
</view>
@ -61,23 +64,23 @@
<view class="basic-message-div">
<view class="basic-message-div-txt">
<view>来源渠道</view>
<view>{{clientInfo.source_channel}}</view>
<view>{{clientInfo.customerResource.source_channel_name}}</view>
</view>
<view class="basic-message-div-txt">
<view>来源</view>
<view>{{clientInfo.customer_source}}</view>
<view>{{clientInfo.customerResource.source_name}}</view>
</view>
<view class="basic-message-div-txt">
<view>顾问</view>
<view>{{clientInfo.gw}}</view>
<view>{{clientInfo.customerResource.consultant_name}}</view>
</view>
<view class="basic-message-div-txt">
<view>学生姓名</view>
<view>{{clientInfo.student_name}}</view>
<view>{{clientInfo.customerResource.name}}</view>
</view>
<view class="basic-message-div-txt">
<view>性别</view>
<view>{{clientInfo.sex == 1 ? '男':'女'}}</view>
<view>{{clientInfo.customerResource.gender_name}}</view>
</view>
</view>
@ -85,11 +88,11 @@
<view class="basic-message-div">
<view class="basic-message-div-txt">
<view>已成交次数</view>
<view>{{clientInfo.cj_count}}</view>
<view>{{clientInfo.customerResource.cj_count || 0}}</view>
</view>
<view class="basic-message-div-txt">
<view>体验课程</view>
<view>{{clientInfo.ty_count}}</view>
<view>{{clientInfo.customerResource.trial_class_count}}</view>
</view>
</view>
<view style="height: 200rpx;"></view>
@ -255,15 +258,16 @@
<!-- 底部按钮组-->
<view class="bottom-label">
<view @click="openViewWritingFollowUp()">添加跟进记录</view>
<view @click="openViewWritingFollowUp()">编辑详情</view>
<view @click="callTel(clientInfo.student_phone)">拨打电话</view>
<view @click="openViewNewTask()">转交跟进任务</view>
<view @click="openViewNewTask()">修改记录</view>
</view>
</view>
</view>
</template>
<script>
import apiRoute from '@/api/apiRoute.js';
import marketApi from '@/api/market.js';
@ -273,14 +277,12 @@
switch_tags_type: 1,
select_type: 1,
id:'',//线id
resource_sharing_id:'',//id
clientInfo:{
follow:{
follow_up_time:'',
initial_customer_intent:'',
}
},//
id:'',//id
customerResource:{},//
sixSpeed:{},//
},//
//
followList:[],
@ -289,23 +291,24 @@
}
},
onLoad(options) {
this.id = options.id
this.resource_sharing_id = options.resource_sharing_id//id
},
onShow(){
this.init()
},
methods: {
async init(){
await this.getInfo()
this.getFollowList()
this.getListCallUp()
await this.getInfo()//
// this.getFollowList()//
// this.getListCallUp()//
},
//
async getInfo(){
let data = {
id:this.id//线id
resource_sharing_id:this.resource_sharing_id//id
}
let res = await marketApi.clientInfo(data)
let res = await apiRoute.xs_resourceSharingInfo(data)
if(res.code != 1){
uni.showToast({
title: res.msg,
@ -314,12 +317,13 @@
return
}
this.clientInfo = res.data
console.log('详情',this.clientInfo)
},
//
async getFollowList(){
let data = {
sales_id:this.id//
sales_id:this.resource_sharing_id//
}
let res = await marketApi.followList(data)
if(res.code != 1){
@ -332,10 +336,10 @@
this.followList = res.data
},
//
//
async getListCallUp(){
let data = {
sales_id:this.id//
sales_id:this.resource_sharing_id//
}
let res = await marketApi.listCallUp(data)
if(res.code != 1){
@ -373,7 +377,7 @@
}
let param = {
sales_id:this.id//线id
sales_id:this.resource_sharing_id//线id
}
let res = await marketApi.setCallUp(param)//
if(res.code != 1){

16
pages/market/clue/index.vue

@ -34,19 +34,19 @@
首联系人{{ v.customerResource.name }} <span class="card-con-span">{{ v.customerResource.decision_maker }}</span>
</view>
<view class="card-date">
<view class="card-con">{{ $util.formatToDateTime((v.shared_at || ''), 'm-d H:i') }}
<view class="card-con">{{ $util.formatToDateTime((v.customerResource.updated_at || ''), 'm-d H:i') }}
跟进
</view>
<view style="margin-left: 30rpx;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image
v-if="['A+','A','A-'].includes(v.follow && v.follow.initial_customer_intent || '')"
v-if="v.customerResource.initial_intent == 'high'"
src="@/static/images/index/intention3.png"
class="drop-image-x"
></image>
<image
v-else-if="['B+','B','B-'].includes(v.follow && v.follow.initial_customer_intent || '')"
v-else-if="v.customerResource.initial_intent == 'medium'"
src="@/static/images/index/intention2.png"
class="drop-image-x"
></image>
@ -99,17 +99,17 @@
决策人{{v.customerResource.name}} <span class="card-con-span">{{v.customerResource.decision_maker}}</span>
</view>
<view class="card-date">
<view class="card-con">{{ $util.formatToDateTime((v.shared_at || ''),'m-d H:i') }} 跟进</view>
<view class="card-con">{{ $util.formatToDateTime((v.customerResource.updated_at || ''),'m-d H:i') }} 跟进</view>
<view style="margin-left: 30rpx;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image
v-if="['A+','A','A-'].includes(v.follow && v.follow.initial_customer_intent || '')"
v-if="v.customerResource.initial_intent == 'high'"
src="@/static/images/index/intention3.png"
class="drop-image-x"
></image>
<image
v-else-if="['B+','B','B-'].includes(v.follow && v.follow.initial_customer_intent || '')"
v-else-if="v.customerResource.initial_intent == 'medium'"
src="@/static/images/index/intention2.png"
class="drop-image-x"
></image>
@ -491,9 +491,9 @@ export default {
//
clue_info(item) {
let id = item.id
let resource_sharing_id = item.id///id
uni.navigateTo({
url: `/pages/market/clue/clue_info?id=${id}`
url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}`
})
},

Loading…
Cancel
Save