|
@@ -46,7 +46,7 @@ class IndexController extends Controller
|
|
|
$grid->time('时间');
|
|
|
$grid->address('地址');
|
|
|
$grid->contact_info('联系方式');
|
|
|
- $grid->column('status','状态')->display(function ($status) {
|
|
|
+ $grid->column('status', '状态')->display(function ($status) {
|
|
|
return $status ? '显示' : '隐藏';
|
|
|
});
|
|
|
$grid->created_at('创建时间');
|
|
@@ -76,13 +76,14 @@ class IndexController extends Controller
|
|
|
->body($this->editForm($id)->edit($id));
|
|
|
}
|
|
|
|
|
|
- protected function editForm($id){
|
|
|
+ protected function editForm($id)
|
|
|
+ {
|
|
|
$info = Presentation::find($id);
|
|
|
$form = new ValidateForm(new Presentation);
|
|
|
- $form->text('name', '宣讲会标题')->rules('required|max:100', array('required'=>'标题不能为空。','max'=>'标题长度不能大于100。'))->setMustMark();
|
|
|
- $form->text('time', '宣讲时间段')->rules('required', array('required'=>'时间段不能为空。'))->setMustMark();
|
|
|
- $form->text('address', '宣讲会地址')->rules('required', array('required'=>'宣讲会地址不能为空。'))->setMustMark();
|
|
|
- $form->text('contact_info', '联系方式')->rules('required', array('required'=>'联系方式不能为空。'))->setMustMark();
|
|
|
+ $form->text('name', '宣讲会标题')->rules('required|max:100', ['required' => '标题不能为空。', 'max' => '标题长度不能大于100。'])->setMustMark();
|
|
|
+ $form->text('time', '宣讲时间段')->rules('required', ['required' => '时间段不能为空。'])->setMustMark();
|
|
|
+ $form->text('address', '宣讲会地址')->rules('required', ['required' => '宣讲会地址不能为空。'])->setMustMark();
|
|
|
+ $form->text('contact_info', '联系方式')->rules('required', ['required' => '联系方式不能为空。'])->setMustMark();
|
|
|
$display_option = [
|
|
|
'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],
|
|
|
'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],
|
|
@@ -95,10 +96,10 @@ class IndexController extends Controller
|
|
|
protected function form()
|
|
|
{
|
|
|
$form = new ValidateForm(new Presentation);
|
|
|
- $form->text('name', '宣讲会标题')->rules('required|max:100', array('required'=>'标题不能为空。','max'=>'标题长度不能大于100。'))->setMustMark();
|
|
|
- $form->text('time', '宣讲时间段')->rules('required', array('required'=>'时间段不能为空。'))->setMustMark();
|
|
|
- $form->text('address', '宣讲会地址')->rules('required', array('required'=>'宣讲会地址不能为空。'))->setMustMark();
|
|
|
- $form->text('contact_info', '联系方式')->rules('required', array('required'=>'联系方式不能为空。'))->setMustMark();
|
|
|
+ $form->text('name', '宣讲会标题')->rules('required|max:100', ['required' => '标题不能为空。', 'max' => '标题长度不能大于100。'])->setMustMark();
|
|
|
+ $form->text('time', '宣讲时间段')->rules('required', ['required' => '时间段不能为空。'])->setMustMark();
|
|
|
+ $form->text('address', '宣讲会地址')->rules('required', ['required' => '宣讲会地址不能为空。'])->setMustMark();
|
|
|
+ $form->text('contact_info', '联系方式')->rules('required', ['required' => '联系方式不能为空。'])->setMustMark();
|
|
|
$display_option = [
|
|
|
'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],
|
|
|
'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],
|
|
@@ -108,22 +109,23 @@ class IndexController extends Controller
|
|
|
return $form;
|
|
|
}
|
|
|
|
|
|
- public function store(Request $request){
|
|
|
+ public function store(Request $request)
|
|
|
+ {
|
|
|
$verify = $this->form()->getValidateInput();
|
|
|
|
|
|
$data = [
|
|
|
- 'name' => $verify['name'],
|
|
|
- 'time' => $verify['time'],
|
|
|
- 'address' => $verify['address'],
|
|
|
+ 'name' => $verify['name'],
|
|
|
+ 'time' => $verify['time'],
|
|
|
+ 'address' => $verify['address'],
|
|
|
'contact_info' => $verify['contact_info'],
|
|
|
- 'status' => $verify['status']
|
|
|
+ 'status' => $verify['status'],
|
|
|
];
|
|
|
|
|
|
|
|
|
try {
|
|
|
Presentation::create($data);
|
|
|
DB::commit();
|
|
|
- }catch (\Exception $e) {
|
|
|
+ } catch (\Exception $e) {
|
|
|
DB::rollback();
|
|
|
return admin_toastr($e->getMessage(), 'error');
|
|
|
}
|
|
@@ -154,7 +156,7 @@ class IndexController extends Controller
|
|
|
public function appointList(Content $content, Request $request)
|
|
|
{
|
|
|
Permission::check('health_appoint_list');
|
|
|
- $id = $request->id;
|
|
|
+ $id = $request->id;
|
|
|
$presentation = Presentation::find($id);
|
|
|
if (empty($presentation)) {
|
|
|
return back();
|
|
@@ -162,8 +164,8 @@ class IndexController extends Controller
|
|
|
|
|
|
$search_data = $request->all();
|
|
|
|
|
|
- $where = [];
|
|
|
- $where[] = ['pid','=',$presentation->id];
|
|
|
+ $where = [];
|
|
|
+ $where[] = ['pid', '=', $presentation->id];
|
|
|
if (isset($search_data['id'])) {
|
|
|
|
|
|
foreach ($search_data as $k => $v) {
|
|
@@ -175,25 +177,25 @@ class IndexController extends Controller
|
|
|
}
|
|
|
}
|
|
|
$perpage = 20;
|
|
|
- $list = PresentationAppoint::where($where)
|
|
|
+ $list = PresentationAppoint::where($where)
|
|
|
->select('*')
|
|
|
- ->orderBy('updated_at','desc')
|
|
|
+ ->orderBy('updated_at', 'desc')
|
|
|
->paginate($perpage);
|
|
|
|
|
|
- foreach ($list as $k => $v){
|
|
|
- if($v->sex == 1){
|
|
|
+ foreach ($list as $k => $v) {
|
|
|
+ if ($v->sex == 1) {
|
|
|
$list[$k]['sex'] = '男';
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$list[$k]['sex'] = '女';
|
|
|
}
|
|
|
- if($v->fresh == 0){
|
|
|
+ if ($v->fresh == 0) {
|
|
|
$list[$k]['fresh'] = '否';
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$list[$k]['fresh'] = '是';
|
|
|
}
|
|
|
- if($v->status == 0){
|
|
|
+ if ($v->status == 0) {
|
|
|
$list[$k]['status'] = '未下载';
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$list[$k]['status'] = '已下载';
|
|
|
}
|
|
|
}
|
|
@@ -202,14 +204,15 @@ class IndexController extends Controller
|
|
|
->header('报名管理')
|
|
|
->description('人员信息列表')
|
|
|
->body(view('admin.health.appoint_list')->with([
|
|
|
- 'list' => $list,
|
|
|
+ 'list' => $list,
|
|
|
'search_data' => $search_data,
|
|
|
- 'recruit' => $presentation
|
|
|
+ 'recruit' => $presentation,
|
|
|
]));
|
|
|
|
|
|
}
|
|
|
|
|
|
- public function qjwjInfoList(Content $content, Request $request){
|
|
|
+ public function qjwjInfoList(Content $content, Request $request)
|
|
|
+ {
|
|
|
Permission::check('qjwjInfoList');
|
|
|
|
|
|
$search_data = $request->all();
|
|
@@ -218,28 +221,28 @@ class IndexController extends Controller
|
|
|
foreach ($search_data as $k => $v) {
|
|
|
if ($k == 'realname') {
|
|
|
$where[] = [$k, 'like', "%$v%"];
|
|
|
- } elseif (in_array($k,['sex','education'])) {
|
|
|
+ } elseif (in_array($k, ['sex', 'education'])) {
|
|
|
$where[] = [$k, '=', $v];
|
|
|
}
|
|
|
}
|
|
|
$perpage = 20;
|
|
|
- $list = QjwjAppoint::where($where)
|
|
|
+ $list = QjwjAppoint::where($where)
|
|
|
->select('*')
|
|
|
- ->orderBy('updated_at','desc')
|
|
|
+ ->orderBy('updated_at', 'desc')
|
|
|
->paginate($perpage);
|
|
|
|
|
|
- foreach ($list as $k => $v){
|
|
|
+ foreach ($list as $k => $v) {
|
|
|
$v->native_place_cn = get_district_cn($v->native_place);
|
|
|
- $v->education = get_category($v->education);
|
|
|
- $v->pro_type = get_category_major($v->pro_type);
|
|
|
- if($v->sex == 1){
|
|
|
+ $v->education = get_category($v->education);
|
|
|
+ $v->pro_type = get_category_major($v->pro_type);
|
|
|
+ if ($v->sex == 1) {
|
|
|
$list[$k]['sex'] = '男';
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$list[$k]['sex'] = '女';
|
|
|
}
|
|
|
- if($v->status == 0){
|
|
|
+ if ($v->status == 0) {
|
|
|
$list[$k]['status'] = '未下载';
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$list[$k]['status'] = '已下载';
|
|
|
}
|
|
|
}
|
|
@@ -248,25 +251,27 @@ class IndexController extends Controller
|
|
|
->header('信息管理')
|
|
|
->description('泉籍卫技人员信息列表')
|
|
|
->body(view('admin.health.qjwj_appoint_list')->with([
|
|
|
- 'list' => $list,
|
|
|
- 'search_data' => $search_data
|
|
|
+ 'list' => $list,
|
|
|
+ 'search_data' => $search_data,
|
|
|
]));
|
|
|
}
|
|
|
|
|
|
- public function qjwjStatus(Request $request){
|
|
|
+ public function qjwjStatus(Request $request)
|
|
|
+ {
|
|
|
|
|
|
$info = QjwjAppoint::where(['id' => $request->id])->first();
|
|
|
- if($info){
|
|
|
+ if ($info) {
|
|
|
$info->status = 1;
|
|
|
$info->save();
|
|
|
return response()->json(['status' => 1, 'msg' => '跳转下载中!', 'data' => 'ok', 'url' => $info->attachment]);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return response()->json(['status' => 0, 'msg' => '找不到记录!', 'data' => 'fail']);
|
|
|
}
|
|
|
//return "/storage/recruit/word/" . $recruit->name_en . '/' .$appoint->audit .$word_url;
|
|
|
}
|
|
|
|
|
|
- public function jyyxInfoList(Content $content, Request $request){
|
|
|
+ public function jyyxInfoList(Content $content, Request $request)
|
|
|
+ {
|
|
|
Permission::check('jyyxInfoList');
|
|
|
|
|
|
$search_data = $request->all();
|
|
@@ -278,16 +283,16 @@ class IndexController extends Controller
|
|
|
}
|
|
|
}
|
|
|
$perpage = 20;
|
|
|
- $list = JyyxAppoint::where($where)
|
|
|
+ $list = JyyxAppoint::where($where)
|
|
|
->select('*')
|
|
|
- ->orderBy('updated_at','desc')
|
|
|
+ ->orderBy('updated_at', 'desc')
|
|
|
->paginate($perpage);
|
|
|
|
|
|
- foreach ($list as $k => $v){
|
|
|
+ foreach ($list as $k => $v) {
|
|
|
|
|
|
- if($v->status == 0){
|
|
|
+ if ($v->status == 0) {
|
|
|
$list[$k]['status'] = '未下载';
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$list[$k]['status'] = '已下载';
|
|
|
}
|
|
|
}
|
|
@@ -296,25 +301,27 @@ class IndexController extends Controller
|
|
|
->header('信息管理')
|
|
|
->description('就业意向人员信息列表')
|
|
|
->body(view('admin.health.jyyx_appoint_list')->with([
|
|
|
- 'list' => $list,
|
|
|
- 'search_data' => $search_data
|
|
|
+ 'list' => $list,
|
|
|
+ 'search_data' => $search_data,
|
|
|
]));
|
|
|
}
|
|
|
|
|
|
- public function jyyxStatus(Request $request){
|
|
|
+ public function jyyxStatus(Request $request)
|
|
|
+ {
|
|
|
|
|
|
$info = JyyxAppoint::where(['id' => $request->id])->first();
|
|
|
- if($info){
|
|
|
+ if ($info) {
|
|
|
$info->status = 1;
|
|
|
$info->save();
|
|
|
return response()->json(['status' => 1, 'msg' => '跳转下载中!', 'data' => 'ok', 'url' => $info->attachment]);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return response()->json(['status' => 0, 'msg' => '找不到记录!', 'data' => 'fail']);
|
|
|
}
|
|
|
//return "/storage/recruit/word/" . $recruit->name_en . '/' .$appoint->audit .$word_url;
|
|
|
}
|
|
|
|
|
|
- public function postInfoList(Content $content, Request $request){
|
|
|
+ public function postInfoList(Content $content, Request $request)
|
|
|
+ {
|
|
|
Permission::check('postInfoList');
|
|
|
|
|
|
$search_data = $request->all();
|
|
@@ -323,28 +330,28 @@ class IndexController extends Controller
|
|
|
foreach ($search_data as $k => $v) {
|
|
|
if ($k == 'realname') {
|
|
|
$where[] = [$k, 'like', "%$v%"];
|
|
|
- } elseif (in_array($k,['sex','education'])) {
|
|
|
- $where[] = ['post_appoint.'.$k, '=', $v];
|
|
|
+ } elseif (in_array($k, ['sex', 'education'])) {
|
|
|
+ $where[] = ['post_appoint.' . $k, '=', $v];
|
|
|
}
|
|
|
}
|
|
|
$perpage = 20;
|
|
|
- $list = PostAppoint::where($where)
|
|
|
- ->leftJoin("jobs","jobs.id",'=','post_appoint.job_id')
|
|
|
- ->select('post_appoint.*','jobs.jobs_name','jobs.company_name')
|
|
|
- ->orderBy('updated_at','desc')
|
|
|
+ $list = PostAppoint::where($where)
|
|
|
+ ->leftJoin("jobs", "jobs.id", '=', 'post_appoint.job_id')
|
|
|
+ ->select('post_appoint.*', 'jobs.jobs_name', 'jobs.company_name')
|
|
|
+ ->orderBy('updated_at', 'desc')
|
|
|
->paginate($perpage);
|
|
|
|
|
|
- foreach ($list as $k => $v){
|
|
|
+ foreach ($list as $k => $v) {
|
|
|
$v->native_place_cn = get_district_cn($v->native_place);
|
|
|
- $v->education = get_category($v->education);
|
|
|
- if($v->sex == 1){
|
|
|
+ $v->education = get_category($v->education);
|
|
|
+ if ($v->sex == 1) {
|
|
|
$list[$k]['sex'] = '男';
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$list[$k]['sex'] = '女';
|
|
|
}
|
|
|
- if($v->status == 0){
|
|
|
+ if ($v->status == 0) {
|
|
|
$list[$k]['status'] = '未下载';
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$list[$k]['status'] = '已下载';
|
|
|
}
|
|
|
}
|
|
@@ -353,21 +360,86 @@ class IndexController extends Controller
|
|
|
->header('信息管理')
|
|
|
->description('投递岗位人员信息列表')
|
|
|
->body(view('admin.health.post_appoint_list')->with([
|
|
|
- 'list' => $list,
|
|
|
- 'search_data' => $search_data
|
|
|
+ 'list' => $list,
|
|
|
+ 'search_data' => $search_data,
|
|
|
]));
|
|
|
}
|
|
|
|
|
|
- public function postStatus(Request $request){
|
|
|
+ public function postStatus(Request $request)
|
|
|
+ {
|
|
|
Permission::check('postInfoList');
|
|
|
$info = PostAppoint::where(['id' => $request->id])->first();
|
|
|
- if($info){
|
|
|
+ if ($info) {
|
|
|
$info->status = 1;
|
|
|
$info->save();
|
|
|
return response()->json(['status' => 1, 'msg' => '跳转下载中!', 'data' => 'ok', 'url' => $info->attachment]);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return response()->json(['status' => 0, 'msg' => '找不到记录!', 'data' => 'fail']);
|
|
|
}
|
|
|
//return "/storage/recruit/word/" . $recruit->name_en . '/' .$appoint->audit .$word_url;
|
|
|
}
|
|
|
+
|
|
|
+ public function presentationAppointList(Content $content,Request $request)
|
|
|
+ {
|
|
|
+ $search_data = $request->all();
|
|
|
+
|
|
|
+ $where = [
|
|
|
+ ['pid', '=', $search_data['id']],
|
|
|
+ ];
|
|
|
+ foreach ($search_data as $k => $v) {
|
|
|
+ if ($k == 'realname') {
|
|
|
+ $where[] = [$k, 'like', "%$v%"];
|
|
|
+ } elseif (in_array($k, ['sex', 'education'])) {
|
|
|
+ $where[] = [$k, '=', $v];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $perpage = 20;
|
|
|
+ $list = PresentationAppoint::where($where)
|
|
|
+ ->orderBy('updated_at', 'desc')
|
|
|
+ ->paginate($perpage);
|
|
|
+
|
|
|
+ foreach ($list as $k => $v) {
|
|
|
+ if ($v->fresh == 1) {
|
|
|
+ $list[$k]['fresh'] = '是';
|
|
|
+ } else {
|
|
|
+ $list[$k]['fresh'] = '否';
|
|
|
+ }
|
|
|
+ if ($v->sex == 1) {
|
|
|
+ $list[$k]['sex'] = '男';
|
|
|
+ } else {
|
|
|
+ $list[$k]['sex'] = '女';
|
|
|
+ }
|
|
|
+ if ($v->status == 0) {
|
|
|
+ $list[$k]['status'] = '未下载';
|
|
|
+ } else {
|
|
|
+ $list[$k]['status'] = '已下载';
|
|
|
+ }
|
|
|
+ if (empty($v->attachment)) {
|
|
|
+ $list[$k]['is_attachment'] = '未上传';
|
|
|
+ } else {
|
|
|
+ $list[$k]['is_attachment'] = '已上传';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return $content
|
|
|
+ ->header('报名管理')
|
|
|
+ ->description('招聘会报名的人员信息管理')
|
|
|
+ ->body(view('admin.health.presentation_appoint_list')->with([
|
|
|
+ 'list' => $list,
|
|
|
+ 'search_data' => $search_data,
|
|
|
+ ]));
|
|
|
+ }
|
|
|
+
|
|
|
+ public function presentationStatus(Request $request)
|
|
|
+ {
|
|
|
+ $info = PresentationAppoint::where(['id' => $request->id])->first();
|
|
|
+ if ($info && $info->attachment) {
|
|
|
+ $info->status = 1;
|
|
|
+ $info->save();
|
|
|
+ return response()->json(['status' => 1, 'msg' => '跳转下载中!', 'data' => 'ok', 'url' => $info->attachment]);
|
|
|
+ } else {
|
|
|
+ return response()->json(['status' => 0, 'msg' => '用户未上传简历!', 'data' => 'fail']);
|
|
|
+ }
|
|
|
+ //return "/storage/recruit/word/" . $recruit->name_en . '/' .$appoint->audit .$word_url;
|
|
|
+ }
|
|
|
}
|