diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/DepartmentController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/DepartmentController.php index 08beaa5..aeb8df6 100644 --- a/Laravel/app/Http/Controllers/API/Admin/YeWu/DepartmentController.php +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/DepartmentController.php @@ -30,6 +30,15 @@ public function GetEnableList(Request $request) $service = new DepartmentService(); return $service->GetEnableList(['userid'=>$userid,'group'=>$group],$is_all); } + //获取筛选后的可用科室列表(仅显示存在执行诊室的科室) + public function GetFilteredEnableList(Request $request) + { + $userid = $request->get('userid'); + $group = $request->get('role'); + $is_all = $request->get('is_all') ?? false; + $service = new DepartmentService(); + return $service->GetFilteredEnableList(['userid' => $userid, 'group' => $group], $is_all); + } //保存科室信息 public function Save() diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php index 39252a0..b038062 100644 --- a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php @@ -667,4 +667,83 @@ public function SaveLockedCount(Request $request) return \Yz::echoError1('保存失败:' . $e->getMessage()); } } + + // ===== 管理员接口(接受 department_id 参数,不依赖用户绑定科室) ===== + + //管理员生成计划明细 + public function CreateAdmin(Request $request, RosterService $rosterService) + { + $userid = $request->get('userid'); + $department_id = request('department_id'); + if (!$department_id) { + return \Yz::echoError1('科室信息不存在'); + } + $dateRange = request('dateRange'); + $planModelIds = request('ids'); + $HolidayEnable = request('HolidayEnable'); + $date_type = request('date_type'); + + try { + $result = $rosterService->generatePlans( + $dateRange, + $planModelIds, + $userid, + $date_type, + $HolidayEnable + ); + return \Yz::Return(true, '执行完成,共计生成计划 ' . $result['count'] . ' 条', $result); + } catch (\Exception $e) { + return \Yz::echoError1($e->getMessage()); + } + } + + //管理员修改计划详情 + public function ChangeInfoAdmin(Request $request) + { + $userid = $request->get('userid'); + $department_id = request('department_id'); + if (!$department_id) { + return \Yz::echoError1('科室信息不存在'); + } + $PlanDetaiInfo = request('PlanDetaiInfo'); + $check = DB::table('s_source_roster_detail')->where(['id' => $PlanDetaiInfo['id']]) + ->where('department_id', $department_id) + ->where('is_del', 0) + ->first(); + if (!$check) return \Yz::echoError1('没有权限'); + $u1 = DB::table('s_source_roster_detail')->where(['id' => $PlanDetaiInfo['id']])->update([ + 'status' => $PlanDetaiInfo['status'] + ]); + $i = 0; + foreach ($PlanDetaiInfo['coutsInfo'] as $key => $value) { + $u2 = DB::table('s_source_roster_detail_count')->where(['id' => $value['id']])->update([ + 'count' => $value['count']==null?0:$value['count'], + 'max_total' => $value['max_total'], + ]); + if ($u2) $i++; + } + if ($u1 or $i > 0) { + return \Yz::Return(true, '保存成功', []); + } else { + return \Yz::echoError1('没有数据更新'); + } + } + + //管理员删除计划明细 + public function DelAdmin(Request $request) + { + $department_id = request('department_id'); + if (!$department_id) { + return \Yz::echoError1('科室信息不存在'); + } + $ids = request('ids'); + $u1 = DB::table('s_source_roster_detail')->where(['department_id' => $department_id])->whereIn('id', $ids)->update([ + 'is_del' => 1 + ]); + if ($u1) { + return \Yz::Return(true, '删除成功', []); + } else { + return \Yz::echoError1('删除失败'); + } + } } diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanModelController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanModelController.php index a4c4c8b..3e75ba7 100644 --- a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanModelController.php +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanModelController.php @@ -504,4 +504,207 @@ public function SaveLockedCount(Request $request) return \Yz::echoError1('保存失败:' . $e->getMessage()); } } + + // ===== 管理员接口(接受 department_id 参数,不依赖用户绑定科室) ===== + + //管理员保存计划模板 + public function SaveAdmin(Request $request) + { + $userid = $request->get('userid'); + $department_id = request('department_id'); + if (!$department_id) { + return \Yz::echoError1('科室信息不存在'); + } + $date_type = request('date_type'); + $planInfo = request('planInfo'); + $bitian = array('max_total', 'qudao_total', 'period_id', 'begin_time', 'end_time', 'end_reservation_time', 'resources_id', 'devices', 'patientType'); + $bitian_zh = array('当日总量', '渠道数量', '时间段', '开始时间', '结束时间', '停止预约时间', '资源', '设备', '患者类型'); + if($date_type==1){ + $bitian[]='xingqi'; + $bitian_zh[]='星期'; + } + foreach ($bitian as $key => $field) { + if (array_key_exists($field, $planInfo) && $planInfo[$field] !== '' && $planInfo[$field] !== null && $planInfo[$field] !== [] && $planInfo[$field] !== 0) { + } else { + return \Yz::echoError1($bitian_zh[$key] . ' 不能为空'); + } + } + if($planInfo['end_reservation_time']>$planInfo['end_time']) return \Yz::echoError1('停止预约时间不能超过结束时间'); + $type=isset($planInfo['type']) ?$planInfo['type']:0; + $resourceInfo=DB::table('s_department_resources')->where(['id' => $planInfo['resources_id']])->first(); + if($resourceInfo->time_mode==1 and $type==0){ + return \Yz::echoError1('请选择时令'); + } + if($resourceInfo->time_mode==0 and $type != 0){ + return \Yz::echoError1('时令配置异常,请刷新页面重试'); + } + + DB::beginTransaction(); + $data = [ + 'type'=>$type, + 'department_id' => $department_id, + 'weekname' => '', + 'resources_id' => $planInfo['resources_id'], + 'device_id' => isset($planInfo['devices']) ? implode(',', $planInfo['devices']) : '', + 'period_id' => $planInfo['period_id'], + 'patient_type' => isset($planInfo['patientType']) ? implode(',', $planInfo['patientType']) : '', + 'begin_time' => $planInfo['begin_time'], + 'end_time' => $planInfo['end_time'], + 'end_reservation_time' => $planInfo['end_reservation_time'], + 'time_unit' => $planInfo['time_unit'], + 'status' => $planInfo['status'], + 'adduser' => $userid, + 'date_type' => $date_type, + ]; + $param=[ + 'type'=>$type, + 'department_id' => $department_id, + 'resources_id' => $planInfo['resources_id'], + 'is_del' => 0, + 'date_type' => $date_type, + ]; + if($date_type==1){ + foreach ($planInfo['xingqi'] as $key => $value) { + $data['weekname'] = $value; + $param['weekname'] = $value; + $check=$this->Check($planInfo,$param,$value); + if(!$check['status']){ + DB::rollBack(); + return \Yz::echoError1($check['msg']); + } + if ($planInfo['id'] == 0) { + $roster_id = DB::table('s_source_roster')->insertGetId($data); + if ($roster_id) { + foreach ($planInfo['qudao_total'] as $k => $v) { + $i_c = DB::table('s_source_roster_count')->insert([ + 'roster_id' => $roster_id, + 'appointment_type_id' => $v['id'], + 'max_total' => $planInfo['max_total'], + 'count' => $v['count'], + ]); + if (!$i_c) { + DB::rollBack(); + return \Yz::echoError1('保存失败'); + } + } + } else { + DB::rollBack(); + return \Yz::echoError1('保存失败'); + } + } + } + }elseif ($date_type==2){ + $check=$this->Check($planInfo,$param,"当前选定的"); + if(!$check['status']){ + DB::rollBack(); + return \Yz::echoError1($check['msg']); + } + if ($planInfo['id'] == 0) { + $roster_id = DB::table('s_source_roster')->insertGetId($data); + if ($roster_id) { + foreach ($planInfo['qudao_total'] as $k => $v) { + $i_c = DB::table('s_source_roster_count')->insert([ + 'roster_id' => $roster_id, + 'appointment_type_id' => $v['id'], + 'max_total' => $planInfo['max_total'], + 'count' => $v['count'], + ]); + if (!$i_c) { + DB::rollBack(); + return \Yz::echoError1('保存失败'); + } + } + } else { + DB::rollBack(); + return \Yz::echoError1('保存失败'); + } + } + } + if($planInfo['id'] > 0) { + $data['id'] = $planInfo['id']; + $i = DB::table('s_source_roster')->where(['id' => $planInfo['id'], 'is_del' => 0])->update($data); + foreach ($planInfo['qudao_total'] as $k => $v) { + $i_c = DB::table('s_source_roster_count')->where(['roster_id' => $planInfo['id'], 'appointment_type_id' => $v['appointment_type_id']])->update([ + 'max_total' => $planInfo['max_total'], + 'count' => $v['count'], + ]); + } + if ($i or $i_c) { + } else { + DB::rollBack(); + return \Yz::echoError1('保存失败'); + } + } + + DB::commit(); + return \Yz::Return(true, '保存成功', []); + } + + //管理员删除计划模板 + public function DelAdmin(Request $request) + { + $ids = request('ids'); + $department_id = request('department_id'); + if (!$department_id) { + return \Yz::echoError1('科室信息不存在'); + } + $d = DB::table('s_source_roster') + ->where(['department_id' => $department_id])->whereIn('id', $ids)->update([ + 'is_del' => 1, + ]); + if ($d) { + return \Yz::Return(true, '操作成功', []); + } else { + return \Yz::echoError1('操作失败'); + } + } + + //管理员获取预约类型比例 + public function GetAppointmentRatioAdmin(Request $request) + { + $department_id = request('department_id'); + if (!$department_id) { + return \Yz::echoError1('科室信息不存在'); + } + $appointment_type = DB::table('s_appointment_type')->where(['status' => 1, 'is_del' => 0])->get(); + $ratio = DB::table('s_appointment_type_ratio') + ->where(['department_id' => $department_id])->get(); + + foreach ($appointment_type as $key => $value) { + $appointment_type[$key]->ratio = 0; + foreach ($ratio as $k => $v) { + if ($value->id == $v->appointment_type_id) { + $appointment_type[$key]->ratio = $v->ratio; + $appointment_type[$key]->link = json_decode($v->link,true); + } + } + } + return \Yz::Return(true, '操作成功', $appointment_type); + } + + //管理员保存预约类型比例 + public function SaveAppointmentRatioAdmin(Request $request) + { + $department_id = request('department_id'); + if (!$department_id) { + return \Yz::echoError1('科室信息不存在'); + } + $ratioInfo = request('ratioInfo'); + $u = false; + DB::table('s_appointment_type_ratio')->where(['department_id' => $department_id])->delete(); + + foreach ($ratioInfo as $key => $value) { + $u = DB::table('s_appointment_type_ratio')->insert([ + 'department_id' => $department_id, + 'appointment_type_id' => $value['id'], + 'ratio' => $value['ratio'], + 'link'=>isset($value['link'])?json_encode($value['link'],JSON_UNESCAPED_UNICODE):null, + ]); + } + if ($u) { + return \Yz::Return(true, '操作成功', []); + } else { + return \Yz::echoError1('保存失败,无数据更新'); + } + } } diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/TimePeriodController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/TimePeriodController.php index e20058d..5aab50d 100644 --- a/Laravel/app/Http/Controllers/API/Admin/YeWu/TimePeriodController.php +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/TimePeriodController.php @@ -120,4 +120,25 @@ public function Del(Request $request) return \Yz::echoError1('操作失败'); } } + + // ===== 管理员接口(接受 department_id 参数,不依赖用户绑定科室) ===== + + public function GetEnableListAdmin(Request $request) + { + $department_id = request('department_id'); + if (!$department_id) { + return \Yz::echoError1('科室信息不存在'); + } + $date_type = request('date_type'); + $list = DB::table('s_period'); + if (isset($date_type)) { + $list = $list->where('date_type', $date_type); + } + $list = $list->where(['department_id' => $department_id, 'period_status' => 1, 'is_del' => 0])->get(); + if (count($list) > 0) { + return \Yz::Return(true, '操作成功', $list); + } else { + return \Yz::echoError1('无可用时间段'); + } + } } diff --git a/Laravel/app/Services/Admin/YeWu/DepartmentService.php b/Laravel/app/Services/Admin/YeWu/DepartmentService.php index 0b61ed7..d6a3967 100644 --- a/Laravel/app/Services/Admin/YeWu/DepartmentService.php +++ b/Laravel/app/Services/Admin/YeWu/DepartmentService.php @@ -74,6 +74,34 @@ public function GetEnableList($arr,$is_all=false) $list= $list->where(['is_del'=>0,'department_status'=>1])->get(); return \Yz::Return(true, '查询成功', ['list'=>$list]); } + // 获取筛选后的可用科室列表(仅显示存在执行诊室的科室) + public function GetFilteredEnableList($arr, $is_all = false) + { + $list = DB::table('s_department'); + if (!in_array($arr['group'], [1, 5]) && $is_all === false) { + $userInfo = DB::table('users')->where(['id' => $arr['userid']])->first(); + if ($userInfo) { + $deptIds = []; + if (!empty($userInfo->department_ids)) { + $deptIds = explode(",", $userInfo->department_ids); + } elseif ($userInfo->department_id) { + $deptIds = [$userInfo->department_id]; + } + if (count($deptIds) > 0) { + $list = $list->whereIn('id', $deptIds); + } + } + } + // 基础过滤:启用、未删除 + $list = $list->where(['is_del' => 0, 'department_status' => 1]); + // 只显示执行科室(在 s_department_resources 表中有记录的科室) + $hasResourceDeptIds = DB::table('s_department_resources') + ->where('is_del', 0) + ->distinct() + ->pluck('department_id'); + $list = $list->whereIn('id', $hasResourceDeptIds); + return \Yz::Return(true, '查询成功', ['list' => $list->get()]); + } public function Save($info) { if(isset($info['id'])){ diff --git a/Laravel/routes/api.php b/Laravel/routes/api.php index 61525d2..625401a 100644 --- a/Laravel/routes/api.php +++ b/Laravel/routes/api.php @@ -76,6 +76,7 @@ Route::post('admin/SaveDepartment','App\Http\Controllers\API\Admin\YeWu\DepartmentController@Save');//保存科室信息 Route::post('admin/DelDepartment','App\Http\Controllers\API\Admin\YeWu\DepartmentController@Del');//删除科室信息 Route::post('admin/GetEnableDepartmentList','App\Http\Controllers\API\Admin\YeWu\DepartmentController@GetEnableList');//获取启用的科室列表 + Route::post('admin/GetFilteredDepartmentList','App\Http\Controllers\API\Admin\YeWu\DepartmentController@GetFilteredEnableList');//获取筛选后的科室列表(仅显示存在执行诊室的科室) Route::post('admin/GetDepartmentChildren','App\Http\Controllers\API\Admin\YeWu\DepartmentController@GetChildren');//获取科室已关联的子科室列表 Route::post('admin/GetLeafDepartmentList','App\Http\Controllers\API\Admin\YeWu\DepartmentController@GetLeafList');//获取可作为诊室的叶子节点科室列表 Route::post('admin/SaveDepartmentChildren','App\Http\Controllers\API\Admin\YeWu\DepartmentController@SaveChildren');//保存科室关联诊室关系 @@ -97,6 +98,15 @@ Route::post('admin/PlanModelDel','App\Http\Controllers\API\Admin\YeWu\PlanModelController@Del');//删除计划模板 Route::post('admin/SaveAppointmentRatio','App\Http\Controllers\API\Admin\YeWu\PlanModelController@SaveAppointmentRatio');//保存渠道比例 Route::post('admin/SavePlanModelLockedCount','App\Http\Controllers\API\Admin\YeWu\PlanModelController@SaveLockedCount');//保存模板占位数量 + // ===== 管理员接口(接受 department_id 参数) ===== + Route::post('admin/PlanModelSaveAdmin','App\Http\Controllers\API\Admin\YeWu\PlanModelController@SaveAdmin');//管理员保存计划模板 + Route::post('admin/PlanModelDelAdmin','App\Http\Controllers\API\Admin\YeWu\PlanModelController@DelAdmin');//管理员删除计划模板 + Route::post('admin/GetAppointmentRatioAdmin','App\Http\Controllers\API\Admin\YeWu\PlanModelController@GetAppointmentRatioAdmin');//管理员获取预约类型比例 + Route::post('admin/SaveAppointmentRatioAdmin','App\Http\Controllers\API\Admin\YeWu\PlanModelController@SaveAppointmentRatioAdmin');//管理员保存渠道比例 + Route::post('admin/CreatePlanListAdmin','App\Http\Controllers\API\Admin\YeWu\PlanListController@CreateAdmin');//管理员生成计划明细 + Route::post('admin/PlanDetailChangeInfoAdmin','App\Http\Controllers\API\Admin\YeWu\PlanListController@ChangeInfoAdmin');//管理员修改计划详情 + Route::post('admin/PlanListDelAdmin','App\Http\Controllers\API\Admin\YeWu\PlanListController@DelAdmin');//管理员删除计划明细 + Route::post('admin/TimePeriodGetEnableListAdmin','App\Http\Controllers\API\Admin\YeWu\TimePeriodController@GetEnableListAdmin');//管理员获取可用时间段 Route::post('admin/CreatePlanList','App\Http\Controllers\API\Admin\YeWu\PlanListController@Create');//生成计划明细 Route::post('admin/PlanListGetList','App\Http\Controllers\API\Admin\YeWu\PlanListController@GetList');//生成计划明细 Route::post('admin/PlanListGetDetail','App\Http\Controllers\API\Admin\YeWu\PlanListController@GetDetail');//计划详情 diff --git a/YiJi-admin/src/api/api.js b/YiJi-admin/src/api/api.js index b9e9f1a..15bb811 100644 --- a/YiJi-admin/src/api/api.js +++ b/YiJi-admin/src/api/api.js @@ -209,6 +209,10 @@ export const SaveDepartment = (data = {}) => { export const GetEnableDepartmentList = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/GetEnableDepartmentList', data: data }) } +//admin获取筛选后的科室列表(仅显示存在执行诊室的科室) +export const GetFilteredDepartmentList = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/GetFilteredDepartmentList', data: data }) +} //admin获取科室已关联的子科室ID列表 export const GetDepartmentChildren = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/GetDepartmentChildren', data: data }) @@ -264,6 +268,10 @@ export const TimePeriodGetList = (data = {}) => { export const TimePeriodGetEnableList = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/TimePeriodGetEnableList', data: data }) } +//admin获取可用时间段(管理员接口) +export const TimePeriodGetEnableListAdmin = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/TimePeriodGetEnableListAdmin', data: data }) +} //admin获取时间段详情 export const TimePeriodGetDetail = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/TimePeriodGetDetail', data: data }) @@ -280,10 +288,18 @@ export const PlanModelGetList = (data = {}) => { export const PlanModelSave = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanModelSave', data: data }) } +//admin保存资源计划模板(管理员接口) +export const PlanModelSaveAdmin = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanModelSaveAdmin', data: data }) +} //admin保存资源计划模板 export const GetAppointmentRatio = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/GetAppointmentRatio', data: data }) } +//admin获取预约类型比例(管理员接口) +export const GetAppointmentRatioAdmin = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/GetAppointmentRatioAdmin', data: data }) +} //admin资源计划详情 export const GetPlanModelDetailInfo = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/GetPlanModelDetailInfo', data: data }) @@ -292,14 +308,26 @@ export const GetPlanModelDetailInfo = (data = {}) => { export const PlanModelDel = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanModelDel', data: data }) } +//admin删除计划模板(管理员接口) +export const PlanModelDelAdmin = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanModelDelAdmin', data: data }) +} //admin保存预约类型(渠道)比例 export const SaveAppointmentRatio = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/SaveAppointmentRatio', data: data }) } +//admin保存预约类型比例(管理员接口) +export const SaveAppointmentRatioAdmin = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/SaveAppointmentRatioAdmin', data: data }) +} //admin生成计划明细 export const CreatePlanList = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/CreatePlanList', data: data }) } +//admin生成计划明细(管理员接口) +export const CreatePlanListAdmin = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/CreatePlanListAdmin', data: data }) +} //admin获取计划明细列表 export const PlanListGetList = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanListGetList', data: data }) @@ -312,10 +340,18 @@ export const PlanListGetDetail = (data = {}) => { export const PlanDetailChangeInfo = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanDetailChangeInfo', data: data }) } +//admin修改计划详情(管理员接口) +export const PlanDetailChangeInfoAdmin = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanDetailChangeInfoAdmin', data: data }) +} //admin删除计划明细 export const PlanDetailPlanListDel = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanListDel', data: data }) } +//admin删除计划明细(管理员接口) +export const PlanDetailPlanListDelAdmin = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanListDelAdmin', data: data }) +} //admin获取主表列表 export const GetMainList = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/GetMainList', data: data }) diff --git a/YiJi-admin/src/router/index.js b/YiJi-admin/src/router/index.js index ab92514..29e34f4 100644 --- a/YiJi-admin/src/router/index.js +++ b/YiJi-admin/src/router/index.js @@ -194,6 +194,20 @@ const router = createRouter({ meta: { title: '预约资源明细' } + },{ + path: '/appointmentmngr/planmodeladmin', + name: 'AppointmentMngrPlanModelAdmin', + component: () => import('../views/AppointmentMngr/PlanModelAdmin.vue'), + meta: { + title: '号源计划管理' + } + },{ + path: '/appointmentmngr/planlistadmin', + name: 'AppointmentMngrPlanListAdmin', + component: () => import('../views/AppointmentMngr/PlanListAdmin.vue'), + meta: { + title: '号源明细管理' + } },{ path: '/appointmentmngr/holidayMngr', name: 'AppointmentMngrHolidayMngr', diff --git a/YiJi-admin/src/views/AppointmentMngr/PlanList.vue b/YiJi-admin/src/views/AppointmentMngr/PlanList.vue index 175601b..c763b67 100644 --- a/YiJi-admin/src/views/AppointmentMngr/PlanList.vue +++ b/YiJi-admin/src/views/AppointmentMngr/PlanList.vue @@ -38,9 +38,11 @@ --> - + + + 搜索 删除 @@ -561,6 +563,7 @@ for (let i = 0; i < qudao_count; i++) { if (PlanDetaiInfo.value.coutsInfo[i].ratio === 0) continue + PlanDetaiInfo.value.coutsInfo[i].max_total = PlanDetaiInfo.value.max_total PlanDetaiInfo.value.coutsInfo[i].count = Math.round(PlanDetaiInfo.value.max_total * (PlanDetaiInfo.value .coutsInfo[i].ratio / 100)) temp = temp + PlanDetaiInfo.value.coutsInfo[i].count diff --git a/YiJi-admin/src/views/AppointmentMngr/PlanListAdmin.vue b/YiJi-admin/src/views/AppointmentMngr/PlanListAdmin.vue new file mode 100644 index 0000000..1d9cb55 --- /dev/null +++ b/YiJi-admin/src/views/AppointmentMngr/PlanListAdmin.vue @@ -0,0 +1,988 @@ + + + \ No newline at end of file diff --git a/YiJi-admin/src/views/AppointmentMngr/PlanModelAdmin.vue b/YiJi-admin/src/views/AppointmentMngr/PlanModelAdmin.vue new file mode 100644 index 0000000..9810d35 --- /dev/null +++ b/YiJi-admin/src/views/AppointmentMngr/PlanModelAdmin.vue @@ -0,0 +1,1346 @@ + + + + + \ No newline at end of file diff --git a/YiJi-admin/src/views/Info/AppointmentTj.vue b/YiJi-admin/src/views/Info/AppointmentTj.vue index 587bc34..b86fb79 100644 --- a/YiJi-admin/src/views/Info/AppointmentTj.vue +++ b/YiJi-admin/src/views/Info/AppointmentTj.vue @@ -2,8 +2,11 @@
- + + + 搜索 @@ -62,7 +65,8 @@ }); let loading = ref(false); let searchInfo = ref({ - name: '' + name: '', + dateRange: [] }) let Info = ref({ id: null, diff --git a/YiJi-admin/src/views/Info/EntrustList.vue b/YiJi-admin/src/views/Info/EntrustList.vue index 02b8482..d857820 100644 --- a/YiJi-admin/src/views/Info/EntrustList.vue +++ b/YiJi-admin/src/views/Info/EntrustList.vue @@ -3,9 +3,11 @@
- + + + { loading.value = true - GetEnableDepartmentList({ + GetFilteredDepartmentList({ is_all: true }).then(res => { loading.value = false diff --git a/YiJi-admin/src/views/Info/MakeListTj.vue b/YiJi-admin/src/views/Info/MakeListTj.vue index 6bb6910..b96d1fc 100644 --- a/YiJi-admin/src/views/Info/MakeListTj.vue +++ b/YiJi-admin/src/views/Info/MakeListTj.vue @@ -2,9 +2,11 @@
- + + + 搜索 @@ -37,7 +39,8 @@ }); let loading=ref(false); let searchInfo=ref({ - name:'' + name:'', + dateRange: [] }) let Info=ref({ id:null, diff --git a/YiJi-admin/src/views/Info/PlanList.vue b/YiJi-admin/src/views/Info/PlanList.vue index 9ff686b..5ef22ae 100644 --- a/YiJi-admin/src/views/Info/PlanList.vue +++ b/YiJi-admin/src/views/Info/PlanList.vue @@ -38,9 +38,11 @@ - + + + 搜索 @@ -225,7 +227,7 @@ } from 'vue' import { PlanListGetList, - GetEnableDepartmentList, + GetFilteredDepartmentList, GetEnableDeviceList, TimePeriodGetEnableList, DepartmentResourceGetEnableList, @@ -316,7 +318,7 @@ let EnableDepartmentList = ref([]) const GetDepartmentEnableList = () => { loading.value = true - GetEnableDepartmentList({is_all: true}).then(res => { + GetFilteredDepartmentList({is_all: true}).then(res => { loading.value = false if (res.status) { EnableDepartmentList.value = res.data.list diff --git a/YiJi-admin/src/views/Info/PlanTj.vue b/YiJi-admin/src/views/Info/PlanTj.vue index d395e12..fcbd94f 100644 --- a/YiJi-admin/src/views/Info/PlanTj.vue +++ b/YiJi-admin/src/views/Info/PlanTj.vue @@ -3,9 +3,11 @@
- + + + 搜索 @@ -37,7 +39,9 @@ let loading = ref(false) let tableData = ref([]) - let SearchInfo=ref({}) + let SearchInfo=ref({ + dateRange: [] + }) let PlanAllCount=ref(0) let AllUsedCount=ref(0) //获取服务器时间 diff --git a/YiJi-admin/src/views/YeWu/DepartmentResources.vue b/YiJi-admin/src/views/YeWu/DepartmentResources.vue index 1a71c1e..c8c783b 100644 --- a/YiJi-admin/src/views/YeWu/DepartmentResources.vue +++ b/YiJi-admin/src/views/YeWu/DepartmentResources.vue @@ -91,7 +91,7 @@ onMounted } from 'vue' import { - GetEnableDepartmentList, + GetFilteredDepartmentList, DepartmentResourceGetList, DepartmentResourceDel, GetEnableDeviceList, @@ -155,7 +155,7 @@ let EnableDepartmentList = ref([]); const GetDepartmentEnableList = () => { loading.value = true - GetEnableDepartmentList({}).then(res => { + GetFilteredDepartmentList({}).then(res => { loading.value = false if (res.status) { EnableDepartmentList.value = res.data.list