This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,6 +2,9 @@ node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
docs
|
||||
!docs/
|
||||
docs/*
|
||||
!docs/权限.md
|
||||
dist-ssr
|
||||
*.local
|
||||
.cursorrules
|
||||
|
||||
235
docs/权限.md
Normal file
235
docs/权限.md
Normal file
@@ -0,0 +1,235 @@
|
||||
# 权限清单
|
||||
|
||||
## 套餐管理:真流量预警规则
|
||||
|
||||
页面 URL:`/package-management/traffic-alert-rules`
|
||||
|
||||
| 类型 | 权限名称 | 权限编码 |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| 页面查看 | `rulesView` | `package_traffic_alert:rules_view` |
|
||||
| 新增规则 | `ruleCreate` | `package_traffic_alert:rule_create` |
|
||||
| 编辑规则 | `ruleUpdate` | `package_traffic_alert:rule_update` |
|
||||
| 启用规则 | `ruleEnable` | `package_traffic_alert:rule_enable` |
|
||||
| 停用规则 | `ruleDisable` | `package_traffic_alert:rule_disable` |
|
||||
|
||||
启用和停用不得复用编辑权限。
|
||||
|
||||
## 套餐管理:真流量达量预警
|
||||
|
||||
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
||||
| --- | --- | --- | --- |
|
||||
| 预警列表 | `/package-management/traffic-alerts` | `recordsView` | `package_traffic_alert:records_view` |
|
||||
| 预警详情 | `/package-management/traffic-alerts/detail/:id` | `recordDetail` | `package_traffic_alert:record_detail` |
|
||||
| 导出预警记录 | — | `export` | `package_traffic_alert:export` |
|
||||
| 导出任务页面 | `/asset-management/export-task-management/export-package-traffic-alert` | `page` | `export_task:package_traffic_alert_page` |
|
||||
|
||||
## 店铺管理:店铺列表
|
||||
|
||||
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
||||
| --- | --- | --- | --- |
|
||||
| 店铺列表 | `/shop-management/list` | `listView` | `shop:list_view` |
|
||||
| 店铺详情 | `/shop-management/detail/:id` | `detailView` | `shop:detail_view` |
|
||||
| 新增店铺 | — | — | `shop:add` |
|
||||
| 批量交接 | — | `batch` | `shop:business_owner_batch` |
|
||||
| 导入业务员 | — | `importPage` | `shop:business_owner_import_view` |
|
||||
| 查看店铺详情 | — | — | `shop:detail` |
|
||||
| 切换店铺状态 | — | — | `shop:modify_status` |
|
||||
| 账号列表 | — | — | `shop:look_customer` |
|
||||
| 默认角色 | — | — | `shop:default_role` |
|
||||
| 调整实际信用额度 | — | — | `shop:credit_limit_manage` |
|
||||
| 编辑店铺 | — | — | `shop:edit` |
|
||||
| 删除店铺 | — | — | `shop:delete` |
|
||||
| 审计记录 | — | — | `audit:shop_entry` / `audit:agent_resource_activity` |
|
||||
| 资金链路 | — | — | `audit:finance_timeline` |
|
||||
|
||||
## 店铺管理:业务用户组
|
||||
|
||||
页面 URL:`/shop-management/business-user-groups`
|
||||
|
||||
| 类型 | 权限名称 | 权限编码 |
|
||||
| -------- | --------- | ----------------------------- |
|
||||
| 页面查看 | `page` | `business_user_group:page` |
|
||||
| 新增 | `create` | `business_user_group:create` |
|
||||
| 编辑 | `update` | `business_user_group:update` |
|
||||
| 删除 | `delete` | `business_user_group:delete` |
|
||||
| 成员管理 | `members` | `business_user_group:members` |
|
||||
|
||||
## 店铺管理:业务负责人导入
|
||||
|
||||
页面 URL:`/shop-management/business-owner-import`
|
||||
|
||||
| 类型 | 权限名称 | 权限编码 |
|
||||
| ---------------------------- | -------------- | ----------------------------------- |
|
||||
| 页面查看 | `importPage` | `shop:business_owner_import_view` |
|
||||
| 创建导入任务 | `importCreate` | `shop:business_owner_import_create` |
|
||||
| 详情按钮 | `importDetail` | `shop:business_owner_import_detail` |
|
||||
| 详情页面(当前为列表页抽屉) | `importDetail` | `shop:business_owner_import_detail` |
|
||||
|
||||
## 店铺管理:代理注册申请
|
||||
|
||||
列表不显示操作列,点击“申请店铺”名称进入详情页。
|
||||
|
||||
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
||||
| --- | --- | --- | --- |
|
||||
| 申请列表 | `/shop-management/agent-distribution-registrations` | `list` | `agent_distribution_registration:list` |
|
||||
| 申请详情 | `/shop-management/agent-distribution-registrations/detail/:id` | `detail` | `agent_distribution_registration:detail` |
|
||||
| 恢复审批 | — | `recoverApproval` | `agent_distribution_registration:recover_approval` |
|
||||
|
||||
## 资产管理:手机号资产关联
|
||||
|
||||
页面 URL:`/asset-management/phone-asset-association`
|
||||
|
||||
| 类型 | 权限名称 | 权限编码 |
|
||||
| ---------------- | -------------------- | ---------------------------------------------- |
|
||||
| 页面查看 | `list` | `phone_asset_association:list` |
|
||||
| 单条解绑 | `unbind` | `phone_asset_association:unbind` |
|
||||
| 批量解绑 | `unbindBatch` | `phone_asset_association:unbind_batch` |
|
||||
| 解绑导入页面 | `unbindImportPage` | `phone_asset_association:unbind_import_view` |
|
||||
| 创建解绑导入任务 | `unbindImportCreate` | `phone_asset_association:unbind_import_create` |
|
||||
|
||||
## 资产管理:解绑导入任务
|
||||
|
||||
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
||||
| --- | --- | --- | --- |
|
||||
| 任务列表 | `/asset-management/task-management/phone-asset-unbind-import-tasks` | `unbindImportPage` | `phone_asset_association:unbind_import_page` |
|
||||
| 任务详情 | `/asset-management/task-management/phone-asset-unbind-import-tasks/detail` | `unbindImportDetail` | `phone_asset_association:unbind_import_detail` |
|
||||
| 详情按钮 | — | `unbindImportDetail` | `asset_association:unbind_import_detail` |
|
||||
|
||||
## 资产管理:临期资产
|
||||
|
||||
页面 URL:`/asset-management/expiring-assets`
|
||||
|
||||
| 类型 | 权限名称 | 权限编码 |
|
||||
| -------- | -------- | ----------------------- |
|
||||
| 页面查看 | `page` | `expiring_asset:page` |
|
||||
| 导出 | `export` | `expiring_asset:export` |
|
||||
|
||||
## 资产管理:导出任务页面
|
||||
|
||||
详情按钮为导出任务列表中的任务编号点击入口,权限编码按导出场景区分;详情页面统一使用 `id` 查询参数。
|
||||
|
||||
| 导出场景 | 列表页面 URL | 页面权限编码 | 详情按钮权限编码 | 详情页面 URL |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| 设备 | `/asset-management/export-task-management/export-device` | `export_task:device_page` | `export_task:device_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| IoT 卡 | `/asset-management/export-task-management/export-iot-card` | `export_task:iot_card_page` | `export_task:iot_card_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| 订单 | `/asset-management/export-task-management/export-order` | `export_task:order_page` | `export_task:order_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| 套餐 | `/asset-management/export-task-management/export-package` | `export_task:package_page` | `export_task:package_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| 代理主钱包流水 | `/asset-management/export-task-management/export-agent-wallet-transaction` | `export_task:agent_wallet_transaction_page` | `export_task:agent_wallet_transaction_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| 代理充值 | `/asset-management/export-task-management/export-agent-recharge` | `export_task:agent_recharge_page` | `export_task:agent_recharge_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| 退款 | `/asset-management/export-task-management/export-refund` | `export_task:refund_page` | `export_task:refund_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| 换货 | `/asset-management/export-task-management/export-exchange` | `export_task:exchange_page` | `export_task:exchange_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| 佣金明细 | `/asset-management/export-task-management/export-commission-record` | `export_task:commission_record_page` | `export_task:commission_record_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| 套餐真流量达量预警 | `/asset-management/export-task-management/export-package-traffic-alert` | `export_task:package_traffic_alert_page` | `export_task:package_traffic_alert_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| 临期资产 | `/asset-management/export-task-management/export-expiring-asset` | `export_task:expiring_asset_page` | `export_task:expiring_asset_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| 设备激活报表 | `/asset-management/export-task-management/export-operations-activation` | `export_task:operations_activation_page` | `export_task:operations_activation_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
| 套餐续费报表 | `/asset-management/export-task-management/export-operations-renewal` | `export_task:operations_renewal_page` | `export_task:operations_renewal_detail` | `/asset-management/export-task-management/export-task-detail?id=:id` |
|
||||
|
||||
## 财务管理:退款管理
|
||||
|
||||
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
||||
| --------- | ---------------------------- | ----------------- | ------------------------- |
|
||||
| 退款列表 | `/finance/refund` | `page` | `refund:page` |
|
||||
| 退款详情 | `/finance/refund/detail/:id` | `detailPage` | `refund:detail_page` |
|
||||
| 恢复审批 | — | `recoverApproval` | `refund:recover_approval` |
|
||||
|
||||
## 财务管理:员工代收款账单
|
||||
|
||||
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
||||
| --- | --- | --- | --- |
|
||||
| 账单列表 | `/finance/employee-collection/bills` | `billPage` | `employee_collection:bill_view` |
|
||||
| 账单详情 | `/finance/employee-collection/bills/detail/:id` | `billDetail` | `employee_collection:bill_detail` |
|
||||
| 创建核销申请 | — | `applicationCreate` | `employee_collection:application_create` |
|
||||
| 关闭账单 | — | `billClose` | `employee_collection:bill_close` |
|
||||
|
||||
## 财务管理:核销申请
|
||||
|
||||
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
||||
| --- | --- | --- | --- |
|
||||
| 申请列表 | `/finance/employee-collection/applications` | `applicationPage` | `employee_collection:application_view` |
|
||||
| 申请详情 | `/finance/employee-collection/applications/detail/:id` | `applicationDetail` | `employee_collection:application_detail` |
|
||||
| 修改并重新提交 | — | `applicationUpdate` | `employee_collection:application_update` |
|
||||
| 查看凭证 | — | `applicationViewVoucher` | `employee_collection:application_view_voucher` |
|
||||
|
||||
## 财务管理:收款方式管理
|
||||
|
||||
页面 URL:`/finance/employee-collection/payment-methods`
|
||||
|
||||
| 类型 | 权限名称 | 权限编码 |
|
||||
| -------- | --------------------- | ------------------------------------------- |
|
||||
| 页面查看 | `paymentMethodPage` | `employee_collection:payment_method_view` |
|
||||
| 新增 | `paymentMethodCreate` | `employee_collection:payment_method_create` |
|
||||
| 编辑 | `paymentMethodEdit` | `employee_collection:payment_method_edit` |
|
||||
| 删除 | `paymentMethodDelete` | `employee_collection:payment_method_delete` |
|
||||
|
||||
## 财务管理:代理商资金概况
|
||||
|
||||
页面 URL:`/finance/agent-fund-overview`
|
||||
|
||||
| 类型 | 权限名称 | 权限编码 |
|
||||
| ------------ | ------------------ | --------------------------------------- |
|
||||
| 页面查看 | `page` | `agent_fund_overview:page` |
|
||||
| 佣金明细导出 | `commissionExport` | `agent_fund_overview:commission_export` |
|
||||
|
||||
## 设置:商户池管理
|
||||
|
||||
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
||||
| --- | --- | --- | --- |
|
||||
| 管理页面 | `/settings/payment-merchant-pools` | `page` | `payment_merchant_pool:page` |
|
||||
| 商户详情 | `/settings/payment-merchant-pools/detail/:id` | `merchantDetail` | `payment_merchant_pool:merchant_detail` |
|
||||
| 商户池详情 | `/settings/payment-merchant-pools/pool-detail/:id` | `poolDetail` | `payment_merchant_pool:pool_detail` |
|
||||
| 新增/编辑/启停/删除商户 | — | — | `payment_merchant_pool:merchant_create` / `merchant_edit` / `merchant_toggle` / `merchant_delete` |
|
||||
| 新增/编辑/启停商户池 | — | — | `payment_merchant_pool:pool_create` / `pool_edit` / `pool_toggle` |
|
||||
| 保存微信授权配置 | — | `wechatAuthEdit` | `payment_merchant_pool:wechat_auth_edit` |
|
||||
|
||||
## 设置:H5运营弹窗配置
|
||||
|
||||
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
||||
| --- | --- | --- | --- |
|
||||
| 配置列表 | `/settings/h5-popup-configuration` | `list` | `h5_popup_configuration:list` |
|
||||
| 配置详情 | `/settings/h5-popup-configuration/detail/:id` | `detail` | `h5_popup_configuration:detail` |
|
||||
| 新增/编辑/启用/停用 | — | — | `h5_popup_configuration:create` / `update` / `enable` / `disable` |
|
||||
|
||||
## 设置:资产钱包自动续费
|
||||
|
||||
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
||||
| --- | --- | --- | --- |
|
||||
| 页面查看 | `/settings/asset-wallet-auto-renewal` | `page` | `asset_wallet_auto_renewal:page` |
|
||||
| 保存配置 | — | `update` | `asset_wallet_auto_renewal:update` |
|
||||
|
||||
## 轮询管理:优先队列
|
||||
|
||||
页面 URL:`/polling-management/priority-queue`
|
||||
|
||||
| 类型 | 权限名称 | 权限编码 |
|
||||
| ------------ | -------- | ------------------------------- |
|
||||
| 页面查看 | `page` | `polling_priority_queue:page` |
|
||||
| 人工优先入队 | `create` | `polling_priority_queue:create` |
|
||||
| 查看详情 | `detail` | `polling_priority_queue:detail` |
|
||||
|
||||
## 运营报表:设备激活报表
|
||||
|
||||
页面 URL:`/operations-reports/activation`
|
||||
|
||||
| 类型 | 权限名称 | 权限编码 |
|
||||
| -------- | ------------------ | -------------------------------------- |
|
||||
| 页面查看 | `activationPage` | `operations_reports:activation_page` |
|
||||
| 导出 | `activationExport` | `operations_reports:activation_export` |
|
||||
|
||||
## 运营报表:套餐续费报表
|
||||
|
||||
页面 URL:`/operations-reports/renewal`
|
||||
|
||||
| 类型 | 权限名称 | 权限编码 |
|
||||
| -------- | --------------- | ----------------------------------- |
|
||||
| 页面查看 | `renewalPage` | `operations_reports:renewal_page` |
|
||||
| 导出 | `renewalExport` | `operations_reports:renewal_export` |
|
||||
|
||||
## 通用:导出任务详情
|
||||
|
||||
页面 URL:`/asset-management/export-task-management/export-task-detail`
|
||||
|
||||
- 页面权限:`export_task:detail_page`
|
||||
- 各场景详情权限:`export_task:<scene>_detail`
|
||||
- 各场景下载权限:`export_task:<scene>_download`
|
||||
|
||||
所有权限编码必须保持唯一;页面 URL 权限与按钮权限应分别定义。
|
||||
@@ -0,0 +1,16 @@
|
||||
## Context
|
||||
|
||||
代理注册申请由公开注册接口创建,后台需要按数据范围查询申请并展示审批提交状态。恢复审批只恢复原企业微信审批提交,不创建新的注册申请或审批实例。
|
||||
|
||||
## Decisions
|
||||
|
||||
- 使用列表页 + 独立详情页,详情页 URL 为 `/shop-management/agent-distribution-registrations/detail/:id`。
|
||||
- 列表和详情均使用后端返回的 `status`、`approval_status`、`submission_status` 和名称字段,不在前端推导状态。
|
||||
- 恢复按钮仅由后端返回的 `recoverable` 控制,并使用独立 `agent_distribution_registration:recover_approval` 权限。
|
||||
- 详情响应直接消费后端完整手机号和注册地址,不展示密码或内部审批字段。
|
||||
|
||||
## Risks / Mitigations
|
||||
|
||||
- 状态可能在列表与详情之间发生变化 → 详情和恢复成功/失败后重新加载后端数据。
|
||||
- 恢复请求并发冲突 → 后端返回错误时提示并刷新详情,不做乐观更新。
|
||||
- 手机号属于敏感业务数据 → 页面仅受注册申请列表/详情权限和后端数据范围控制。
|
||||
@@ -0,0 +1,31 @@
|
||||
# Change: 增加代理注册申请后台管理
|
||||
|
||||
## Why
|
||||
|
||||
后台目前无法查看代理扫码注册申请,也无法处理企业微信审批提交失败或结果未知的注册申请。根据 `docs/产品迭代8月份/代理注册管理.md`,需要提供申请列表、详情和恢复原审批提交入口。
|
||||
|
||||
## What Changes
|
||||
|
||||
- 新增后台代理注册申请列表页,支持状态、申请/决定时间、手机号、关键字、直接上级店铺和提交异常筛选。
|
||||
- 新增注册申请详情页,展示完整手机号、注册地址、申请店铺、分销码、业务状态、审批状态和企微提交状态。
|
||||
- 当 `recoverable = true` 时显示“恢复审批”,调用 `POST /api/admin/agent-distribution-registrations/{id}/recover-approval`,成功后刷新详情。
|
||||
- 新增代理注册申请 API、类型、路由和权限编码。
|
||||
- 权限编码:列表 `agent_distribution_registration:list`、详情 `agent_distribution_registration:detail`、恢复审批 `agent_distribution_registration:recover_approval`。
|
||||
|
||||
## Impact
|
||||
|
||||
- Affected specs: `agent-distribution-registration`
|
||||
- Affected code:
|
||||
- `src/api/modules/agentDistribution.ts`
|
||||
- `src/types/api/agentDistribution.ts`
|
||||
- `src/config/constants/augustIteration.ts`
|
||||
- `src/router/routesAlias.ts`
|
||||
- `src/router/routes/asyncRoutes.ts`
|
||||
- `src/views/shop-management/agent-distribution-registrations/index.vue`
|
||||
- `src/views/shop-management/agent-distribution-registrations/detail.vue`
|
||||
- `src/locales/langs/zh.json`
|
||||
- `docs/权限.md`
|
||||
- Out of scope:
|
||||
- C 端注册流程和代理登录流程。
|
||||
- 后端审批、数据库和企业微信回调实现。
|
||||
- 修改注册申请业务资料或审批结果。
|
||||
@@ -0,0 +1,33 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Agent Registration Application List
|
||||
|
||||
The admin frontend SHALL provide a paginated agent registration application list with the documented filters and backend response statuses.
|
||||
|
||||
#### Scenario: Filter registration applications
|
||||
|
||||
- **WHEN** an authorized user selects status, time, phone, keyword, parent shop, or submission anomaly filters
|
||||
- **THEN** the frontend MUST send those filters to `GET /api/admin/agent-distribution-registrations`
|
||||
- **AND** the list MUST display business, approval, and submission status names from the response
|
||||
|
||||
### Requirement: Agent Registration Application Detail
|
||||
|
||||
The admin frontend SHALL provide a detail page for `GET /api/admin/agent-distribution-registrations/{id}` and display the complete registration information returned by the backend.
|
||||
|
||||
#### Scenario: Open registration detail
|
||||
|
||||
- **WHEN** an authorized user opens a registration application
|
||||
- **THEN** the frontend MUST request the application detail by ID
|
||||
- **AND** MUST display the phone, address, shop, distribution code, business status, approval status, and submission status
|
||||
- **AND** MUST NOT display password or internal approval fields not present in the response
|
||||
|
||||
### Requirement: Recover Agent Registration Approval
|
||||
|
||||
The frontend SHALL expose `POST /api/admin/agent-distribution-registrations/{id}/recover-approval` only when `recoverable = true` and the user has the recovery permission.
|
||||
|
||||
#### Scenario: Recover approval
|
||||
|
||||
- **GIVEN** a registration response has `recoverable = true`
|
||||
- **WHEN** the user confirms “恢复审批”
|
||||
- **THEN** the frontend MUST call the recovery endpoint with only the registration ID
|
||||
- **AND** MUST refresh the detail after success or a state conflict
|
||||
@@ -0,0 +1,17 @@
|
||||
## 1. API And Types
|
||||
|
||||
- [x] 1.1 增加代理注册申请列表、详情和恢复审批 TypeScript 类型。
|
||||
- [x] 1.2 扩展 `AgentDistributionService`:列表、详情、恢复审批接口。
|
||||
- [x] 1.3 增加唯一权限常量 `list`、`detail`、`recoverApproval`。
|
||||
|
||||
## 2. Pages And Routes
|
||||
|
||||
- [x] 2.1 新增注册申请列表页和筛选条件。
|
||||
- [x] 2.2 新增详情页和审批/提交状态展示。
|
||||
- [x] 2.3 接入“恢复审批”按钮、确认、错误提示和刷新。
|
||||
- [x] 2.4 增加店铺管理下的列表/详情路由与中英文菜单文案。
|
||||
|
||||
## 3. Documentation And Verification
|
||||
|
||||
- [x] 3.1 将页面、详情和恢复审批权限写入 `docs/权限.md`。
|
||||
- [x] 3.2 运行类型检查、lint、编码检查、构建和 OpenSpec 校验。
|
||||
@@ -32,12 +32,14 @@
|
||||
### 3. 常量与权限
|
||||
|
||||
- **修改**: `src/config/constants/augustIteration.ts` — `AUGUST_PERMISSIONS` 新增 `packageTrafficAlert` 权限组
|
||||
- `trafficAlertRules: 'package_traffic_alert:rules_view'`
|
||||
- `trafficAlertRuleCreate: 'package_traffic_alert:rule_create'`
|
||||
- `trafficAlertRuleUpdate: 'package_traffic_alert:rule_update'`
|
||||
- `trafficAlertRecords: 'package_traffic_alert:records_view'`
|
||||
- `trafficAlertRecordDetail: 'package_traffic_alert:record_detail'`
|
||||
- `trafficAlertExport: 'package_traffic_alert:export'`
|
||||
- `rulesView: 'package_traffic_alert:rules_view'`
|
||||
- `ruleCreate: 'package_traffic_alert:rule_create'`
|
||||
- `ruleUpdate: 'package_traffic_alert:rule_update'`
|
||||
- `ruleEnable: 'package_traffic_alert:rule_enable'`
|
||||
- `ruleDisable: 'package_traffic_alert:rule_disable'`
|
||||
- `recordsView: 'package_traffic_alert:records_view'`
|
||||
- `recordDetail: 'package_traffic_alert:record_detail'`
|
||||
- `export: 'package_traffic_alert:export'`
|
||||
- **新增/修改**: 通知状态枚举常量(1 已通知 / 2 待投递 / 3 投递失败 / 4 未通知(接收人已失效)/ 5 未通知(无有效业务员))及对应 tag 类型映射
|
||||
- 若既有导出任务列表需要区分本场景,补充对应导出场景配置(场景值联调时与后端确认)
|
||||
|
||||
|
||||
@@ -2,6 +2,20 @@
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: 真流量预警规则按钮权限必须唯一
|
||||
|
||||
规则页面 SHALL 为查看、新增、编辑、启用和停用操作使用唯一的权限编码;启用和停用不得复用编辑权限。
|
||||
|
||||
#### Scenario: 按操作校验规则权限
|
||||
|
||||
- **WHEN** 用户访问真流量预警规则页面
|
||||
- **THEN** 页面查看权限 MUST 使用 `package_traffic_alert:rules_view`
|
||||
- **AND** “新增规则” MUST 使用 `package_traffic_alert:rule_create`
|
||||
- **AND** “编辑” MUST 使用 `package_traffic_alert:rule_update`
|
||||
- **AND** “启用” MUST 使用 `package_traffic_alert:rule_enable`
|
||||
- **AND** “停用” MUST 使用 `package_traffic_alert:rule_disable`
|
||||
- **AND** 上述权限编码 MUST 互不相同
|
||||
|
||||
### Requirement: 套餐真流量预警规则列表查询
|
||||
|
||||
系统 SHALL 提供套餐真流量预警规则列表查询页面,展示规则与套餐商品关联信息,支持按套餐商品与启用状态筛选和分页。
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
## 2. 常量与权限
|
||||
|
||||
- [x] 2.1 `src/config/constants/augustIteration.ts`:`AUGUST_PERMISSIONS` 新增 `packageTrafficAlert` 权限组(rules_view / rule_create / rule_update / records_view / record_detail / export)
|
||||
- [x] 2.1 `src/config/constants/augustIteration.ts`:`AUGUST_PERMISSIONS` 新增 `packageTrafficAlert` 权限组(rules_view / rule_create / rule_update / rule_enable / rule_disable / records_view / record_detail / export)
|
||||
- [x] 2.2 新增通知状态常量:枚举 1-5 文案(已通知/待投递/投递失败/未通知(接收人已失效)/未通知(无有效业务员))及 tag 类型映射
|
||||
- [x] 2.3 若导出任务列表需要场景区分,补充真流量预警导出场景配置(场景值与后端确认后更新 `EXPORT_TASK_SCENE_CONFIG` 及 `getExportTaskSceneName`)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
## 5. 路由、菜单与国际化
|
||||
|
||||
- [x] 5.1 `src/router/routesAlias.ts`:新增 `TrafficAlertRules` / `TrafficAlerts` / `TrafficAlertDetail`
|
||||
- [x] 5.2 `src/router/routes/asyncRoutes.ts`:套餐管理分组下新增规则页、记录页(keepAlive)与隐藏详情路由
|
||||
- [x] 5.2 `src/router/routes/asyncRoutes.ts`:套餐管理分组下新增规则页、记录页(keepAlive)与隐藏详情路由;规则页 URL `/package-management/traffic-alert-rules` 增加 `rulesView` 页面权限
|
||||
- [x] 5.3 `src/locales/langs/zh.json` / `en.json`:`menus.packageManagement` 新增 `trafficAlertRules` / `trafficAlerts` / `trafficAlertDetail`
|
||||
|
||||
## 6. 联调与验收
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
## 1. Contract And Types
|
||||
|
||||
- [ ] 1.1 在 `Refund` 列表/详情类型中增加 `submission_status`、`submission_status_name`、`approval_recoverable`、`approval_failure_summary`、`approval_last_recovery_at`。
|
||||
- [ ] 1.2 在 `RefundService` 增加 `recoverApproval(id)`,调用无请求体的 `POST /api/admin/refunds/{id}/recover-approval` 并返回完整 `Refund`。
|
||||
- [ ] 1.3 补充 API 注释和统一错误响应处理,明确不传审批实例 ID、材料或企业微信单号。
|
||||
- [x] 1.1 在 `Refund` 列表/详情类型中增加 `submission_status`、`submission_status_name`、`approval_recoverable`、`approval_failure_summary`、`approval_last_recovery_at`。
|
||||
- [x] 1.2 在 `RefundService` 增加 `recoverApproval(id)`,调用无请求体的 `POST /api/admin/refunds/{id}/recover-approval` 并返回完整 `Refund`。
|
||||
- [x] 1.3 补充 API 注释和统一错误响应处理,明确不传审批实例 ID、材料或企业微信单号。
|
||||
|
||||
## 2. Refund List And Detail
|
||||
|
||||
- [ ] 2.1 列表展示提交状态名称、脱敏失败摘要和最近恢复时间(按页面现有字段展示约定接入)。
|
||||
- [ ] 2.2 仅在 `approval_recoverable === true` 且通过现有退款管理权限/数据范围校验时显示“恢复审批”操作。
|
||||
- [ ] 2.3 恢复操作增加确认和请求中 loading,成功后刷新列表并展示最新响应数据。
|
||||
- [ ] 2.4 详情页展示上述字段和“恢复审批”操作;成功后刷新详情。
|
||||
- [ ] 2.5 处理状态冲突:提示“当前退款审批状态不允许恢复”,并刷新当前数据;其他后端错误沿用统一错误提示。
|
||||
- [x] 2.1 列表展示提交状态名称、脱敏失败摘要和最近恢复时间(按页面现有字段展示约定接入)。
|
||||
- [x] 2.2 仅在 `approval_recoverable === true` 且通过现有退款管理权限/数据范围校验时显示“恢复审批”操作。
|
||||
- [x] 2.3 恢复操作增加确认和请求中 loading,成功后刷新列表并展示最新响应数据。
|
||||
- [x] 2.4 详情页展示上述字段和“恢复审批”操作;成功后刷新详情。
|
||||
- [x] 2.5 处理状态冲突:提示“当前退款审批状态不允许恢复”,并刷新当前数据;其他后端错误沿用统一错误提示。
|
||||
|
||||
## 3. Verification
|
||||
|
||||
- [ ] 3.1 测试已有 `sp_no`、提交结果未知、明确提交失败和不可恢复记录的入口展示与刷新行为。
|
||||
- [ ] 3.2 测试无退款权限、越权数据和 `approval_recoverable = false` 时不显示按钮。
|
||||
- [ ] 3.3 测试重复点击被 loading 阻止,且请求体为空、不携带审批材料或实例 ID。
|
||||
- [ ] 3.4 运行相关单元测试、类型检查、lint 和构建。
|
||||
- [ ] 3.5 运行 `openspec.cmd validate add-refund-approval-recovery --strict`。
|
||||
|
||||
- [x] 3.1 核对已有 `sp_no`、提交结果未知、明确提交失败和不可恢复记录的入口展示与刷新行为。
|
||||
- [x] 3.2 核对无退款权限、越权数据和 `approval_recoverable = false` 时不显示按钮。
|
||||
- [x] 3.3 核对重复点击被 loading 阻止,且请求体为空、不携带审批材料或实例 ID。
|
||||
- [x] 3.4 运行相关类型检查、lint、编码检查和构建。
|
||||
- [x] 3.5 运行 `openspec.cmd validate add-refund-approval-recovery --strict`。
|
||||
|
||||
@@ -3,7 +3,13 @@
|
||||
*/
|
||||
|
||||
import { BaseService } from '../BaseService'
|
||||
import type { BaseResponse } from '@/types/api'
|
||||
import type {
|
||||
AgentDistributionRegistrationPageResult,
|
||||
AgentDistributionRegistrationQueryParams,
|
||||
AgentDistributionRegistrationItem,
|
||||
BaseResponse,
|
||||
RecoverAgentDistributionRegistrationResponse
|
||||
} from '@/types/api'
|
||||
|
||||
/**
|
||||
* 发送短信验证码请求参数
|
||||
@@ -71,4 +77,32 @@ export class AgentDistributionService extends BaseService {
|
||||
{ requestOptions: { withToken: false } }
|
||||
)
|
||||
}
|
||||
|
||||
/** 查询后台代理注册申请列表 */
|
||||
static getRegistrationApplications(
|
||||
params?: AgentDistributionRegistrationQueryParams
|
||||
): Promise<BaseResponse<AgentDistributionRegistrationPageResult>> {
|
||||
return this.get<BaseResponse<AgentDistributionRegistrationPageResult>>(
|
||||
'/api/admin/agent-distribution-registrations',
|
||||
params
|
||||
)
|
||||
}
|
||||
|
||||
/** 查询后台代理注册申请详情 */
|
||||
static getRegistrationApplicationDetail(
|
||||
id: number
|
||||
): Promise<BaseResponse<AgentDistributionRegistrationItem>> {
|
||||
return this.getOne<AgentDistributionRegistrationItem>(
|
||||
`/api/admin/agent-distribution-registrations/${id}`
|
||||
)
|
||||
}
|
||||
|
||||
/** 恢复代理注册原审批提交 */
|
||||
static recoverRegistrationApproval(
|
||||
id: number
|
||||
): Promise<BaseResponse<RecoverAgentDistributionRegistrationResponse>> {
|
||||
return this.post<BaseResponse<RecoverAgentDistributionRegistrationResponse>>(
|
||||
`/api/admin/agent-distribution-registrations/${id}/recover-approval`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,18 @@ export const AUGUST_PERMISSIONS = {
|
||||
unbindImportCreate: 'phone_asset_association:unbind_import_create',
|
||||
unbindImportDetail: 'phone_asset_association:unbind_import_detail'
|
||||
},
|
||||
shop: {
|
||||
listView: 'shop:list_view',
|
||||
detailView: 'shop:detail_view'
|
||||
},
|
||||
agentDistributionRegistration: {
|
||||
list: 'agent_distribution_registration:list',
|
||||
detail: 'agent_distribution_registration:detail',
|
||||
recoverApproval: 'agent_distribution_registration:recover_approval'
|
||||
},
|
||||
h5PopupConfiguration: {
|
||||
list: 'h5_popup_configuration:list',
|
||||
detail: 'h5_popup_configuration:detail',
|
||||
create: 'h5_popup_configuration:create',
|
||||
update: 'h5_popup_configuration:update',
|
||||
enable: 'h5_popup_configuration:enable',
|
||||
@@ -36,9 +46,39 @@ export const AUGUST_PERMISSIONS = {
|
||||
rulesView: 'package_traffic_alert:rules_view',
|
||||
ruleCreate: 'package_traffic_alert:rule_create',
|
||||
ruleUpdate: 'package_traffic_alert:rule_update',
|
||||
ruleEnable: 'package_traffic_alert:rule_enable',
|
||||
ruleDisable: 'package_traffic_alert:rule_disable',
|
||||
recordsView: 'package_traffic_alert:records_view',
|
||||
recordDetail: 'package_traffic_alert:record_detail',
|
||||
export: 'package_traffic_alert:export'
|
||||
},
|
||||
expiringAsset: {
|
||||
page: 'expiring_asset:page',
|
||||
export: 'expiring_asset:export'
|
||||
},
|
||||
refund: {
|
||||
page: 'refund:page',
|
||||
detailPage: 'refund:detail_page',
|
||||
recoverApproval: 'refund:recover_approval'
|
||||
},
|
||||
agentFundOverview: {
|
||||
page: 'agent_fund_overview:page',
|
||||
commissionExport: 'agent_fund_overview:commission_export'
|
||||
},
|
||||
assetWalletAutoRenewal: {
|
||||
page: 'asset_wallet_auto_renewal:page',
|
||||
update: 'asset_wallet_auto_renewal:update'
|
||||
},
|
||||
pollingPriorityQueue: {
|
||||
page: 'polling_priority_queue:page',
|
||||
create: 'polling_priority_queue:create',
|
||||
detail: 'polling_priority_queue:detail'
|
||||
},
|
||||
operationsReports: {
|
||||
activationPage: 'operations_reports:activation_page',
|
||||
activationExport: 'operations_reports:activation_export',
|
||||
renewalPage: 'operations_reports:renewal_page',
|
||||
renewalExport: 'operations_reports:renewal_export'
|
||||
}
|
||||
} as const
|
||||
|
||||
|
||||
@@ -16,19 +16,25 @@ export const BUSINESS_USER_GROUP_BUSINESS_LINE_OPTIONS: Array<{
|
||||
]
|
||||
|
||||
/** 业务线文案映射 */
|
||||
export const BUSINESS_USER_GROUP_BUSINESS_LINE_MAP = BUSINESS_USER_GROUP_BUSINESS_LINE_OPTIONS.reduce(
|
||||
(map, item) => {
|
||||
map[item.value] = item
|
||||
return map
|
||||
},
|
||||
{} as Record<BusinessUserGroupBusinessLine, (typeof BUSINESS_USER_GROUP_BUSINESS_LINE_OPTIONS)[number]>
|
||||
)
|
||||
export const BUSINESS_USER_GROUP_BUSINESS_LINE_MAP =
|
||||
BUSINESS_USER_GROUP_BUSINESS_LINE_OPTIONS.reduce(
|
||||
(map, item) => {
|
||||
map[item.value] = item
|
||||
return map
|
||||
},
|
||||
{} as Record<
|
||||
BusinessUserGroupBusinessLine,
|
||||
(typeof BUSINESS_USER_GROUP_BUSINESS_LINE_OPTIONS)[number]
|
||||
>
|
||||
)
|
||||
|
||||
/** 获取业务线标签 */
|
||||
export function getBusinessUserGroupBusinessLineLabel(businessLine?: string | null): string {
|
||||
if (!businessLine) return '-'
|
||||
return BUSINESS_USER_GROUP_BUSINESS_LINE_MAP[businessLine as BusinessUserGroupBusinessLine]
|
||||
?.label ?? businessLine
|
||||
return (
|
||||
BUSINESS_USER_GROUP_BUSINESS_LINE_MAP[businessLine as BusinessUserGroupBusinessLine]?.label ??
|
||||
businessLine
|
||||
)
|
||||
}
|
||||
|
||||
/** 业务用户组页面与按钮权限编码 */
|
||||
@@ -43,6 +49,7 @@ export const BUSINESS_USER_GROUP_PERMISSIONS = {
|
||||
/** 店铺业务负责人运营权限编码 */
|
||||
export const SHOP_BUSINESS_OWNER_PERMISSIONS = {
|
||||
batch: 'shop:business_owner_batch',
|
||||
importPage: 'shop:business_owner_import',
|
||||
importCreate: 'shop:business_owner_import'
|
||||
}
|
||||
importPage: 'shop:business_owner_import_view',
|
||||
importCreate: 'shop:business_owner_import_create',
|
||||
importDetail: 'shop:business_owner_import_detail'
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import type { ExportTaskScene } from '@/types/api'
|
||||
|
||||
export interface ExportTaskScenePermissions {
|
||||
page: string
|
||||
detail: string
|
||||
download: string
|
||||
}
|
||||
|
||||
export const EXPORT_TASK_DETAIL_PAGE_PERMISSION = 'export_task:detail_page'
|
||||
|
||||
export interface ExportTaskSceneConfig {
|
||||
scene: ExportTaskScene
|
||||
sceneName: string
|
||||
@@ -18,6 +21,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '设备管理',
|
||||
pageTitle: '导出设备',
|
||||
permissions: {
|
||||
page: 'export_task:device_page',
|
||||
detail: 'export_task:device_detail',
|
||||
download: 'export_task:device_download'
|
||||
}
|
||||
@@ -27,6 +31,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: 'IOT卡管理',
|
||||
pageTitle: '导出IOT卡',
|
||||
permissions: {
|
||||
page: 'export_task:iot_card_page',
|
||||
detail: 'export_task:iot_card_detail',
|
||||
download: 'export_task:iot_card_download'
|
||||
}
|
||||
@@ -36,6 +41,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '订单管理',
|
||||
pageTitle: '导出订单',
|
||||
permissions: {
|
||||
page: 'export_task:order_page',
|
||||
detail: 'export_task:order_detail',
|
||||
download: 'export_task:order_download'
|
||||
}
|
||||
@@ -45,6 +51,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '套餐管理',
|
||||
pageTitle: '导出套餐',
|
||||
permissions: {
|
||||
page: 'export_task:package_page',
|
||||
detail: 'export_task:package_detail',
|
||||
download: 'export_task:package_download'
|
||||
}
|
||||
@@ -54,6 +61,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '代理主钱包流水',
|
||||
pageTitle: '导出代理主钱包流水',
|
||||
permissions: {
|
||||
page: 'export_task:agent_wallet_transaction_page',
|
||||
detail: 'export_task:agent_wallet_transaction_detail',
|
||||
download: 'export_task:agent_wallet_transaction_download'
|
||||
}
|
||||
@@ -63,6 +71,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '代理充值',
|
||||
pageTitle: '导出代理充值',
|
||||
permissions: {
|
||||
page: 'export_task:agent_recharge_page',
|
||||
detail: 'export_task:agent_recharge_detail',
|
||||
download: 'export_task:agent_recharge_download'
|
||||
}
|
||||
@@ -72,6 +81,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '退款',
|
||||
pageTitle: '导出退款',
|
||||
permissions: {
|
||||
page: 'export_task:refund_page',
|
||||
detail: 'export_task:refund_detail',
|
||||
download: 'export_task:refund_download'
|
||||
}
|
||||
@@ -81,6 +91,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '换货',
|
||||
pageTitle: '导出换货',
|
||||
permissions: {
|
||||
page: 'export_task:exchange_page',
|
||||
detail: 'export_task:exchange_detail',
|
||||
download: 'export_task:exchange_download'
|
||||
}
|
||||
@@ -90,6 +101,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '佣金明细',
|
||||
pageTitle: '导出佣金明细',
|
||||
permissions: {
|
||||
page: 'export_task:commission_record_page',
|
||||
detail: 'export_task:commission_record_detail',
|
||||
download: 'export_task:commission_record_download'
|
||||
}
|
||||
@@ -99,6 +111,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '套餐真流量达量预警',
|
||||
pageTitle: '导出套餐真流量达量预警',
|
||||
permissions: {
|
||||
page: 'export_task:package_traffic_alert_page',
|
||||
detail: 'export_task:package_traffic_alert_detail',
|
||||
download: 'export_task:package_traffic_alert_download'
|
||||
}
|
||||
@@ -108,6 +121,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '临期资产',
|
||||
pageTitle: '导出临期资产',
|
||||
permissions: {
|
||||
page: 'export_task:expiring_asset_page',
|
||||
detail: 'export_task:expiring_asset_detail',
|
||||
download: 'export_task:expiring_asset_download'
|
||||
}
|
||||
@@ -117,6 +131,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '设备激活情况报表',
|
||||
pageTitle: '导出设备激活情况报表',
|
||||
permissions: {
|
||||
page: 'export_task:operations_activation_page',
|
||||
detail: 'export_task:operations_activation_detail',
|
||||
download: 'export_task:operations_activation_download'
|
||||
}
|
||||
@@ -126,6 +141,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '套餐续费情况报表',
|
||||
pageTitle: '导出套餐续费情况报表',
|
||||
permissions: {
|
||||
page: 'export_task:operations_renewal_page',
|
||||
detail: 'export_task:operations_renewal_detail',
|
||||
download: 'export_task:operations_renewal_download'
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ export const JULY_PERMISSIONS = {
|
||||
updateExpiryBase: 'series_grants:update_expiry_base'
|
||||
},
|
||||
batchPurchase: {
|
||||
page: 'bulk_purchase:view',
|
||||
create: 'bulk_purchase:create',
|
||||
detail: 'bulk_purchase:detail'
|
||||
page: 'july_bulk_purchase:view',
|
||||
create: 'july_bulk_purchase:create',
|
||||
detail: 'july_bulk_purchase:detail'
|
||||
}
|
||||
} as const
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* 编码命名参考代理充值页 agent_recharge:<action> 风格。
|
||||
*/
|
||||
export const PAYMENT_MERCHANT_POOL_PERMISSIONS = {
|
||||
page: 'payment_merchant_pool:page',
|
||||
merchantCreate: 'payment_merchant_pool:merchant_create',
|
||||
merchantEdit: 'payment_merchant_pool:merchant_edit',
|
||||
merchantToggle: 'payment_merchant_pool:merchant_toggle',
|
||||
|
||||
@@ -26,20 +26,11 @@
|
||||
"setting": {
|
||||
"menuType": {
|
||||
"title": "Menu Layout",
|
||||
"list": [
|
||||
"Vertical",
|
||||
"Horizontal",
|
||||
"Mixed",
|
||||
"Dual"
|
||||
]
|
||||
"list": ["Vertical", "Horizontal", "Mixed", "Dual"]
|
||||
},
|
||||
"theme": {
|
||||
"title": "Theme Style",
|
||||
"list": [
|
||||
"Light",
|
||||
"Dark",
|
||||
"System"
|
||||
]
|
||||
"list": ["Light", "Dark", "System"]
|
||||
},
|
||||
"menu": {
|
||||
"title": "Menu Style"
|
||||
@@ -49,17 +40,11 @@
|
||||
},
|
||||
"box": {
|
||||
"title": "Box Style",
|
||||
"list": [
|
||||
"Border",
|
||||
"Shadow"
|
||||
]
|
||||
"list": ["Border", "Shadow"]
|
||||
},
|
||||
"container": {
|
||||
"title": "Container Width",
|
||||
"list": [
|
||||
"Full",
|
||||
"Boxed"
|
||||
]
|
||||
"list": ["Full", "Boxed"]
|
||||
},
|
||||
"basics": {
|
||||
"title": "Basic Config",
|
||||
@@ -97,14 +82,8 @@
|
||||
"notice": {
|
||||
"title": "Notice",
|
||||
"btnRead": "Mark as read",
|
||||
"bar": [
|
||||
"Notice",
|
||||
"Message",
|
||||
"Todo"
|
||||
],
|
||||
"text": [
|
||||
"No"
|
||||
],
|
||||
"bar": ["Notice", "Message", "Todo"],
|
||||
"text": ["No"],
|
||||
"viewAll": "View all"
|
||||
},
|
||||
"worktab": {
|
||||
@@ -460,7 +439,9 @@
|
||||
"title": "Shop Management",
|
||||
"shopList": "Shop List",
|
||||
"businessUserGroups": "Business User Groups",
|
||||
"businessOwnerImport": "Business Owner Import"
|
||||
"businessOwnerImport": "Business Owner Import",
|
||||
"agentDistributionRegistrations": "Agent Registration Applications",
|
||||
"agentDistributionRegistrationDetail": "Agent Registration Application Detail"
|
||||
},
|
||||
"assetManagement": {
|
||||
"title": "Asset Management",
|
||||
|
||||
@@ -27,20 +27,11 @@
|
||||
"setting": {
|
||||
"menuType": {
|
||||
"title": "菜单布局",
|
||||
"list": [
|
||||
"垂直",
|
||||
"水平",
|
||||
"混合",
|
||||
"双列"
|
||||
]
|
||||
"list": ["垂直", "水平", "混合", "双列"]
|
||||
},
|
||||
"theme": {
|
||||
"title": "主题风格",
|
||||
"list": [
|
||||
"浅色",
|
||||
"深色",
|
||||
"系统"
|
||||
]
|
||||
"list": ["浅色", "深色", "系统"]
|
||||
},
|
||||
"menu": {
|
||||
"title": "菜单风格"
|
||||
@@ -50,17 +41,11 @@
|
||||
},
|
||||
"box": {
|
||||
"title": "盒子样式",
|
||||
"list": [
|
||||
"边框",
|
||||
"阴影"
|
||||
]
|
||||
"list": ["边框", "阴影"]
|
||||
},
|
||||
"container": {
|
||||
"title": "容器宽度",
|
||||
"list": [
|
||||
"铺满",
|
||||
"定宽"
|
||||
]
|
||||
"list": ["铺满", "定宽"]
|
||||
},
|
||||
"basics": {
|
||||
"title": "基础配置",
|
||||
@@ -98,14 +83,8 @@
|
||||
"notice": {
|
||||
"title": "通知",
|
||||
"btnRead": "标为已读",
|
||||
"bar": [
|
||||
"通知",
|
||||
"消息",
|
||||
"代办"
|
||||
],
|
||||
"text": [
|
||||
"暂无"
|
||||
],
|
||||
"bar": ["通知", "消息", "代办"],
|
||||
"text": ["暂无"],
|
||||
"viewAll": "查看全部"
|
||||
},
|
||||
"worktab": {
|
||||
@@ -131,11 +110,7 @@
|
||||
"admin": "管理员",
|
||||
"user": "普通用户"
|
||||
},
|
||||
"placeholder": [
|
||||
"请输入手机号",
|
||||
"请输入密码",
|
||||
"请拖动滑块完成验证"
|
||||
],
|
||||
"placeholder": ["请输入手机号", "请输入密码", "请拖动滑块完成验证"],
|
||||
"sliderText": "按住滑块拖动",
|
||||
"sliderSuccessText": "验证成功",
|
||||
"rememberPwd": "记住密码",
|
||||
@@ -178,11 +153,7 @@
|
||||
"register": {
|
||||
"title": "创建账号",
|
||||
"subTitle": "欢迎加入我们,请填写以下信息完成注册",
|
||||
"placeholder": [
|
||||
"请输入账号",
|
||||
"请输入密码",
|
||||
"请再次输入密码"
|
||||
],
|
||||
"placeholder": ["请输入账号", "请输入密码", "请再次输入密码"],
|
||||
"rule": [
|
||||
"请再次输入密码",
|
||||
"两次输入密码不一致!",
|
||||
@@ -396,7 +367,9 @@
|
||||
"title": "店铺管理",
|
||||
"shopList": "店铺列表",
|
||||
"businessUserGroups": "业务用户组",
|
||||
"businessOwnerImport": "业务负责人导入"
|
||||
"businessOwnerImport": "业务负责人导入",
|
||||
"agentDistributionRegistrations": "代理注册申请",
|
||||
"agentDistributionRegistrationDetail": "代理注册申请详情"
|
||||
},
|
||||
"assetManagement": {
|
||||
"title": "资产管理",
|
||||
|
||||
@@ -5,6 +5,10 @@ import { JULY_PERMISSIONS } from '@/config/constants/julyIteration'
|
||||
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
import { PAYMENT_MERCHANT_POOL_PERMISSIONS } from '@/config/constants/paymentMerchantPools'
|
||||
import {
|
||||
EXPORT_TASK_DETAIL_PAGE_PERMISSION,
|
||||
EXPORT_TASK_SCENE_CONFIG
|
||||
} from '@/config/constants/exportTask'
|
||||
import {
|
||||
BUSINESS_USER_GROUP_PERMISSIONS,
|
||||
SHOP_BUSINESS_OWNER_PERMISSIONS
|
||||
@@ -219,7 +223,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
component: RoutesAlias.TrafficAlertRules,
|
||||
meta: {
|
||||
title: 'menus.packageManagement.trafficAlertRules',
|
||||
keepAlive: true
|
||||
keepAlive: true,
|
||||
permissions: [AUGUST_PERMISSIONS.packageTrafficAlert.rulesView]
|
||||
}
|
||||
},
|
||||
// 真流量达量预警记录
|
||||
@@ -229,7 +234,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
component: RoutesAlias.TrafficAlerts,
|
||||
meta: {
|
||||
title: 'menus.packageManagement.trafficAlerts',
|
||||
keepAlive: true
|
||||
keepAlive: true,
|
||||
permissions: [AUGUST_PERMISSIONS.packageTrafficAlert.recordsView]
|
||||
}
|
||||
},
|
||||
// 真流量达量预警记录详情
|
||||
@@ -240,7 +246,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: 'menus.packageManagement.trafficAlertDetail',
|
||||
isHide: true,
|
||||
keepAlive: false
|
||||
keepAlive: false,
|
||||
permissions: [AUGUST_PERMISSIONS.packageTrafficAlert.recordDetail]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -263,7 +270,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
component: RoutesAlias.Shop,
|
||||
meta: {
|
||||
title: 'menus.shopManagement.shopList',
|
||||
keepAlive: true
|
||||
keepAlive: true,
|
||||
permissions: [AUGUST_PERMISSIONS.shop.listView]
|
||||
}
|
||||
},
|
||||
// 店铺详情
|
||||
@@ -274,7 +282,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: '店铺详情',
|
||||
isHide: true,
|
||||
keepAlive: false
|
||||
keepAlive: false,
|
||||
permissions: [AUGUST_PERMISSIONS.shop.detailView]
|
||||
}
|
||||
},
|
||||
// 业务用户组
|
||||
@@ -300,6 +309,29 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
roles: ['R_SUPER', 'R_ADMIN'],
|
||||
permissions: [SHOP_BUSINESS_OWNER_PERMISSIONS.importPage]
|
||||
}
|
||||
},
|
||||
// 代理注册申请
|
||||
{
|
||||
path: 'agent-distribution-registrations',
|
||||
name: 'AgentDistributionRegistrations',
|
||||
component: RoutesAlias.AgentDistributionRegistrations,
|
||||
meta: {
|
||||
title: 'menus.shopManagement.agentDistributionRegistrations',
|
||||
keepAlive: true,
|
||||
permissions: [AUGUST_PERMISSIONS.agentDistributionRegistration.list]
|
||||
}
|
||||
},
|
||||
// 代理注册申请详情
|
||||
{
|
||||
path: 'agent-distribution-registrations/detail/:id',
|
||||
name: 'AgentDistributionRegistrationDetail',
|
||||
component: RoutesAlias.AgentDistributionRegistrationDetail,
|
||||
meta: {
|
||||
title: 'menus.shopManagement.agentDistributionRegistrationDetail',
|
||||
isHide: true,
|
||||
keepAlive: false,
|
||||
permissions: [AUGUST_PERMISSIONS.agentDistributionRegistration.detail]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -375,7 +407,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
component: RoutesAlias.ExpiringAssets,
|
||||
meta: {
|
||||
title: '临期资产',
|
||||
keepAlive: true
|
||||
keepAlive: true,
|
||||
permissions: [AUGUST_PERMISSIONS.expiringAsset.page]
|
||||
}
|
||||
},
|
||||
// IoT卡管理
|
||||
@@ -691,7 +724,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: 'menus.assetManagement.exportCommissionRecord',
|
||||
exportTaskScene: 'commission_record',
|
||||
keepAlive: true
|
||||
keepAlive: true,
|
||||
permissions: [EXPORT_TASK_SCENE_CONFIG.commission_record.permissions.page]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -701,7 +735,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: 'menus.assetManagement.exportPackageTrafficAlert',
|
||||
exportTaskScene: 'package_traffic_alert',
|
||||
keepAlive: true
|
||||
keepAlive: true,
|
||||
permissions: [EXPORT_TASK_SCENE_CONFIG.package_traffic_alert.permissions.page]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -711,7 +746,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: 'menus.assetManagement.exportExpiringAsset',
|
||||
exportTaskScene: 'expiring_asset',
|
||||
keepAlive: true
|
||||
keepAlive: true,
|
||||
permissions: [EXPORT_TASK_SCENE_CONFIG.expiring_asset.permissions.page]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -721,7 +757,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: 'menus.assetManagement.exportOperationsActivation',
|
||||
exportTaskScene: 'operations_activation',
|
||||
keepAlive: true
|
||||
keepAlive: true,
|
||||
permissions: [EXPORT_TASK_SCENE_CONFIG.operations_activation.permissions.page]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -731,7 +768,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: 'menus.assetManagement.exportOperationsRenewal',
|
||||
exportTaskScene: 'operations_renewal',
|
||||
keepAlive: true
|
||||
keepAlive: true,
|
||||
permissions: [EXPORT_TASK_SCENE_CONFIG.operations_renewal.permissions.page]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -741,7 +779,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: 'menus.assetManagement.exportTaskDetail',
|
||||
isHide: true,
|
||||
keepAlive: false
|
||||
keepAlive: false,
|
||||
permissions: [EXPORT_TASK_DETAIL_PAGE_PERMISSION]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -821,7 +860,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
component: RoutesAlias.RefundManagement,
|
||||
meta: {
|
||||
title: 'menus.financialManagement.refundManagement',
|
||||
keepAlive: true
|
||||
keepAlive: true,
|
||||
permissions: [AUGUST_PERMISSIONS.refund.page]
|
||||
}
|
||||
},
|
||||
// 退款详情
|
||||
@@ -832,7 +872,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: 'menus.financialManagement.refundDetail',
|
||||
isHide: true,
|
||||
keepAlive: false
|
||||
keepAlive: false,
|
||||
permissions: [AUGUST_PERMISSIONS.refund.detailPage]
|
||||
}
|
||||
},
|
||||
// 员工代收款账单
|
||||
@@ -901,7 +942,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: 'menus.financialManagement.agentFundOverview',
|
||||
keepAlive: true,
|
||||
roles: ['R_SUPER', 'R_ADMIN']
|
||||
roles: ['R_SUPER', 'R_ADMIN'],
|
||||
permissions: [AUGUST_PERMISSIONS.agentFundOverview.page]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1047,7 +1089,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: 'menus.settings.paymentMerchantPools',
|
||||
keepAlive: true,
|
||||
allowedUserTypes: [1, 2]
|
||||
allowedUserTypes: [1, 2],
|
||||
permissions: [PAYMENT_MERCHANT_POOL_PERMISSIONS.page]
|
||||
}
|
||||
},
|
||||
// 支付商户详情
|
||||
@@ -1174,7 +1217,7 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
isHide: true,
|
||||
keepAlive: false,
|
||||
allowedUserTypes: [1, 2],
|
||||
permissions: [AUGUST_PERMISSIONS.h5PopupConfiguration.list]
|
||||
permissions: [AUGUST_PERMISSIONS.h5PopupConfiguration.detail]
|
||||
}
|
||||
},
|
||||
// 资产钱包自动续费配置
|
||||
@@ -1185,7 +1228,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: 'menus.settings.assetWalletAutoRenewal',
|
||||
keepAlive: true,
|
||||
allowedUserTypes: [1, 2]
|
||||
allowedUserTypes: [1, 2],
|
||||
permissions: [AUGUST_PERMISSIONS.assetWalletAutoRenewal.page]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1278,7 +1322,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
component: RoutesAlias.PollingPriorityQueue,
|
||||
meta: {
|
||||
title: '优先队列',
|
||||
keepAlive: true
|
||||
keepAlive: true,
|
||||
permissions: [AUGUST_PERMISSIONS.pollingPriorityQueue.page]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1301,7 +1346,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: '设备激活报表',
|
||||
keepAlive: true,
|
||||
allowedUserTypes: [1, 2]
|
||||
allowedUserTypes: [1, 2],
|
||||
permissions: [AUGUST_PERMISSIONS.operationsReports.activationPage]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1311,7 +1357,8 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
meta: {
|
||||
title: '套餐续费报表',
|
||||
keepAlive: true,
|
||||
allowedUserTypes: [1, 2]
|
||||
allowedUserTypes: [1, 2],
|
||||
permissions: [AUGUST_PERMISSIONS.operationsReports.renewalPage]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -47,6 +47,8 @@ export enum RoutesAlias {
|
||||
ShopDetail = '/shop-management/detail', // 店铺详情
|
||||
BusinessUserGroups = '/shop-management/business-user-groups', // 业务用户组
|
||||
BusinessOwnerImport = '/shop-management/business-owner-import', // 业务负责人导入
|
||||
AgentDistributionRegistrations = '/shop-management/agent-distribution-registrations', // 代理注册申请
|
||||
AgentDistributionRegistrationDetail = '/shop-management/agent-distribution-registrations/detail', // 代理注册申请详情
|
||||
|
||||
// 通用页面(店铺账号-企业账号)
|
||||
EnterpriseCustomerAccounts = '/common/account-list', // 企业客户账号列表和店铺账号列表共用
|
||||
|
||||
56
src/types/api/agentDistributionRegistration.ts
Normal file
56
src/types/api/agentDistributionRegistration.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
/** 后台代理注册申请管理类型 */
|
||||
|
||||
export interface AgentDistributionRegistrationQueryParams {
|
||||
page?: number
|
||||
page_size?: number
|
||||
status?: 0 | 1 | 2
|
||||
start_time?: string
|
||||
end_time?: string
|
||||
decided_start_time?: string
|
||||
decided_end_time?: string
|
||||
phone?: string
|
||||
keyword?: string
|
||||
parent_shop_id?: number
|
||||
submission_anomaly?: boolean
|
||||
}
|
||||
|
||||
export interface AgentDistributionRegistrationItem {
|
||||
id: number
|
||||
status: number
|
||||
status_name?: string | null
|
||||
approval_status?: number | null
|
||||
approval_status_name?: string | null
|
||||
submission_status?: number | null
|
||||
submission_status_name?: string | null
|
||||
recoverable?: boolean
|
||||
failure_summary?: string | null
|
||||
last_recovery_at?: string | null
|
||||
approval_instance_id?: number | null
|
||||
phone: string
|
||||
username: string
|
||||
shop_name: string
|
||||
shop_code: string
|
||||
contact_name?: string | null
|
||||
province?: string | null
|
||||
city?: string | null
|
||||
district?: string | null
|
||||
address?: string | null
|
||||
distribution_code?: string | null
|
||||
parent_shop_id?: number | null
|
||||
parent_shop_name?: string | null
|
||||
reject_reason?: string | null
|
||||
created_at: string
|
||||
decided_at?: string | null
|
||||
}
|
||||
|
||||
export interface AgentDistributionRegistrationPageResult {
|
||||
items: AgentDistributionRegistrationItem[]
|
||||
page: number
|
||||
size: number
|
||||
total: number
|
||||
}
|
||||
|
||||
export interface RecoverAgentDistributionRegistrationResponse {
|
||||
id: number
|
||||
message?: string
|
||||
}
|
||||
@@ -75,6 +75,7 @@ export * from './asset'
|
||||
|
||||
// 代理充值相关
|
||||
export * from './agentRecharge'
|
||||
export * from './agentDistributionRegistration'
|
||||
|
||||
// 支付设置相关
|
||||
export * from './paymentSettings'
|
||||
|
||||
@@ -27,7 +27,9 @@
|
||||
<ElButton v-if="canDownload" type="success" link @click="downloadExport">
|
||||
下载
|
||||
</ElButton>
|
||||
<ElButton type="primary" :loading="exporting" @click="handleExport">导出</ElButton>
|
||||
<ElButton v-if="canExport" type="primary" :loading="exporting" @click="handleExport">
|
||||
导出
|
||||
</ElButton>
|
||||
</template>
|
||||
</ArtTableHeader>
|
||||
|
||||
@@ -72,11 +74,15 @@
|
||||
import { useAsyncTaskPolling } from '@/composables/useAsyncTaskPolling'
|
||||
import { useCheckedColumns } from '@/composables/useCheckedColumns'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
|
||||
defineOptions({ name: 'ExpiringAssets' })
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const { hasAuth } = useAuth()
|
||||
const canExport = computed(() => hasAuth(AUGUST_PERMISSIONS.expiringAsset.export))
|
||||
const tableRef = ref()
|
||||
const loading = ref(false)
|
||||
const exporting = ref(false)
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
<!-- 佣金明细 Tab -->
|
||||
<ElTabPane label="佣金明细" name="commission">
|
||||
<div class="commission-export-actions">
|
||||
<ElButton
|
||||
v-if="hasAuth('commission_record:export')"
|
||||
<ElButton
|
||||
v-if="hasAuth(AUGUST_PERMISSIONS.agentFundOverview.commissionExport)"
|
||||
@click="commissionExportDialogVisible = true"
|
||||
>
|
||||
导出
|
||||
@@ -511,6 +511,7 @@
|
||||
import ExportTaskCreateDialog from '@/components/business/ExportTaskCreateDialog.vue'
|
||||
import CommissionRecordDetailDialog from '@/components/business/CommissionRecordDetailDialog.vue'
|
||||
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
import { resolveFinanceAuditTarget } from '@/utils/business/auditNavigation'
|
||||
import { openAuditInvestigation } from '@/components/business/audit/investigationController'
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
重新申请
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-if="refund && canRecoverApproval(refund) && hasAuth('refund:detail')"
|
||||
v-if="
|
||||
refund &&
|
||||
canRecoverApproval(refund) &&
|
||||
hasAuth(AUGUST_PERMISSIONS.refund.recoverApproval)
|
||||
"
|
||||
type="warning"
|
||||
:loading="recoverApprovalLoading"
|
||||
@click="handleRecoverApproval"
|
||||
@@ -182,7 +186,7 @@
|
||||
import { ref, onMounted, computed, h, reactive } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { ElButton, ElCard, ElIcon, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import type { FormRules } from 'element-plus'
|
||||
import { ArrowLeft, Loading } from '@element-plus/icons-vue'
|
||||
import DetailPage from '@/components/common/DetailPage.vue'
|
||||
import type { DetailSection } from '@/components/common/DetailPage.vue'
|
||||
@@ -206,6 +210,7 @@
|
||||
import RefundApprovalDialog from '@/components/business/RefundApprovalDialog.vue'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
|
||||
defineOptions({ name: 'RefundDetail' })
|
||||
|
||||
|
||||
@@ -219,6 +219,7 @@
|
||||
import { getErrorMessage, toVoucherKeyList } from '@/utils/business'
|
||||
import { RoutesAlias } from '@/router/routesAlias'
|
||||
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
import {
|
||||
resolveAuditResourceTarget,
|
||||
resolveFinanceAuditTarget
|
||||
@@ -1112,7 +1113,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
if (canRecoverApproval(row) && hasAuth('refund:detail')) {
|
||||
if (canRecoverApproval(row) && hasAuth(AUGUST_PERMISSIONS.refund.recoverApproval)) {
|
||||
actions.push({
|
||||
label: '恢复审批',
|
||||
handler: () => handleRecoverApproval(row),
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
@refresh="handleRefresh"
|
||||
>
|
||||
<template #left>
|
||||
<ElButton type="primary" :loading="exporting" @click="handleExport">导出</ElButton>
|
||||
<ElButton v-if="canExport" type="primary" :loading="exporting" @click="handleExport">
|
||||
导出
|
||||
</ElButton>
|
||||
<span v-if="snapshotText" class="report-snapshot">{{ snapshotText }}</span>
|
||||
<ElTag v-if="exportTask" :type="exportStatusType" class="report-export-tag">
|
||||
{{ exportTask.status_name || '处理中' }}
|
||||
@@ -50,6 +52,8 @@
|
||||
import type { ActivationSummaryData, ActivationSummaryItem } from '@/types/api'
|
||||
import type { SearchFormItem } from '@/types'
|
||||
import { ACTIVATION_GROUP_OPTIONS, ACTIVATION_METRIC_COLUMNS, formatMetric } from '../constants'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
|
||||
defineOptions({ name: 'OperationsActivationReport' })
|
||||
|
||||
@@ -80,6 +84,8 @@
|
||||
|
||||
const loading = ref(false)
|
||||
const exporting = ref(false)
|
||||
const { hasAuth } = useAuth()
|
||||
const canExport = computed(() => hasAuth(AUGUST_PERMISSIONS.operationsReports.activationExport))
|
||||
const summary = ref<ActivationSummaryData | null>(null)
|
||||
|
||||
const searchFormItems: SearchFormItem[] = [
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
@refresh="handleRefresh"
|
||||
>
|
||||
<template #left>
|
||||
<ElButton type="primary" :loading="exporting" @click="handleExport">导出</ElButton>
|
||||
<ElButton v-if="canExport" type="primary" :loading="exporting" @click="handleExport">
|
||||
导出
|
||||
</ElButton>
|
||||
<span v-if="snapshotText" class="report-snapshot">{{ snapshotText }}</span>
|
||||
<ElTag v-if="exportTask" :type="exportStatusType" class="report-export-tag">
|
||||
{{ exportTask.status_name || '处理中' }}
|
||||
@@ -50,6 +52,8 @@
|
||||
import type { RenewalSummaryData, RenewalSummaryItem } from '@/types/api'
|
||||
import type { SearchFormItem } from '@/types'
|
||||
import { RENEWAL_GROUP_OPTIONS, RENEWAL_METRIC_COLUMNS, formatMetric } from '../constants'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
|
||||
defineOptions({ name: 'OperationsRenewalReport' })
|
||||
|
||||
@@ -80,6 +84,8 @@
|
||||
|
||||
const loading = ref(false)
|
||||
const exporting = ref(false)
|
||||
const { hasAuth } = useAuth()
|
||||
const canExport = computed(() => hasAuth(AUGUST_PERMISSIONS.operationsReports.renewalExport))
|
||||
const summary = ref<RenewalSummaryData | null>(null)
|
||||
|
||||
const searchFormItems: SearchFormItem[] = [
|
||||
|
||||
@@ -127,7 +127,6 @@
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { useCheckedColumns } from '@/composables/useCheckedColumns'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import { normalizeApiError } from '@/utils/business/apiError'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants'
|
||||
import type { SearchFormItem } from '@/types'
|
||||
import type {
|
||||
@@ -143,6 +142,8 @@
|
||||
|
||||
const canCreate = computed(() => hasAuth(perms.ruleCreate))
|
||||
const canUpdate = computed(() => hasAuth(perms.ruleUpdate))
|
||||
const canEnable = computed(() => hasAuth(perms.ruleEnable))
|
||||
const canDisable = computed(() => hasAuth(perms.ruleDisable))
|
||||
|
||||
// ========== 列表数据 ==========
|
||||
|
||||
@@ -333,15 +334,16 @@
|
||||
handler: () => void
|
||||
type?: 'primary' | 'danger'
|
||||
}> = []
|
||||
if (!canUpdate.value) return actions
|
||||
actions.push({ label: '编辑', handler: () => openFormDialog('edit', row) })
|
||||
if (row.enabled) {
|
||||
if (canUpdate.value) {
|
||||
actions.push({ label: '编辑', handler: () => openFormDialog('edit', row) })
|
||||
}
|
||||
if (row.enabled && canDisable.value) {
|
||||
actions.push({
|
||||
label: '停用',
|
||||
handler: () => handleToggleEnabled(row, false),
|
||||
type: 'danger' as const
|
||||
})
|
||||
} else {
|
||||
} else if (!row.enabled && canEnable.value) {
|
||||
actions.push({
|
||||
label: '启用',
|
||||
handler: () => handleToggleEnabled(row, true),
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
@refresh="handleRefresh"
|
||||
>
|
||||
<template #left>
|
||||
<el-button type="primary" @click="showCreateDialog">人工优先入队</el-button>
|
||||
<el-button v-if="canCreate" type="primary" @click="showCreateDialog">
|
||||
人工优先入队
|
||||
</el-button>
|
||||
</template>
|
||||
</ArtTableHeader>
|
||||
|
||||
@@ -187,9 +189,15 @@
|
||||
POLLING_PRIORITY_TRIGGER_TYPE_OPTIONS,
|
||||
getPollingPriorityResultName
|
||||
} from '@/config/constants'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
|
||||
defineOptions({ name: 'PollingPriorityQueue' })
|
||||
|
||||
const { hasAuth } = useAuth()
|
||||
const canCreate = computed(() => hasAuth(AUGUST_PERMISSIONS.pollingPriorityQueue.create))
|
||||
const canDetail = computed(() => hasAuth(AUGUST_PERMISSIONS.pollingPriorityQueue.detail))
|
||||
|
||||
const loading = ref(false)
|
||||
const tableData = ref<PollingPriorityItem[]>([])
|
||||
const tableRef = ref()
|
||||
@@ -329,7 +337,8 @@
|
||||
}))
|
||||
)
|
||||
|
||||
const getActions = () => [{ label: '详情', handler: showDetail, type: 'primary' as const }]
|
||||
const getActions = () =>
|
||||
canDetail.value ? [{ label: '详情', handler: showDetail, type: 'primary' as const }] : []
|
||||
|
||||
const loadData = async () => {
|
||||
loading.value = true
|
||||
|
||||
@@ -74,7 +74,9 @@
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<ElButton type="primary" :loading="saving" @click="handleSave">保存配置</ElButton>
|
||||
<ElButton v-if="canUpdate" type="primary" :loading="saving" @click="handleSave">
|
||||
保存配置
|
||||
</ElButton>
|
||||
<ElButton :disabled="saving" @click="loadConfig">重新加载</ElButton>
|
||||
</div>
|
||||
</template>
|
||||
@@ -84,7 +86,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { computed, onMounted, reactive, ref } from 'vue'
|
||||
import { ElMessage, type FormInstance, type FormRules } from 'element-plus'
|
||||
import { AssetWalletService, PackageManageService } from '@/api/modules'
|
||||
import type {
|
||||
@@ -94,10 +96,14 @@
|
||||
} from '@/types/api'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import { usePermission } from '@/composables/usePermission'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
|
||||
defineOptions({ name: 'AssetWalletAutoRenewal' })
|
||||
|
||||
const { isPlatformAccount } = usePermission()
|
||||
const { hasAuth } = useAuth()
|
||||
const canUpdate = computed(() => hasAuth(AUGUST_PERMISSIONS.assetWalletAutoRenewal.update))
|
||||
|
||||
const formRef = ref<FormInstance>()
|
||||
const loading = ref(false)
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<div class="registration-detail-page">
|
||||
<ElCard shadow="never">
|
||||
<div class="detail-header">
|
||||
<ElButton @click="router.back()">返回</ElButton>
|
||||
<h2>代理注册申请详情</h2>
|
||||
<ElButton
|
||||
v-if="
|
||||
application?.recoverable &&
|
||||
hasAuth(AUGUST_PERMISSIONS.agentDistributionRegistration.recoverApproval)
|
||||
"
|
||||
type="warning"
|
||||
:loading="recovering"
|
||||
@click="recoverApproval"
|
||||
>
|
||||
恢复审批
|
||||
</ElButton>
|
||||
</div>
|
||||
|
||||
<ElDescriptions v-if="application" :column="2" border>
|
||||
<ElDescriptionsItem label="申请ID">{{ application.id }}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="业务状态">{{
|
||||
application.status_name || '-'
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="审批状态">{{
|
||||
application.approval_status_name || '-'
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="企微提交状态">{{
|
||||
application.submission_status_name || '-'
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="手机号">{{ application.phone }}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="用户名">{{ application.username }}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="店铺名称">{{ application.shop_name }}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="店铺编号">{{ application.shop_code }}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="上级店铺">{{
|
||||
application.parent_shop_name || '-'
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="联系人">{{
|
||||
application.contact_name || '-'
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="分销码">{{
|
||||
application.distribution_code || '-'
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="申请时间">{{
|
||||
formatDateTime(application.created_at)
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="省市区" :span="2">
|
||||
{{
|
||||
[application.province, application.city, application.district]
|
||||
.filter(Boolean)
|
||||
.join(' / ') || '-'
|
||||
}}
|
||||
</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="详细地址" :span="2">{{
|
||||
application.address || '-'
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="驳回原因" :span="2">{{
|
||||
application.reject_reason || '-'
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="提交失败摘要" :span="2">{{
|
||||
application.failure_summary || '-'
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="最近恢复时间">{{
|
||||
application.last_recovery_at ? formatDateTime(application.last_recovery_at) : '-'
|
||||
}}</ElDescriptionsItem>
|
||||
</ElDescriptions>
|
||||
<ElEmpty v-else-if="!loading" description="暂无详情" />
|
||||
<div v-if="loading" class="loading">加载中...</div>
|
||||
</ElCard>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { AgentDistributionService } from '@/api/modules'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import type { AgentDistributionRegistrationItem } from '@/types/api'
|
||||
|
||||
defineOptions({ name: 'AgentDistributionRegistrationDetail' })
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const { hasAuth } = useAuth()
|
||||
const loading = ref(false)
|
||||
const recovering = ref(false)
|
||||
const application = ref<AgentDistributionRegistrationItem | null>(null)
|
||||
const id = Number(route.params.id)
|
||||
|
||||
const loadDetail = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await AgentDistributionService.getRegistrationApplicationDetail(id)
|
||||
if (res.code === 0) application.value = res.data
|
||||
else ElMessage.error(res.msg || '获取代理注册申请详情失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const recoverApproval = async () => {
|
||||
if (!application.value?.recoverable || recovering.value) return
|
||||
try {
|
||||
await ElMessageBox.confirm('确定要恢复该代理注册申请的原审批提交吗?', '恢复审批', {
|
||||
type: 'warning',
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
})
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
recovering.value = true
|
||||
try {
|
||||
const res = await AgentDistributionService.recoverRegistrationApproval(id)
|
||||
if (res.code === 0) {
|
||||
ElMessage.success(res.msg || '恢复审批成功')
|
||||
await loadDetail()
|
||||
} else {
|
||||
ElMessage.error(res.msg || '恢复审批失败')
|
||||
await loadDetail()
|
||||
}
|
||||
} finally {
|
||||
recovering.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(loadDetail)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.registration-detail-page {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.detail-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.detail-header h2 {
|
||||
flex: 1;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.loading {
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<ArtTableFullScreen>
|
||||
<div class="agent-registration-page" id="table-full-screen">
|
||||
<ArtSearchBar
|
||||
v-model:filter="searchForm"
|
||||
:items="searchFormItems"
|
||||
show-expand
|
||||
label-width="100px"
|
||||
@reset="handleReset"
|
||||
@search="handleSearch"
|
||||
/>
|
||||
|
||||
<ElCard shadow="never" class="art-table-card">
|
||||
<ArtTableHeader
|
||||
:columnList="columnOptions"
|
||||
v-model:columns="columnChecks"
|
||||
@refresh="handleRefresh"
|
||||
/>
|
||||
|
||||
<ArtTable
|
||||
:loading="loading"
|
||||
:data="items"
|
||||
:currentPage="pagination.page"
|
||||
:pageSize="pagination.pageSize"
|
||||
:total="pagination.total"
|
||||
:marginTop="10"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<template #default>
|
||||
<ElTableColumn v-for="col in columns" :key="col.prop || col.type" v-bind="col" />
|
||||
</template>
|
||||
</ArtTable>
|
||||
</ElCard>
|
||||
</div>
|
||||
</ArtTableFullScreen>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { h, onMounted, reactive, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage, ElTag } from 'element-plus'
|
||||
import { AgentDistributionService } from '@/api/modules'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { useCheckedColumns } from '@/composables/useCheckedColumns'
|
||||
import { RoutesAlias } from '@/router/routesAlias'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import type { SearchFormItem } from '@/types'
|
||||
import type {
|
||||
AgentDistributionRegistrationItem,
|
||||
AgentDistributionRegistrationQueryParams
|
||||
} from '@/types/api'
|
||||
|
||||
defineOptions({ name: 'AgentDistributionRegistrations' })
|
||||
|
||||
const router = useRouter()
|
||||
const { hasAuth } = useAuth()
|
||||
const loading = ref(false)
|
||||
const items = ref<AgentDistributionRegistrationItem[]>([])
|
||||
const pagination = reactive({ page: 1, pageSize: 20, total: 0 })
|
||||
const searchForm = reactive({
|
||||
status: undefined as 0 | 1 | 2 | undefined,
|
||||
phone: '',
|
||||
keyword: '',
|
||||
dateRange: [] as string[],
|
||||
submission_anomaly: undefined as number | undefined
|
||||
})
|
||||
|
||||
const searchFormItems: SearchFormItem[] = [
|
||||
{
|
||||
label: '业务状态',
|
||||
prop: 'status',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '待审批', value: 0 },
|
||||
{ label: '已通过', value: 1 },
|
||||
{ label: '已驳回', value: 2 }
|
||||
],
|
||||
config: { clearable: true, placeholder: '请选择业务状态' }
|
||||
},
|
||||
{
|
||||
label: '手机号',
|
||||
prop: 'phone',
|
||||
type: 'input',
|
||||
config: { clearable: true, placeholder: '请输入手机号' }
|
||||
},
|
||||
{
|
||||
label: '关键字',
|
||||
prop: 'keyword',
|
||||
type: 'input',
|
||||
config: { clearable: true, placeholder: '店铺/用户名/联系人' }
|
||||
},
|
||||
{
|
||||
label: '申请时间',
|
||||
prop: 'dateRange',
|
||||
type: 'datetimerange',
|
||||
config: {
|
||||
type: 'datetimerange',
|
||||
valueFormat: 'YYYY-MM-DDTHH:mm:ssZ',
|
||||
rangeSeparator: '至',
|
||||
startPlaceholder: '申请开始',
|
||||
endPlaceholder: '申请结束'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '提交异常',
|
||||
prop: 'submission_anomaly',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '仅异常', value: 1 },
|
||||
{ label: '非异常', value: 0 }
|
||||
],
|
||||
config: { clearable: true, placeholder: '全部' }
|
||||
}
|
||||
]
|
||||
|
||||
const columnOptions = [
|
||||
{ label: '申请店铺', prop: 'shop_name' },
|
||||
{ label: '用户名', prop: 'username' },
|
||||
{ label: '手机号', prop: 'phone' },
|
||||
{ label: '上级店铺', prop: 'parent_shop_name' },
|
||||
{ label: '业务状态', prop: 'status_name' },
|
||||
{ label: '审批状态', prop: 'approval_status_name' },
|
||||
{ label: '企微提交状态', prop: 'submission_status_name' },
|
||||
{ label: '可恢复', prop: 'recoverable' },
|
||||
{ label: '申请时间', prop: 'created_at' }
|
||||
]
|
||||
|
||||
const formatStatus = (row: AgentDistributionRegistrationItem) =>
|
||||
h(
|
||||
ElTag,
|
||||
{ type: row.status === 1 ? 'success' : row.status === 2 ? 'danger' : 'warning' },
|
||||
() => row.status_name || '-'
|
||||
)
|
||||
|
||||
const { columnChecks, columns } = useCheckedColumns(() => [
|
||||
{
|
||||
prop: 'shop_name',
|
||||
label: '申请店铺',
|
||||
minWidth: 180,
|
||||
showOverflowTooltip: true,
|
||||
formatter: (row: AgentDistributionRegistrationItem) =>
|
||||
h(
|
||||
'span',
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: () => openDetail(row)
|
||||
},
|
||||
row.shop_name
|
||||
)
|
||||
},
|
||||
{ prop: 'username', label: '用户名', width: 140 },
|
||||
{ prop: 'phone', label: '手机号', width: 140 },
|
||||
{
|
||||
prop: 'parent_shop_name',
|
||||
label: '上级店铺',
|
||||
width: 150,
|
||||
formatter: (row: AgentDistributionRegistrationItem) => row.parent_shop_name || '-'
|
||||
},
|
||||
{ prop: 'status_name', label: '业务状态', width: 110, formatter: formatStatus },
|
||||
{
|
||||
prop: 'approval_status_name',
|
||||
label: '审批状态',
|
||||
width: 130,
|
||||
formatter: (row: AgentDistributionRegistrationItem) => row.approval_status_name || '-'
|
||||
},
|
||||
{
|
||||
prop: 'submission_status_name',
|
||||
label: '企微提交状态',
|
||||
width: 140,
|
||||
formatter: (row: AgentDistributionRegistrationItem) => row.submission_status_name || '-'
|
||||
},
|
||||
{
|
||||
prop: 'recoverable',
|
||||
label: '可恢复',
|
||||
width: 90,
|
||||
formatter: (row: AgentDistributionRegistrationItem) =>
|
||||
h(ElTag, { type: row.recoverable ? 'warning' : 'info' }, () =>
|
||||
row.recoverable ? '是' : '否'
|
||||
)
|
||||
},
|
||||
{
|
||||
prop: 'created_at',
|
||||
label: '申请时间',
|
||||
width: 180,
|
||||
formatter: (row: AgentDistributionRegistrationItem) => formatDateTime(row.created_at)
|
||||
}
|
||||
])
|
||||
|
||||
const getParams = (): AgentDistributionRegistrationQueryParams => ({
|
||||
page: pagination.page,
|
||||
page_size: pagination.pageSize,
|
||||
status: searchForm.status,
|
||||
phone: searchForm.phone.trim() || undefined,
|
||||
keyword: searchForm.keyword.trim() || undefined,
|
||||
start_time: searchForm.dateRange[0] || undefined,
|
||||
end_time: searchForm.dateRange[1] || undefined,
|
||||
submission_anomaly:
|
||||
searchForm.submission_anomaly === undefined ? undefined : searchForm.submission_anomaly === 1
|
||||
})
|
||||
|
||||
const loadData = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await AgentDistributionService.getRegistrationApplications(getParams())
|
||||
if (res.code === 0 && res.data) {
|
||||
items.value = res.data.items || []
|
||||
pagination.total = res.data.total || 0
|
||||
} else {
|
||||
ElMessage.error(res.msg || '获取代理注册申请失败')
|
||||
}
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const handleSearch = () => {
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
const handleReset = () => {
|
||||
searchForm.status = undefined
|
||||
searchForm.phone = ''
|
||||
searchForm.keyword = ''
|
||||
searchForm.dateRange = []
|
||||
searchForm.submission_anomaly = undefined
|
||||
handleSearch()
|
||||
}
|
||||
|
||||
const handleRefresh = () => loadData()
|
||||
|
||||
const handleSizeChange = (size: number) => {
|
||||
pagination.pageSize = size
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
const handleCurrentChange = (page: number) => {
|
||||
pagination.page = page
|
||||
loadData()
|
||||
}
|
||||
|
||||
const openDetail = (row: AgentDistributionRegistrationItem) => {
|
||||
if (!hasAuth(AUGUST_PERMISSIONS.agentDistributionRegistration.detail)) {
|
||||
ElMessage.warning('您没有查看代理注册申请详情的权限')
|
||||
return
|
||||
}
|
||||
router.push(`${RoutesAlias.AgentDistributionRegistrationDetail}/${row.id}`)
|
||||
}
|
||||
|
||||
onMounted(loadData)
|
||||
</script>
|
||||
@@ -45,6 +45,8 @@
|
||||
:pageSize="pagination.pageSize"
|
||||
:total="pagination.total"
|
||||
:marginTop="10"
|
||||
:actions="getActions"
|
||||
:actionsWidth="90"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
@@ -199,9 +201,13 @@
|
||||
import { useCheckedColumns } from '@/composables/useCheckedColumns'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import { SHOP_BUSINESS_OWNER_PERMISSIONS } from '@/config/constants'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
|
||||
defineOptions({ name: 'BusinessOwnerImport' })
|
||||
|
||||
const { hasAuth } = useAuth()
|
||||
const canImportDetail = computed(() => hasAuth(SHOP_BUSINESS_OWNER_PERMISSIONS.importDetail))
|
||||
|
||||
const importStatusOptions = [
|
||||
{ label: '待处理', value: 1 },
|
||||
{ label: '处理中', value: 2 },
|
||||
@@ -251,6 +257,7 @@
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (event: MouseEvent) => {
|
||||
if (!canImportDetail.value) return
|
||||
event.stopPropagation()
|
||||
openDetail(row)
|
||||
}
|
||||
@@ -349,6 +356,11 @@
|
||||
getList()
|
||||
}
|
||||
|
||||
const getActions = (row: BusinessOwnerImportDetail) =>
|
||||
canImportDetail.value
|
||||
? [{ label: '详情', handler: () => openDetail(row), type: 'primary' as const }]
|
||||
: []
|
||||
|
||||
// ==================== 模板下载 ====================
|
||||
const handleDownloadTemplate = () => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user