소스 검색

增加确认面试功能

sandm 1 개월 전
부모
커밋
2cd0accb7f
3개의 변경된 파일146개의 추가작업 그리고 0개의 파일을 삭제
  1. 75 0
      app/Http/Controllers/Web/Recruit/IndexController.php
  2. 69 0
      public/themes/default/views/app/recruit/show.blade.php
  3. 2 0
      routes/web.php

+ 75 - 0
app/Http/Controllers/Web/Recruit/IndexController.php

@@ -135,6 +135,27 @@ class IndexController extends WebBaseController
             } else {
                 $appoint_info->check_ticket = 0;
             }
+
+            //20251017增加确认面试功能
+            if ($recruit->face_comfirm) {
+                if ($appoint_info->audit != 3) {//审核未通过,无需确认
+                    $appoint_info->face_comfirm = 0;
+                } else {
+                    $time = time();
+                    if (strtotime($recruit->face_comfirm_start) > $time || strtotime($recruit->face_comfirm_end) < $time) {
+                        $appoint_info->face_comfirm = -1; //确认未开始
+                    } else {
+                        if ($appoint_info->face_audit != -2) {
+                            $appoint_info->face_comfirm = -2;//已确认无需再次确认
+                        } else {
+                            $appoint_info->face_comfirm = 1;
+                        }
+                    }
+                }
+            } else {
+                $appoint_info->face_comfirm = 0;//无需确认
+            }
+
             //面试
             $face_ticket = RecruitTicket::where('appoint_id', $appoint_info->id)->where('ex_type', 3)->first();
 
@@ -3030,6 +3051,60 @@ class IndexController extends WebBaseController
 
     }
 
+    public function comfirm_face(Request $request)
+    {
+        $user = $this->getUser();
+        if (!empty($user)) {
+            $uid = $user->id;
+        } else {
+            return redirect(route('login'));
+        }
+
+        //招考id
+        $id = $request->input('recruit_id', 0);
+        if (!$id) {
+            return ['status' => 0, 'msg' => '请选择报名项目!', 'data' => ''];
+        }
+
+        $recruit = Recruit::find($id);
+        if (!$recruit['status']) {
+            return ['status' => 0, 'msg' => '抱歉,该项目状态不正确,请联系客服!', 'data' => ''];
+        }
+
+        if (!$recruit->face_comfirm) {
+            return ['status' => 0, 'msg' => '该项目无须确认面试考试!', 'data' => ''];
+        }
+
+        $appoint_info = RecruitAppointInfo::where('recruit_id', $id)->where('uid', $uid)->first();
+        if (!$appoint_info) {
+            return ['status' => 0, 'msg' => '找不到您的报名记录,请检查!', 'data' => ''];
+        }
+
+        if ($appoint_info->audit != 3) {
+            return ['status' => 0, 'msg' => '您的报名未审核通过,无需确认!', 'data' => ''];
+        }
+
+        $time = time();
+        if (strtotime($recruit->face_comfirm_start) > $time || strtotime($recruit->face_comfirm_end) < $time) {
+            return ['status' => 0, 'msg' => '未在笔试确认时间段!', 'data' => ''];
+        }
+
+        if ($appoint_info->face_audit != -2) {
+            return ['status' => 0, 'msg' => '您已确认参加面试,无需再次确认!', 'data' => ''];
+        }
+
+        $appoint_info->update(['face_audit' => -1]);
+        $log = [
+            'type'       => 3,
+            'appoint_id' => $appoint_info->id,
+            'uid'        => $uid,
+            'log'        => '用户确认参加面试',
+        ];
+        RecruitAppointLog::create($log);
+        return ['status' => 1, 'msg' => '确认成功', 'data' => $appoint_info->id];
+
+    }
+
     public function supplementary_entry(Request $request)
     {
         $user = $this->getUser();

+ 69 - 0
public/themes/default/views/app/recruit/show.blade.php

@@ -91,6 +91,11 @@
                         <li style="background:#19b38d;float: left;margin-bottom:10px;">上机/考核准考证打印</li>
                     </a>
                 @endif
+                @if($recruit->face_comfirm)
+                    <a href="javascript:void(0)" id="face_comfirm" data-id="{{$info->id}}" >
+                        <li style="background:#ff9900;float: left;margin-bottom:10px;">确认参加面试</li>
+                    </a>
+                @endif
                 @if(in_array(5,explode(',',$recruit->step)) && $recruit->face_ticket_type == 1)
                     <a href="javascript:void(0)" id="face_ticket" data-id="{{$info->id}}" >
                         <li style="background:#bc3fbb;float: left;margin-bottom:10px;">面试通知书打印</li>
@@ -566,6 +571,70 @@
                 }
             });
 
