feat: some
All checks were successful
构建并部署前端到测试环境 / deploy (push) Successful in 55s

This commit is contained in:
luo
2026-09-22 12:14:47 +08:00
parent c136f68ab8
commit 0a28b7d8ef
19 changed files with 608 additions and 117 deletions

View File

@@ -0,0 +1,19 @@
# Change: 对齐业务用户组成员增量管理接口
## Why
《产品迭代8月份/修改.md》已将业务用户组成员维护从“整体替换”调整为增量增加/迁移和按组移除。当前前端仍调用旧 PUT/全局 DELETE 接口,无法展示候选成员归属和操作提示。
## What Changes
- 对齐成员查询、成员候选、增量增加/迁移、按组移除接口。
- 成员管理弹窗展示当前成员及成员关系信息。
- 候选账号展示 `add`、`already_member`、`move` 操作提示。
- 停用组允许查询和移除,但新增/迁移由后端拒绝并提示。
- 用户组列表/详情使用实时成员数。
## Impact
- Affected specs: `business-user-group-management`
- Affected code: business user group types/API/page
- Breaking API alignment: 移除前端对旧整体替换 PUT 与全局清空 DELETE 的调用。

View File

@@ -0,0 +1,17 @@
## ADDED Requirements
### Requirement: Incremental Business User Group Membership
The frontend SHALL use the member query, candidate query, incremental POST add/move, and scoped DELETE remove contracts from the modification document.
#### Scenario: Add or move members
- **WHEN** the user selects candidate accounts and confirms adding members
- **THEN** the frontend MUST POST the account IDs to `/api/admin/business-user-groups/{id}/members`
- **AND** MUST refresh current members and member counts
#### Scenario: Remove current members
- **WHEN** the user selects members currently belonging to the group and confirms removal
- **THEN** the frontend MUST DELETE `/api/admin/business-user-groups/{id}/members` with the account IDs
- **AND** MUST refresh current members

View File

@@ -0,0 +1,14 @@
## 1. Contract
- [ ] 1.1 更新成员、候选和成员数类型。
- [ ] 1.2 更新 `BusinessUserGroupService` 方法与 HTTP 方法/路径。
## 2. UI
- [ ] 2.1 展示当前成员列表和成员状态。
- [ ] 2.2 使用候选接口展示归属筛选和操作提示。
- [ ] 2.3 将“整体替换”改为增量添加/迁移,将移除限定为当前组成员。
## 3. Verification
- [ ] 3.1 运行类型检查、lint、编码检查、构建和 OpenSpec 校验。

View File

@@ -0,0 +1,9 @@
## Context
核销申请的审批提交状态与业务状态独立维护。恢复操作只能复用最新审批尝试和原审批实例,不能创建新的申请或审批尝试。
## Decisions
- 资格以响应中的 `recoverable` 为准,前端不根据状态字段自行推导。
- 列表提供快速入口,详情提供主要操作入口;两处共用同一恢复权限编码。
- 恢复接口只传申请 ID,结果由后端返回并触发重新加载。

View File

@@ -0,0 +1,25 @@
# Change: 补齐核销申请恢复审批
## Why
《产品迭代8月份/修改.md》新增核销申请恢复原审批接口和恢复资格字段。当前前端类型、列表和详情尚未提供恢复入口,提交失败或结果未知的核销申请无法由运营人员处理。
## What Changes
- 扩展核销申请响应类型,支持 `recoverable`、提交状态、失败摘要和最近恢复时间。
- 新增 `EmployeeCollectionService.recoverApplicationApproval(id)`。
- 核销申请列表和详情在 `recoverable = true` 且具备权限时显示“恢复审批”。
- 恢复成功或冲突后刷新详情/列表,并展示后端错误消息。
- 新增权限 `employee_collection:application_recover_approval` 并写入权限文档。
## Impact
- Affected specs: `employee-collection`
- Affected code:
- `src/types/api/employeeCollection.ts`
- `src/api/modules/employeeCollection.ts`
- `src/config/constants/augustIteration.ts`
- `src/views/finance/employee-collection/applications/index.vue`
- `src/views/finance/employee-collection/applications/detail.vue`
- `docs/权限.md`
- Out of scope: 后端接口、数据库和企业微信审批引擎实现。

View File

@@ -0,0 +1,12 @@
## ADDED Requirements
### Requirement: Recover Employee Collection Approval
The frontend SHALL expose recovery for an employee collection application only when the backend returns `recoverable = true` and the user has the recovery permission.
#### Scenario: Recover approval from application detail
- **GIVEN** a核销申请返回 `recoverable = true`
- **WHEN** the user confirms “恢复审批”
- **THEN** the frontend MUST call `POST /api/admin/employee-collection-applications/{id}/recover-approval`
- **AND** MUST reload the application data after success or conflict

View File

@@ -0,0 +1,12 @@
## 1. Implementation
- [x] 1.1 扩展核销申请类型与恢复接口响应。
- [x] 1.2 增加恢复审批 API service 和唯一权限编码。
- [x] 1.3 列表增加提交状态字段和恢复审批操作。
- [x] 1.4 详情增加提交状态字段和恢复审批操作。
- [x] 1.5 更新 `docs/权限.md`。
## 2. Verification
- [x] 2.1 运行类型检查、lint、编码检查和构建。
- [x] 2.2 运行 OpenSpec 严格校验。