From df2cca374b181e4165baf806856a97819ce2b7e9 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Thu, 29 May 2025 10:13:51 +0800 Subject: [PATCH 01/14] =?UTF-8?q?refactor(im=5Fchat=5Finfo):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=81=8A=E5=A4=A9=E8=AE=B0=E5=BD=95=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=90=8E=E7=9A=84=E6=BB=9A=E5=8A=A8=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除不必要的 scrollIntoView 和 scrollViewHeight 属性 - 添加 isFirstLoad 和 scrollTop 属性 - 修改加载完成后滚动到底部的逻辑,使用 scrollTop 属性 - 优化代码结构,提高可读性和性能 --- pages/common/im_chat_info.vue | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/pages/common/im_chat_info.vue b/pages/common/im_chat_info.vue index bc709d3..ae88c48 100644 --- a/pages/common/im_chat_info.vue +++ b/pages/common/im_chat_info.vue @@ -6,6 +6,7 @@ @@ -90,7 +91,8 @@ export default { content: '',//文本内容(JSON 格式扩展字段),文本类型=纯文字,图片类型=绝对路径 }, - lastItemId: null, + isFirstLoad: true, // 标记是否为首次加载 + scrollTop:'', } }, onLoad(options) { @@ -137,16 +139,10 @@ export default { //获取聊天记录列表 await this.getList(); - // 更新最后一个 item 的 ID - this.lastItemId = 'item_' + (this.tableList.length - 1); - - // 滚动到底部 - this.$nextTick(() => { - this.$refs.scrollView.scrollTo({ top: this.scrollViewHeight }); - }); - - // 或者直接使用 scroll-into-view - this.scrollIntoView = this.lastItemId; + // 首次加载后滚动到底部 + if (this.filteredData.page == 2) { + this.scrollToBottom() + } }, //获取好友关系详情 @@ -303,6 +299,13 @@ export default { } }, + //页面滚动到底部 + scrollToBottom() { + alert(1) + this.$nextTick(() => { + this.scrollTop = 999999 // 足够大的值确保滚动到底部 + }) + }, } } From 57a54d14c8c8e5b8b27b82f4f9d5cfa51bdac9f7 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Thu, 29 May 2025 12:06:03 +0800 Subject: [PATCH 02/14] =?UTF-8?q?feat(im=5Fchat=5Finfo):=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=9B=BE=E7=89=87=E6=B6=88=E6=81=AF=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 AQUplodeImage 组件用于上传图片 - 在聊天界面添加发送图片的功能 - 实现图片消息的展示和预览 -优化聊天界面布局和样式 --- components/AQ/AQUplodeImage.vue | 56 +++++++++ pages/common/im_chat_info.vue | 208 ++++++++++++++++++++++++++------ 2 files changed, 228 insertions(+), 36 deletions(-) create mode 100644 components/AQ/AQUplodeImage.vue diff --git a/components/AQ/AQUplodeImage.vue b/components/AQ/AQUplodeImage.vue new file mode 100644 index 0000000..7d67ef8 --- /dev/null +++ b/components/AQ/AQUplodeImage.vue @@ -0,0 +1,56 @@ + + + diff --git a/pages/common/im_chat_info.vue b/pages/common/im_chat_info.vue index ae88c48..33c8918 100644 --- a/pages/common/im_chat_info.vue +++ b/pages/common/im_chat_info.vue @@ -15,16 +15,25 @@ {{v.created_at}} - - {{v.content}} + + + {{v.content}} + + + + - - {{v.content}} + + {{v.content}} + + + + @@ -36,27 +45,66 @@ - + + + + + + + + + + + + + + + + + + + + + + 相册 + + + + + + + + @@ -369,13 +452,20 @@ export default { word-wrap: break-word; /* 允许长单词或 URL 换行 */ word-break: break-all; /* 强制所有字符换行 */ .text_box{} + .img_box { + .chat_img { + width: 200rpx; + height: 200rpx; + border-radius: 16rpx; + } + } } .left_item{ - background-color: #f4f6f9; + //background-color: #f4f6f9; color: #343434; } .right_item{ - background-color: #1684fc; + //background-color: #1684fc; color: #fff; } } @@ -390,12 +480,12 @@ export default { position: fixed; bottom: 0; - padding: 50rpx 50rpx; + padding: 50rpx 30rpx; display: flex; justify-content:space-between; align-items: center; + gap: 20rpx; .left_box{ - width: 70%; .input{ background-color: #f4f6f9; height: 88rpx; @@ -403,22 +493,28 @@ export default { font-size: 28rpx; border-radius: 32rpx; - width: 532rpx; + width: 480rpx; color: #292929; font-size: 28rpx; } } .right_box{ - border-radius: 50%; - background-color: #a2cefe; - width: 88rpx; - height: 88rpx; + width: 100%; display: flex; - justify-content: center; + justify-content: space-between; align-items: center; - .send_img{ - width: 36rpx; - height: 36rpx; + .img_box{ + width: 88rpx; + height: 88rpx; + border-radius: 50%; + background-color: #a2cefe; + display: flex; + justify-content: center; + align-items: center; + .send_img{ + width: 36rpx; + height: 36rpx; + } } } @@ -428,4 +524,44 @@ export default { color: #999999; padding-left: 30rpx; } + + + /* 更多选项相关 自定义内容区样式需自行控制 */ + .more_section{ + .fui-scroll__wrap { + padding-top: 30rpx; + position: relative; + } + .fui-title { + font-size: 30rpx; + font-weight: bold; + text-align: center; + padding-bottom: 24rpx; + } + .fui-icon__close { + position: absolute; + top: 24rpx; + left: 24rpx; + } + .fui-scroll__view { + width: 100%; + height: 350rpx; + } + + .ul{ + padding: 10rpx 40rpx; + display: flex; + .li{ + display: flex; + flex-direction: column; + align-items: center; + .icon_box{ + } + .title{ + font-size: 28rpx; + text-align: center; + } + } + } + } \ No newline at end of file From 894211bb1851ed6e4e823cb2a5e5928f408ef0e6 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Thu, 29 May 2025 14:22:12 +0800 Subject: [PATCH 03/14] =?UTF-8?q?feat(api):=20=E6=B7=BB=E5=8A=A0=E9=94=80?= =?UTF-8?q?=E5=94=AE=E7=AB=AF=E8=81=8A=E5=A4=A9=E5=A5=BD=E5=8F=8B=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8E=A5=E5=8F=A3=E5=B9=B6=E4=BC=98=E5=8C=96=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=88=97=E8=A1=A8=E5=8A=9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=E5=90=8C=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=98=BE=E7=A4=BA=E7=9B=B8=E5=BA=94=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/apiRoute.js | 8 +++ pages/common/contract_list.vue | 2 +- pages/common/my_message.vue | 109 ++++++++++++++++++++++++++++--- static/images/common/jia_hao.png | Bin 0 -> 817 bytes 4 files changed, 109 insertions(+), 10 deletions(-) create mode 100644 static/images/common/jia_hao.png diff --git a/api/apiRoute.js b/api/apiRoute.js index f99b173..8fd04e3 100644 --- a/api/apiRoute.js +++ b/api/apiRoute.js @@ -262,6 +262,14 @@ export default { return res; }) }, + //销售端-好友关系列表 + xs_chatGetChatFriendsList(data = {}) { + let url = '/chat/getChatFriendsList' + return http.get(url, data).then(res => { + return res; + }) + }, + diff --git a/pages/common/contract_list.vue b/pages/common/contract_list.vue index 481375c..b20a320 100644 --- a/pages/common/contract_list.vue +++ b/pages/common/contract_list.vue @@ -101,7 +101,7 @@ export default { let data = {...this.filteredData} //判断是否还有数据 - if(this.filteredData.page * this.filteredData.limit > this.filteredData.total){ + if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) { this.loading = false uni.showToast({ title: '暂无更多', diff --git a/pages/common/my_message.vue b/pages/common/my_message.vue index 6e9b765..a8729e2 100644 --- a/pages/common/my_message.vue +++ b/pages/common/my_message.vue @@ -24,9 +24,9 @@ > @@ -46,19 +46,27 @@ From 74a41537d2767998e248325ae1c94907604d8ea8 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Fri, 30 May 2025 17:16:14 +0800 Subject: [PATCH 11/14] =?UTF-8?q?feat(api):=20=E6=B7=BB=E5=8A=A0=E9=94=80?= =?UTF-8?q?=E5=94=AE=E7=AB=AF=E6=9F=A5=E8=AF=A2=E5=AE=A2=E6=88=B7=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E5=85=A8=E9=83=A8=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 xs_getAllCustomerResources 方法,用于获取所有客户资源列表 - 更新 add_clues 页面,使用新接口获取客户数据 - 调整客户列表显示逻辑,增加决策者和联系电话字段 - 优化客户意向显示,根据 initial_intent 字段展示不同图标 --- api/apiRoute.js | 7 ++++++ pages/market/clue/add_clues.vue | 40 +++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/api/apiRoute.js b/api/apiRoute.js index db7a892..97689a4 100644 --- a/api/apiRoute.js +++ b/api/apiRoute.js @@ -211,6 +211,13 @@ export default { return res; }) }, + //销售端-查询客户资源全部列表 + xs_getAllCustomerResources(data = {}) { + let url = '/customerResources/getAll' + return http.get(url, data).then(res => { + return res; + }) + }, //销售端-客户资源-获取修改日志列表 xs_customerResourcesGetEditLogList(data = {}) { let url = '/customerResources/getEditLogList' diff --git a/pages/market/clue/add_clues.vue b/pages/market/clue/add_clues.vue index fd32e7e..84106e4 100644 --- a/pages/market/clue/add_clues.vue +++ b/pages/market/clue/add_clues.vue @@ -14,12 +14,12 @@ - - - - - - + + + + + 查重 + @@ -454,28 +454,34 @@ - {{v.student_name}} - {{ v.is_status == 1 ? '试听' : '成交' }} + {{v.name}} + - 首选联系人:{{v.contact_name}} + 首选联系人:{{v.decision_maker}} + + + 联系电话:{{v.phone_number || ''}} + + + - {{ $util.formatToDateTime((v.follow && v.follow.follow_up_time || ''), 'm-d H:i') }} 跟进 + {{ $util.formatToDateTime((v.updated_at || ''), 'm-d H:i') }} 跟进 @@ -485,13 +491,13 @@ class="img" > - 意向:{{ v.follow && v.follow.initial_customer_intent || '' }} + 意向:{{ v.initial_intent_name || '' }} - - + + @@ -907,9 +913,9 @@ export default { this.clientUserList = [] let param = { - student_name:this.student_name + name:this.student_name } - let res = await marketApi.clientList(param) + let res = await apiRoute.xs_getAllCustomerResources(param) if(res.code != 1){ uni.showToast({ title: res.msg, 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 12/14] =?UTF-8?q?refactor(market):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=BA=BF=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, From 9636ff98ab660d8134c62cddad9bb64babd9749a Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Fri, 30 May 2025 18:47:20 +0800 Subject: [PATCH 13/14] =?UTF-8?q?refactor(market):=20=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=8E=89=E6=88=91=E7=9A=84=E5=B8=82=E5=9C=BA=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E7=BB=9F=E8=AE=A1=E4=BF=A1=E6=81=AF=E6=A8=A1?= =?UTF-8?q?=E5=9D=97-=20=E4=BD=BF=E7=94=A8=20=20=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E6=A0=87=E8=AE=B0=E6=B3=A8=E9=87=8A=E6=8E=89=E4=BA=86?= =?UTF-8?q?=E6=95=B4=E4=B8=AA=E7=BB=9F=E8=AE=A1=E4=BF=A1=E6=81=AF=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=20-=20=E4=BF=9D=E7=95=99=E4=BA=86=E5=8E=9F=E6=9C=89?= =?UTF-8?q?=E7=9A=84=20HTML=20=E7=BB=93=E6=9E=84=EF=BC=8C=E4=BB=A5?= =?UTF-8?q?=E4=BE=BF=E4=BA=8E=E6=9C=AA=E6=9D=A5=E5=8F=AF=E8=83=BD=E7=9A=84?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=90=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/market/my/index.vue | 52 +++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/pages/market/my/index.vue b/pages/market/my/index.vue index ce3bf73..2439434 100644 --- a/pages/market/my/index.vue +++ b/pages/market/my/index.vue @@ -34,32 +34,32 @@ - - - - - - {{userInfo.yjds}} - 业绩单数/人 - - - {{userInfo.yqds}} - 已签单数/人 - - - 1234 - 新课签到数/人 - - - - 较上月 - -5 - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + From 6e7fd6008d12d2feabfb4c83a52334736f566c34 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Fri, 30 May 2025 18:55:01 +0800 Subject: [PATCH 14/14] =?UTF-8?q?feat(market):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=88=86=E9=85=8D=E6=9D=83=E9=99=90=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将判断用户是否为经理的逻辑,改为判断用户是否为销售经理 -通过更新角色键名,提高权限控制的精确度 --- pages/market/clue/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/market/clue/index.vue b/pages/market/clue/index.vue index 2f25661..497b4ef 100644 --- a/pages/market/clue/index.vue +++ b/pages/market/clue/index.vue @@ -267,8 +267,8 @@ export default { this.filteredData_1.shared_by = this.userInfo.id//共享人ID始终是当前登录的员工 - //判断用户是不是经理,是就展示"资源分配" - if(this.userInfo.role_key_arr.includes('manager')){ + //判断用户是不是销售经理,是就展示"资源分配" + if(this.userInfo.role_key_arr.includes('market_manager')){ this.values = [ { id: 1,