From ae860ab9dcd47fb2ffaeee769f46c94fe511d1df Mon Sep 17 00:00:00 2001
From: liutong <836164388@qq.com>
Date: Mon, 19 May 2025 18:53:01 +0800
Subject: [PATCH] =?UTF-8?q?refactor(market):=20=E9=87=8D=E6=9E=84=E5=B8=82?=
=?UTF-8?q?=E5=9C=BA=E7=BA=BF=E7=B4=A2=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 更新数据结构:将列表项的属性从直接使用改为通过 customerResource 属性访问- 调整日期显示:从 follow.follow_up_time 改为 shared_at
- 修改拨打电话功能:使用 customerResource.phone_number 替代 student_phone
- 优化列表数据获取逻辑:添加共享人 ID 并使用新的 API 路由
- 注释和调试代码清理:移除不必要的注释和多余的空行
---
pages/market/clue/index.vue | 44 +++++++++++++++++++------------------
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/pages/market/clue/index.vue b/pages/market/clue/index.vue
index 52fadbc..89e4664 100644
--- a/pages/market/clue/index.vue
+++ b/pages/market/clue/index.vue
@@ -27,14 +27,14 @@
- {{ v.student_name }}
- {{ v.is_status == 1 ? '试听' : '成交' }}
+ {{ v.customerResource.name }}
+
- 首联系人:{{ v.contact_name }} {{ v.decision_maker }}
+ 首联系人:{{ v.customerResource.name }} {{ v.customerResource.decision_maker }}
- {{ $util.formatToDateTime((v.follow && v.follow.follow_up_time || ''), 'm-d H:i') }}
+ {{ $util.formatToDateTime((v.shared_at || ''), 'm-d H:i') }}
跟进
@@ -56,7 +56,7 @@
class="drop-image-x"
>
- 意向:{{ v.follow && v.follow.initial_customer_intent || '' }}
+ 意向:{{ v.customerResource && v.customerResource.initial_intent_name || '' }}
@@ -65,7 +65,7 @@
-
+
@@ -266,6 +266,8 @@ export default {
this.userInfo = res.data
+ this.filteredData_1.shared_by = this.userInfo.id//共享人ID始终是当前登录的员工
+
//判断用户是不是经理,是就展示"资源分配"
if(this.userInfo.role_key_arr.includes('manager')){
this.values = [
@@ -349,11 +351,13 @@ export default {
return
}
+ this.filteredData_1.shared_by = this.userInfo.id//共享人ID始终是当前登录的员工
+
if(data.page == 1){
this.tableList_1 = []
}
- let res = await marketApi.myClient(data)
+ let res = await apiRoute.xs_resourceSharingIndex(data)
this.loading = false
this.isReachedBottom = false;
if (res.code != 1){
@@ -366,12 +370,10 @@ export default {
this.tableList_1 = this.tableList_1.concat(res.data.data); // 使用 concat 方法 将新数据追加到数组中
- console.log('列表',this.tableList_1)
+ console.log('列表1',this.tableList_1)
this.filteredData_1.total = res.data.total
this.filteredData_1.page++
-
-
},
//获取列表-资源分配相关
@@ -425,7 +427,7 @@ export default {
this.tableList_2 = this.tableList_2.concat(res.data.data); // 使用 concat 方法 将新数据追加到数组中
- console.log('列表',this.tableList_2)
+ console.log('列表2',this.tableList_2)
this.filteredData_2.total = res.data.total
this.filteredData_2.page++
},
@@ -459,7 +461,7 @@ export default {
//拨打电话
async dialTel(item) {
- let tel = item.student_phone
+ let tel = item.customerResource.phone_number
if (!tel) {
uni.showToast({
@@ -470,16 +472,16 @@ export default {
}
let param = {
- sales_id: item.id//线索id
- }
- let res = await marketApi.setCallUp(param)//添加通过记录
- if (res.code != 1) {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- return
+ sales_id: item.customerResource.id//线索id
}
+ // let res = await marketApi.setCallUp(param)//添加通过记录
+ // if (res.code != 1) {
+ // uni.showToast({
+ // title: res.msg,
+ // icon: 'none'
+ // })
+ // return
+ // }
uni.makePhoneCall({