diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php index 47a28b7..20feef3 100644 --- a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php @@ -391,6 +391,7 @@ class PlanListController extends Controller { date_default_timezone_set('PRC'); $nowdatetime = date("Y-m-d H:i:s"); + $do_userid=request('do_user'); $planid = request('planid'); $appointment_type = request('appointment_type');//渠道id $mainlistid = request('mainlistid');//主表id @@ -398,7 +399,7 @@ class PlanListController extends Controller if (!isset($do_type)) return \Yz::echoError1('参数:操作类型 不能为空'); $service = new PlanListService(); - return $service->YuYue($planid, $appointment_type, $mainlistid, $do_type); + return $service->YuYue($planid, $appointment_type, $mainlistid, $do_type,$do_userid); } //自动预约 public function AutoYuYue() @@ -454,10 +455,11 @@ class PlanListController extends Controller $reg_num = request('reg_num'); $password = request('password'); $userid = $request->get('userid');//中间件产生的参数 + $do_userid=request('do_user'); $query = DB::table('users')->where(['id' => $userid])->get(); if (password_verify($password, $query[0]->pwd)) { $service = new PlanListService(); - return $service->CancelYuYue($MainListId, $reg_num); + return $service->CancelYuYue($MainListId, $reg_num,$do_userid); } 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 8ea30ed..127928a 100644 --- a/Laravel/app/Http/Controllers/API/Admin/YeWu/WorkMainController.php +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/WorkMainController.php @@ -373,8 +373,9 @@ class WorkMainController extends Controller { $MainListId = request('MainListId'); $reg_num = request('reg_num'); + $do_userid=request('do_user'); $service = new PlanListService(); - return $service->CancelYuYue($MainListId,$reg_num); + return $service->CancelYuYue($MainListId,$reg_num,$do_userid); } //获取某个患者全部预约记录 public function GetPersonYuYueList() diff --git a/Laravel/app/Services/Admin/YeWu/PlanListService.php b/Laravel/app/Services/Admin/YeWu/PlanListService.php index caee4e3..ed9f8ea 100644 --- a/Laravel/app/Services/Admin/YeWu/PlanListService.php +++ b/Laravel/app/Services/Admin/YeWu/PlanListService.php @@ -184,7 +184,7 @@ WHERE } //开始预约占用名额 - public function YuYue($planid, $appointment_type, $mainlistids, $do_type) + public function YuYue($planid, $appointment_type, $mainlistids, $do_type,$do_user=null) { date_default_timezone_set('PRC'); $nowdatetime = date("Y-m-d H:i:s"); @@ -454,7 +454,7 @@ WHERE 'reg_num' => $oldMainInfo->reg_num, 'old_status' => $oldMainInfo->list_status, 'new_status' => 1, - 'create_user' => null, + 'create_user' => $do_user, 'note' => $note, 'data' => json_encode($u_data) ]); @@ -535,7 +535,7 @@ WHERE } } - public function CancelYuYue($MainListId, $reg_num) + public function CancelYuYue($MainListId, $reg_num,$do_user=null) { date_default_timezone_set('PRC'); $nowdatetime = date("Y-m-d H:i:s"); @@ -692,7 +692,7 @@ WHERE 'reg_num' => $mainInfo->reg_num, 'old_status' => $mainInfo->list_status, 'new_status' => 0, - 'create_user' => null, + 'create_user' => $do_user, 'note' => '取消预约', 'data' => json_encode($u_data, JSON_UNESCAPED_UNICODE), 'created_at' => $nowdatetime, diff --git a/YiJi-admin/src/components/Yewu/YuYue202506.vue b/YiJi-admin/src/components/Yewu/YuYue202506.vue index 17ce816..6aef90a 100644 --- a/YiJi-admin/src/components/Yewu/YuYue202506.vue +++ b/YiJi-admin/src/components/Yewu/YuYue202506.vue @@ -148,10 +148,14 @@ type: String }, appointment_type: { - type: Number + type: [String, Number] }, dotype: { type: Number + }, + do_user: { + default:'', + type: [String, Number] } }) let entrustTableRef = ref(null) @@ -569,7 +573,8 @@ mainlistid: selectedMianListId.value, planid: selectedPlanId.value, appointment_type: props.appointment_type, - dotype: type, //1预约2改约 + dotype: type, //1预约2改约, + do_user:props.do_user, }).then(res => { planLoading.value = false @@ -619,6 +624,7 @@ return DoctorCancelYuYue({ MainListId: v.id, reg_num: v.reg_num, + do_user:props.do_user, }).then(res => { if (res.status) { ElMessage.success('取消成功') diff --git a/YiJi-admin/src/views/YeWu/MainList.vue b/YiJi-admin/src/views/YeWu/MainList.vue index 2ab2df4..042a225 100644 --- a/YiJi-admin/src/views/YeWu/MainList.vue +++ b/YiJi-admin/src/views/YeWu/MainList.vue @@ -4,7 +4,7 @@ - +
@@ -59,8 +59,8 @@ - - + @@ -562,7 +562,8 @@ CancelYuYue({ MainListId: tableSelected.value[0].id, reg_num: tableSelected.value[0].reg_num, - password: value + do_user:loginUserinfo.value.id, + password: value, }).then(res => { loading.value = false if (res.status) {