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,