Browse Source

增加专项考试

sandm 1 year ago
parent
commit
3887f570fc

+ 36 - 1
app/Admin/Controllers/Recruit/RecruitController.php

@@ -84,6 +84,10 @@ class RecruitController extends Controller
     public function edit($id, Content $content)
     public function edit($id, Content $content)
     {
     {
         Permission::check('recruit_manager_edit');
         Permission::check('recruit_manager_edit');
+        $recruit = Recruit::find($id);
+        if($recruit->special){
+            $this->show();
+        }
         $grid = $this->form()->edit($id)->render();
         $grid = $this->form()->edit($id)->render();
         return $content
         return $content
             ->header('招考管理')
             ->header('招考管理')
@@ -119,8 +123,13 @@ class RecruitController extends Controller
      */
      */
     public function getRecruitPost(Request $request)
     public function getRecruitPost(Request $request)
     {
     {
+        Permission::check('recruit_manager_create');
+        Permission::check('recruit_manager_edit');
         $id = $request->id;
         $id = $request->id;
         $recruit = Recruit::find($id);
         $recruit = Recruit::find($id);
+        if($recruit->special){
+            $this->show();
+        }
         $post = RecruitPost::where('recruit_id', $id)->get();
         $post = RecruitPost::where('recruit_id', $id)->get();
         return response()->json(['post' => $post, 'recruit' => $recruit], '200');
         return response()->json(['post' => $post, 'recruit' => $recruit], '200');
     }
     }
@@ -384,6 +393,7 @@ class RecruitController extends Controller
         $data['reexamine_ticket_content'] = $verify['reexamine_ticket_content'];
         $data['reexamine_ticket_content'] = $verify['reexamine_ticket_content'];
         $data['reexamine_ticket_status'] = 0;
         $data['reexamine_ticket_status'] = 0;
         $data['reexamine_field'] = implode(',',$verify['reexamine_field']);
         $data['reexamine_field'] = implode(',',$verify['reexamine_field']);
+        $data['special'] = 0;
 
 
         $fileCharater = $request->input('addFile');
         $fileCharater = $request->input('addFile');
         DB::beginTransaction();//检查数据库事务
         DB::beginTransaction();//检查数据库事务
@@ -456,6 +466,10 @@ class RecruitController extends Controller
             return admin_toastr('请填写招考岗位名称', 'error');
             return admin_toastr('请填写招考岗位名称', 'error');
         }
         }
         $recruit_id = $id;
         $recruit_id = $id;
+        $recruit = Recruit::find($id);
+        if($recruit->special){
+            $this->show();
+        }
         $data = [];
         $data = [];
         $data['name'] = $verify['name'];
         $data['name'] = $verify['name'];
         $data['company'] = $verify['company'];
         $data['company'] = $verify['company'];
@@ -527,6 +541,7 @@ class RecruitController extends Controller
         $data['reexamine_field'] = implode(',',$verify['reexamine_field']);
         $data['reexamine_field'] = implode(',',$verify['reexamine_field']);
         $ids = RecruitPost::where('recruit_id', $recruit_id)->pluck('id');
         $ids = RecruitPost::where('recruit_id', $recruit_id)->pluck('id');
         $fileCharater = $request->input('addFile');
         $fileCharater = $request->input('addFile');
