修改管理员删除体检日历

修改管理员删除体检日历
main
yanzai 2 years ago
parent 32a9d4dd5f
commit deb2b30e87

@ -202,7 +202,12 @@ class AppointmentController extends Controller
if (count($appointments_to_delete)) { if (count($appointments_to_delete)) {
return Yo::error_echo(200023); return Yo::error_echo(200023);
} }
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['del' => 1]); if(Login::$info->id==1){
Appointment::whereIn('id', $ids)->update(['del' => 1]);
}else{
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['del' => 1]);
}
return Yo::delete_echo($ids); return Yo::delete_echo($ids);
} }
@ -211,7 +216,12 @@ class AppointmentController extends Controller
Login::admin([], [15, 27]); Login::admin([], [15, 27]);
$ids = $request->post('ids'); $ids = $request->post('ids');
$status = $request->post('status'); $status = $request->post('status');
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['status' => $status]); if(Login::$info->id==1){
Appointment::whereIn('id', $ids)->update(['status' => $status]);
}else{
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['status' => $status]);
}
return Yo::update_echo($ids); return Yo::update_echo($ids);
} }
@ -220,7 +230,12 @@ class AppointmentController extends Controller
Login::admin([], [15, 27]); Login::admin([], [15, 27]);
$ids = $request->post('ids'); $ids = $request->post('ids');
$count = $request->post('count'); $count = $request->post('count');
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['max_count' => $count]); if(Login::$info->id==1){
Appointment::whereIn('id', $ids)->update(['max_count' => $count]);
}else{
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['max_count' => $count]);
}
return Yo::update_echo($ids); return Yo::update_echo($ids);
} }

@ -1,5 +1,5 @@
let url_ = "https://bjrrtj-api.cjy.net.cn"; let url_ = "https://bjrrtj-api.cjy.net.cn";
const dev = 0 const dev = 1
if (dev === 1) { if (dev === 1) {
url_ = "http://localbeijingrenren" url_ = "http://localbeijingrenren"
} }

@ -2,7 +2,7 @@ import {
$post $post
} from '@/lu/axios.js' } from '@/lu/axios.js'
let url_ = "https://bjrrtj-api.cjy.net.cn"; let url_ = "https://bjrrtj-api.cjy.net.cn";
const dev = 0 const dev = 1
if (dev === 1) { if (dev === 1) {
url_ = "http://localbeijingrenren" url_ = "http://localbeijingrenren"
} }

@ -49,6 +49,7 @@
conclusion: response.data.conclusion, conclusion: response.data.conclusion,
list: response.data.list, list: response.data.list,
} }
}) })
} }

Loading…
Cancel
Save