2026-04-16 13:29:07 +08:00

94 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 客户管理模块 (Customer Management)
## 模块概述
客户管理模块提供完整的客户档案管理、交接管理和公海池功能支持360度客户视图和自动化工作流程。
## 功能特性
### 2.2 客户管理模块
#### 2.2.1 客户档案管理
- **基础信息**:客户类型(个人/企业)、联系方式、所属行业、分级标签(重要/普通/潜在)
- **360度视图**:整合商机记录、合同历史、服务工单、回款情况,参考纷享销客客户档案体系
- **数据校验**:手机号/企业税号唯一性校验,避免重复建档
#### 2.2.2 客户交接管理
- **触发场景**:人员离职/岗位调整自动触发交接流程
- **交接内容**:含客户基本信息、未结商机、历史合同、未解决问题等核心数据
- **交接流程**
a. 准备阶段:系统自动生成交接清单,原负责人补充完善
b. 审核阶段:负责人审核清单完整性
c. 确认阶段:接手人确认接收,系统自动更新客户负责人
- **客户通知**:交接完成后自动发送短信/邮件告知客户对接人变更
#### 2.2.3 客户公海池
- **规则配置**自动回收N天未跟进的客户
- **分配机制**:手动分配或销售自主领取
## 数据库表结构
### customers (客户档案表)
- `id`: 客户ID (主键)
- `customer_name`: 客户名称 (必填)
- `customer_type`: 客户类型 (individual=个人, enterprise=企业)
- `phone`: 手机号 (唯一性约束)
- `tax_id`: 企业税号 (唯一性约束,仅企业客户)
- `industry`: 所属行业
- `customer_level`: 分级标签 (important=重要, normal=普通, potential=潜在)
- `owner_id`: 负责人ID
- `last_follow_up`: 最后跟进时间
- `status`: 状态 (active=活跃, inactive=非活跃, in_pool=公海)
### customer_handover (客户交接表)
- `id`: 交接ID (主键)
- `customer_id`: 客户ID
- `from_owner_id`: 原负责人ID
- `to_owner_id`: 新负责人ID
- `handover_reason`: 交接原因 (resignation=离职, position_change=岗位调整)
- `current_stage`: 当前阶段 (preparation/review/confirmation/completed)
### customer_handover_items (交接项目明细表)
- `id`: 项目ID (主键)
- `handover_id`: 交接ID
- `item_type`: 项目类型 (basic_info/opportunities/contracts/service_tickets/payment_issues)
- `item_description`: 项目描述
- `is_completed`: 是否完成
### customer_pool (客户公海池表)
- `id`: 公海记录ID (主键)
- `customer_id`: 客户ID
- `original_owner_id`: 原负责人ID
- `recycle_reason`: 回收原因 (inactive_days=未跟进超限, manual=手动)
- `pool_status`: 公海状态 (available/assigned/claimed)
## API接口
### 客户管理
- `create_customer()`: 创建客户档案(包含唯一性校验)
- `get_customer_360_view()`: 获取客户360度视图
### 交接管理
- `initiate_handover()`: 发起交接流程(自动生成清单)
- `complete_handover_preparation()`: 完成准备阶段
- `approve_handover()`: 审核交接清单
- `confirm_handover()`: 确认接收(自动更新负责人并发送通知)
### 公海管理
- `recycle_to_pool()`: 回收客户到公海池
- `claim_from_pool()`: 从公海池认领客户
## 前端界面
- 客户档案CRUD界面
- 客户交接管理界面
- 客户公海池界面
- 客户360度视图查询面板
## 安装部署
1. 将模块目录复制到 `~/repos/` 目录下
2. 运行主应用的 `build.sh` 脚本,自动处理数据库表创建和前端资源链接
3. 模块将自动集成到系统中
## 依赖要求
- ahserver >= 1.0.0
- sqlor-database-module >= 1.0.0
- bricks-framework >= 1.0.0