feat: add agent user edit, card type permission check and balance deduction

- Backend: check AgentApplicationCardType.can_generate before allowing card recharge
- Backend: deduct agent balance and record consumption when creating user with card
- Backend: add GET /agent/users/:id and PUT /agent/users/:id for user edit
- Backend: extract checkAgentUserPermission helper, refactor handleUpdateUserStatus
- Frontend: add user edit page ([id].vue) with username/email/password
- Frontend: add edit action in user list dropdown menu
- Frontend: add route for agent user edit page
- Add i18n keys for agent user edit
This commit is contained in:
2026-05-11 08:48:02 +08:00
parent 57e1d10689
commit a76a30ee78
8 changed files with 374 additions and 22 deletions
+6
View File
@@ -450,6 +450,12 @@ const routes: RouteRecordRaw[] = [
component: () => import('@/pages/agent/users/create.vue'),
meta: { title: '创建用户 - 代理商后台' },
},
{
path: 'users/:id',
name: 'AgentUserEdit',
component: () => import('@/pages/agent/users/[id].vue'),
meta: { title: '编辑用户 - 代理商后台' },
},
{
path: 'finance',
name: 'AgentFinance',