承销商管理 — 前端技术方案
依据:承销商管理功能需求.md、承销商管理技术方案.md;布局对齐 tradeMarket/supplier/index.vue(双 el-card);字段 小驼峰。
1. 页面与路由
| 项 |
说明 |
| Vue 路径 |
ruoyi-ui/src/views/tradeMarket/distributor/index.vue |
| 组件名 |
TradeMarketDistributor |
| 菜单配置 |
组件路径:tradeMarket/distributor/index(「交易市场平台」目录下,手工配置) |
| 权限前缀 |
tradeMarket:distributor:list\|query\|add\|edit\|remove\|assignAccount |
2. API 模块
| 项 |
说明 |
| 文件 |
ruoyi-ui/src/api/tradeMarket/distributor.js |
| Base |
/tradeMarket/distributor |
| 方法 |
HTTP |
说明 |
listDistributor |
GET |
/list |
getDistributor |
GET |
/{id} |
addDistributor |
POST |
/ |
updateDistributor |
PUT |
/ |
delDistributor |
DELETE |
/{ids} |
assignAccountDistributor |
POST |
/assignAccount/{id} |
3. 页面结构
- 筛选区:承销商编号、承销商名称(模糊,原样提交由后端
LIKE);搜索、重置、新增。
- 列表区:编号、名称、类型、身份识别号、联系方式、经营地点、销售去向、操作。
- 新增/编辑弹窗:编号只读(保存后自动生成);类型联动身份字段;销售去向三选一。
- 查看弹窗:全部业务字段、销售去向、审计信息;可编辑/删除。
4. 业务规则(前端)
| 规则 |
实现 |
| 承销商编号 |
新增不传;编辑只读 distributorCode;保存后必有 2 位编号 |
| 类型与证件 |
1 个体户 / 2 企业;ID_CARD_REG / USCC_REG |
| 销售去向 |
1 本市、2 本省、3 外省;必选 |
| 列表筛选 |
查询参数 distributorCode、distributorName 模糊匹配(后端实现) |
| 与供应商差异 |
无收费方式/费率、无车辆号牌;筛选为模糊非精确 |
| 分配账号 |
同供应商:canAssignAccount;角色后端绑定 104 |
枚举常量
| 常量 |
值 |
| 个体户 |
distributorType = 1 |
| 企业 |
distributorType = 2 |
| 本市 |
salesDestination = 1 |
| 本省 |
salesDestination = 2 |
| 外省 |
salesDestination = 3 |
5. 国际化
| 项 |
说明 |
| 语言包 |
tradeMarket.distributor(lang/zh/tradeMarket.js、lang/bo/tradeMarket.js) |
| Mixin |
tradeMarketLocaleMixin,tmNs = 'distributor' |
| 公共文案 |
tradeMarket.common.*(与供应商模块共用) |
6. 联调说明
- 部署
BizDistributorController 及 biz_distributor 表。
- 菜单
tradeMarket/distributor/index,权限与后端 §4 一致。
- 验证:模糊筛选、销售去向三档、编号不可改、逻辑删除、分配账号、双语切换。
7. 文件清单
| 类型 |
路径 |
| 页面 |
ruoyi-ui/src/views/tradeMarket/distributor/index.vue |
| API |
ruoyi-ui/src/api/tradeMarket/distributor.js |
| i18n |
ruoyi-ui/src/lang/zh/tradeMarket.js、lang/bo/tradeMarket.js(distributor 节点) |
8. 修订记录
| 版本 |
说明 |
| 1.0 |
初版:双卡片 CRUD;销售去向;模糊筛选;复用 tradeMarket 公共 i18n 与 mixin |
| 1.1 |
移除车辆号牌相关 UI、校验与 i18n(对齐修订草稿) |
| 1.2 |
分配账号 API/列表列/操作按钮(对齐功能需求 §5.6) |