From 57a9e7deb88c653d758c1f97ca02935c8759c2c2 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Fri, 30 May 2025 17:58:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor(market):=20=E4=BC=98=E5=8C=96=E7=BA=BF?= =?UTF-8?q?=E7=B4=A2=E9=A1=B5=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改客户详情页面跳转逻辑,增加对共享资源 ID 的处理 - 更新我的消息页面跳转逻辑,使用发送者和接收者 ID -调整拨打电话功能,增加沟通记录相关参数 - 更改 API 调用方法,使用新的通信记录添加接口 --- pages/market/clue/add_clues.vue | 36 ++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/pages/market/clue/add_clues.vue b/pages/market/clue/add_clues.vue index 84106e4..ba2aa88 100644 --- a/pages/market/clue/add_clues.vue +++ b/pages/market/clue/add_clues.vue @@ -939,23 +939,37 @@ export default { //跳转页面-客户详情 openViewClueInfo(item) { - let id = item.id + let resource_sharing_id = ''; + if (item.resourceSharingHasMany && item.resourceSharingHasMany.length > 0) { + resource_sharing_id = item.resourceSharingHasMany[0].id; // 共享资源表id + } + + if (!resource_sharing_id) { + uni.showToast({ + title: '暂时无法查看', + icon: 'none' + }); + return; + } + uni.navigateTo({ - url: `/pages/market/clue/clue_info?id=${id}` + url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}` }) }, //跳转页面-我的消息 openViewMyMessage(item) { - let hair_staff_id = item.hair_staff_id + let from_id = this.userInfo.id//发送者的id + let to_id = item.customerResource.id//接收者ID uni.navigateTo({ - url: `/pages/common/im_chat_info?hair_staff_id=${hair_staff_id}` + url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}` }) }, //拨打电话 async dialTel(item) { - let tel = item.student_phone + + let tel = item.phone_number if (!tel) { uni.showToast({ @@ -965,10 +979,18 @@ export default { return; } + let param = { - sales_id: item.id//线索id + staff_id: this.userInfo.id,//员工id + resource_id: item.id,//资源ID + resource_type: '',//资源类型(如设备、文件、系统等) + communication_type: 'phone',//沟通类型: phone-电话, email-邮件, meeting-会议, other-其他 + communication_result: 'success',//沟通结果: success-成功, failure-失败, pending-待定 + remarks: null,//备注 + tag: null,//标签 } - let res = await marketApi.setCallUp(param)//添加通过记录 + + let res = await apiRoute.xs_communicationRecordsAdd(param)//添加通过记录 if (res.code != 1) { uni.showToast({ title: res.msg,