Browse Source

refactor(market): 重构市场线索页面

- 更新筛选条件和数据统计逻辑
- 优化区域公海和我的客户切换功能- 调整线索列表展示格式
- 添加意向等级图标和逻辑
- 优化数据请求和处理流程
master
liutong 1 year ago
parent
commit
6e683a9d29
  1. 240
      pages/market/clue/index.vue

240
pages/market/clue/index.vue

@ -3,15 +3,15 @@
<fui-segmented-control :values="values" type="text" activeColor="#29d3b4" color="#fff"
@click="segmented"></fui-segmented-control>
<view class="search">
<view :class="{'selected': select_type == 1, 'not-selected': select_type != 1}" @click="setSelect(1)">全部(320)
<view :class="{'selected': select_type == 1, 'not-selected': select_type != 1}" @click="setSelect(1)">全部({{countArr.type_0}})
</view>
<view :class="{'selected': select_type == 2, 'not-selected': select_type != 2}" @click="setSelect(2)">待跟进(8)
<view :class="{'selected': select_type == 2, 'not-selected': select_type != 2}" @click="setSelect(2)">待跟进({{countArr.type_1}})
</view>
<view :class="{'selected': select_type == 3, 'not-selected': select_type != 3}" @click="setSelect(3)">
7天未跟进(15)
7天未跟进({{countArr.type_2}})
</view>
<view :class="{'selected': select_type == 4, 'not-selected': select_type != 4}" @click="setSelect(4)">
30天未成交(12)
30天未成交({{countArr.type_3}})
</view>
</view>
<!--我的客户-->
@ -58,193 +58,58 @@
<image src="@/static/images/index/message.png" class="image"></image>
</view>
<view style="width: 15%;">
<image src="@/static/images/index/phone.png" class="image"></image>
<image v-if="v.student_phone" src="@/static/images/index/phone.png" class="image"></image>
</view>
</view>
</view>
<!--区域公海-->
<view v-if="segmented_type == 2">
<view style="color: #999999;padding: 20rpx 30rpx;">
今日待领15/30
</view>
<view class="card">
<view style="width: 70%;" @click="clue_info">
<view style="display: flex;align-items: center;padding: 20rpx;">
<view>
<image src="@/static/images/index/myk.png" class="card-image"></image>
</view>
<view class="card-text">包子皮</view>
<view class="card-label">试听</view>
</view>
<view class="card-con">
首联系人包念念 <span class="card-con-span">妈妈</span>
</view>
<view class="card-date">
<view class="card-con">08-30 14:25  跟进</view>
<view style="margin-left: 30rpx;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image src="@/static/images/index/intention1.png" class="drop-image-x"></image>
</view>
<view class="title-x">意向</view>
</view>
</view>
</view>
</view>
<view style="width: 30%;display: flex;justify-content: center;">
<view class="neck">
</view>
</view>
</view>
<view class="card">
<view style="width: 70%;" @click="clue_info">
<view style="display: flex;align-items: center;padding: 20rpx;">
<view>
<image src="@/static/images/index/myk.png" class="card-image"></image>
</view>
<view class="card-text">包子皮</view>
<view class="card-label">试听</view>
</view>
<view class="card-con">
首联系人包念念 <span class="card-con-span">妈妈</span>
</view>
<view class="card-date">
<view class="card-con">08-30 14:25  跟进</view>
<view style="margin-left: 30rpx;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image src="@/static/images/index/intention1.png" class="drop-image-x"></image>
</view>
<view class="title-x">意向</view>
</view>
</view>
</view>
</view>
<view style="width: 30%;display: flex;justify-content: center;">
<view class="neck">
</view>
</view>
</view>
<view class="card">
<view style="width: 70%;" @click="clue_info">
<view style="display: flex;align-items: center;padding: 20rpx;">
<view>
<image src="@/static/images/index/myk.png" class="card-image"></image>
</view>
<view class="card-text">包子皮</view>
<view class="card-label">试听</view>
</view>
<view class="card-con">
首联系人包念念 <span class="card-con-span">妈妈</span>
</view>
<view class="card-date">
<view class="card-con">08-30 14:25 跟进</view>
<view style="margin-left: 30rpx;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image src="@/static/images/index/intention1.png" class="drop-image-x"></image>
</view>
<view class="title-x">意向</view>
</view>
</view>
</view>
</view>
<view style="width: 30%;display: flex;justify-content: center;">
<view class="neck">
</view>
</view>
</view>
<view class="card">
<view style="width: 70%;" @click="clue_info">
<view style="display: flex;align-items: center;padding: 20rpx;">
<view>
<image src="@/static/images/index/myk.png" class="card-image"></image>
</view>
<view class="card-text">包子皮</view>
<view class="card-label">试听</view>
</view>
<view class="card-con">
首联系人包念念 <span class="card-con-span">妈妈</span>
</view>
<view class="card-date">
<view class="card-con">08-30 14:25  跟进</view>
<view style="margin-left: 30rpx;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image src="@/static/images/index/intention1.png" class="drop-image-x"></image>
</view>
<view class="title-x">意向</view>
</view>
</view>
</view>
</view>
<view style="width: 30%;display: flex;justify-content: center;">
<view class="neck">
</view>
</view>
今日待领{{countArr.lq_count}}/{{countArr.max_count}}
</view>
<view class="card">
<view class="card" v-for="(v,k) in tableList" :key="k">
<view style="width: 70%;" @click="clue_info">
<view style="display: flex;align-items: center;padding: 20rpx;">
<view>
<image src="@/static/images/index/myk.png" class="card-image"></image>
</view>
<view class="card-text">包子皮</view>
<view class="card-label">试听</view>
<view class="card-text">{{v.student_name}}</view>
<view class="card-label">{{v.is_status == 1 ? '试听' : '成交'}}</view>
</view>
<view class="card-con">
首联系人包念念 <span class="card-con-span">妈妈</span>
首联系人{{v.contact_name}} <span class="card-con-span">{{v.decision_maker}}</span>
</view>
<view class="card-date">
<view class="card-con">08-30 14:25  跟进</view>
<view class="card-con">{{ $util.formatToDateTime((v.follow && v.follow.follow_up_time || ''),'m-d H:i') }} 跟进</view>
<view style="margin-left: 30rpx;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image src="@/static/images/index/intention1.png" class="drop-image-x"></image>
<image
v-if="['A+','A','A-'].includes(v.follow && v.follow.initial_customer_intent || '')"
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 || '')"
src="@/static/images/index/intention2.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">意向</view>
<view class="title-x">意向{{ v.follow && v.follow.initial_customer_intent || '' }}</view>
</view>
</view>
</view>
</view>
<view style="width: 30%;display: flex;justify-content: center;">
<view class="neck">
</view>
</view>
</view>
<view class="card">
<view style="width: 70%;" @click="clue_info">
<view style="display: flex;align-items: center;padding: 20rpx;">
<view>
<image src="@/static/images/index/myk.png" class="card-image"></image>
</view>
<view class="card-text">包子皮</view>
<view class="card-label">试听</view>
</view>
<view class="card-con">
首联系人包念念 <span class="card-con-span">妈妈</span>
</view>
<view class="card-date">
<view class="card-con">08-30 14:25  跟进</view>
<view style="margin-left: 30rpx;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image src="@/static/images/index/intention1.png" class="drop-image-x"></image>
</view>
<view class="title-x">意向</view>
</view>
</view>
</view>
<view style="width: 15%;">
<image src="@/static/images/index/message.png" class="image"></image>
</view>
<view style="width: 30%;display: flex;justify-content: center;">
<view class="neck">
</view>
<view style="width: 15%;">
<image src="@/static/images/index/phone.png" class="image"></image>
</view>
</view>
</view>
@ -273,9 +138,18 @@ export default {
limit:10,//
total:10,//
type: '0',//0=,1=,2=7,3=30
is_gh: '1',//1=,2=
is_gh: '2',//1=,2=
},
countArr:{
type_0:0,
type_1:0,
type_2:0,
type_3:0,
max_count:0,
lq_count:0,
},//
tableList:[],//
values: [{
@ -287,6 +161,7 @@ export default {
}],
select_type: 1,//|1,2,3,4
segmented_type: 1,//1=,2=
}
},
onLoad(options) {},
@ -352,11 +227,21 @@ export default {
return
}
this.tableList = this.tableList.concat(res.data.data); // 使 concat
this.tableList = this.tableList.concat(res.data.list.data); // 使 concat
console.log('列表',this.tableList)
this.filteredData.total = res.data.total
this.filteredData.total = res.data.list.total
this.filteredData.page++
this.countArr = {
type_0:res.data.count[0],
type_1:res.data.count[1],
type_2:res.data.count[2],
type_3:res.data.count[3],
max_count:res.data.gh.max_count,
lq_count:res.data.gh.lq_count,
}
},
//
@ -364,7 +249,13 @@ export default {
this.select_type = type
//
await this.resetFilteredData()
this.filteredData.is_gh = this.segmented_type
if(this.segmented_type == 1){
this.filteredData.is_gh = '2'//2=
}else{
this.filteredData.is_gh = '1'//1=
}
switch (type) {
//
case 1:
@ -391,7 +282,14 @@ export default {
this.segmented_type = index.id//1=,2=
//
await this.resetFilteredData()
this.filteredData.is_gh = this.segmented_type
if(this.segmented_type == 1){
this.filteredData.is_gh = '2'//2=
}else{
this.filteredData.is_gh = '1'//1=
}
this.filteredData.type = '0'
await this.getList()
},

Loading…
Cancel
Save