diff --git a/admin/src/api/doctor.ts b/admin/src/api/doctor.ts index b92149dc..1534dc6d 100644 --- a/admin/src/api/doctor.ts +++ b/admin/src/api/doctor.ts @@ -71,6 +71,11 @@ export function appointmentAdminEdit(params: any) { return request.post({ url: '/doctor.appointment/edit', params }) } +/** 批量修改挂号渠道来源(与 edit 共用 doctor.appointment/edit 权限) */ +export function appointmentBatchEditChannel(params: any) { + return request.post({ url: '/doctor.appointment/batchEditChannel', params }) +} + // 获取挂号详情 export function appointmentDetail(params: any) { return request.get({ url: '/doctor.appointment/detail', params }) diff --git a/admin/src/views/consumer/prescription/guahao.vue b/admin/src/views/consumer/prescription/guahao.vue index f3bc5453..faa7a0a9 100644 --- a/admin/src/views/consumer/prescription/guahao.vue +++ b/admin/src/views/consumer/prescription/guahao.vue @@ -50,6 +50,22 @@ + + + + + 查询 重置 @@ -58,7 +74,29 @@ - +
+ + 批量修改渠道 + + + 已选 {{ selectedRows.length }} 条 + +
+ + + + +

将对已选 {{ selectedRows.length }} 条挂号写入同一渠道来源(仅改渠道,不改其它字段)。

+ + + + + + + + + + + +
- + @@ -99,7 +99,7 @@ - +
diff --git a/server/sql/1.9.20260514/add_appointment_batch_edit_channel_perm.sql b/server/sql/1.9.20260514/add_appointment_batch_edit_channel_perm.sql new file mode 100644 index 00000000..00e56048 --- /dev/null +++ b/server/sql/1.9.20260514/add_appointment_batch_edit_channel_perm.sql @@ -0,0 +1,17 @@ +-- 挂号批量改渠道:接口 doctor.appointment/batchEditChannel +-- 须写入菜单权限才会走鉴权;实际访问时 AuthMiddleware 将 batch 映射为已勾选的 doctor.appointment/edit +-- 执行前确认表前缀为 zyt_ + +SET @guahao_menu_id := (SELECT id FROM zyt_system_menu WHERE paths = 'consumer/prescription_guahao' LIMIT 1); + +INSERT INTO zyt_system_menu ( + pid, type, name, icon, sort, perms, paths, component, + selected, params, is_cache, is_show, is_disable, create_time, update_time +) +SELECT + @guahao_menu_id, 'A', '批量修改挂号渠道', '', 2, + 'doctor.appointment/batchEditChannel', '', '', + '', '', 0, 1, 0, UNIX_TIMESTAMP(), UNIX_TIMESTAMP() +FROM DUAL +WHERE @guahao_menu_id IS NOT NULL + AND NOT EXISTS (SELECT 1 FROM zyt_system_menu WHERE perms = 'doctor.appointment/batchEditChannel');