feat: 新增员工管理端 CRUD 并增强订单筛选

- /employee 管理端列表/新增/更新/启停用,/employee/me 供管理端判定陪诊员身份

- 订单列表补充支付状态、支付渠道、日期区间、关键词筛选与各页签计数

- 陪诊员订单复用统一列表查询,过滤与分页口径与管理员一致

- 管理员代客下单时订单归属以就诊人档案用户为准,无归属订单跳过未完成上限

- 管理员判定兼容 web-escort-admin 与重构后的 apps 成员视图
This commit is contained in:
lik
2026-11-06 19:47:42 +08:00
parent 420f379ce8
commit af9a1543ae
6 changed files with 492 additions and 96 deletions
+11
View File
@@ -129,6 +129,17 @@ function registerRoutes(app) {
router.put("/health-profile/:id", requireAuth, requireAdmin, handlerHealthProfile.updateProfile.bind(handlerHealthProfile));
router.delete("/health-profile/:id", requireAuth, requireAdmin, handlerHealthProfile.deleteProfile.bind(handlerHealthProfile));
// 当前账号的员工档案:登录即可访问,供管理端判定陪诊员身份。
// 必须注册在 /employee 管理端路由之前,避免被更宽的路由抢占
router.get("/employee/me", requireAuth, handlerEmployee.getMyEmployee.bind(handlerEmployee));
// 员工(陪诊师)管理:管理端 CRUD,必须管理员。
// 与下方公开的 /attendant 公示接口分离:这里返回真实姓名等内部字段
router.get("/employee", requireAuth, requireAdmin, handlerEmployee.getEmployees.bind(handlerEmployee));
router.post("/employee", requireAuth, requireAdmin, createLimit, handlerEmployee.createEmployee.bind(handlerEmployee));
router.put("/employee/:id", requireAuth, requireAdmin, updateLimit, handlerEmployee.updateEmployee.bind(handlerEmployee));
router.patch("/employee/:id/status", requireAuth, requireAdmin, updateLimit, handlerEmployee.updateEmployeeStatus.bind(handlerEmployee));
// 医院基础信息:列表/详情公开,写接口仅管理员
router.get("/hospital", handlerHospital.getHospitals.bind(handlerHospital));
router.get("/hospital/:id", handlerHospital.getHospitalById.bind(handlerHospital));