Selaa lähdekoodia

更新后台健康信息审核功能

sandm 2 vuotta sitten
vanhempi
commit
c1daa9f146

+ 4 - 2
app/Admin/Controllers/Recruit/RecruitController.php

@@ -1027,6 +1027,7 @@ class RecruitController extends Controller
         $type = $request->type;
         $view_data['ids'] = $ids;
         $info = RecruitSupplement::where('appoint_id',$ids)->where("type",$type)->first();
+        $view_data['type'] = $type;
         if(!$info){
             $view_data['switch'] = 0;
             $view_data['photos'] = [];
@@ -1358,6 +1359,7 @@ class RecruitController extends Controller
         if (empty($ids)) {
             return response()->json(['status' => 0, 'msg' => '请选择审核记录!'], '200');
         }
+        $type = $request->type;
         $status = $request->h_status;
         $reason = $request->reason;
         if(empty($status)){
@@ -1367,7 +1369,7 @@ class RecruitController extends Controller
             return response()->json(['status' => 0, 'msg' => '请输入审核原因!'], '200');
         }
         if($status == -1){
-            $info = RecruitSupplement::where('appoint_id', $ids)->first();
+            $info = RecruitSupplement::where('appoint_id', $ids)->where('type',$type)->first();
             $appointinfo = RecruitAppointInfo::where('id', $ids)->first();
             //写日志
             $log = [
@@ -1387,7 +1389,7 @@ class RecruitController extends Controller
         }
         if($status == 1){
             $reason = $reason ?? '符合报考条件';
-            $info = RecruitSupplement::where('appoint_id', $ids)->first();
+            $info = RecruitSupplement::where('appoint_id', $ids)->where('type',$type)->first();
             $appointinfo = RecruitAppointInfo::where('id', $ids)->first();
             //写日志
             $log = [

+ 7 - 5
app/Http/Controllers/Web/Recruit/IndexController.php

@@ -2466,18 +2466,20 @@ class IndexController extends WebBaseController
         if(!$appoint_info){
             return $this->showMessage('抱歉,您没有报名,无需补充信息!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
         }
-        if($appoint_info->pen_audit != 1){
-            return $this->showMessage('抱歉,您未入闱,无需考察审核!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
-        }
 
+        $uids = [];//写死用户
 
-        $limit_time = 1660901400;
+
+        $limit_time = 1661961599;
         $time = time();
         if( $time > $limit_time){
             return $this->showMessage('抱歉,考察审核端口已关闭!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
         }
 
-        $info = RecruitSupplement::where('appoint_id',$appoint_info->id)->where('type','supplement')->first();
+
+
+
+
     }
 
 

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

@@ -26,6 +26,7 @@
         <form id="J_interviewWrap">
             <input type="hidden" name="_token" value="{{ csrf_token() }}" />
             <input name="ids" type="hidden" value="{{$ids}}"/>
+            <input name="type" type="hidden" value="{{$type}}"/>
             <h1 style="text-align: center;line-height: 60px;">
                 健康信息审核
             </h1>

+ 1 - 0
routes/web.php

@@ -120,6 +120,7 @@ Route::group([
     $router->get('select_result','Web\Recruit\IndexController@select_result')->name('recruit.select_result');
     $router->post('get_select_result','Web\Recruit\IndexController@get_select_result')->name('recruit.get_select_result');
     $router->post('select_init','Web\Recruit\IndexController@select_init')->name('recruit.select_init');
+    $router->get('supplement_info','Web\Recruit\IndexController@supplement_info')->name('recruit.supplement_info');
 
     $router->any('/{route?}', function () {
         return view('recruit');