+        $data['special'] = 0;
 
 
         DB::beginTransaction();//检查数据库事务
         DB::beginTransaction();//检查数据库事务
         try {
         try {
@@ -617,6 +632,9 @@ class RecruitController extends Controller
         Permission::check('recruit_manager_del');
         Permission::check('recruit_manager_del');
         $info = Recruit::find($id);
         $info = Recruit::find($id);
         if($info){
         if($info){
+            if($info->special){
+                $this->show();
+            }
             if($info->delete()){
             if($info->delete()){
                 //RecruitAppointInfo::where('recruit_id', $id)->delete();  //todo保留
                 //RecruitAppointInfo::where('recruit_id', $id)->delete();  //todo保留
                 return response()->json(['status' => 1, 'message' => '删除成功!'], '200');
                 return response()->json(['status' => 1, 'message' => '删除成功!'], '200');
@@ -642,6 +660,9 @@ class RecruitController extends Controller
         Permission::check('recruit_appoint_list');
         Permission::check('recruit_appoint_list');
         $id = $request->id;
         $id = $request->id;
         $recruit = Recruit::find($id);
         $recruit = Recruit::find($id);
+        if($recruit->special){
+            $this->show();
+        }
         if (empty($recruit)) {
         if (empty($recruit)) {
             return back();
             return back();
         }
         }
@@ -798,6 +819,9 @@ class RecruitController extends Controller
             ->select('recruit_appoint_info.*', 'recruit_post.name', 'recruit_post.code', 'recruit_appoint_detail.train', 'recruit_appoint_detail.rewards_and_punishments', 'recruit_appoint_detail.introduce', 'recruit_appoint_expand_special.point_apply', 'recruit_appoint_expand_special.condition', 'recruit_appoint_expand_special.material')
             ->select('recruit_appoint_info.*', 'recruit_post.name', 'recruit_post.code', 'recruit_appoint_detail.train', 'recruit_appoint_detail.rewards_and_punishments', 'recruit_appoint_detail.introduce', 'recruit_appoint_expand_special.point_apply', 'recruit_appoint_expand_special.condition', 'recruit_appoint_expand_special.material')
             ->first();
             ->first();
         $recruit = Recruit::where('id',$data->recruit_id)->first();
         $recruit = Recruit::where('id',$data->recruit_id)->first();
+        if($recruit->special){
+            $this->show();
+        }
         $recruit->forms = explode(',', $recruit->forms);
         $recruit->forms = explode(',', $recruit->forms);
         $data->family = json_decode($data->family);
         $data->family = json_decode($data->family);
         if ($data->family) {
         if ($data->family) {
@@ -1204,6 +1228,10 @@ class RecruitController extends Controller
                 //撤回至未审核
                 //撤回至未审核
                 foreach ($ids as $k => $v){
                 foreach ($ids as $k => $v){
                     $appointinfo = RecruitAppointInfo::where('id', $v)->first();
                     $appointinfo = RecruitAppointInfo::where('id', $v)->first();
+                    $recruit = Recruit::find($appointinfo->recruit_id);
+                    if($recruit->special){
+                        continue;
+                    }
                     if(!$appointinfo || intval($appointinfo->audit) === 1){
                     if(!$appointinfo || intval($appointinfo->audit) === 1){
                         continue;
                         continue;
                     }
                     }
@@ -1236,6 +1264,10 @@ class RecruitController extends Controller
                 //审核未通过
                 //审核未通过
                 foreach ($ids as $k => $v){
                 foreach ($ids as $k => $v){
                     $appointinfo = RecruitAppointInfo::where('id', $v)->first();
                     $appointinfo = RecruitAppointInfo::where('id', $v)->first();
+                    $recruit = Recruit::find($appointinfo->recruit_id);
+                    if($recruit->special){
+                        continue;
+                    }
                     if(!$appointinfo || intval($appointinfo->audit) === 2){
                     if(!$appointinfo || intval($appointinfo->audit) === 2){
                         continue;
                         continue;
                     }
                     }
@@ -1269,6 +1301,10 @@ class RecruitController extends Controller
                 //审核通过
                 //审核通过
                 foreach ($ids as $k => $v){
                 foreach ($ids as $k => $v){
                     $appointinfo = RecruitAppointInfo::where('id', $v)->first();
                     $appointinfo = RecruitAppointInfo::where('id', $v)->first();
+                    $recruit = Recruit::find($appointinfo->recruit_id);
+                    if($recruit->special){
+                        continue;
+                    }
                     if(!$appointinfo || intval($appointinfo->audit) === 3){
                     if(!$appointinfo || intval($appointinfo->audit) === 3){
                         continue;
                         continue;
                     }
                     }
@@ -1505,7 +1541,6 @@ class RecruitController extends Controller
         $recruit_id = $request->recruit_id;
         $recruit_id = $request->recruit_id;
         $appoint_id = $request->appoint_id;
         $appoint_id = $request->appoint_id;
         if(!empty($recruit_id) && !empty($appoint_id)){
         if(!empty($recruit_id) && !empty($appoint_id)){
-
             $url = $this->fetch_word(['recruit_id'=>$recruit_id,'appoint_id'=>$appoint_id]);
             $url = $this->fetch_word(['recruit_id'=>$recruit_id,'appoint_id'=>$appoint_id]);
             return response()->json(['status' => 1, 'msg' => '生成Word简历成功!', 'data' => 'ok', 'url' => $url]);
             return response()->json(['status' => 1, 'msg' => '生成Word简历成功!', 'data' => 'ok', 'url' => $url]);
         }else{
         }else{

+ 687 - 4
app/Admin/Controllers/Recruit/SpecialController.php

@@ -4,9 +4,15 @@ namespace App\Admin\Controllers\Recruit;
 
 
 use App\Admin\Extensions\Form\ValidateForm;
 use App\Admin\Extensions\Form\ValidateForm;
 use App\Http\Controllers\Controller;
 use App\Http\Controllers\Controller;
+use App\Models\Admin\AdminUser;
+use App\Models\Member;
+use App\Models\Pms;
 use App\Models\Recruit;
 use App\Models\Recruit;
+use App\Models\RecruitAppointInfo;
+use App\Models\RecruitAppointLog;
 use App\Models\RecruitPost;
 use App\Models\RecruitPost;
 use App\Models\RecruitSubjoin;
 use App\Models\RecruitSubjoin;
+use App\Models\RecruitTicket;
 use App\Models\RecruitTicketField;
 use App\Models\RecruitTicketField;
 use App\Services\Common\SmsService;
 use App\Services\Common\SmsService;
 use Encore\Admin\Auth\Permission;
 use Encore\Admin\Auth\Permission;
@@ -28,6 +34,18 @@ class SpecialController extends Controller
         $this->smsService = $smsService;
         $this->smsService = $smsService;
     }
     }
 
 
+    /**
+     * Show interface.
+     *
+     * @param mixed $id
+     * @param Content $content
+     * @return Content
+     */
+    public function show($id, Content $content)
+    {
+        return redirect('/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/special/index');
+    }
+
     /**
     /**
      * 招考报名首页
      * 招考报名首页
      * @param Content $content
      * @param Content $content
@@ -103,7 +121,7 @@ class SpecialController extends Controller
         });
         });
         $grid->created_at('创建时间');
         $grid->created_at('创建时间');
         $grid->actions(function ($actions) {
         $grid->actions(function ($actions) {
-            $actions->append('<a href="/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/recruit/appoint_list?id=' . $actions->row['id'] . '"  class="btn btn-primary btn-xs" >报名管理</a>');
+            $actions->append('<a href="/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/special/appoint_list?id=' . $actions->row['id'] . '"  class="btn btn-primary btn-xs" >报名管理</a>');
             $actions->disableEdit(false);
             $actions->disableEdit(false);
             $actions->disableDelete(false);
             $actions->disableDelete(false);
             $actions->disableView();
             $actions->disableView();
@@ -125,7 +143,7 @@ class SpecialController extends Controller
         return $content
         return $content
             ->header('新增专场招聘场次')
             ->header('新增专场招聘场次')
             ->description('新增')
             ->description('新增')
-            ->body(view('admin.recruit.index')->with(['grid' => $this->form()->render(), 'id' => '0']));
+            ->body(view('admin.special.index')->with(['grid' => $this->form()->render(), 'id' => '0']));
     }
     }
 
 
     /**
     /**
@@ -315,9 +333,7 @@ class SpecialController extends Controller
         $data['reexamine_field'] = implode(',',$verify['reexamine_field']);
         $data['reexamine_field'] = implode(',',$verify['reexamine_field']);
         $data['special'] = 1;
         $data['special'] = 1;
 
 
-
         $fileCharater = $request->input('addFile');
         $fileCharater = $request->input('addFile');
-        dd(Recruit::create($data));
 
 
         DB::beginTransaction();//检查数据库事务
         DB::beginTransaction();//检查数据库事务
         try {
         try {
@@ -366,9 +382,676 @@ class SpecialController extends Controller
             }
             }
             DB::commit();//检查数据库事务
             DB::commit();//检查数据库事务
         } catch (\Exception $e) {
         } catch (\Exception $e) {
+            dd($e->getMessage());
             DB::rollback();
             DB::rollback();
             return admin_toastr($e->getMessage(), 'error');
             return admin_toastr($e->getMessage(), 'error');
         }
         }
 
 
     }
     }
+
+    /**
+     * Edit interface.
+     *
+     * @param mixed $id
+     * @param Content $content
+     * @return Content
+     */
+    public function edit($id, Content $content)
+    {
+        Permission::check('special_recruit_manager_edit');
+        $recruit = Recruit::find($id);
+        if(!$recruit->special){
+            $this->show();
+        }
+        $grid = $this->form()->edit($id)->render();
+        return $content
+            ->header('招考管理')
+            ->description('编辑')
+            ->body(view('admin.special.index')->with(['grid' => $grid, 'id' => $id]));
+    }
+
+    /**
+     * 删掉指定招考场次
+     * @param $id
+     */
+    public function destroy($id)
+    {
+        Permission::check('special_recruit_manager_del');
+        $info = Recruit::find($id);
+        if($info){
+            if(!$info->special){
+                $this->show();
+            }
+            if($info->delete()){
+                //RecruitAppointInfo::where('recruit_id', $id)->delete();  //todo保留
+                return response()->json(['status' => 1, 'message' => '删除成功!'], '200');
+            }else{
+                return response()->json(['status' => 0, 'message' => '删除失败!'], '200');
+            }
+        }else{
+            return response()->json(['status' => 0, 'message' => '找不到记录!'], '200');
+        }
+    }
+
+    /**
+     * 报名管理
+     * @param Content $content
+     * @param Request $request
+     * @return Content|\Illuminate\Http\RedirectResponse
+     */
+    public function appointList(Content $content, Request $request)
+    {
+        Permission::check('special_recruit_appoint_list');
+        $id = $request->id;
+        $recruit = Recruit::find($id);
+        if(!$recruit->special){
+            $this->show();
+        }
+        if (empty($recruit)) {
+            return back();
+        }
+
+        $search_data = $request->all();
+
+        $where = [];
+        $where[] = ['audit','>',0];
+        if (isset($search_data['id']) || session('manage_search_data')['id']) {
+            if (isset($search_data['page'])) {
+                if (session('search_data')) {
+                    $where = session('managewhere');
+                    unset($search_data['page']);
+                    $search_data = session('manage_search_data');
+
+                }
+            }
+            foreach ($search_data as $k => $v) {
+                if ($k == 'realname') {
+                    $where[] = [$k, 'like', "%$v%"];
+                } elseif ($k == 'id') {
+                    $where[] = ['recruit_appoint_info.recruit_id', '=', $v];
+                } elseif($k == 'print_bs'){
+                    $where[] = ['recruit_ticket.ex_type', '=', 1];
+                    $where[] = ['recruit_ticket.ex_status', '=', $v];
+                } elseif($k == 'print_js'){
+                    $where[] = ['recruit_ticket.ex_type', '=', 2];
+                    $where[] = ['recruit_ticket.ex_status', '=', $v];
+                } elseif($k == 'print_ms'){
+                    $where[] = ['recruit_ticket.ex_type', '=', 3];
+                    $where[] = ['recruit_ticket.ex_status', '=', $v];
+                } elseif ($k != '_pjax' and $k != 'page' && $k != 'perpage') {
+                    $where[] = [$k, '=', $v];
+                }
+            }
+            session(['managewhere' => $where]);
+            session(['manage_search_data' => $search_data]);
+            session()->save();
+        }
+
+        $session_data = session('search_data');
+        if(isset($session_data['perpage'])){
+            $perpage = $session_data['perpage'];
+        }else{
+            $perpage = 20;
+        }
+
+        $list = RecruitAppointInfo::where($where)
+            ->join('recruit_post', 'recruit_appoint_info.post_id', '=', 'recruit_post.id', 'left')
+            ->join('recruit_ticket', 'recruit_ticket.appoint_id', '=', 'recruit_appoint_info.id','left')
+            ->select('recruit_appoint_info.*', 'recruit_post.code', 'recruit_post.name')
+            ->orderBy('recruit_appoint_info.updated_at','desc')
+            ->paginate($perpage);
+
+        foreach ($list as $k => $v){
+            if($v->sex == 0){
+                $list[$k]['sex'] = '女';
+            }else{
+                $list[$k]['sex'] = '男';
+            }
+            switch ($v->political_affiliation){
+                case '01':
+                    $list[$k]['political_affiliation'] = '中共党员';
+                    break;
+                case '02':
+                    $list[$k]['political_affiliation'] = '中共预备党员';
+                    break;
+                case '03':
+                    $list[$k]['political_affiliation'] = '共青团员';
+                    break;
+                case '04':
+                    $list[$k]['political_affiliation'] = '民革党员';
+                    break;
+                case '05':
+                    $list[$k]['political_affiliation'] = '民盟盟员';
+                    break;
+                case '06':
+                    $list[$k]['political_affiliation'] = '民建会员';
+                    break;
+                case '07':
+                    $list[$k]['political_affiliation'] = '民进会员';
+                    break;
+                case '08':
+                    $list[$k]['political_affiliation'] = '农工党党员';
+                    break;
+                case '09':
+                    $list[$k]['political_affiliation'] = '致公党党员';
+                    break;
+                case '10':
+                    $list[$k]['political_affiliation'] = '九三学社社员';
+                    break;
+                case '11':
+                    $list[$k]['political_affiliation'] = '台盟盟员';
+                    break;
+                case '12':
+                    $list[$k]['political_affiliation'] = '无党派人士';
+                    break;
+                case '13':
+                    $list[$k]['political_affiliation'] = '群众';
+                    break;
+            }
+            $list[$k]['pen_print'] = 0;
+            $list[$k]['computer_print'] = 0;
+            $list[$k]['face_print'] = 0;
+            $list[$k]['reexamine_print'] = 0;
+            $tickets = RecruitTicket::where('appoint_id',$v->id)->get();
+            if($tickets){
+                foreach ($tickets as $tk => $tv){
+                    if($tv->ex_type == 1){
+                        $list[$k]['pen_print'] = $tv->ex_status;
+                    }
+                    if($tv->ex_type == 2){
+                        $list[$k]['computer_print'] = $tv->ex_status;
+                    }
+                    if($tv->ex_type == 3){
+                        $list[$k]['face_print'] = $tv->ex_status;
+                    }
+                    if($tv->ex_type == 4){
+                        $list[$k]['reexamine_print'] = $tv->ex_status;
+                    }
+                }
+            }
+        }
+
+        $post_data = RecruitPost::where('recruit_id',$id)->where('status',1)->selectRaw('id, CONCAT(code," ",name) as post')->pluck('post', 'id');
+
+        return $content
+            ->header('报名管理')
+            ->description('招考人员信息列表')
+            ->body(view('admin.special.appoint_list')->with([
+                'list' => $list,
+                'search_data' => $search_data,
+                'recruit' => $recruit,
+                'post' => $post_data
+            ]));
+    }
+
+    /**
+     * 查看审核日志
+     * @param Request $request
+     * @return \Illuminate\Http\JsonResponse
+     */
+    public function showLog(Request $request)
+    {
+        Permission::check('special_recruit_show_log');
+        $id = $request->id;
+        $logs = RecruitAppointLog::where('appoint_id', $id)->orderBy('created_at', 'desc')->get()->toArray();
+        $str = "";
+        if ($logs) {
+            $str .= "<table class='table'><tr style='background:#F0F8FD'><td>审核时间</td><td>操作级别</td><td>记录类型</td><td>触发操作的人员</td><td>审核描述</td></tr>";
+            foreach ($logs as $k => $v) {
+                switch ($v['type']){
+                    case '1':
+                        $level = '系统级操作';
+                        $user = '系统';
+                        break;
+                    case '2':
+                        $level = '审核系列操作';
+                        $admin = AdminUser::where('id',$v['uid'])->first();
+                        $user = $admin->name;
+                        break;
+                    case '3':
+                        $level = '用户自行操作';
+                        $member = Member::where('id',$v['uid'])->first();
+                        $user = $member->username;
+                        break;
+                }
+                switch ($v['step']){
+                    case '1':
+                        $step = '报名及审核';
+                        break;
+                    case '2':
+                        $step = '笔试';
+                        break;
+                    case '3':
+                        $step = '面试';
+                        break;
+                    case '4':
+                        $step = '上机';
+                        break;
+                    case '5':
+                        $step = '复审';
+                        break;
+                    case '6':
+                        $step = '体检';
+                        break;
+                    case '7':
+                        $step = '政审';
+                        break;
+                    case '8':
+                        $step = '录用';
+                        break;
+                }
+                $str .= "<tr><td>" . $v['created_at'] . "</td><td>" . $level . "</td><td>" . $step . "</td><td>" . $user . "</td><td>" . $v['log'] . "</td></tr>\r\n";
+            }
+            $str .= "</table>";
+        } else {
+            $str = "抱歉,暂未有审核记录";
+        }
+        return response()->json(['code' => 1, 'data' => $str]);
+    }
+
+    /**
+     * 查看报名详细信息
+     * @param Request $request
+     * @return \Illuminate\Http\JsonResponse
+     * @throws \Throwable
+     */
+    public function getUserinfo(Request $request)
+    {
+        Permission::check('special_recruit_getUserinfo');
+        $id = $request->id;
+        $data = RecruitAppointInfo::where('recruit_appoint_info.id',$id)
+            ->join('recruit_post', 'recruit_appoint_info.post_id', '=', 'recruit_post.id', 'left')
+            ->join('recruit_appoint_expand_special', 'recruit_appoint_info.id', '=', 'recruit_appoint_expand_special.recruit_appoint_id', 'left')
+            ->join('recruit_appoint_detail', 'recruit_appoint_detail.recruit_appoint_id', '=', 'recruit_appoint_info.id', 'left')
+            ->select('recruit_appoint_info.*', 'recruit_post.name', 'recruit_post.code', 'recruit_appoint_detail.train', 'recruit_appoint_detail.rewards_and_punishments', 'recruit_appoint_detail.introduce', 'recruit_appoint_expand_special.point_apply', 'recruit_appoint_expand_special.condition', 'recruit_appoint_expand_special.material')
+            ->first();
+        $recruit = Recruit::where('id',$data->recruit_id)->first();
+        $recruit->forms = explode(',', $recruit->forms);
+        $data->family = json_decode($data->family);
+        if ($data->family) {
+            foreach ($data->family as $k => $v) {
+                $v->political_affiliation = RecruitAppointInfo::$political_affiliation[$v->political_affiliation];
+            }
+        }
+
+        //layer相册层
+        $photos = [
+            'material'=>[],
+            'identification'=>[],
+            'education_certification'=>[],
+            'other_certification'=>[],
+        ];
+
+        if(in_array('expand_special',$recruit->forms)){
+            if(json_decode($data->material)){
+                $data->material = json_decode($data->material);
+                $photo_data = [];
+                foreach ($data->material as $k => $v) {
+                    if($v->status){
+                        $photo_data[] = [
+                            'alt' => $v->name,
+                            'pid' => $v->uid,
+                            'src' => $v->response->path,
+                        ];
+                    }
+                }
+                $photos['material'] = [
+                    'title' => '申请加分佐证材料',
+                    'id' => 1,
+                    'start' => 0,
+                    'data' =>$photo_data
+                ];
+            }else{
+                $data->material = [];
+            }
+        }
+        if(in_array('identification',$recruit->forms) || in_array('internship',$recruit->forms)){
+            if(json_decode($data->identification)){
+                $data->identification = json_decode($data->identification);
+                $photo_data = [];
+                foreach ($data->identification as $k => $v) {
+                    if($v->status){
+                        $photo_data[] = [
+                            'alt' => $v->name,
+                            'pid' => $v->uid,
+                            'src' => $v->response->path,
+                        ];
+                    }
+                }
+                $photos['identification'] = [
+                    'title' => '身份证明',
+                    'id' => 1,
+                    'start' => 0,
+                    'data' =>$photo_data
+                ];
+            }else{
+                $data->identification = [];
+            }
+        }
+        if(in_array('education_certification',$recruit->forms) || in_array('internship',$recruit->forms)){
+            if(json_decode($data->education_certification)){
+                $data->education_certification = json_decode($data->education_certification);
+                $photo_data = [];
+                foreach ($data->education_certification as $k => $v) {
+                    if($v->status){
+                        $photo_data[] = [
+                            'alt' => $v->name,
+                            'pid' => $v->uid,
+                            'src' => $v->response->path,
+                        ];
+                    }
+                }
+                $photos['education_certification'] = [
+                    'title' => '学历证明',
+                    'id' => 1,
+                    'start' => 0,
+                    'data' =>$photo_data
+                ];
+            }else{
+                $data->education_certification = [];
+            }
+        }
+        if(in_array('other_certification',$recruit->forms) || in_array('internship',$recruit->forms)){
+            if(json_decode($data->other_certification)){
+                $data->other_certification = json_decode($data->other_certification);
+                $photo_data = [];
+                foreach ($data->other_certification as $k => $v) {
+                    if($v->status){
+                        $photo_data[] = [
+                            'alt' => $v->name,
+                            'pid' => $v->uid,
+                            'src' => $v->response->path,
+                        ];
+                    }
+                }
+                $photos['other_certification'] = [
+                    'title' => '其他证明',
+                    'id' => 1,
+                    'start' => 0,
+                    'data' =>$photo_data
+                ];
+            }else{
+                $data->other_certification = [];
+            }
+        }
+        if(in_array('chengnuoshu',$recruit->forms)){
+            if(json_decode($data->chengnuoshu)){
+                $data->chengnuoshu = json_decode($data->chengnuoshu);
+                $photo_data = [];
+                foreach ($data->chengnuoshu as $k => $v) {
+                    if($v->status){
+                        $photo_data[] = [
+                            'alt' => $v->name,
+                            'pid' => $v->uid,
+                            'src' => $v->response->path,
+                        ];
+                    }
+                }
+                $photos['chengnuoshu'] = [
+                    'title' => '诚信承诺书',
+                    'id' => 1,
+                    'start' => 0,
+                    'data' =>$photo_data
+                ];
+            }else{
+                $data->chengnuoshu = [];
+            }
+        }
+        if(in_array('shixin',$recruit->forms)){
+            if(json_decode($data->shixin)){
+                $data->shixin = json_decode($data->shixin);
+                $photo_data = [];
+                foreach ($data->shixin as $k => $v) {
+                    if($v->status){
+                        $photo_data[] = [
+                            'alt' => $v->name,
+                            'pid' => $v->uid,
+                            'src' => $v->response->path,
+                        ];
+                    }
+                }
+                $photos['shixin'] = [
+                    'title' => '失信被执行人查询信息页扫描件',
+                    'id' => 1,
+                    'start' => 0,
+                    'data' =>$photo_data
+                ];
+            }else{
+                $data->shixin = [];
+            }
+        }
+
+        $html = view('admin.recruit.manageajax_userinfo')->with(['appointinfo' => $data,'recruit' => $recruit,'photos'=>$photos])->render();
+        return response()->json(['code' => 1, 'data' => $html]);
+    }
+
+    /**
+     * 获得招考场次的岗位
+     * @param Request $request
+     * @return \Illuminate\Http\JsonResponse
+     */
+    public function getRecruitPost(Request $request)
+    {
+        //Permission::check('special_recruit_manager_create');
+        //Permission::check('special_recruit_manager_edit');
+        $id = $request->id;
+        $recruit = Recruit::find($id);
+        $post = RecruitPost::where('recruit_id', $id)->get();
+        return response()->json(['post' => $post, 'recruit' => $recruit], '200');
+    }
+
+    /**
+     * 报名记录审核处理
+     * @param Request $request
+     * @return \Illuminate\Http\JsonResponse
+     */
+    public function appoint_audit(Request $request)
+    {
+        $ids = $request->ids;
+        if (!is_array($ids)) {
+            $ids = explode(",", $ids);
+        }
+        if (empty($ids)) {
+            return response()->json(['status' => 0, 'msg' => '请选择审核记录!'], '200');
+        }
+        $audit = $request->audit;
+        $exam_flow_path = $request->exam_flow_path;
+        $reason = $request->reason;
+        if(empty($audit)){
+            return response()->json(['status' => 0, 'msg' => '请选择审核状态!'], '200');
+        }
+        if($audit == '3' && empty($exam_flow_path)){
+            return response()->json(['status' => 0, 'msg' => '请选择审核后的考试流程!'], '200');
+        }
+        if($audit != '3' && empty($reason)){
+            return response()->json(['status' => 0, 'msg' => '请输入审核原因!'], '200');
+        }
+        $message = [];
+        switch ($audit){
+            case '1':
+                //撤回至未审核
+                foreach ($ids as $k => $v){
+                    $appointinfo = RecruitAppointInfo::where('id', $v)->first();
+                    $recruit = Recruit::find($appointinfo->recruit_id);
+                    if(!$recruit->special){
+                        continue;
+                    }
+                    if(!$appointinfo || intval($appointinfo->audit) === 1){
+                        continue;
+                    }
+                    //设置该报名的各个状态
+                    $appointinfo_data = [
+                        'current' => 1,
+                        'audit' =>  1,
+                        'pen_audit' => -1,
+                        'computer_audit' => -1,
+                        'face_audit' => -1,
+                        'reexamine_audit' => -1,
+                        'inspect_audit' => -1,
+                        'political_audit' => -1,
+                        'employ_audit' => -1
+                    ];
+                    RecruitAppointInfo::where('id', $v)->update($appointinfo_data);
+                    //写日志
+                    $log = [
+                        'type'  =>  2,
+                        'step' => 1,
+                        'appoint_id' => $v,
+                        'uid' => Admin::user()->id,
+                        'log' => '撤回至未审核状态,原因是:'.$reason
+                    ];
+                    RecruitAppointLog::create($log);
+                    $message[$v] = '您此次的报名需要重新审核,原因是:'.$reason;
+                }
+                break;
+            case '2':
+                //审核未通过
+                foreach ($ids as $k => $v){
+                    $appointinfo = RecruitAppointInfo::where('id', $v)->first();
+                    $recruit = Recruit::find($appointinfo->recruit_id);
+                    if(!$recruit->special){
+                        continue;
+                    }
+                    if(!$appointinfo || intval($appointinfo->audit) === 2){
+                        continue;
+                    }
+                    //设置该报名的各个状态
+                    $appointinfo_data = [
+                        'current' => 1,
+                        'audit' =>  2,
+                        'pen_audit' => -1,
+                        'computer_audit' => -1,
+                        'face_audit' => -1,
+                        'reexamine_audit' => -1,
+                        'inspect_audit' => -1,
+                        'political_audit' => -1,
+                        'employ_audit' => -1
+                    ];
+                    RecruitAppointInfo::where('id', $v)->update($appointinfo_data);
+                    //写日志
+                    $log = [
+                        'type'  =>  2,
+                        'step' => 1,
+                        'appoint_id' => $v,
+                        'uid' => Admin::user()->id,
+                        'log' => '审核未通过,原因是:'.$reason
+                    ];
+                    RecruitAppointLog::create($log);
+                    $message[$v] = '您此次报名审核未通过,原因是:'.$reason;
+                    $this->smsService->sendSms($appointinfo->mobile,'sms_recruit_register_error',array('reason'=>$reason));
+                }
+                break;
+            case '3':
+                //审核通过
+                foreach ($ids as $k => $v){
+                    $appointinfo = RecruitAppointInfo::where('id', $v)->first();
+                    $recruit = Recruit::find($appointinfo->recruit_id);
+                    if(!$recruit->special){
+                        continue;
+                    }
+                    if(!$appointinfo || intval($appointinfo->audit) === 3){
+                        continue;
+                    }
+                    $recruit = Recruit::where('id',$appointinfo->recruit_id)->first();
+                    $step = explode(',',$recruit->step);
+                    $step_str = [
+                        'pen' => '未设置此条报名记录的笔试信息',
+                    ];
+                    if(in_array('3',$step)){
+                        //场次有设置笔试
+                        if(in_array('pen',$exam_flow_path)){
+                            $step_str['pen'] = '该场次需要笔试,已设置此条报考需要参与笔试';
+                            $pen_audit = -1;
+                        }else{
+                            $step_str['pen'] = '该场次需要笔试,此条报考可跳过笔试';
+                            $pen_audit = 3;
+                        }
+                    }else{
+                        $step_str['pen'] = '该场次不需要笔试';
+                        $pen_audit = 3;
+                    }
+                    if(in_array('4',$step)){
+                        //场次有设置上机
+                        if(in_array('computer',$exam_flow_path)){
+                            $step_str['computer'] = '该场次需要上机,已设置此条报考需要参与上机';
+                            $computer_audit = -1;
+                        }else{
+                            $step_str['computer'] = '该场次需要上机,此条报考可跳过上机';
+                            $computer_audit = 3;
+                        }
+                    }else{
+                        $step_str['computer'] = '该场次不需要上机';
+                        $computer_audit = 3;
+                    }
+                    if(in_array('5',$step)){
+                        //场次有设置上机
+                        if(in_array('face',$exam_flow_path)){
+                            $step_str['face'] = '该场次需要面试,已设置此条报考需要参与面试';
+                            $face_audit = -1;
+                        }else{
+                            $step_str['face'] = '该场次需要面试,此条报考可跳过面试';
+                            $face_audit = 3;
+                        }
+                    }else{
+                        $step_str['face'] = '该场次不需要面试';
+                        $face_audit = 3;
+                    }
+                    if(in_array('6',$step)){
+                        //场次有设置复试
+                        if(in_array('reexamine',$exam_flow_path)){
+                            $step_str['reexamine'] = '该场次需要复试,已设置此条报考需要参与复试';
+                            $reexamine_audit = -1;
+                        }else{
+                            $step_str['reexamine'] = '该场次需要复试,此条报考可跳过复试';
+                            $reexamine_audit = 3;
+                        }
+                    }else{
+                        $step_str['reexamine'] = '该场次不需要复试';
+                        $reexamine_audit = 3;
+                    }
+                    //设置该报名的各个状态
+                    $appointinfo_data = [
+                        'current' => 2,//审核成功后进入考试流程
+                        'audit' =>  3,
+                        'pen_audit' => $pen_audit,
+                        'computer_audit' => $computer_audit,
+                        'face_audit' => $face_audit,
+                        'reexamine_audit' => $reexamine_audit,
+                        'inspect_audit' => -1,
+                        'political_audit' => -1,
+                        'employ_audit' => -1
+                    ];
+                    RecruitAppointInfo::where('id', $v)->update($appointinfo_data);
+                    $reason = $reason ?? '符合报考条件';
+                    //写日志
+                    $log = [
+                        'type'  =>  2,
+                        'step' => 1,
+                        'appoint_id' => $v,
+                        'uid' => Admin::user()->id,
+                        'log' => '审核通过,原因是:' . $reason,
+                        'admin_log' => implode(';',$step_str)
+                    ];
+                    RecruitAppointLog::create($log);
+                    $message[$v] = '您此次报名审核已通过,原因是:' . $reason;
+                    $this->smsService->sendSms($appointinfo->mobile,'sms_recruit_register_success',array('reason'=>$reason));
+                    $this->fetch_word(['recruit_id'=>$appointinfo->recruit_id,'appoint_id'=>$appointinfo->id]);
+                }
+                break;
+        }
+
+        //站内信
+        foreach ($ids as $key => $val) {
+            if(array_key_exists($val,$message)){
+                $user_info = Member::where('id', $appointinfo->uid)->first();
+                Pms::write_pmsnotice($user_info->id, $user_info->username, $message[$val]);
+            }else{
+                continue;
+            }
+        }
+        return response()->json(['status' => 1, 'msg' => '操作成功!', 'data' => 'ok']);
+    }
+
+
+
 }
 }

+ 5 - 0
app/Admin/routes.php

@@ -476,6 +476,11 @@ Route::group([
         'namespace' =>  'Recruit'
         'namespace' =>  'Recruit'
     ], function (Router $router) {
     ], function (Router $router) {
         $router->resource('index', SpecialController::class)->names('special');//专场招考
         $router->resource('index', SpecialController::class)->names('special');//专场招考
+        $router->get('appoint_list', 'SpecialController@appointList')->name('special.appoint_list');//报名管理
+        $router->get('manage/getRecruitPost', 'SpecialController@getRecruitPost')->name('special.getRecruitPost');//获得招考岗位表
+        $router->get('ajax_audit', 'SpecialController@ajax_audit')->name('special.ajax_audit');
+        $router->get('show_log', 'SpecialController@showLog')->name('special.show_log');
+        $router->post('appoint_audit', 'SpecialController@appoint_audit')->name('special.appoint_audit');
 
 
     });
     });
 
 

+ 0 - 1
resources/views/admin/recruit/index.blade.php

@@ -7,7 +7,6 @@
     $("input[name='flow_path[]']").eq(1).attr("disabled", true);
     $("input[name='flow_path[]']").eq(1).attr("disabled", true);
     $(document).ready(function () {
     $(document).ready(function () {
 
 
-
         $("#preview").on('click',function () {
         $("#preview").on('click',function () {
             let num = $("#forms").find(".checked").length;
             let num = $("#forms").find(".checked").length;
             if(num == 0){
             if(num == 0){

+ 1117 - 0
resources/views/admin/special/appoint_list.blade.php

@@ -0,0 +1,1117 @@
+<section class="content">
+    <div class="row">
+        <div class="col-md-12">
+            <div class="box">
+                {{ csrf_field() }}
+                <div class="box-body table-responsive">
+                    <div class="col-md-3 clearfix">
+                        <div class="box-body table-responsive" style="padding:5px;">
+                            <div class="form-group clearfix" style="margin-bottom:0;">
+                                <label for="prefix" class="control-label">政治面貌:</label>
+                                <div style="float: left;width: 150px;">
+                                    <select class="form-control" name="political_affiliation" id="political_affiliation">
+                                        <option value=''>不限</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '01') selected @endif  value="01">中共党员</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '02') selected @endif  value="02">中共预备党员</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '03') selected @endif  value="03">共青团员</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '04') selected @endif  value="04">民革党员</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '05') selected @endif  value="05">民盟盟员</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '06') selected @endif  value="06">民建会员</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '07') selected @endif  value="07">民进会员</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '08') selected @endif  value="08">农工党党员</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '09') selected @endif  value="09">致公党党员</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '10') selected @endif  value="10">九三学社社员</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '11') selected @endif  value="11">台盟盟员</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '12') selected @endif  value="12">无党派人士</option>
+                                        <option @if(array_key_exists('political_affiliation',$search_data) && $search_data['political_affiliation'] == '13') selected @endif  value="13">群众</option>
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="box-body table-responsive" style="padding:5px;">
+                            <div class="form-group clearfix" style="margin-bottom:0;">
+                                <label for="prefix" class="control-label">报名状态:</label>
+                                <div style="float: left;width: 150px;">
+                                    <select class="form-control" name="audit" id="audit">
+                                        <option value=''>不限</option>
+                                        <option @if(array_key_exists('audit',$search_data) && $search_data['audit'] == '1') selected @endif value='1'>已提交,待审核</option>
+                                        <option @if(array_key_exists('audit',$search_data) && $search_data['audit'] == '2') selected @endif value='2'>审核失败,已退回</option>
+                                        <option @if(array_key_exists('audit',$search_data) && $search_data['audit'] == '3') selected @endif value='3'>审核成功</option>
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="box-body table-responsive" style="padding:5px;">
+                            <div class="form-group clearfix" style="margin-bottom:0;">
+                                <label for="prefix" class="control-label">精确查询:</label>
+                                <div style="float: left;width: 150px;">
+                                    <input type="text" class="form-control" name="realname" id="realname" placeholder="请输入姓名" @if(array_key_exists('realname',$search_data)) value="{{$search_data['realname']}}" @endif>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="col-md-3 clearfix">
+                        <div class="box-body table-responsive" style="padding:5px;">
+                            <div class="form-group clearfix" style="margin-bottom:0;">
+                                <label for="prefix" class="control-label">性别:</label>
+                                <div style="float: left;width: 150px;">
+                                    <select class="form-control" name="sex" id="sex">
+                                        <option value=''>不限</option>
+                                        <option value='0' @if(array_key_exists('sex',$search_data) && $search_data['sex'] == '0') selected @endif>女</option>
+                                        <option value='1' @if(array_key_exists('sex',$search_data) && $search_data['sex'] == '1') selected @endif>男</option>
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="box-body table-responsive" style="padding:5px;">
+                            <div class="form-group clearfix" style="margin-bottom:0;">
+                                <label for="prefix" class="control-label">学历:</label>
+                                <div style="float: left;width: 150px;">
+                                    <select class="form-control" name="education" id="education">
+                                        <option value=''>不限</option>
+                                        <option value='小学' @if(array_key_exists('education',$search_data) && $search_data['education'] == '小学') selected @endif>小学</option>
+                                        <option value='初中' @if(array_key_exists('education',$search_data) && $search_data['education'] == '初中') selected @endif>初中</option>
+                                        <option value='技校' @if(array_key_exists('education',$search_data) && $search_data['education'] == '技校') selected @endif>技校</option>
+                                        <option value='职高' @if(array_key_exists('education',$search_data) && $search_data['education'] == '职高') selected @endif>职高</option>
+                                        <option value='高中' @if(array_key_exists('education',$search_data) && $search_data['education'] == '高中') selected @endif>高中</option>
+                                        <option value='中专' @if(array_key_exists('education',$search_data) && $search_data['education'] == '中专') selected @endif>中专</option>
+                                        <option value='专科' @if(array_key_exists('education',$search_data) && $search_data['education'] == '专科') selected @endif>专科</option>
+                                        <option value='本科' @if(array_key_exists('education',$search_data) && $search_data['education'] == '本科') selected @endif>本科</option>
+                                        <option value='硕士' @if(array_key_exists('education',$search_data) && $search_data['education'] == '硕士') selected @endif>硕士</option>
+                                        <option value='博士' @if(array_key_exists('education',$search_data) && $search_data['education'] == '博士') selected @endif>博士</option>
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="box-body table-responsive" style="padding:5px;">
+                            <div class="form-group clearfix" style="margin-bottom:0;">
+                                <label for="prefix" class="control-label">报名岗位:</label>
+                                <div style="float: left;width: 150px;">
+                                    <select class="form-control" name="post_id" id="post_id">
+                                        <option value=''>不限</option>
+                                        @foreach($post as $k => $v)
+                                            <option value='{{$k}}' @if(array_key_exists('post_id',$search_data) && $search_data['post_id'] == $k) selected @endif>{{$v}}</option>
+                                        @endforeach
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="col-md-3 clearfix">
+                        <div class="box-body table-responsive" style="padding:5px;">
+                            <div class="form-group clearfix" style="margin-bottom:0;">
+                                <label for="prefix" class="control-label">打印笔试准考证:</label>
+                                <div style="float: left;width: 150px;">
+                                    <select class="form-control" name="print_bs" id="print_bs">
+                                        <option value=''>不限</option>
+                                        <option value='1' @if(array_key_exists('print_bs',$search_data) && $search_data['print_bs'] == '1') selected @endif >是</option>
+                                        <option value='0' @if(array_key_exists('print_bs',$search_data) && $search_data['print_bs'] == '0') selected @endif >否</option>
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="box-body table-responsive" style="padding:5px;">
+                            <div class="form-group clearfix" style="margin-bottom:0;">
+                                <label for="prefix" class="control-label">打印上机准考证:</label>
+                                <div style="float: left;width: 150px;">
+                                    <select class="form-control" name="print_js" id="print_js">
+                                        <option value=''>不限</option>
+                                        <option value='1' @if(array_key_exists('print_js',$search_data) && $search_data['print_js'] == '1') selected @endif >是</option>
+                                        <option value='0' @if(array_key_exists('print_js',$search_data) && $search_data['print_js'] == '0') selected @endif >否</option>
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="box-body table-responsive" style="padding:5px;">
+                            <div class="form-group clearfix" style="margin-bottom:0;">
+                                <label for="prefix" class="control-label">打印面试准考证:</label>
+                                <div style="float: left;width: 150px;">
+                                    <select class="form-control" name="print_ms" id="print_ms">
+                                        <option value=''>不限</option>
+                                        <option value='1' @if(array_key_exists('print_ms',$search_data) && $search_data['print_ms'] == '1') selected @endif >是</option>
+                                        <option value='0' @if(array_key_exists('print_ms',$search_data) && $search_data['print_ms'] == '0') selected @endif>否
+                                        </option>
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="col-md-3 clearfix">
+                        <div class="box-body table-responsive" style="padding:5px;">
+                            <div class="form-group clearfix" style="margin-bottom:0;">
+                                <label for="prefix" class="control-label">笔试结果:</label>
+                                <div style="float: left;width: 150px;">
+                                    <select class="form-control" name="pen_audit" id="pen_audit">
+                                        <option value=''>不限</option>
+                                        <option value='-1' @if(array_key_exists('pen_audit',$search_data) && $search_data['pen_audit'] == '-1') selected @endif>未开始</option>
+                                        <option value='1' @if(array_key_exists('pen_audit',$search_data) && $search_data['pen_audit'] == '1') selected @endif>已通过</option>
+                                        <option value='0' @if(array_key_exists('pen_audit',$search_data) && $search_data['pen_audit'] == '0') selected @endif>未通过</option>
+                                        <option value="2" @if(array_key_exists('pen_audit',$search_data) && $search_data['pen_audit'] == '2') selected @endif>缺考</option>
+                                        <option value="3" @if(array_key_exists('pen_audit',$search_data) && $search_data['pen_audit'] == '3') selected @endif>不需要</option>
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="box-body table-responsive" style="padding:5px;">
+                            <div class="form-group clearfix" style="margin-bottom:0;">
+                                <label for="prefix" class="control-label">补登结果:</label>
+                                <div style="float: left;width: 150px;">
+                                    <select class="form-control" name="political_audit" id="political_audit">
+                                        <option value=''>不限</option>
+                                        <option value='-1' @if(array_key_exists('political_audit',$search_data) && $search_data['political_audit'] == '-1') selected @endif>未补登</option>
+                                        <option value='4' @if(array_key_exists('political_audit',$search_data) && $search_data['political_audit'] == '4') selected @endif>未审核</option>
+                                        <option value='0' @if(array_key_exists('political_audit',$search_data) && $search_data['political_audit'] == '0') selected @endif>未通过</option>
+                                        <option value="1" @if(array_key_exists('political_audit',$search_data) && $search_data['political_audit'] == '1') selected @endif>已通过</option>
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+
+                <div class="box-footer">
+                    <div class="btn-group" style="margin-left: 440px;">
+                        <button type="button" class="btn btn-info  btn-primary js-search" data-type="1"><i class="fa fa-search">搜索</i></button>
+                    </div>
+                </div>
+
+                <div class="box-body table-responsive">
+                    <div class="col-md-12">
+                        <div class="box-header with-border">
+                            <h3 class="box-title">查询结果</h3>
+                        </div>
+                        <div class="box-body table-responsive no-padding">
+                            <table class="table table-hover">
+                                <thead>
+                                <tr>
+                                    <th height="26" class="admin_list_tit">
+                                        <input type="checkbox" name=" " title="全选/反选" id="chk" />
+                                    </th>
+                                    <th>照片</th>
+                                    <th>基础资料</th>
+                                    <th>邮箱</th>
+                                    <th>电话</th>
+                                    <th>岗位编号</th>
+                                    <th>报考岗位</th>
+                                    <th>报名时间</th>
+                                    <th>记录变更时间</th>
+                                    <th>当前状态</th>
+                                    <th>准考证打印情况</th>
+                                    <th>日志</th>
+                                    <th>操作</th>
+                                </tr>
+                                </thead>
+                                <tbody>
+                                @if(isset($list) && $list->total())
+                                    @foreach($list as $k=>$v)
+                                        <tr>
+                                            <td>
+                                                <input ls="{{$v->id}}" name="id[]" id="appointinfo_{{$v->id}}" type="checkbox" value="{{$v->id}}" />
+                                            </td>
+                                            <td>
+                                                <span class="vtip" title='<img  @if($v->avatar) src="{{$v->avatar}}" @else src="/data/upload/resource/no_photo_male.png" @endif>'  height=120>
+                                                <img style="width: 30px; height: 30px;" @if($v->avatar) src="{{$v->avatar}}" @else src="/data/upload/resource/no_photo_male.png" @endif></span>
+                                            </td>
+                                            <td>
+                                                <a target="_blank" href="{{admin_base_path()}}/personal/manager/into2/{{$v->uid}}/{{$v->recruit_id}}">{!! $v->realname !!}</a>
+                                                <span style="color: #0A246A; margin-right: 3px;">{{$v->sex}}</span>
+                                                <span style="color:#be7707; margin-right: 3px;">{{$v->birthday}}</span>
+                                                <span style="color:#0A7CF7; margin-right: 3px;">{{$v->education}}</span>
+                                                <span style="color:#ff2424; margin-right: 3px;">{{$v->nation}}</span>
+                                                <span style="color:#0F73AC; margin-right: 3px;">{{$v->native_place}}</span>
+                                                <span style="color:#ff0000; margin-right: 3px;">{{$v->political_affiliation}}</span>
+                                            </td>
+                                            <td>
+                                                {{ $v->email }}
+                                            </td>
+                                            <td>
+                                                {{ $v->mobile }}
+                                            </td>
+                                            <td>{!! $v->code !!}</td>
+                                            <td>{!! $v->name !!}</td>
+                                            <td>{!! $v->created_at !!}</td>
+                                            <td>{!! $v->updated_at !!}</td>
+                                            <td>
+                                                @if(in_array('1',explode(',',$recruit->step)) && $v->current >= 1)
+                                                    <p>报名:
+                                                        @if($v->audit == 3)
+                                                            <span style="color: #67c23a;">通过</span>
+                                                        @elseif($v->audit == 2)
+                                                            <span style="color: #f56c6c;">审核失败</span>
+                                                        @elseif($v->audit == 1)
+                                                            <span style="color: #e6a23c;">审核中</span>
+                                                        @endif
+                                                    </p>
+                                                @endif
+                                                @if(in_array('3',explode(',',$recruit->step)) && $v->current >= 2)
+                                                    <p>笔试:
+                                                        @if($v->pen_audit == -2)
+                                                            <span style="color: #909399;">未确认</span>
+                                                        @elseif($v->pen_audit == -1)
+                                                            <span style="color: #f56c6c;">未开始</span>
+                                                        @elseif($v->pen_audit == 0)
+                                                            <span style="color: #f56c6c;">未通过</span>
+                                                        @elseif($v->pen_audit == 1)
+                                                            <span style=" color: #67c23a;">通过</span>
+                                                        @elseif($v->pen_audit == 2)
+                                                            <span style="color: #909399;">缺考</span>
+                                                        @elseif($v->pen_audit == 3)
+                                                            <span style="color: #909399;">不需要笔试</span>
+                                                        @endif
+                                                    </p>
+                                                @endif
+                                                @if(in_array('4',explode(',',$recruit->step)) && $v->current >= 2)
+                                                    <p>上机:
+                                                        @if($v->computer_audit == -1)
+                                                            <span style="color: #909399;">未开始</span>
+                                                        @elseif($v->computer_audit == 0)
+                                                            <span style="color: #f56c6c;">未通过</span>
+                                                        @elseif($v->computer_audit == 1)
+                                                            <span style=" color: #67c23a;">通过</span>
+                                                        @elseif($v->computer_audit == 2)
+                                                            <span style="color: #909399;">缺考</span>
+                                                        @elseif($v->computer_audit == 3)
+                                                            <span style="color: #909399;">不需要上机</span>
+                                                        @endif
+                                                    </p>
+                                                @endif
+                                                @if(in_array('5',explode(',',$recruit->step)) && $v->current >= 2)
+                                                    <p>面试:
+                                                        @if($v->face_audit == -1)
+                                                            <span style="color: #909399;">未开始</span>
+                                                        @elseif($v->face_audit == 0)
+                                                            <span style="color: #f56c6c;">未通过</span>
+                                                        @elseif($v->face_audit == 1)
+                                                            <span style=" color: #67c23a;">通过</span>
+                                                        @elseif($v->face_audit == 2)
+                                                            <span style="color: #909399;">缺考</span>
+                                                        @elseif($v->face_audit == 3)
+                                                            <span style="color: #909399;">不需要面试</span>
+                                                        @endif
+                                                    </p>
+                                                @endif
+                                                @if(in_array('6',explode(',',$recruit->step)) && $v->current >= 2)
+                                                    <p>复试:
+                                                        @if($v->reexamine_audit == -1)
+                                                            <span style="color: #909399;">未开始</span>
+                                                        @elseif($v->reexamine_audit == 0)
+                                                            <span style="color: #f56c6c;">未通过</span>
+                                                        @elseif($v->reexamine_audit == 1)
+                                                            <span style=" color: #67c23a;">通过</span>
+                                                        @elseif($v->reexamine_audit == 2)
+                                                            <span style="color: #909399;">缺考</span>
+                                                        @elseif($v->reexamine_audit == 3)
+                                                            <span style="color: #909399;">不需要复试</span>
+                                                        @endif
+                                                    </p>
+                                                @endif
+                                                @if(in_array('7',explode(',',$recruit->step)) && $v->current >= 3)
+                                                    <p>体检:
+                                                        @if($v->inspect_audit == -1)
+                                                            <span style="color: #909399;">未开始</span>
+                                                        @elseif($v->inspect_audit == 0)
+                                                            <span style="color: #f56c6c;">未通过</span>
+                                                        @elseif($v->inspect_audit == 1)
+                                                            <span style=" color: #67c23a;">通过</span>
+                                                        @elseif($v->inspect_audit == 2)
+                                                            <span style="color: #909399;">缺检</span>
+                                                        @elseif($v->inspect_audit == 3)
+                                                            <span style="color: #909399;">不需要体检</span>
+                                                        @endif
+                                                    </p>
+                                                @endif
+                                                @if(in_array('8',explode(',',$recruit->step)) && $v->current >= 3)
+                                                    <p>政审:
+                                                        @if($v->political_audit == -1)
+                                                            <span style="color: #909399;">未开始</span>
+                                                        @elseif($v->political_audit == 0)
+                                                            <span style="color: #f56c6c;">未通过</span>
+                                                        @elseif($v->political_audit == 1)
+                                                            <span style=" color: #67c23a;">通过</span>
+                                                        @elseif($v->political_audit == 2)
+                                                            <span style="color: #909399;">缺检</span>
+                                                        @elseif($v->political_audit == 3)
+                                                            <span style="color: #909399;">不需要政审</span>
+                                                        @endif
+                                                    </p>
+                                                @endif
+                                            </td>
+                                            <td>
+                                                @if(in_array('3',explode(',',$recruit->step)) && $v->current >= 2 && $v->pen_audit != 3)
+                                                    <p>笔试准考证:
+                                                        @if($v->pen_print)
+                                                            <span style=" color: #67c23a;">已打印</span>
+                                                        @else
+                                                            <span style=" color: #ff2424;">未打印</span><br />
+                                                        @endif
+                                                    </p>
+                                                @endif
+                                                @if(in_array('4',explode(',',$recruit->step)) && $v->current >= 2 && $v->computer_audit != 3)
+                                                    <P>上机准考证:
+                                                        @if($v->computer_print)
+                                                            <span style=" color: #67c23a;">已打印</span>
+                                                        @else
+                                                            <span style=" color: #ff2424;">未打印</span><br />
+                                                        @endif
+                                                    </P>
+                                                @endif
+                                                @if(in_array('5',explode(',',$recruit->step)) && $v->current >= 2 & $v->face_audit != 3)
+                                                    <P>面试准考证:
+                                                        @if($v->face_print)
+                                                            <span style=" color: #67c23a;">已打印</span>
+                                                        @else
+                                                            <span style=" color: #ff2424;">未打印</span><br />
+                                                        @endif
+                                                    </P>
+                                                @endif
+                                                @if(in_array('6',explode(',',$recruit->step)) && $v->current >= 2 & $v->reexamine_audit != 3)
+                                                    <P>复试准考证:
+                                                        @if($v->reexamine_print)
+                                                            <span style=" color: #67c23a;">已打印</span>
+                                                        @else
+                                                            <span style=" color: #ff2424;">未打印</span><br />
+                                                        @endif
+                                                    </P>
+                                                @endif
+                                            </td>
+                                            <td>
+                                                <a href="javascript:;" data-url="{{ route('special.show_log') }}" data-param="{{$v->id}}" hidefocus="true" class="ButExamineLog">查看</a>
+                                            </td>
+                                            <td>
+                                                <button class='btn btn-primary btn-xs business ButCompared' data-param="{{$v->id}}" data-url="{{ route('special.getUserinfo') }}" style="margin-bottom: 10px" >查看报名信息</button>
+                                                <button class='btn btn-primary btn-xs appoint_audit' data-param="{{$v->id}}" style="margin-bottom: 10px">报名审核</button>
+                                                <button class='btn btn-primary btn-xs fetch_word' data-rid="{{$v->recruit_id}}" data-aid="{{$v->id}}" style="margin-bottom: 10px">生成word简历</button>
+                                                @if($recruit->id == 5 || $recruit->id == 16 || $recruit->id == 18)
+                                                    <button class='btn btn-primary btn-xs supplement' data-param="{{$v->id}}" style="margin-bottom: 10px">补登材料审核</button>
+                                                @endif
+                                            </td>
+                                        </tr>
+                                    @endforeach
+                                @else
+                                    <tr>
+                                        <td colspan="10">
+                                            <div class="list_empty_group">
+                                                <div class="list_empty">
+                                                    <div class="list_empty_left"></div>
+                                                    <div class="list_empty_right">
+                                                        <div class="sorry_box">对不起,暂无相关信息!</div>
+                                                    </div>
+                                                    <div class="clear"></div>
+                                                </div>
+                                            </div>
+                                        </td>
+                                    </tr>
+                                @endif
+                                </tbody>
+                            </table>
+                        </div>
+                        <div class="list_foot" style="margin-top: 20px">
+                            <table width="100%" border="0" cellspacing="10" cellpadding="0" class="admin_list_btm">
+                                <tr>
+                                    <td>
+
+                                        <input name="ButtonADD" type="button" class="btn btn-sm  btn-warning" recruit_id="{{$recruit->id}}" id="ButtonAudit" value="批量报名审核" />
+                                        {{--                                        <input name="ButDel" type="button" class="btn btn-sm  btn-info ButPen" onclick="employ()" recruit_id="{{$recruit->id}}" value="入职聘用" />--}}
+                                        <input name="ButDel" type="button" class="btn btn-sm  btn-info" onclick="record()" value="上传成绩" />
+
+                                        <input name="ButDel" type="button" class="btn btn-sm  btn-info ButPen" onclick="card()" value="准考证生成" />
+                                        {{--                                        <input name="ButDel" type="button" class="btn btn-sm  btn-info ButPen" onclick="delcard()" value="准考证撤销" />--}}
+                                        {{--                                        @if(Encore\Admin\Facades\Admin::user()->can('auth_recruit_outexcel'))--}}
+                                        {{--                                        <a href="{{route('recruit.out_zip',['where'=>\Request::getRequestUri(),'id'=>$recruit->id])}}" target="_blank">--}}
+                                        {{--                                            <input name="ButDel" type="button" class="btn btn-sm  btn-info ButPen" recruit_id="{{$recruit->id}}" value="导出word版简历(压缩包)" />--}}
+                                        {{--                                        </a>--}}
+                                        <a href="{{route('recruit.out_excel',['where'=>\Request::getRequestUri(),'id'=>$recruit->id])}}" target="_blank">
+                                            <input id="out_excel" name="ButDel" type="button" class="btn btn-sm  btn-info ButPen" data-recruit_id="{{$recruit->id}}" value="汇总表" />
+                                        </a>
+                                        <a href="{{route('recruit.seat_sticker',['where'=>\Request::getRequestUri(),'id'=>$recruit->id])}}" target="_blank">
+                                            <input id="seat_sticker" name="ButDel" type="button" class="btn btn-sm  btn-info ButPen" data-recruit_id="{{$recruit->id}}" value="座位贴" />
+                                        </a>
+                                        <a href="{{route('recruit.sign_table',['where'=>\Request::getRequestUri(),'id'=>$recruit->id])}}" target="_blank">
+                                            <input id="seat_sticker" name="ButDel" type="button" class="btn btn-sm  btn-info ButPen" data-recruit_id="{{$recruit->id}}" value="签到表" />
+                                        </a>
+                                        {{--                                        @endif--}}
+                                    </td>
+                                </tr>
+                            </table>
+                        </div>
+                        @if(isset($list))
+                            {{ $list->appends($search_data)->links('module.widgets.pagination') }}
+                        @endif
+                    </div>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</section>
+<script type="text/javascript" src="{{ theme_asset('app/js/jquery.disappear.tooltip.js') }}"></script>
+<script type="text/javascript" src="{{ theme_asset('app/js/jquery.modal.userselectlayer.js') }}"></script>
+<script type="text/javascript" src="{{ theme_asset('app/js/jquery.user.city.js') }}"></script>
+<script type="text/javascript" src="{{ theme_asset('app/js/jquery.modal.dialog.js') }}"></script>
+<script>
+    //图片预览
+    this.vtip = function() {
+        this.xOffset = -10; // x distance from mouse
+        this.yOffset = 15; // y distance from mouse
+        $(".vtip").unbind().hover(
+            function(e) {
+                this.t = $(this).attr("title");
+                this.title = '';
+                this.top = (e.pageY + yOffset);
+                this.left = (e.pageX + xOffset);
+                $('body').css("cursor","help");
+                $('p#vtip').width()>450?$('p#vtip').width(450):'';
+                $('body').append( '<p id="vtip">' + this.t + '</p>' );
+                $('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn(0);
+            },
+            function() {
+                this.title = this.t;
+                $('body').css("cursor","");
+                $("p#vtip").fadeOut("slow").remove();
+            }
+        ).mousemove(
+            function(e) {
+                this.top = (e.pageY + yOffset);
+                this.left = (e.pageX + xOffset);
+                $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");
+            }
+        );
+
+    };
+    //提交数组整理
+    this.show = function(type = 0){
+        var id_array = new Array();
+        if(type == 0){
+            $('input[name="id\[\]"]:checked').each(function() {
+                id_array.push($(this).val()); //向数组中添加元素
+            });
+        }else{
+            id_array.push($("#appointinfo_"+type).val());
+        }
+        if (id_array.length == 0) {
+            disapperTooltip('remind', '请选择用户');
+            return false;
+        } else {
+            var idstr = id_array.join(','); //将数组元素连接起来以构建一个字符串
+            if (idstr == '' || idstr == null) {
+                idstr = 0;
+            }
+            return idstr;
+        }
+    }
+    //报名记录审核
+    this.appointAudit = function(type = 0){
+        var ids = show(type);
+        if(!ids){
+            return false;
+        }
+        if (ids !== false) {
+            var qsDialog = $(this).dialog({
+                title: '报名审核',
+                loading: true,
+                showFooter: false,
+                yes: function() {
+                    $('.J_btnyes').val('发送中...');
+                    $.post("{{ route('special.appoint_audit') }}", $('#J_interviewWrap').serialize(), function(result) {
+                        if (result.status == 1) {
+                            disapperTooltip('success', result.msg);
+                            setTimeout(function() {
+                                $.pjax.reload('#pjax-container');
+                                qsDialog.hide(true);
+                            }, 2000);
+                        } else {
+                            $('.J_btnyes').val('确定');
+                            disapperTooltip('remind', result.msg);
+                        }
+                    }, 'json');
+                }
+            });
+            qsDialog.setCloseDialog(false);
+            var recruit_id = $(this).attr('recruit_id');
+            $.getJSON("/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/special/ajax_audit", {
+                recruit_id: recruit_id,
+                ids: ids
+            }, function(result) {
+                if (result.status == 1) {
+                    qsDialog.setContent(result.data);
+                    qsDialog.showFooter(true);
+                } else {
+                    qsDialog.setContent('<div class="confirm">' + result.msg + '<\/div>');
+                }
+            });
+        }
+    };
+    //材料补登
+    this.supplement = function(type = 0){
+        var ids = show(type);
+        if(!ids){
+            return false;
+        }
+        if (ids !== false) {
+            var qsDialog = $(this).dialog({
+                title: '材料补登审核',
+                loading: true,
+                showFooter: false,
+                yes: function() {
+                    $('.J_btnyes').val('发送中...');
+                    $.post("{{ route('recruit.supplement') }}", $('#J_interviewWrap').serialize(), function(result) {
+                        if (result.status == 1) {
+                            disapperTooltip('success', result.msg);
+                            setTimeout(function() {
+                                $.pjax.reload('#pjax-container');
+                                qsDialog.hide(true);
+                            }, 2000);
+                        } else {
+                            $('.J_btnyes').val('确定');
+                            disapperTooltip('remind', result.msg);
+                        }
+                    }, 'json');
+                }
+            });
+            qsDialog.setCloseDialog(false);
+            var recruit_id = $(this).attr('recruit_id');
+            $.getJSON("/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/recruit/ajax_supplement", {
+                recruit_id: recruit_id,
+                ids: ids
+            }, function(result) {
+                if (result.status == 1) {
+                    qsDialog.setContent(result.data);
+                    qsDialog.showFooter(true);
+                } else {
+                    qsDialog.setContent('<div class="confirm">' + result.msg + '<\/div>');
+                }
+            });
+        }
+    }
+
+
+
+    $(document).ready(function() {
+        vtip();
+        $(document).off("click",'.appoint_audit').on('click','.appoint_audit',function () {
+            appointAudit($(this).data('param'));
+        });
+        $(document).off("click",'.supplement').on('click','.supplement',function () {
+            supplement($(this).data('param'));
+        });
+        $(document).off("click",'.fetch_word').on('click','.fetch_word',function () {
+            var recruit_id = $(this).attr('data-rid'),appoint_id = $(this).attr('data-aid');
+
+            var qsDialog = $(this).dialog({
+                title: 'word简历生成',
+                loading: true,
+                showFooter: false,
+                yes: function() {
+                    $('.J_btnyes').val('发送中...');
+                    $.post("{{ route('recruit.fetchword') }}", {_token:'{{ csrf_token() }}',recruit_id:recruit_id,appoint_id:appoint_id}, function(result) {
+                        if (result.status == 1) {
+                            disapperTooltip('success', result.msg);
+                            window.location.href = result.url;
+                            setTimeout(function() {
+                                $.pjax.reload('#pjax-container');
+                                qsDialog.hide(true);
+                            }, 2000);
+                        } else {
+                            $('.J_btnyes').val('确定');
+                            disapperTooltip('remind', result.msg);
+                        }
+                    }, 'json');
+                }
+            });
+            qsDialog.setCloseDialog(false);
+            qsDialog.setContent("重新生成会覆盖原有简历,请确认?");
+            qsDialog.showFooter(true);
+        });
+        $("#ButtonAudit").click(function() {
+            appointAudit(0)
+        })
+        /*查看人员信息*/
+        $('.ButCompared').click(function() {
+            var qsDialog = $(this).dialog({
+                title: '查看报名信息',
+                loading: true,
+                footer: false
+            });
+            var param = $(this).data('param');
+            var url = $(this).data('url') + "?id=" + param;
+            $.getJSON(url, function(result) {
+                qsDialog.setContent('<div style="max-height:600px;overflow-y:auto;">' + result.data + '<\/div>');
+            });
+        });
+
+        //导出word简历压缩包
+        $("#out_zip").click(function() {
+            var id = show();
+            if(!id){
+                return false;
+            }
+            $(this).val("数据生成中。。。")
+            $.ajax({
+                url: "{{ route('recruit.out_zip') }}",
+                type: 'POST',
+                dataType: 'json',
+                data: {
+                    id: id,
+                    recruit_id: "{{$recruit->id}}"
+                },
+                error: function(data) {
+
+                },
+                success: function(res) {
+                    $(this).val("导出word版简历(压缩包)")
+                    if (res.status == 1) {
+                        window.open(res.msg);
+                    } else {
+                        alert(res.msg);
+                        return false;
+                    }
+                }
+            });
+        });
+
+    });
+
+    /*查看日志信息*/
+    $('.ButExamineLog').click(function() {
+        var qsDialog = $(this).dialog({
+            title: '查看审核信息',
+            loading: true,
+            footer: false
+        });
+        var param = $(this).data('param');
+        var url = $(this).data('url') + "?id=" + param;
+        $.getJSON(url, function(result) {
+            qsDialog.setContent('<div style="max-height:600px;overflow-y:auto;">' + result.data + '<\/div>');
+        });
+    });
+
+    $('.js-search').click(function() {
+        var political_affiliation = $.trim($('#political_affiliation').val());
+        var audit = $.trim($('#audit').val());
+        var realname = $.trim($('#realname').val());
+        var print_ms = $.trim($('#print_ms').val());
+        var print_bs = $.trim($('#print_bs').val());
+        var pen_audit = $.trim($('#pen_audit').val());
+        var computer_audit = $.trim($('#computer_audit').val());
+        var face_audit = $.trim($('#face_audit').val());
+        var reexamine_audit = $.trim($('#reexamine_audit').val());
+        var inspect_audit = $.trim($('#inspect_audit').val());
+        var print_js = $.trim($('#print_js').val());
+        var review_audit = $.trim($('#review_audit').val());
+        var political_audit = $.trim($('#political_audit').val());
+        var sex = $.trim($("#sex").val());
+        var education = $.trim($("#education").val());
+        var post_id = $.trim($("#post_id").val());
+        var parm = '';
+        if (political_audit) {
+            parm += "&political_audit=" + political_audit;
+        }
+        if (review_audit) {
+            parm += "&review_audit=" + review_audit;
+        }
+        if (political_affiliation) {
+            parm += "&political_affiliation=" + political_affiliation;
+        }
+        if (audit) {
+            parm += "&audit=" + audit;
+        }
+        if (realname) {
+            parm += "&realname=" + realname;
+        }
+        if (print_ms) {
+            parm += "&print_ms=" + print_ms;
+        }
+        if (print_bs) {
+            parm += "&print_bs=" + print_bs;
+        }
+        if (pen_audit) {
+            parm += "&pen_audit=" + pen_audit;
+        }
+        if (face_audit) {
+            parm += "&face_audit=" + face_audit;
+        }
+        if (computer_audit) {
+            parm += "&computer_audit=" + computer_audit;
+        }
+        if (reexamine_audit) {
+            parm += "&reexamine_audit=" + reexamine_audit;
+        }
+        if (inspect_audit) {
+            parm += "&inspect_audit=" + inspect_audit;
+        }
+        if (print_js) {
+            parm += "&print_js=" + print_js;
+        }
+        if(sex){
+            parm += "&sex=" + sex;
+        }
+        if(education){
+            parm += "&education=" + education;
+        }
+        if(post_id){
+            parm += "&post_id=" + post_id;
+        }
+        window.location = "{{ url('/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/special/appoint_list')}}?id={{$search_data['id']}}" + parm;
+    });
+
+    //入职聘用
+    function employ() {
+        var ids = show();
+        if (ids !== false) {
+            var qsDialog = $(this).dialog({
+                title: '请选择',
+                loading: true,
+                showFooter: false,
+                yes: function() {
+                    $('.J_btnyes').val('发送中...');
+                    // console.log($('#J_interviewWrap').serialize());
+                    $.post("recruit.employ", $('#J_interviewWrap').serialize(), function(result) {
+                        if (result.status == 1) {
+                            disapperTooltip('success', result.msg);
+                            setTimeout(function() {
+                                $.pjax.reload('#pjax-container');
+                                qsDialog.hide(true);
+                            }, 2000);
+                        } else {
+                            $('.J_btnyes').val('确定');
+                            disapperTooltip('remind', result.msg);
+                        }
+                    }, 'json');
+                }
+            });
+            qsDialog.setCloseDialog(false);
+            var recruit_id = "{{$recruit->id}}";
+            $.getJSON("recruit.employ_audit", {
+                recruit_id: recruit_id,
+                ids: ids
+            }, function(result) {
+                if (result.status == 1) {
+                    qsDialog.setContent(result.data);
+                    qsDialog.showFooter(true);
+                } else {
+                    qsDialog.setContent('<div class="confirm">' + result.msg + '<\/div>');
+                }
+            });
+        }
+    }
+
+
+
+
+
+    //其它审核
+    function butpen(i) {
+        var ids = show();
+        if (ids !== false) {
+            var qsDialog = $(this).dialog({
+                title: '请选择',
+                loading: true,
+                showFooter: false,
+                yes: function() {
+                    $('.J_btnyes').val('发送中...');
+                    $.post("recruit.other_auth", $('#J_interviewWrap').serialize(), function(result) {
+                        if (result.status == 1) {
+                            disapperTooltip('success', result.msg);
+                            setTimeout(function() {
+                                $.pjax.reload('#pjax-container');
+                                qsDialog.hide(true);
+                            }, 2000);
+                        } else {
+                            $('.J_btnyes').val('确定');
+                            disapperTooltip('remind', result.msg);
+                        }
+                    }, 'json');
+                }
+            });
+            qsDialog.setCloseDialog(false);
+            var recruit_id = "{{$recruit->id}}";
+            if (i == 'pay_audit') {
+                $.getJSON("recruit.pay_audit", {
+                    recruit_id: recruit_id,
+                    ids: ids,
+                    type: i
+                }, function(result) {
+                    if (result.status == 1) {
+                        qsDialog.setContent(result.data);
+                        qsDialog.showFooter(true);
+                    } else {
+                        qsDialog.setContent('<div class="confirm">' + result.msg + '<\/div>');
+                    }
+                });
+            } else {
+                $.getJSON("recruit.ajax_other_audit", {
+                    recruit_id: recruit_id,
+                    ids: ids,
+                    type: i
+                }, function(result) {
+                    if (result.status == 1) {
+                        qsDialog.setContent(result.data);
+                        qsDialog.showFooter(true);
+                    } else {
+                        qsDialog.setContent('<div class="confirm">' + result.msg + '<\/div>');
+                    }
+                });
+            }
+        }
+    }
+
+    //准考证生成
+    function card() {
+        var recruit_id = "{{$recruit->id}}";
+        var qsDialog = $(this).dialog({
+            title: '请选择',
+            loading: true,
+            showFooter: false,
+            yes: function() {
+                $('.J_btnyes').val('发送中...');
+                var data = new FormData(document.getElementById("J_ticketWrap"));
+                console.log(data)
+                $.ajax({
+                    url: "{{ route('recruit.create_ticket') }}",
+                    type: 'POST',
+                    data: data,
+                    processData: false,
+                    contentType : false,
+                    success: function(response){
+                        if (response.status == 1) {
+                            disapperTooltip('success', response.msg);
+                            setTimeout(function() {
+                                $.pjax.reload('#pjax-container');
+                                qsDialog.hide(true);
+                            }, 2000);
+                        } else {
+                            $('.J_btnyes').val('确定');
+                            disapperTooltip('remind', response.msg);
+                        }
+                    }
+                })
+            }
+        });
+        qsDialog.setCloseDialog(false);
+        $.getJSON("ajax/ajax_ticket", {
+            recruit_id: recruit_id
+        }, function(result) {
+            if (result.status == 1) {
+                qsDialog.setContent(result.data);
+                qsDialog.showFooter(true);
+            } else {
+                qsDialog.setContent('<div class="confirm">' + result.msg + '<\/div>');
+            }
+        });
+
+    }
+
+    //成绩更新
+    function record() {
+        var recruit_id = "{{$recruit->id}}";
+        var qsDialog = $(this).dialog({
+            title: '请选择',
+            loading: true,
+            showFooter: false,
+            yes: function() {
+                $('.J_btnyes').val('发送中...');
+                var data = new FormData(document.getElementById("J_recordWrap"));
+                $.ajax({
+                    url: "{{ route('recruit.update_record') }}",
+                    type: 'POST',
+                    data: data,
+                    processData: false,
+                    contentType : false,
+                    success: function(response){
+                        if (response.status == 1) {
+                            disapperTooltip('success', response.msg);
+                            setTimeout(function() {
+                                $.pjax.reload('#pjax-container');
+                                qsDialog.hide(true);
+                            }, 2000);
+                        } else {
+                            $('.J_btnyes').val('确定');
+                            disapperTooltip('remind', response.msg);
+                        }
+                    }
+                })
+            }
+        });
+        qsDialog.setCloseDialog(false);
+        $.getJSON("ajax/ajax_record", {
+            recruit_id: recruit_id
+        }, function(result) {
+            if (result.status == 1) {
+                qsDialog.setContent(result.data);
+                qsDialog.showFooter(true);
+            } else {
+                qsDialog.setContent('<div class="confirm">' + result.msg + '<\/div>');
+            }
+        });
+
+    }
+
+    //提交准考证
+    $("#build").click(function() {
+
+        $("form[name=form1]").attr("action", "{:U('buildcard')}" + "&recruit_id=" + recruit_ids +
+            "&time=" + time + "&audits=" + audits + "&times=" + times + "&home=" + home + "&address=" + address + "&expand=" + expand);
+        $("form[name=form1]").submit();
+    });
+    //撤销准考证
+    $("#del_ticket").click(function() {
+        var ticket_id = $("input[name='ticket_id']:checked").val();
+        var r_id = $("input[name='r_id']").val();
+        $("form[name=form1]").attr("action", "{:U('delcard')}" + "&ticket_id=" + ticket_id + "&r_id=" + r_id);
+        $("form[name=form1]").submit();
+    });
+
+    //撤销准考证
+    function delcard() {
+        var ids = show();
+        var recruit_id = "{{$recruit->id}}";
+        if (ids !== false) {
+            var qsDialog = $(this).dialog({
+                title: '请选择',
+                loading: true,
+                showFooter: false,
+                yes: function() {
+                    $('.J_btnyes').val('发送中...');
+                    var ticket_id = $("input[name='ticket_id']:checked").val();
+                    data = {
+                        'ids': ids,
+                        'recruit_id': recruit_id,
+                        'ticket_id': ticket_id,
+                    };
+                    $.post("recruit.ticket_del", data, function(result) {
+                        if (result.status == 1) {
+                            disapperTooltip('success', result.msg);
+                            setTimeout(function() {
+                                $.pjax.reload('#pjax-container');
+                                qsDialog.hide(true);
+                            }, 2000);
+                        } else {
+                            $('.J_btnyes').val('确定');
+                            disapperTooltip('remind', result.msg);
+                        }
+                    }, 'json');
+                }
+            });
+            qsDialog.setCloseDialog(false);
+            $.getJSON("recruit.ajax_ticket_del", {
+                recruit_id: recruit_id,
+                ids: ids,
+            }, function(result) {
+                if (result.status == 1) {
+                    // console.log(result.data);
+                    qsDialog.setContent(result.data);
+                    qsDialog.showFooter(true);
+                } else {
+                    qsDialog.setContent('<div class="confirm">' + result.msg + '<\/div>');
+                }
+            });
+        }
+    }
+
+
+    /*全选*/
+    $("#chk").click(function() {
+        if (this.checked == false) {
+            // console.log("反选")
+            $("td :checkbox").prop("checked", false);
+        }
+        if (this.checked == true) {
+            // console.log("全选")
+            $("td :checkbox").prop("checked", true);
+        }
+    })
+
+    //子复选框有一个未选中时,去掉全选按钮的选中状态
+    $("td :checkbox").click(function() {
+        var allCheckNum = $("td input[type='checkbox']").length;
+        var checkedNum = $("td input[type='checkbox']:checked").length;
+        if (checkedNum == allCheckNum) {
+            // console.log("全选");
+            document.getElementById("chk").checked = true;
+        } else {
+            // console.log("反选");
+            document.getElementById("chk").checked = false;
+        }
+    })
+</script>
+<link href="{{ theme_asset('app/css/person/common.css') }}" rel="stylesheet">
+<style type="text/css">
+    p#vtip { display: none; position: absolute; padding: 10px; left: 5px; font-size: 0.8em; background-color: white; border: 1px solid #a6c9e2; -moz-border-radius: 5px; -webkit-border-radius: 5px; z-index: 9999 }
+    p#vtip img{width: 200px}
+    /*body{min-width: 1680px;overflow: auto;}*/
+    .clearfix:after {
+        display: block;
+        clear: both;
+        content: "";
+        visibility: hidden;
+        height: 0;
+    }
+
+    .clearfix {
+        zoom: 1;
+        /*为了兼容IE*/
+    }
+
+    .box .box-body {
+        position: relative;
+    }
+
+    .box .form-group label {
+        float: left;
+        width: 120px;
+        line-height: 34px;
+        text-align: right;
+    }
+
+    .box .input-group {
+        width: 360px;
+    }
+
+    .list_empty_group {
+        text-align: center;
+        line-height: 80px;
+        color: #404446;
+        font-size: 22px;
+    }
+
+    .jobslist_table .li-table-btn {
+        width: 120px;
+        height: 50px;
+        line-height: 50px;
+    }
+
+    .modal {
+        display: block;
+        position: static;
+    }
+
+    .qs-category-unlimited .selected-group .selected-box .s-cell {
+        width: 112px;
+    }
+
+    .qs-category-unlimited .cate-type .dd {
+        margin: 0px;
+        font-size: 14px;
+    }
+
+    .qs-category-unlimited .cate-type .one-select label {
+        display: block;
+        margin: 0px;
+        width: 110px;
+    }
+
+    .qs-category-unlimited .cate-type .one-select .check-box {
+        margin: 0px;
+    }
+
+    .modal_body_box .list_nav1 li label {
+        margin-bottom: 0px;
+    }
+
+    .disappear_tooltip .content {
+        min-height: auto;
+        padding: 0px;
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+</style>

+ 209 - 0
resources/views/admin/special/index.blade.php

@@ -0,0 +1,209 @@
+{!! $grid !!}
+<link rel="stylesheet" href="{{ theme_asset('app/css/viewer.min.css') }}">
+<script type="text/javascript" src="{{ theme_asset('app/js/viewer-jquery.min.js') }}"></script>
+<script>
+    //报名审核必选
+    $("input[name='flow_path[]']").eq(0).attr("disabled", true);
+    $("input[name='flow_path[]']").eq(1).attr("disabled", true);
+    $(document).ready(function () {
+
+        $("#preview").on('click',function () {
+            let num = $("#forms").find(".checked").length;
+            if(num == 0){
+                alert("未选中报名表单模块");
+                return false;
+            }
+            let modules = new Array();
+            $.each($("#forms").find(".checked"),function(index,item){
+                modules.push($(item).children("input").val())
+            });
+            window.open("https://www.jucai.gov.cn/recruit/preview?modules="+modules.join(','));
+
+            return false;
+        });
+    });
+
+
+    var admin = null;
+    var paper = null;
+    var post = null;
+    var id = {{$id}}
+
+    $(function () {
+        getAdmin();
+    });
+
+    function getAdmin() {
+        if (id !== 0) {
+            getPost()
+        } else {
+            getView()
+
+        }
+    }
+
+    function getPost() {
+        if (this.post === null) {
+            $.ajax({
+                url: "{{route('special.getRecruitPost')}}",
+                data: {id: id,_token:'{{csrf_token()}}'},
+                success: function ($data) {
+                    post = $data.post;
+                    editView()
+                },
+            });
+        }
+    }
+
+    function getView() {
+        var job_base = '<div style=" font-weight:700;padding-left:20px;border-bottom:1px  #DFEDF7 solid;border-top:1px #DFEDF7 solid;background-color:#F0F8FD;height:30px;line-height:30px;margin-bottom:15px;"><span style="color:#f00">*<\/span>招考岗位<\/div>'
+        job_base += '<div style="margin-left:20px;margin-bottom:15px;"><input type="button" id="add_post" onclick="addPost()" class="btn btn-warning"  value="增行"><span>&nbsp;(注:岗位编号为一位或两位数字)<\/span><\/div>';
+        job_base += '<div style="background:#F5F7F8;padding:20px;margin-left:20px; "><table id="post_table"  border="0" cellpadding="15" cellspacing="3"  >' +
+            ' <tr >' +
+            '              <th  style="text-align: center;">岗位编号<\/th>' +
+            '              <th  style="text-align: center;">岗位名称<\/th>' +
+            '              <th  style="text-align: center;">招聘人数<\/th>' +
+            '              <th  style="text-align: center;">岗位限制条件(JSON格式)<\/th>' +
+            '              <th  style="text-align: center;"><\/th>' +
+            '         <\/tr>' +
+            '<tr>' +
+            '              <td  style="padding:8px 15px;"><input type="text"  name="postcode[]" value="" class="form-control postcode"  style="width:100px; " onkeyup="value=value.replace(/[^\\d.]/g,\'\')"  ><\/td>' +
+            '              <td  style="padding:8px 15px;"><input type="text"  name="postname[]" value="" class="form-control postname"   style="width:400px;" maxlength="80" ><\/td>' +
+            '              <td  style="padding:8px 15px;"><input type="text"  name="postnumber[]" value="1" class="form-control postname"   style="width:100px;" maxlength="80" ><\/td>' +
+            '              <td  style="padding:8px 15px;"><input type="text"  name="postlimit[]" value="" class="form-control limit"   style="width:400px;" ><\/td>'
+        ;
+
+        job_base += '                    <\/select>' +
+            '              <\/td>' +
+            '              <td>' +
+            '              <\/td>' +
+            '        <\/tr>' +
+            '    <\/table><\/div>';
+        $("form .box-body .fields-group").append(job_base);
+    }
+
+    function editView() {
+        var job_base = '<div style=" font-weight:700;padding-left:20px;border-bottom:1px  #DFEDF7 solid;border-top:1px #DFEDF7 solid;background-color:#F0F8FD;height:30px;line-height:30px;margin-bottom:15px;"><span style="color:#f00">*<\/span>招考岗位<\/div>'
+        job_base += '<div style="margin-left:20px;margin-bottom:15px;"><input type="button" id="add_post" onclick="addPost()" class="btn btn-warning"  value="增行"><span>&nbsp;(注:岗位编号为一位或两位数字)<\/span><\/div>';
+        job_base += '<div style="background:#F5F7F8;padding:20px;margin-left:20px; "><table id="post_table"  border="0" cellpadding="15" cellspacing="3"  >' +
+            ' <tr >' +
+            '              <th  style="text-align: center;">岗位编号<\/th>' +
+            '              <th  style="text-align: center;">岗位名称<\/th>' +
+            '              <th  style="text-align: center;">限制条件<\/th>' +
+            '              <th  style="text-align: center;"><\/th>' +
+            '         <\/tr>';
+        for (var c = 0; c < post.length; c++) {
+            job_base += '<tr>' +
+                '              <td  style="padding:8px 15px;"><input type="text"  name="postcode[]" value="' + post[c].code + '" class="form-control postcode"  style="width:100px; " onkeyup="value=value.replace(/[^\\d.]/g,\'\')"  ><\/td>' +
+                '              <td  style="padding:8px 15px;"><input type="text"  name="postname[]" value="' + post[c].name + '" class="form-control postname"   style="width:400px;"  maxlength="80" ><\/td>' +
+                '              <td  style="padding:8px 15px;"><input type="text"  name="postnumber[]" value="' + post[c].number + '" class="form-control postnumber"   style="width:100px;"  maxlength="80" ><\/td>' +
+                '              <td  style="padding:8px 15px;"><input type="text" id="post_' + post[c].id + '"  name="postlimit[]" value="" class="form-control limit"   style="width:400px;" ><\/td>'
+            ;
+            job_base += '                    <\/select>' +
+                '              <\/td>' +
+                '              <td>' +
+                ' <input type="button" onclick="deltr(this)"class="btn btn-danger" value="删除">' +
+                ' <input  type="hidden" class="btn btn-danger" name="postid_arr[]" value="' + post[c].id + '">' +
+                '              <\/td>' +
+                '        <\/tr>';
+        }
+        job_base += '    <\/table><\/div>';
+        $("form .box-body .fields-group").append(job_base);
+        for (var c = 0; c < post.length; c++) {
+            $("#post_" + post[c].id).val(post[c].limit);
+        }
+    }
+
+    function addPost() {
+        var trtd = '<tr>' +
+            '              <td  style="padding:8px 15px;"><input type="text"  name="postcode[]" value="" class="form-control postcode"  style="width:100px; " onkeyup="value=value.replace(/[^\\d.]/g,\'\')"  ><\/td>' +
+            '              <td  style="padding:8px 15px;"><input type="text"  name="postname[]" value="" class="form-control postname"   style="width:400px;"  maxlength="80" ><\/td>' +
+            '              <td  style="padding:8px 15px;"><input type="text"  name="postnumber[]" value="1" class="form-control postnumber"  style="width:100px; "  ><\/td>' +
+            '              <td  style="padding:8px 15px;"><input type="text"  name="postlimit[]" value="" class="form-control limit"   style="width:400px;"  ><\/td>'
+        ;
+
+        trtd += '                    <\/select>' +
+            '              <\/td>' +
+            '              <td><input type="button" onclick="deltr(this)"class="btn btn-danger" value="删除"><\/td>' +
+            '        <\/tr>';
+
+        var tables = $('#post_table');
+        tables.append(trtd);
+    }
+
+
+
+    function deltr(obj) {
+        $(obj).parent().parent().remove();
+    }
+
+    checkFlowPath();
+    setInterval(function () {
+        checkFlowPath();
+    }, 250);
+
+    //判断时间是否显示
+    function checkFlowPath() {
+        $('input[name="flow_path[]"]').each(function () {
+            //笔试时间
+            if ($(this).val() == 3) {
+                if ($(this).is(":checked")) {
+                    $("input[name='preliminary_start']").parents(".form-group").css("display", "block");
+                } else {
+                    $("input[name='preliminary_start']").parents(".form-group").css("display", "none");
+                }
+            }
+            //上机时间
+            if ($(this).val() == 4) {
+                if ($(this).is(":checked")) {
+                    $("input[name='computer_start']").parents(".form-group").css("display", "block");
+                } else {
+                    $("input[name='computer_start']").parents(".form-group").css("display", "none");
+                }
+            }
+            //面试时间
+            if ($(this).val() == 5) {
+                if ($(this).is(":checked")) {
+                    $("input[name='interview_start']").parents(".form-group").css("display", "block");
+                    $("textarea[name='expand_id']").parents(".form-group").css("display", "block");
+                } else {
+                    $("input[name='interview_start']").parents(".form-group").css("display", "none");
+                    $("textarea[name='expand_id']").parents(".form-group").css("display", "none");
+                }
+            }
+            //复试时间
+            if ($(this).val() == 6) {
+                if ($(this).is(":checked")) {
+                    $("input[name='reexamine_start']").parents(".form-group").css("display", "block");
+                } else {
+                    $("input[name='reexamine_start']").parents(".form-group").css("display", "none");
+                }
+            }
+            //体检时间
+            if ($(this).val() == 7) {
+                if ($(this).is(":checked")) {
+                    $("input[name='health_start']").parents(".form-group").css("display", "block");
+                } else {
+                    $("input[name='health_start']").parents(".form-group").css("display", "none");
+                }
+            }
+        })
+    }
+
+
+    function getCookie(name) {
+        var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
+        if (arr = document.cookie.match(reg)) {
+            return unescape(arr[2]);
+        } else
+            return null;
+    }
+
+    function setCookie(name, value) {
+        var Days = 60000;
+        var exp = new Date();
+        exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
+        document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
+    }
+
+</script>