From 9e9672abda4b09b3ad261cac6360bd978e2b03f3 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Mon, 10 Nov 2025 10:49:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=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 | 22 + components/followup-form/FollowupPickers.vue | 260 ++++ pages.json | 7 + pages/customer/detail/index.vue | 6 +- pages/customer/follow/add/index.vue | 1451 ++++++++++++++++++ 5 files changed, 1745 insertions(+), 1 deletion(-) create mode 100644 components/followup-form/FollowupPickers.vue create mode 100644 pages/customer/follow/add/index.vue diff --git a/common/api/customer.js b/common/api/customer.js index ea1f8d5..09c5de4 100644 --- a/common/api/customer.js +++ b/common/api/customer.js @@ -142,6 +142,28 @@ export const getFollowupDetail = (followId) => { }); }; +/** + * 创建跟进记录 + * @param {Object} data 跟进记录数据 + * @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 createFollowup = (data) => { + return uni.$uv.http.post(`bst/customerFollow`, data, { + custom: { + auth: true + } + }); +}; + /** * 获取客户项目列表 * @param {string} customerId 客户ID diff --git a/components/followup-form/FollowupPickers.vue b/components/followup-form/FollowupPickers.vue new file mode 100644 index 0000000..b68016a --- /dev/null +++ b/components/followup-form/FollowupPickers.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/pages.json b/pages.json index 874b856..81e2ba2 100644 --- a/pages.json +++ b/pages.json @@ -90,6 +90,13 @@ "navigationStyle": "custom" } }, + { + "path": "pages/customer/follow/add/index", + "style": { + "navigationBarTitleText": "新建跟进记录", + "navigationStyle": "custom" + } + }, { "path": "pages/customer/follow/detail/index", "style": { diff --git a/pages/customer/detail/index.vue b/pages/customer/detail/index.vue index 20b1937..317c827 100644 --- a/pages/customer/detail/index.vue +++ b/pages/customer/detail/index.vue @@ -299,8 +299,12 @@ const handleProjectMore = (project) => { // 写新跟进 const handleNewFollowup = () => { + if (!customerId.value) { + uni.$uv.toast('客户信息不完整'); + return; + } uni.navigateTo({ - url: `/pages/customer-follow/index?customerId=${customerId.value}&customerName=${customerDetail.value.name}` + url: `/pages/customer/follow/add/index?customerId=${customerId.value}&customerName=${encodeURIComponent(customerDetail.value.name || '')}` }); }; diff --git a/pages/customer/follow/add/index.vue b/pages/customer/follow/add/index.vue new file mode 100644 index 0000000..f822a25 --- /dev/null +++ b/pages/customer/follow/add/index.vue @@ -0,0 +1,1451 @@ +