+            $("#face_comfirm").click(function (){
+                var isVisitor = "{{$uid}}";
+                var face_comfirm = "{{ $appoint_info->face_comfirm }}";
+                var isVisitorutype = "{{$utype}}"; //判断是企业还是个人
+                if ((isVisitor > 0)) {
+                    if (face_comfirm == 0) {
+                        disapperTooltip("remind", "您无需参与此次确认面试的操作!");
+                        return false;
+                    }
+                    if (face_comfirm == -1) {
+                        disapperTooltip("remind", "未在操作时间段内!");
+                        return false;
+                    }
+                    if (face_comfirm == -2) {
+                        disapperTooltip("remind", "您已确认,无需再次确认!");
+                        return false;
+                    }
+                    if (isVisitorutype == '1') {
+                        disapperTooltip("remind", "只有登录个人会员才可确认!");
+                        return false;
+                    } else {
+                        var qsDialog = $(this).dialog({
+                            loading: true,
+                            header: false,
+                            border: false,
+                            btns: ['确认参加面试','取消'],
+                            yes: function(){
+                                $.post("{{route('recruit.comfirm_face')}}", {_token:"{{csrf_token()}}",recruit_id:"{{ $recruit->id }}"},function(result){
+                                    if(result.status == 1){alert('确认参加面试成功,请在指定时间段内打印准考证!');
+                                    }else{
+                                        alert('确认失败,请联系工作人员!');
+                                    }
+                                });
+                            }
+                        });
+                        qsDialog.setContent("您正在进行确认参加面试的操作,请确认您能按时参加面试!");
+                    }
+                }else{
+                    var qsDialog = $(this).dialog({
+                        loading: true,
+                        footer: false,
+                        header: false,
+                        border: false,
+                        backdrop: false
+                    });
+                    var loginUrl = "{{route('loginDig')}}";
+                    $.post(loginUrl, {_token:"{{csrf_token()}}",type:'per','redirect_url':"{{ route('recruit.index.show',['id'=>$recruit->id]) }}"},function(result){
+                        if(result.status==1){
+                            qsDialog.hide();
+                            var qsDialogSon = $(this).dialog({
+                                title: '会员登录',
+                                content: result.html,
+                                footer: false,
+                                border: false
+                            });
+                            qsDialogSon.setInnerPadding(false);
+                        } else {
+                            qsDialog.hide();
+                            disapperTooltip('remind','操作失败');
+                        }
+                    });
+                }
+            });
+
             //笔试准考证
             $("#pen_ticket").click(function (){
                 var isVisitor = "{{$uid}}";

+ 2 - 0
routes/web.php

@@ -127,6 +127,8 @@ Route::group([
 
     $router->post('pen_comfirm','Web\Recruit\IndexController@comfirm_pen')->name('recruit.comfirm_pen');
 
+    $router->post('face_comfirm','Web\Recruit\IndexController@comfirm_face')->name('recruit.comfirm_face');
+
     $router->post('supplementary_entry','Web\Recruit\IndexController@supplementary_entry')->name('recruit,supplementary_entry');
 
     $router->post("get_appoint_list",'Web\Recruit\IndexController@show_sign_limit')->name('recruit.get_appoint_list');