feat:代理现金余额不足100元展示、店铺业务员选择展示与筛选
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m34s

This commit is contained in:
luo
2026-07-20 12:17:02 +08:00
parent ca338dd345
commit e95dc8e4f5
12 changed files with 334 additions and 49 deletions

View File

@@ -0,0 +1,80 @@
## ADDED Requirements
### Requirement: Shop Platform Salesperson Assignment
The system SHALL allow users to assign or clear an optional platform salesperson for a shop during shop creation and editing. The assignment SHALL represent only business ownership and notification relationship and MUST NOT create distribution, commission, or hierarchy behavior.
#### Scenario: Assign an enabled platform account during shop creation
- **GIVEN** 用户进入店铺新建表单
- **WHEN** 用户在“平台业务员”可搜索下拉中选择一个启用的平台账号
- **THEN** 系统 MUST 提交该账号的 `business_owner_account_id`
- **AND** 候选项 MUST 展示账号名和手机号摘要
#### Scenario: Edit a shop salesperson assignment
- **GIVEN** 用户进入已存在店铺的编辑表单
- **WHEN** 用户选择不同的启用平台账号
- **THEN** 系统 MUST 在 `PUT /api/admin/shops/{id}` 请求中提交新的 `business_owner_account_id`
#### Scenario: Clear a shop salesperson assignment
- **GIVEN** 店铺已绑定平台业务员
- **WHEN** 用户清空“平台业务员”选择器并提交编辑表单
- **THEN** 系统 MUST 提交 `business_owner_account_id: null`
- **AND** 店铺不再关联该业务员
#### Scenario: Do not expose disabled accounts as editable candidates
- **WHEN** 用户打开或搜索“平台业务员”选择器
- **THEN** 系统 MUST 仅查询 `account_type=platform``status=1` 的账号
- **AND** 已停用平台账号 MUST NOT 作为新建或编辑候选项显示
#### Scenario: No eligible salesperson exists
- **GIVEN** 不存在启用的平台账号
- **WHEN** 用户打开“平台业务员”选择器
- **THEN** 系统 MUST 显示无可选账号状态
- **AND** 用户仍 MUST 能够不选择业务员完成表单提交
### Requirement: Shop Salesperson List Filtering And Display
The shop list SHALL display the assigned salesperson and support filtering by `business_owner_account_id`.
#### Scenario: Display salesperson in shop list
- **WHEN** 用户查看店铺列表
- **THEN** 列表 MUST 显示业务员列
- **AND** 已绑定业务员的行 MUST 展示 `business_owner_name``business_owner_phone_masked`
#### Scenario: Filter shops by salesperson
- **WHEN** 用户在店铺列表选择一个平台业务员作为筛选条件
- **THEN** 前端 MUST 在 `GET /api/admin/shops` 请求中提交该账号的 `business_owner_account_id`
- **AND** 列表 MUST 仅展示后端返回的匹配店铺
#### Scenario: Display historical disabled salesperson in list
- **GIVEN** 店铺历史上已绑定的平台业务员后来被停用
- **WHEN** 用户查看店铺列表
- **THEN** 列表 MUST 继续展示该店铺返回的 `business_owner_name``business_owner_phone_masked`
### Requirement: Shop Detail Salesperson Display
The shop detail SHALL display the assigned salesperson name and masked phone from the shop detail response, including historical assignments to disabled accounts.
#### Scenario: Display salesperson in shop detail
- **WHEN** 用户查看已绑定平台业务员的店铺详情
- **THEN** 页面 MUST 展示业务员名称和手机号摘要
#### Scenario: Display historical disabled salesperson in detail
- **GIVEN** 店铺绑定的业务员已停用
- **WHEN** 用户查看该店铺详情
- **THEN** 页面 MUST 继续使用详情响应中的 `business_owner_name``business_owner_phone_masked` 展示历史业务员信息
#### Scenario: Do not add distribution or commission semantics
- **WHEN** 用户查看店铺新建、编辑、列表或详情页面
- **THEN** 页面 MUST NOT 将平台业务员描述为分销关系、佣金关系或发展层级