diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php index d7ea1f7..6296242 100644 --- a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php @@ -724,6 +724,7 @@ public function SaveLockedCount(Request $request) $userid = $request->get('userid'); $roster_detail_id = request('roster_detail_id'); $locked_counts = request('locked_counts'); + $locked_remark = request('locked_remark'); if (empty($roster_detail_id)) { return \Yz::echoError1('计划明细ID不能为空'); @@ -791,6 +792,11 @@ public function SaveLockedCount(Request $request) } } + // 更新占位备注(时段级,无条件覆盖) + DB::table('s_source_roster_detail') + ->where('id', $roster_detail_id) + ->update(['locked_remark' => $locked_remark ?? null]); + // 有变更时记录日志 if (!empty($changes)) { DB::table('s_source_roster_detail_log')->insert([ @@ -1196,6 +1202,7 @@ public function BatchChangeLocked(Request $request) } $ids = request('ids'); $coutsInfo = request('coutsInfo'); + $locked_remark = request('locked_remark'); if (empty($ids) || empty($coutsInfo)) { return \Yz::echoError1('参数错误'); } @@ -1238,6 +1245,10 @@ public function BatchChangeLocked(Request $request) AND appointment_type_id IN ({$atypeIdsStr})"; $u2 = DB::update($sql); if ($u2 !== false) { + // 更新占位备注(时段级,无条件覆盖) + DB::table('s_source_roster_detail') + ->whereIn('id', array_map('intval', $ids)) + ->update(['locked_remark' => $locked_remark ?? null]); return \Yz::Return(true, '批量占位成功', []); } else { return \Yz::echoError1('批量占位失败'); diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/WorkMainController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/WorkMainController.php index a51b4ff..6a7318a 100644 --- a/Laravel/app/Http/Controllers/API/Admin/YeWu/WorkMainController.php +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/WorkMainController.php @@ -217,7 +217,7 @@ public function GetList(Request $request) ->leftJoin('s_period','s_list.reservation_time','=','s_period.id') ->leftJoin('s_department_resources','s_list.reservation_sources','=','s_department_resources.id') ->select('s_list.*','s_period.period_begin_time','s_period.period_end_time','s_department_resources.department_resources_name') - ->where(['s_list.is_del'=>0,'s_list.is_nullify'=>0]); + ->where(['s_list.is_del'=>0]); if($userInfo[0]->group==2){ // $list=$list->whereIn('warddesc', explode(",", $userInfo[0]->ward)); $list=$list->where(['wardcode'=> $department->department_number]); @@ -272,8 +272,15 @@ public function GetList(Request $request) $list = $list->whereBetween('s_list.reservation_date', $searchInfo['dateRange']); } } - if (isset($searchInfo['list_status'])) { - $list = $list->where('s_list.list_status', $searchInfo['list_status']); + if (isset($searchInfo['list_status']) && $searchInfo['list_status'] !== '' && $searchInfo['list_status'] !== null) { + if ($searchInfo['list_status'] === 'nullify') { + $list = $list->where('s_list.is_nullify', 1); + } else { + $list = $list->where('s_list.is_nullify', 0) + ->where('s_list.list_status', $searchInfo['list_status']); + } + } else { + $list = $list->where('s_list.is_nullify', 0); } if (isset($searchInfo['patient_type'])) { $list = $list->where('s_list.patient_type', $searchInfo['patient_type']); @@ -303,7 +310,7 @@ public function GetList(Request $request) //动态排序 $orderField = $searchInfo['orderField'] ?? ''; $orderDirection = ($searchInfo['orderDirection'] ?? '') == 'ascending' ? 'asc' : 'desc'; - $allowedFields = ['reg_num', 'episodeid', 'user_name', 'user_sex', 'user_brithday', 'entrust', 'is_pay', 'list_status', 'reservation_department', 'user_phone', 'reservation_time', 'entrust_date_time']; + $allowedFields = ['reg_num', 'episodeid', 'user_name', 'user_sex', 'user_brithday', 'entrust', 'is_pay', 'list_status', 'reservation_department', 'user_phone', 'reservation_time', 'reservation_date', 'entrust_date_time']; if (!empty($orderField) && in_array($orderField, $allowedFields)) { if ($orderField === 'reservation_time') { $list = $list->orderByRaw("CONCAT(IFNULL(s_list.reservation_date,''), ' ', IFNULL(s_period.period_begin_time,'')) $orderDirection"); diff --git a/YiJi-admin/src/views/AppointmentMngr/PlanList.vue b/YiJi-admin/src/views/AppointmentMngr/PlanList.vue index f56ab44..dd70e14 100644 --- a/YiJi-admin/src/views/AppointmentMngr/PlanList.vue +++ b/YiJi-admin/src/views/AppointmentMngr/PlanList.vue @@ -287,6 +287,16 @@ + + +