Commit Graph

113 Commits

Author SHA1 Message Date
v6ole ab20bc5a1f Merge branch 'main' into develop
# Conflicts:
#	backend/app/api/key_visits.py
#	backend/app/api/mini_business.py
#	backend/app/api/visits.py
#	backend/app/api/work_plans.py
#	backend/app/main.py
#	backend/app/models/__init__.py
#	backend/app/schemas/key_visit.py
#	backend/app/schemas/mini_business.py
#	backend/app/schemas/work_plan.py
#	backend/app/services/light_board.py
#	frontend/src/components/DesktopLayout.vue
#	frontend/src/stores/theme.ts
#	frontend/src/views/desktop/ManagerWorkspace.vue
#	frontend/src/views/desktop/WorkPlans.vue
#	frontend/src/views/mobile/KeyVisitForm.vue
#	frontend/src/views/mobile/LeaveForm.vue
#	frontend/src/views/mobile/PlansList.vue
#	frontend/src/views/mobile/VisitForm.vue
#	frontend/src/views/mobile/WorkPlanForm.vue
2026-08-17 09:31:12 +08:00
v6ole 1ec20ee53e chore: 保存进行中的未提交改动(企微定向推送+搜索筛选UI等)
保存合并前工作树中遗留的进行中改动,避免分支合并时丢失:
- scheduler: 填报汇总改为定向推送给支局长/领导(而非广播@all)
- router: JWT token 校验修复,bind token(UUID)不被误剥离
- 工作计划/计划列表: 搜索+筛选+分页 UI
- 各列表 API 增加 search 参数支持
- docker-compose.backend.yml + backend/.dockerignore 纳入版本管理

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-17 09:17:03 +08:00
v6ole 804812dd7e feat: 企业微信OAuth静默登录
- 新增 GET /api/wecom/oauth-url 和 /api/wecom/oauth-callback
- OAuth回调返回HTML页面直接写localStorage(避坑企微webview 307重定向不可靠)
- 菜单URL改为OAuth静默授权链接(snsapi_base + agentid)
- redirect目标编码到state参数中(避坑redirect_uri不允许自定义query)
- wecom_userid大小写不敏感匹配
- 前端路由守卫处理 ?token= 自动登录(fallback)
- Login.vue企微环境检测自动跳OAuth
- setup-menu同步更新为OAuth链接

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-30 12:33:43 +08:00
v6ole 2187be7aeb feat: 操作日志系统 + 日期修复 + 协同去重 + 主题持久化 + 计划自动完成
本次累积提交包含以下功能:

1. 修复:el-date-picker 缺失 value-format 导致日期保存偏移(8处)
2. 新增:协同拜访 visit_group_id 去重机制(完整副本 + 周报合并 + 亮灯去重)
3. 新增:计划自动完成(创建计划检测已有拜访 / 编辑拜访触发)
4. 新增:拜访表单选择客户后自动预填过期计划内容
5. 新增:移动端主题切换按钮 + 后端持久化
6. 新增:操作日志系统 (audit_logs),全覆盖 8 个模块 CRUD
7. 新增:PC端「我的数据」支局长/领导视角客户经理列

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-30 12:01:14 +08:00
v6ole 9b5805447e docs: 协同拜访记录去重设计方案
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-30 09:55:08 +08:00
v6ole 6b43b77c3b fix(security): harden uploads and wecom binding 2026-07-28 12:18:45 +08:00
v6ole 7f87aa7353 fix: 请假表单日期序列化与错误消息格式化修复
- el-date-picker 添加 value-format="YYYY-MM-DD",确保日期以字符串格式发送而非 ISO datetime,修复后端 Pydantic date 校验 422 错误
- 错误处理中正确解析 FastAPI 422 返回的 detail 数组,提取 msg 字段拼接显示,修复 [object Object] 显示问题

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-28 11:02:26 +08:00
v6ole ccb436664b fix: Element Plus暗色CSS变量覆盖 + 设置页对经理开放(仅主题)
- App.vue: 新增 html.dark --el-* 变量全覆盖(30+变量),修复所有select/input/dropdown/table/pagination等组件暗色背景
- DesktopLayout: 设置页对所有角色开放,用户管理仍限支局长
- Settings: 经理只显示主题面板,其他6个管理模块仅支局长可见

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 08:42:29 +08:00
v6ole af3d3bfc89 fix: 暗黑模式UI优化 — 导航栏/页面背景互换, Element Plus组件适配, 亮灯表卡片+仪表盘图标暗色适配
- 极简/科技深色: 导航栏和页面背景颜色互换(sidebar更亮,page更暗)
- 新增20+条 Element Plus 暗色全局覆盖(input/select/table/pagination/button/dialog/tabs/date-picker等)
- Dashboard: stat-glyph在暗色下移除背景色(参考本周请假), progress-row背景降低亮度
- LightBoard: 卡片文字固定深色(card背景是浅色), light-dot适配暗色背景
- 新增 --c-bg-light token 防止暗色下summary-bar回退到浅色

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 08:29:58 +08:00
v6ole 5b55029576 fix: 修复logout清除新主题偏好; 移除DesktopLayout未使用的themeLabels导入
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 01:51:17 +08:00
v6ole e14308b757 feat: 新增 minimal-dark 和 tech-dark 两套暗色 CSS 变量
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 01:48:14 +08:00
v6ole ce24937ba0 feat: 改造 theme store 支持暗黑模式双选架构
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 01:45:56 +08:00
v6ole 6fd9cfbff9 chore: 更新 components.d.ts 自动生成文件
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 01:34:03 +08:00
v6ole a9344eadae fix: 日期选择框和搜索框统一宽度240px; 搜索按钮改为文字
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 01:27:55 +08:00
v6ole 392380ab51 fix: 日期选择合并为daterange; 搜索框+日期选择移至标题行
- 两个独立month picker合并为一个daterange选择器
- 日期选择+搜索框移至我的工作数据标题同行
- 搜索框增加搜索按钮
- 移除新建按钮

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 01:25:52 +08:00
v6ole 7699e88578 feat: 我的数据页面日期筛选改为月度选择器+新建按钮移至筛选栏
- 替换固定周期(本周/本月/本年)为 el-date-picker type=month
- 支持任意月份筛选,选完自动刷新
- 新建按钮移至筛选栏最右侧,与搜索框同行
- 各Tab内移除独立的创建按钮

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 01:12:05 +08:00
v6ole f89638b3f0 feat: 桌面端工作计划/商机/要客列表新增搜索框
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 01:06:56 +08:00
v6ole 04f701b27c fix: 移动端列表页搜索框和按钮去掉size=small,使用默认大小
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 01:02:35 +08:00
v6ole 07c6f65378 fix: 商机跟单/要客拜访搜索框漏传params参数
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 00:59:53 +08:00
v6ole 72d869bafb feat: 移动端列表页支持搜索+分页(25条/页);历史移至请假后
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 00:49:43 +08:00
v6ole 3059f0e7e4 feat: 移动端工作中心新增历史拜访+历史纪要
- 工作中心新增两个卡片入口:历史拜访 / 历史纪要
- VisitsList.vue: 拜访历史记录列表,点击进入编辑
- NotesList.vue: 纪要历史记录列表,点击进入编辑
- 复用已有编辑表单(VisitForm/DailyNoteForm edit mode)
- 网格改为3列布局容纳6个卡片

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 00:32:16 +08:00
v6ole d6dec7f9af feat: 我的数据页面新增日期筛选+搜索+分页
- 本周/本月/本年/全部 四个时间范围筛选(默认本月)
- 关键词搜索所有内容
- el-pagination 分页(25/50/100条每页)
- 每个Tab独立分页状态

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 00:25:21 +08:00
v6ole ff07e9c470 fix: 图片上传改用 POST + axios.put,与ManagerWorkspace一致
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 00:17:33 +08:00
v6ole c55ea18aaf feat: 个人用户拜访编辑新增照片查看/删除/上传功能
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 00:14:40 +08:00
v6ole 32ca029580 fix: 个人用户编辑弹窗与我的数据保持一致—补全四模块全部字段
- 拜访: 客户经理/日期/方式/时间/拜访人/电话/相关人员/内容/需求
- 计划: 客户经理/计划日期/内容/状态
- 商机: 客户经理/产品/金额/跟进/状态/预计列收(月选择器)
- 要客: 客户经理/紧急度/描述/进展/时间/拜访人/对象

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 00:12:09 +08:00
v6ole ae29a17825 fix: 个人用户拜访编辑弹窗补全所有字段
客户经理/日期/方式/时间/拜访人/电话/沟通内容/客户需求

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 00:08:13 +08:00
v6ole 1fddc35119 feat: 个人用户视图表格新增编辑按钮+编辑弹窗
4个Tab的表格均添编辑按钮,点击弹窗可编辑关键字段并保存/删除

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 00:04:32 +08:00
v6ole 9a39b96316 fix: 客户类型Tab改为自定义按钮样式,匹配整体设计风格
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 00:01:02 +08:00
v6ole 83c87cad3d fix: 个人用户Tab禁用新建客户按钮
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 23:58:38 +08:00
v6ole 9f3067b412 fix: 单位客户列表API请求加上 customer_type 筛选参数
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 23:52:26 +08:00
v6ole 7c75164323 feat: 个人用户拜访记录新增拜访人+客户经理列
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 22:19:14 +08:00
v6ole 6504a393e3 feat: 个人用户聚合视图 — 客户管理双Tab+四模块数据聚合
- customers 表新增 customer_type 列 (unit/individual)
- 客户管理页:单位客户 | 个人用户 Tab 切换
- 个人用户 Tab: 直接内嵌4 Tab 显示所有个人用户的聚合数据
- 个人用户通过业务模块快速新建产生 (customer_type=individual)
- 4个业务API新增 customer_type 筛选参数(JOIN customers)
- 客户列表排序: 个人用户置顶

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 22:14:44 +08:00
v6ole 835e5d38fd Revert "feat: 客户管理新增个人用户类型,双Tab分离管理"
This reverts commit 03198557f7.
2026-07-12 21:45:23 +08:00
v6ole 03198557f7 feat: 客户管理新增个人用户类型,双Tab分离管理
- customers 表新增 customer_type 列 (unit/individual)
- 列表按个人优先排序,支持 customer_type 筛选
- PC端 el-radio-group 切换:单位客户 | 个人用户
- 个人用户表单: 仅姓名+备注,隐藏行业/地址/业务/月费/客户经理/联系人
- 所有业务模块客户搜索下拉中个人用户置顶

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 21:43:08 +08:00
v6ole 98a0d4f7c8 fix: 客户详情顶部信息区用卡片样式区分Tab区域
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 21:09:58 +08:00
v6ole 05d33d518f feat: 客户详情弹窗新增拜访/计划/商机/要客四个关联数据Tab
点击客户名 → 800px 弹窗,顶部显示基本信息,下方 el-tabs 切换:
- 拜访记录 / 工作计划 / 商机跟单 / 要客拜访
- 各 Tab 并行加载对应 customer_id 筛选数据

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 21:03:10 +08:00
v6ole 9354752b89 fix: 商机改为已流失时前端自动清空列收时间再提交
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:56:03 +08:00
v6ole 82755e14a1 fix: 桌面端支局长/领导新建记录时客户经理栏显示UUID
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:50:07 +08:00
v6ole 20f5b01987 feat: 商机跟单默认筛选跟进中 + 已流失置底 + 清空列收
- 后端: 状态改为已流失时自动清空 expected_revenue_date
- PC端: 默认筛选跟进中,排序 跟进中→已签约→已流失
- 移动端: 列表自动排序,已流失在最底部

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:49:01 +08:00
v6ole 78962e45d7 feat: 移动端商机跟单新增跟进记录时间线+添加功能
编辑模式下表单底部显示跟进时间线 + 新增跟进入口
与PC端一致的体验:方式chip选择 + 日期 + 内容

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:42:22 +08:00
v6ole fade9e62e2 fix: 支局长/领导新建记录时客户经理栏显示UUID
manager_id 初始值: director/leader 设为空让用户选择,manager 仍用自身ID
编辑模式保留原记录的 manager_id

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:38:51 +08:00
v6ole 7b91cb4230 fix: 移动端编辑表单自动补充客户到选项列表,避免显示UUID
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:34:34 +08:00
v6ole 6c76b34d1b fix: 移动端刷新页面后主题回退的问题
在 index.html 添加内联 script,Vue 启动前从 localStorage 读取主题
并设置 data-theme 属性,消除 Pinia store 初始化时序导致的闪烁

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:32:31 +08:00
v6ole 1e0f77d4e6 feat: 桌面端表单必填项标记 * + 提交校验
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:30:43 +08:00
v6ole ff0a38a369 feat: 移动端表单必填项标记红色 * 号 + 提交校验
- 客户单位/日期/纪要内容/计划拜访时间 标记 *
- 缺失必填项时 ElMessage.warning 提示
- CSS: .required-star { color: var(--vermilion); }

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:28:54 +08:00
v6ole 6d1ccbb246 fix: 删除按钮移至标题栏右侧,与标题水平对齐
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:23:31 +08:00
v6ole 216406326a fix: 添加单条记录GET端点,修复移动端编辑表单数据加载
- work-plans/mini-business/key-visits 均新增 GET /{id} 端点
- 三个移动端编辑表单改用单条端点加载数据
- 修复点击卡片进入编辑时空白的 bug

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:20:07 +08:00
v6ole 33fb6a63c0 fix: 移动端列表卡片去掉编辑按钮,点击卡片直接进入编辑
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:17:03 +08:00
v6ole 637a0949a8 fix: 移动端列表页删除按钮改为编辑按钮
卡片底部按钮从 🗑 删除改为 ✏️ 编辑,编辑表单内保留删除功能

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:13:39 +08:00
v6ole aed9182dbe fix: 移动端列表页移除 v-loading 遮罩,修复卡片点击无反应
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 20:12:14 +08:00