From 40685b41a522fe9cbe54eb126049331860fcb35c Mon Sep 17 00:00:00 2001
From: WindowBird <13870814+windows-bird@user.noreply.gitee.com>
Date: Fri, 7 Nov 2025 09:59:46 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=AF=A6=E7=BB=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/api.js | 34 +-
components/CustomerManagement.vue | 8 +-
pages.json | 7 +
pages/customer-detail/index.vue | 960 ++++++++++++++++++++++++++++++
4 files changed, 1004 insertions(+), 5 deletions(-)
create mode 100644 pages/customer-detail/index.vue
diff --git a/common/api.js b/common/api.js
index 2d38078..1c733cc 100644
--- a/common/api.js
+++ b/common/api.js
@@ -210,10 +210,42 @@ export const getCustomerList = (params = {}) => {
* @returns {Promise} 返回客户详情
*/
export const getCustomerDetail = (id) => {
- return uni.$uv.http.get(`customer/${id}`, {
+ return uni.$uv.http.get(`bst/customer/${id}`, {
custom: {
auth: true // 启用 token 认证
}
});
};
+/**
+ * 获取客户跟进动态列表
+ * @param {string} customerId 客户ID
+ * @returns {Promise} 返回跟进动态列表
+ */
+export const getCustomerFollowupList = (customerId) => {
+ return uni.$uv.http.get(`bst/customer/followup/list`, {
+ params: {
+ customerId: customerId
+ },
+ custom: {
+ auth: true
+ }
+ });
+};
+
+/**
+ * 获取客户项目列表
+ * @param {string} customerId 客户ID
+ * @returns {Promise} 返回项目列表
+ */
+export const getCustomerProjects = (customerId) => {
+ return uni.$uv.http.get(`bst/customer/projects`, {
+ params: {
+ customerId: customerId
+ },
+ custom: {
+ auth: true
+ }
+ });
+};
+
diff --git a/components/CustomerManagement.vue b/components/CustomerManagement.vue
index 983a912..4512e18 100644
--- a/components/CustomerManagement.vue
+++ b/components/CustomerManagement.vue
@@ -235,10 +235,10 @@ const loadCustomerList = async () => {
// 处理客户点击
const handleCustomerClick = (customer) => {
console.log('点击客户:', customer);
- // 可以跳转到客户详情页
- // uni.navigateTo({
- // url: `/pages/customer-detail/index?id=${customer.id}`
- // });
+ // 跳转到客户详情页
+ uni.navigateTo({
+ url: `/pages/customer-detail/index?id=${customer.id}`
+ });
};
// 处理跟进
diff --git a/pages.json b/pages.json
index c49f25a..7391334 100644
--- a/pages.json
+++ b/pages.json
@@ -68,6 +68,13 @@
"navigationBarTitleText": "申请详情",
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "pages/customer-detail/index",
+ "style": {
+ "navigationBarTitleText": "客户详情",
+ "navigationStyle": "custom"
+ }
}
],
diff --git a/pages/customer-detail/index.vue b/pages/customer-detail/index.vue
new file mode 100644
index 0000000..9956e4d
--- /dev/null
+++ b/pages/customer-detail/index.vue
@@ -0,0 +1,960 @@
+
+
+
+
+
+ ‹
+ {{ customerDetail.name || '客户详情' }}
+ 占位
+
+
+
+
+
+
+
+ 客户状态
+
+ {{ getStatusText(customerDetail.status) }}
+
+
+
+ 客户星级
+
+ ★
+
+
+
+
+
+ 客户归属
+ {{ customerDetail.followName || '未分配' }}
+
+
+ 客户类型
+ {{ customerDetail.customerType || '--' }}
+
+
+
+
+ 联系人
+ {{ customerDetail.contactName || customerDetail.name || '--' }}
+
+
+ 最近跟进
+ {{ formatDateTime(customerDetail.lastFollowTime) }}
+
+
+
+
+
+
+
+ 跟进动态
+
+
+ 项目列表
+
+
+ 客户信息
+
+
+
+
+
+
+
+
+
+
+ {{ formatDate(item.createTime) }}
+
+
+
+ {{ item.content }}
+ {{ formatDateTime(item.createTime) }}
+
+
+
+ 暂无跟进记录
+
+
+
+
+
+
+
+
+
+ {{ project.name }}
+
+
+
+
+ {{ project.progress }}%
+
+
+ {{ formatParticipants(project.participants) }}
+
+
+ 🕐
+ {{ formatDeadline(project) }}
+
+
+
+ 暂无项目
+
+
+
+
+
+
+
+
+
+ 基础信息
+
+
+ 客户名称
+ {{ customerDetail.name || '--' }}
+
+
+ 联系电话
+ {{ customerDetail.mobile || '--' }}
+
+
+ 微信号
+ {{ customerDetail.wechat || '--' }}
+
+
+ 客户来源
+ {{ customerDetail.source || '--' }}
+
+
+ 客户意向
+ {{ customerDetail.intent || '--' }}
+
+
+ 意向强度
+ {{ getIntentStrengthText(customerDetail.intentLevel) }}
+
+
+ 客户地区
+ {{ formatRegion(customerDetail.region, customerDetail.city) }}
+
+
+ 工作微信
+ {{ customerDetail.workWechat || '--' }}
+
+
+
+
+
+
+ 其他信息
+
+
+ 客户星级
+
+ ★
+
+
+
+ 备注
+ {{ customerDetail.remark || '--' }}
+
+
+ 顾虑点
+ {{ customerDetail.concerns || '--' }}
+
+
+ 痛点
+ {{ customerDetail.painPoints || '--' }}
+
+
+ 关注点
+ {{ customerDetail.focusPoints || '--' }}
+
+
+ 需求点
+ {{ customerDetail.requirements || '--' }}
+
+
+
+
+
+
+
+
+ ✎
+ 写新跟进
+
+
+ ☑
+ 新建任务
+
+
+ ☎
+ 拨打电话
+
+
+ ⋯
+ 更多操作
+
+
+
+
+
+
+
+