docs: 补充收银系统菜单数据结构
- 添加菜单 JSON 结构说明(code/type/icon/path/permission/buttons) - 添加完整菜单配置 JSON(第 8 节) - 添加权限标识汇总表
This commit is contained in:
@@ -36,7 +36,58 @@
|
||||
|
||||
> ⚠️ **注意**:收银系统相关 Issue 应提交到 `rui/rui-cashier` 仓库,不是 `spring-ai`
|
||||
|
||||
### 2.2 整体架构
|
||||
### 2.2 菜单数据结构
|
||||
|
||||
系统菜单使用以下 JSON 结构:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "cashier",
|
||||
"menus": [
|
||||
{
|
||||
"code": "cashier",
|
||||
"name": "收银系统",
|
||||
"type": 1,
|
||||
"icon": "tabler:money",
|
||||
"sortNo": 100,
|
||||
"children": [
|
||||
{
|
||||
"code": "store",
|
||||
"name": "门店管理",
|
||||
"type": 2,
|
||||
"icon": "tabler:building-store",
|
||||
"path": "/cashier/store",
|
||||
"permission": "cashier:store:list",
|
||||
"sortNo": 1,
|
||||
"buttons": [
|
||||
{ "code": "btn:add", "name": "新增", "permission": "cashier:store:add" },
|
||||
{ "code": "btn:edit", "name": "编辑", "permission": "cashier:store:edit" },
|
||||
{ "code": "btn:del", "name": "删除", "permission": "cashier:store:delete" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**字段说明:**
|
||||
|
||||
| 字段 | 类型 | 说明 |
|
||||
|------|------|------|
|
||||
| `code` | string | 菜单编码,唯一标识 |
|
||||
| `name` | string | 菜单显示名称 |
|
||||
| `type` | int | 1=目录,2=菜单,3=按钮 |
|
||||
| `icon` | string | 图标,支持 `tabler:` 前缀或 Element Plus 图标名 |
|
||||
| `path` | string | 路由路径(type=2时必填) |
|
||||
| `permission` | string | 权限标识,格式:`模块:功能:操作` |
|
||||
| `sortNo` | int | 排序号,越小越靠前 |
|
||||
| `children` | array | 子菜单列表 |
|
||||
| `buttons` | array | 页面按钮权限(type=2时可选) |
|
||||
|
||||
**收银系统完整菜单配置见第 2.9 节。**
|
||||
|
||||
### 2.3 整体架构
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
@@ -1133,4 +1184,132 @@ app/rui-cashier/
|
||||
|
||||
---
|
||||
|
||||
## 八、收银系统菜单配置
|
||||
|
||||
### 8.1 完整菜单 JSON
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "cashier",
|
||||
"menus": [
|
||||
{
|
||||
"code": "cashier",
|
||||
"name": "收银系统",
|
||||
"type": 1,
|
||||
"icon": "tabler:money",
|
||||
"sortNo": 100,
|
||||
"children": [
|
||||
{
|
||||
"code": "store",
|
||||
"name": "门店管理",
|
||||
"type": 2,
|
||||
"icon": "tabler:building-store",
|
||||
"path": "/cashier/store",
|
||||
"permission": "cashier:store:list",
|
||||
"sortNo": 1,
|
||||
"buttons": [
|
||||
{ "code": "btn:add", "name": "新增", "permission": "cashier:store:add" },
|
||||
{ "code": "btn:edit", "name": "编辑", "permission": "cashier:store:edit" },
|
||||
{ "code": "btn:del", "name": "删除", "permission": "cashier:store:delete" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "room",
|
||||
"name": "包间管理",
|
||||
"type": 2,
|
||||
"icon": "tabler:door",
|
||||
"path": "/cashier/room",
|
||||
"permission": "cashier:room:list",
|
||||
"sortNo": 2,
|
||||
"buttons": [
|
||||
{ "code": "btn:add", "name": "新增", "permission": "cashier:room:add" },
|
||||
{ "code": "btn:edit", "name": "编辑", "permission": "cashier:room:edit" },
|
||||
{ "code": "btn:del", "name": "删除", "permission": "cashier:room:delete" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "product",
|
||||
"name": "商品管理",
|
||||
"type": 2,
|
||||
"icon": "tabler:package",
|
||||
"path": "/cashier/product",
|
||||
"permission": "cashier:product:list",
|
||||
"sortNo": 3,
|
||||
"buttons": [
|
||||
{ "code": "btn:add", "name": "新增", "permission": "cashier:product:add" },
|
||||
{ "code": "btn:edit", "name": "编辑", "permission": "cashier:product:edit" },
|
||||
{ "code": "btn:del", "name": "删除", "permission": "cashier:product:delete" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "pricing",
|
||||
"name": "定价策略",
|
||||
"type": 2,
|
||||
"icon": "tabler:tags",
|
||||
"path": "/cashier/pricing",
|
||||
"permission": "cashier:pricing:list",
|
||||
"sortNo": 4,
|
||||
"buttons": [
|
||||
{ "code": "btn:add", "name": "新增", "permission": "cashier:pricing:add" },
|
||||
{ "code": "btn:edit", "name": "编辑", "permission": "cashier:pricing:edit" },
|
||||
{ "code": "btn:del", "name": "删除", "permission": "cashier:pricing:delete" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "order",
|
||||
"name": "订单管理",
|
||||
"type": 2,
|
||||
"icon": "tabler:file-invoice",
|
||||
"path": "/cashier/order",
|
||||
"permission": "cashier:order:list",
|
||||
"sortNo": 5,
|
||||
"buttons": [
|
||||
{ "code": "btn:add", "name": "开台", "permission": "cashier:order:add" },
|
||||
{ "code": "btn:checkout", "name": "结账", "permission": "cashier:order:checkout" },
|
||||
{ "code": "btn:refund", "name": "退款", "permission": "cashier:order:refund" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "report",
|
||||
"name": "营业报表",
|
||||
"type": 2,
|
||||
"icon": "tabler:chart-bar",
|
||||
"path": "/cashier/report",
|
||||
"permission": "cashier:report:list",
|
||||
"sortNo": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### 8.2 权限标识汇总
|
||||
|
||||
| 模块 | 权限标识 | 说明 |
|
||||
|------|----------|------|
|
||||
| 门店 | `cashier:store:list` | 查询门店 |
|
||||
| 门店 | `cashier:store:add` | 新增门店 |
|
||||
| 门店 | `cashier:store:edit` | 编辑门店 |
|
||||
| 门店 | `cashier:store:delete` | 删除门店 |
|
||||
| 包间 | `cashier:room:list` | 查询包间 |
|
||||
| 包间 | `cashier:room:add` | 新增包间 |
|
||||
| 包间 | `cashier:room:edit` | 编辑包间 |
|
||||
| 包间 | `cashier:room:delete` | 删除包间 |
|
||||
| 商品 | `cashier:product:list` | 查询商品 |
|
||||
| 商品 | `cashier:product:add` | 新增商品 |
|
||||
| 商品 | `cashier:product:edit` | 编辑商品 |
|
||||
| 商品 | `cashier:product:delete` | 删除商品 |
|
||||
| 定价 | `cashier:pricing:list` | 查询定价策略 |
|
||||
| 定价 | `cashier:pricing:add` | 新增定价策略 |
|
||||
| 定价 | `cashier:pricing:edit` | 编辑定价策略 |
|
||||
| 定价 | `cashier:pricing:delete` | 删除定价策略 |
|
||||
| 订单 | `cashier:order:list` | 查询订单 |
|
||||
| 订单 | `cashier:order:add` | 开台 |
|
||||
| 订单 | `cashier:order:checkout` | 结账 |
|
||||
| 订单 | `cashier:order:refund` | 退款 |
|
||||
| 报表 | `cashier:report:list` | 查看报表 |
|
||||
|
||||
---
|
||||
|
||||
*文档结束*
|
||||
|
||||
Reference in New Issue
Block a user