Files
shanxia2.0/docs/superpowers/specs/2026-08-01-contract-approver-setting-design.md
T
zlwuandCursor 06956b742b feat(crm): add tenant-level contract approver setting with submit prefill
Mirror the quote approver setting so contract submit dialogs can prefill ordered approvers from a tenant config page while remaining editable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 13:37:23 +08:00

42 lines
1.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.
# 合同审批人设置(租户级默认审批人)
**日期:** 2026-08-01
**状态:** 已实现
**选定方案:** A — 1:1 复用「报价单审批人设置」
**对照:** `docs/superpowers/specs/2026-08-01-quote-approver-setting-design.md`
## 1. 目标
1. 管理员在「合同审批人设置」配置租户级有序默认审批人。
2. 合同「提交审批」弹窗(`ApprovalDialog`,含批量)自动预填,可改。
3. 未配置 / 停用时与现网一致(审批人必填、手选)。
## 2. 非目标
与报价单首版相同:无默认备注、无部门/金额分岔、不共用报价设置表、不接工作流引擎。
## 3. 决策(继承报价单)
| 项 | 决策 |
|----|------|
| 粒度 | 租户级一份 |
| 提交可改 | 可以 |
| 维护权限 | 菜单 `crm:contract:approverSetting` |
| 未配置 | 手选 |
| 空配置 get | `{ approverIds: [], status: '0' }`(避免首次落到停用) |
## 4. 数据 / API / UI
- 表:`crm_contract_approver_setting`(字段同 `crm_quote_approver_setting`)
- API:`POST /web/crm/contract-approver-setting/get|save`
- 页:`#/crm/contract-approver-setting` → `views/crm/contract/approver-setting/index.vue`
- 预填:仅改 `contract/components/ApprovalDialog.vue`(列表/表单/详情均复用该弹窗)
- 菜单 ID:`CRM3000000000000000000000000026`
## 5. 验收
1. 设置启用审批人后,提交审批弹窗预填且可改。
2. 停用/清空后恢复手选。
3. 无设置菜单权限不可 save;有合同权限可读 get。
4. 租户隔离。