From ef46928b7e708bc6e54842edae1fdc0d32e74dc4 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Mon, 10 Nov 2025 14:14:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=9F=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/api/customer.js | 23 + components/customer-detail/FollowupTab.vue | 42 +- pages.json | 7 + pages/customer/follow/edit/index.vue | 1213 ++++++++++++++++++++ 4 files changed, 1284 insertions(+), 1 deletion(-) create mode 100644 pages/customer/follow/edit/index.vue diff --git a/common/api/customer.js b/common/api/customer.js index 09c5de4..9c3954e 100644 --- a/common/api/customer.js +++ b/common/api/customer.js @@ -164,6 +164,29 @@ export const createFollowup = (data) => { }); }; +/** + * 更新跟进记录 + * @param {Object} data 跟进记录数据(必须包含 followId) + * @param {string} data.followId 跟进ID + * @param {string} data.customerId 客户ID + * @param {string} data.type 跟进方式 + * @param {string} data.content 跟进内容 + * @param {string} data.picture 图片URL(多个用逗号分隔) + * @param {string} data.attaches 附件URL(多个用逗号分隔) + * @param {string} data.followTime 跟进时间 (yyyy-MM-dd HH:mm:ss) + * @param {string} data.nextFollowTime 下次跟进时间 (yyyy-MM-dd HH:mm:ss) + * @param {string} data.customerStatus 客户状态 + * @param {string} data.customerIntentLevel 客户意向强度 + * @returns {Promise} 返回更新结果 + */ +export const updateFollowup = (data) => { + return uni.$uv.http.put(`bst/customerFollow`, data, { + custom: { + auth: true + } + }); +}; + /** * 获取客户项目列表 * @param {string} customerId 客户ID diff --git a/components/customer-detail/FollowupTab.vue b/components/customer-detail/FollowupTab.vue index 4ac5833..fa7137f 100644 --- a/components/customer-detail/FollowupTab.vue +++ b/components/customer-detail/FollowupTab.vue @@ -23,7 +23,12 @@ {{ item.userName }} 销售经理 - + + + ✏️ + + + {{ item.content }} @@ -130,6 +135,15 @@ const handleFollowupClick = (item) => { } emit('followup-click', item); }; + +// 编辑跟进记录 +const handleEdit = (item) => { + if (item && item.followId) { + uni.navigateTo({ + url: `/pages/customer/follow/edit/index?followId=${item.followId}` + }); + } +}; +