feat: 员工自助注册+审核流程

- 新增 registration_packages 表:管理员配置注册套餐(名称/角色)
- AuthController 新增 register() 和 registrationPackages() 公开接口
- UserController 新增 approve() / reject() 审核接口
- StoreController 新增 publicList() 公开门店列表
- 前端 /register 注册页:选门店→选岗位套餐→填信息→提交
- 前端 system/registration-packages:套餐 CRUD
- 用户管理页:待审核状态展示 + 通过/拒绝快捷操作
- 登录页底部加「申请注册」跳转链接
- 路由白名单加 /register
This commit is contained in:
li
2026-03-14 17:39:50 +08:00
parent 4a68855a88
commit ee2b1757d0
105 changed files with 7859 additions and 2469 deletions
+27 -18
View File
@@ -49,8 +49,8 @@ onMounted(() => fetchList())
</script>
<template>
<div class="page-container">
<div class="search-bar">
<div class="p-6 space-y-4">
<div class="bg-white rounded-2xl border border-gray-100 shadow-sm p-4 flex items-center flex-wrap gap-3">
<el-input v-model="searchForm.user_id" placeholder="员工ID" style="width:160px" clearable @keydown.enter="handleSearch" />
<el-date-picker v-model="searchForm.start_date" type="date" value-format="YYYY-MM-DD" placeholder="开始日期" />
<el-date-picker v-model="searchForm.end_date" type="date" value-format="YYYY-MM-DD" placeholder="结束日期" />
@@ -58,22 +58,31 @@ onMounted(() => fetchList())
<el-button @click="handleReset">重置</el-button>
</div>
<div class="table-container">
<div class="table-actions"><el-button type="primary" @click="handleAdd">新增排班</el-button></div>
<el-table v-loading="loading" :data="tableData" border stripe style="width:100%">
<el-table-column label="员工" min-width="100">
<template #default="{ row }">{{ row.user?.name || '-' }}</template>
</el-table-column>
<el-table-column prop="schedule_date" label="排班日期" width="120" />
<el-table-column label="班次" width="90" align="center">
<template #default="{ row }">
<el-tag :type="shiftType[row.shift_type]" size="small">{{ shiftMap[row.shift_type] }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="start_time" label="开始时间" width="100" />
<el-table-column prop="end_time" label="结束时间" width="100" />
</el-table>
<el-pagination v-model:current-page="pagination.page" :total="total" layout="total,prev,pager,next" background @current-change="handlePageChange" />
<div class="bg-white rounded-2xl border border-gray-100 shadow-sm">
<div class="flex items-center justify-between px-5 py-4 border-b border-gray-50">
<div class="flex items-center gap-3">
<span class="font-medium text-gray-700">排班列表</span>
</div>
<el-button type="primary" @click="handleAdd">新增排班</el-button>
</div>
<div class="px-2">
<el-table v-loading="loading" :data="tableData" style="width:100%">
<el-table-column label="员工" min-width="100">
<template #default="{ row }">{{ row.user?.name || '-' }}</template>
</el-table-column>
<el-table-column prop="schedule_date" label="排班日期" width="120" />
<el-table-column label="班次" width="90" align="center">
<template #default="{ row }">
<el-tag :type="shiftType[row.shift_type]" size="small">{{ shiftMap[row.shift_type] }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="start_time" label="开始时间" width="100" />
<el-table-column prop="end_time" label="结束时间" width="100" />
</el-table>
</div>
<div class="px-5 py-3 border-t border-gray-50">
<el-pagination v-model:current-page="pagination.page" :total="total" layout="total,prev,pager,next" background @current-change="handlePageChange" />
</div>
</div>
<el-dialog v-model="dialogVisible" title="新增排班" width="500px" destroy-on-close>