Files
shanxia2.0/docs/superpowers/plans/2026-08-08-merge-approver-setting.md
T
2026-08-08 20:43:48 +08:00

39 lines
1.7 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.
# 报价、合同审批人设置合并 Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** 将 CRM 下两个审批人设置页合并为系统管理下的单页(上报价、下合同,分区各自保存),并软隐藏旧菜单。
**Architecture:** 新建 `system/approver-setting/index.vue` 拼装两套现有表单逻辑;`sqxp.ts` 增加系统管理路由并隐藏 CRM 旧路由;save 接口权限改为 `system:approverSetting`;SQL 插入新菜单、隐藏旧菜单、迁移角色菜单。
**Tech Stack:** Vue 3 + Element Plus(web-admin)、FastAPI menu guard、MySQL `sys_menu` / `sys_role_menu`
**Spec:** `docs/superpowers/specs/2026-08-08-merge-approver-setting-design.md`
---
### Task 1: 合并页面 + 前端路由
**Files:**
- Create: `web-admin/src/views/system/approver-setting/index.vue`
- Modify: `web-admin/src/router/modules/sqxp.ts`
- Modify: `docs/web-admin-ui-pattern-index.md`
- [x] 新建上下双 panel 页(共用 userList,分区独立 load/save)
- [x] 系统管理下增加路由;CRM 两路由 `isHide: true`
- [x] pattern-index 对照行指向新页
### Task 2: 后端权限 + SQL 迁移
**Files:**
- Modify: `backend/app/api/crm_quote_routes.py`
- Modify: `backend/app/api/crm_contract_routes.py`
- Create: `docs/sql/migrations/2026-08-08-merge-approver-setting-menu.sql`
- [x] save 守卫改为 `system:approverSetting`
- [x] 幂等:INSERT 新菜单、UPDATE 旧 visible=0、迁移 role_menu
### Task 3: 图谱更新
- [x] `./scripts/update-graph.sh frontend`(及 backend 若改了 API)