Browse Source

增加百度识别健康码与行程码

sandm 2 năm trước cách đây
mục cha
commit
cd4c6185fb

+ 41 - 10
app/Admin/Controllers/Recruit/RecruitController.php

@@ -247,23 +247,34 @@ class RecruitController extends Controller
                 'required' => '审核限制次数必须填写',
                 'regex' => '次数必须为数字'
             ])->default(1)->help('允许提交审核的次数,直接输入数字即可');
+            $form->datetimeRange('supplement_start', 'supplement_end', '材料补登时间');
             $form->radio('pay_switch', '缴费报名')->options([0 => '否', 1 => '是'])->default(0);
         })->tab('笔试', function ($form) {
-            $form->radio('pen_ticket_type', '准考证类型')->options([-1 => '不需要',1 => '纸质', 2 => '短信'])->default(-1);
-            $form->text('pen_ticket_content', '准考证内容')->help('当类型为纸质时,此处填入准考证模板的路径,当类型为短信时,此处填入短信标识');
+            $form->radio('pen_ticket_type', '准考证类型')->options([-1 => '不需要',1 => '纸质', 2 => '短信', 3 => '模板'])->default(-1);
+            $form->text('pen_ticket_content', '准考证内容')->help('当类型为纸质时,此处填入准考证模板的路径,当类型为短信时,此处填入短信标识,当类型为模板时,输入模板ID');
             $form->listbox('pen_ticket_field', '模板字段')->options(RecruitTicketField::ticketFieldData('pen'))->attribute('hight', '200px')->help('仅纸质准考证需要,非ex开头的字段将自动渲染');
+            $form->switch('pen_epidemic', '两码上传')->help("下列依赖两码设置,须此项打开才可生效")->default(0)->setMustMark();
+            $form->switch('pen_health', '健康状态')->help('当两码上传打开且该选项打开时,打印准考证必须通过两码审核')->default(0)->setMustMark();
+            $form->datetimeRange('pen_health_start', 'pen_health_end', '两码时间')->help("设置该时间后,仅在该时间段内上传该时段内的两码截图才可以");
         })->tab('上机', function ($form) {
-            $form->radio('computer_ticket_type', '准考证类型')->options([-1 => '不需要',1 => '纸质', 2 => '短信'])->default(-1);
-            $form->text('computer_ticket_content', '准考证内容')->help('当类型为纸质时,此处填入准考证模板的路径,当类型为短信时,此处填入短信标识');
+            $form->radio('computer_ticket_type', '准考证类型')->options([-1 => '不需要',1 => '纸质', 2 => '短信', 3 => '模板'])->default(-1);
+            $form->text('computer_ticket_content', '准考证内容')->help('当类型为纸质时,此处填入准考证模板的路径,当类型为短信时,此处填入短信标识,当类型为模板时,输入模板ID');
             $form->listbox('computer_ticket_field', '模板字段')->options(RecruitTicketField::ticketFieldData('computer'))->attribute('hight', '200px')->help('仅纸质准考证需要,非ex开头的字段将自动渲染');
+            $form->switch('computer_epidemic', '两码上传')->help("下列依赖两码设置,须此项打开才可生效")->default(0)->setMustMark();
+            $form->switch('computer_health', '健康状态')->help('当两码上传打开且该选项打开时,打印准考证必须通过两码审核')->default(0)->setMustMark();
+            $form->datetimeRange('computer_health_start', 'computer_health_end', '两码时间')->help("设置该时间后,仅在该时间段内上传该时段内的两码截图才可以");
         })->tab('面试', function ($form) {
-            $form->radio('face_ticket_type', '准考证类型')->options([-1 => '不需要',1 => '纸质', 2 => '短信'])->default(-1);
-            $form->text('face_ticket_content', '准考证内容')->help('当类型为纸质时,此处填入准考证模板的路径,当类型为短信时,此处填入短信标识');
+            $form->radio('face_ticket_type', '准考证类型')->options([-1 => '不需要',1 => '纸质', 2 => '短信', 3 => '模板'])->default(-1);
+            $form->text('face_ticket_content', '准考证内容')->help('当类型为纸质时,此处填入准考证模板的路径,当类型为短信时,此处填入短信标识,当类型为模板时,输入模板ID');
             $form->listbox('face_ticket_field', '模板字段')->options(RecruitTicketField::ticketFieldData('face'))->attribute('hight', '200px')->help('仅纸质准考证需要,非ex开头的字段将自动渲染');
+            $form->switch('face_epidemic', '两码上传')->help("下列依赖两码设置,须此项打开才可生效")->default(0)->setMustMark();
+            $form->switch('face_health', '健康状态')->help('当两码上传打开且该选项打开时,打印准考证必须通过两码审核')->default(0)->setMustMark();
+            $form->datetimeRange('face_health_start', 'face_health_end', '两码时间')->help("设置该时间后,仅在该时间段内上传该时段内的两码截图才可以");
         })->tab('复试', function ($form) {
-            $form->radio('reexamine_ticket_type', '准考证类型')->options([-1 => '不需要',1 => '纸质', 2 => '短信'])->default(-1);
-            $form->text('reexamine_ticket_content', '准考证内容')->help('当类型为纸质时,此处填入准考证模板的路径,当类型为短信时,此处填入短信标识');
+            $form->radio('reexamine_ticket_type', '准考证类型')->options([-1 => '不需要',1 => '纸质', 2 => '短信', 3 => '模板'])->default(-1);
+            $form->text('reexamine_ticket_content', '准考证内容')->help('当类型为纸质时,此处填入准考证模板的路径,当类型为短信时,此处填入短信标识,当类型为模板时,输入模板ID');
             $form->listbox('reexamine_field', '模板字段')->options(RecruitTicketField::ticketFieldData('reexamine'))->attribute('hight', '200px')->help('仅纸质准考证需要,非ex开头的字段将自动渲染');
+
         });
 
         return $form;
@@ -316,6 +327,8 @@ class RecruitController extends Controller
         $data['political_end'] = $verify['political_end'] ? $verify['political_end'] : null;
         $data['publicity_start'] = $verify['publicity_start'] ? $verify['publicity_start'] : null;//公示时间
         $data['publicity_end'] = $verify['publicity_end'] ? $verify['publicity_end'] : null;
+        $data['supplement_start'] = $verify['supplement_start'] ? $verify['supplement_start'] : null;
+        $data['supplement_end'] = $verify['supplement_end'] ? $verify['supplement_end'] : null;
         $data['introduction'] = $verify['introduction'];
         $data['host_address'] = $verify['host_address'];
         $data['contact'] = $verify['contact'];
@@ -328,6 +341,10 @@ class RecruitController extends Controller
         $data['pen_ticket_type'] = $verify['pen_ticket_type'];
         $data['pen_ticket_content'] = $verify['pen_ticket_content'];
         $data['pen_ticket_status'] = 0;
+        $data['pen_epidemic'] = $verify['pen_epidemic'];
+        $data['pen_health'] = $verify['pen_health'];
+        $data['pen_health_start'] = $verify['pen_health_start'] ? $verify['pen_health_start'] : null;
+        $data['pen_health_end'] = $verify['pen_health_end'] ? $verify['pen_health_end'] : null;
         $data['computer_ticket_type'] = $verify['computer_ticket_type'];
         $data['computer_ticket_content'] = $verify['computer_ticket_content'];
         $data['computer_ticket_status'] = 0;
@@ -439,6 +456,8 @@ class RecruitController extends Controller
         $data['political_end'] = $verify['political_end'] ? $verify['political_end'] : null;
         $data['publicity_start'] = $verify['publicity_start'] ? $verify['publicity_start'] : null;//公示时间
         $data['publicity_end'] = $verify['publicity_end'] ? $verify['publicity_end'] : null;
+        $data['supplement_start'] = $verify['supplement_start'] ? $verify['supplement_start'] : null;
+        $data['supplement_end'] = $verify['supplement_end'] ? $verify['supplement_end'] : null;
         $data['introduction'] = $verify['introduction'];
         $data['host_address'] = $verify['host_address'];
         $data['contact'] = $verify['contact'];
@@ -452,6 +471,10 @@ class RecruitController extends Controller
         $data['pen_ticket_content'] = $verify['pen_ticket_content'];
         $data['pen_ticket_status'] = 0;
         $data['pen_ticket_field'] = implode(',',$verify['pen_ticket_field']);
+        $data['pen_epidemic'] = $verify['pen_epidemic'];
+        $data['pen_health'] = $verify['pen_health'];
+        $data['pen_health_start'] = $verify['pen_health_start'] ? $verify['pen_health_start'] : null;
+        $data['pen_health_end'] = $verify['pen_health_end'] ? $verify['pen_health_end'] : null;
         $data['computer_ticket_type'] = $verify['computer_ticket_type'];
         $data['computer_ticket_content'] = $verify['computer_ticket_content'];
         $data['computer_ticket_status'] = 0;
@@ -462,9 +485,10 @@ class RecruitController extends Controller
         $data['face_ticket_field'] = implode(',',$verify['face_ticket_field']);
         $ids = RecruitPost::where('recruit_id', $recruit_id)->pluck('id');
         $fileCharater = $request->input('addFile');
+
         DB::beginTransaction();//检查数据库事务
         try {
-            Recruit::where('id', $recruit_id)->update($data);
+            $res = Recruit::where('id', $recruit_id)->update($data);
             $postcode_array = $request->postcode;
             $postname_array = $request->postname;
             $postnumber_array = $request->postnumber;
@@ -984,8 +1008,9 @@ class RecruitController extends Controller
     {
         Permission::check('recruit_ajax_health');
         $ids = $request->ids;
+        $type = $request->type;
         $view_data['ids'] = $ids;
-        $info = RecruitSupplement::where('appoint_id',$ids)->first();
+        $info = RecruitSupplement::where('appoint_id',$ids)->where("type",$type)->first();
         if(!$info){
             $view_data['switch'] = 0;
             $view_data['photos'] = [];
@@ -2532,6 +2557,12 @@ class RecruitController extends Controller
         }
     }
 
+
+    public function ticket_template(Request $request)
+    {
+
+    }
+
     public function create_ticket(Request $request)
     {
         $data = $request->only('recruit_id','type','channel','content','keys');

+ 4 - 5
app/Admin/Controllers/Recruit/RecruitTicketController.php

@@ -7,6 +7,7 @@ use App\Models\Recruit;
 use App\Models\RecruitAppointInfo;
 use App\Models\RecruitPost;
 use App\Models\RecruitTicket;
+use Encore\Admin\Controllers\HasResourceActions;
 use Encore\Admin\Layout\Content;
 use Encore\Admin\Form;
 use Illuminate\Http\Request;
@@ -17,13 +18,11 @@ use Illuminate\Support\Facades\Storage;
 
 class RecruitTicketController extends Controller
 {
+    use HasResourceActions;
 
-    public function index($id, Content $content)
+    public function index(Content $content)
     {
-        return $content
-            ->header('新闻')
-            ->description(' ')
-            ->body($this->form($id)->edit($id));
+        echo 'sadfsdf';
     }
 
     /**

+ 3 - 2
app/Admin/routes.php

@@ -157,7 +157,6 @@ Route::group([
 
         $router->get('consultantList', 'ConsultantController@consultantList')->name('consultant.list');
 
-
         $router->post('consultantReset', 'ConsultantController@consultantReset')->name('consultant.reset');
 
 
@@ -442,7 +441,7 @@ Route::group([
         $router->get('show_log', 'RecruitController@showLog')->name('recruit.show_log');
         $router->get('fetch_word', 'RecruitController@fetch_word')->name('recruit.fetch_word');
         $router->post('fetchword', 'RecruitController@fetchWord')->name('recruit.fetchword');
-        $router->get('ticket/{id}', 'RecruitTicketController@index')->name('recruit.ticket');
+        $router->resource('ticket', RecruitTicketController::class)->names('recruit.ticket');
         $router->put('ticket/{id}/ticket_save', 'RecruitTicketController@ticket_save')->name('recruit.ticket_save');
         $router->get('test', 'RecruitController@test')->name('recruit.test');
         $router->resource('article', RecruitArticleController::class)->names('recruit.article');
@@ -464,6 +463,8 @@ Route::group([
         $router->post('create_ticket','RecruitTicketController@create_ticket')->name('recruit.create_ticket');
         $router->post('update_record','RecruitController@update_record')->name('recruit.update_record');
         $router->get('create_record_template', 'RecruitController@create_record_template')->name('recruit.create_record_template');
+        $router->get('ticket_template','RecruitController@ticket_template')->name('recruit.ticket_template');
+
     });
 
     //抽奖

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

@@ -85,7 +85,7 @@ class IndexController extends WebBaseController
             //笔试
             $pen_ticket = RecruitTicket::where('appoint_id',$appoint_info->id)->where('ex_type',1)->first();
             if($pen_ticket){
-                $pen_health = RecruitSupplement::where("appoint_id",$appoint_info->id)->where("type","pen")->first();
+                $pen_health = RecruitSupplement::where("appoint_id",$appoint_info->id)->where("type","pen")->where('h_status',1)->first();
                 if(!$pen_health){
                     $appoint_info->pen_ticket = -2;
                 }else{
@@ -1872,6 +1872,7 @@ class IndexController extends WebBaseController
         $appoint_id = $request->input('appoint_id');
         $type = $request->input('type');
         $appoint_info = RecruitAppointInfo::where('uid',$uid)->where('id',$appoint_id)->first();
+        $recruit = Recruit::where('id',$appoint_info->recruit_id)->first();
         if(!$appoint_info){
             return ['status' => 0, 'msg' => '抱歉,找不到您要登记的报名记录!'];
         }
@@ -1908,7 +1909,11 @@ class IndexController extends WebBaseController
             $info->save();
             return ['status' => 1, 'msg' => '提交成功', 'data' => ''];
         }else{
+
             $data['appoint_id'] = $appoint_id;
+            $data['type'] = $type;
+            $data['h_status'] = 0;
+            $appoint_info->health_audit = 4;
             $health_code = $request->input('health_code');
             if(is_array($health_code)){
                 //删除掉没有成功返回路径的图片
@@ -1919,11 +1924,38 @@ class IndexController extends WebBaseController
                 }
             }
 
-            $this->baiduService->health_code(file_get_contents(base_path() . "/public" . $health_code[0]['response']['path']));
+            $health_result = $this->baiduService->health_code(file_get_contents(base_path() . "/public" . $health_code[0]['response']['path']));
 
-            dd($health_code);
+            if(!array_key_exists('error_msg',$health_result) && !array_key_exists('error_code',$health_result)){
+                if(array_key_exists('姓名',$health_result)){
+                    if($health_result['姓名'][0]['word'] != $appoint_info->realname){
+                        return ['status' => 0, 'msg' => '抱歉,请上传您本人的健康码!'];
+                    }
+                }else{
+                    return ['status' => 0, 'msg' => '健康码错误,识别不到姓名!'];
+                }
+                if(array_key_exists('状态',$health_result)){
+                    if($health_result['状态'][0]['word'] != '绿码'){
+                        return ['status' => 0, 'msg' => '抱歉,您的健康码非绿码!'];
+                    }
+                }else{
+                    return ['status' => 0, 'msg' => '健康码错误,识别不到状态!'];
+                }
+                if(array_key_exists('更新时间',$health_result)){
+                    $time = strtotime($health_result['更新时间'][0]['word']);
+                    if($time < strtotime($recruit->pen_health_start) || $time > strtotime($recruit->pen_health_end)){
+                        return ['status' => 0, 'msg' => "抱歉,请上传{$recruit->pen_health_start}至{$recruit->pen_health_end}之间的健康码!"];
+                    }
+                }else{
+                    return ['status' => 0, 'msg' => '健康码错误,识别不到时间!'];
+                }
+                $data['h_status'] = 1;
+                $data['h_msg'] = '健康码自动审核通过';
+                $appoint_info->health_audit = 1;
+                $data['health_code'] = json_encode($health_code);
+            }
 
-            $data['health_code'] = json_encode($health_code);
+            $data['health_result'] = json_encode($health_result);
 
             $trip_code = $request->input('trip_code');
             if(is_array($trip_code)){
@@ -1934,11 +1966,31 @@ class IndexController extends WebBaseController
                     }
                 }
             }
+            $trip_result = $this->baiduService->trip_code(file_get_contents(base_path() . "/public" . $trip_code[0]['response']['path']));
+            if(!array_key_exists('error_msg',$trip_result) && !array_key_exists('error_code',$trip_result)){
+                if(array_key_exists('途经地',$trip_result['result'])){
+                    $fangyi_area = explode("\r\n",config('aix.fangyi.fangyi_zhaokao.fangyi_zhaokao.risk_area'));
+                    $result = array_intersect($fangyi_area,$trip_result['result']['途经地'][0]['word']);
+                    if(count($result) > 0){
+                        return ['status' => 0, 'msg' => '抱歉,您的行程中包含系统设置中高风险地区!'];
+                    }
+                }
+                if(array_key_exists('风险性',$trip_result['result']) && $trip_result['result']['风险性']){
+                    return ['status' => 0, 'msg' => '抱歉,您的行程可能含有风险!'];
+                }
+                if(array_key_exists('更新时间',$trip_result['result'])){
+                    $time = strtotime($health_result['更新时间'][0]['word'][0]);
+                    if($time > strtotime($recruit->pen_health_start) || $recruit < ($recruit->pen_health_end)){
+                        return ['status' => 0, 'msg' => "抱歉,请上传{$recruit->pen_health_start}至{$recruit->pen_health_end}之间的行程码!"];
+                    }
+                }
+                $data['h_msg'] .= '行程码审核通过';
+            }
+
+            $data['trip_result'] = json_encode($trip_result);
             $data['trip_code'] = json_encode($trip_code);
-            $data['type'] = $type;
-            $data['h_status'] = 0;
+
             RecruitSupplement::create($data);
-            $appoint_info->health_audit = 4;
             $appoint_info->save();
             return ['status' => 1, 'msg' => '提交成功', 'data' => ''];
         }

+ 25 - 7
app/Services/Common/BaiduService.php

@@ -33,6 +33,7 @@ class BaiduService
         $this->appid=config('aix.fangyi.fangyi_zhaokao.fangyi_zhaokao.client_id');
         $this->appkey=config('aix.fangyi.fangyi_zhaokao.fangyi_zhaokao.client_secret');
 
+
     }
 
     public function getAccessToken()
@@ -40,10 +41,11 @@ class BaiduService
         $access_token = Cache::get('baidu_access_token');
         if (empty($access_token)) {
             $uri=$this->url."oauth/2.0/token?grant_type=client_credentials&client_id=$this->appid&client_secret=$this->appkey";
-            $curl = new CurlService();
-            $resopnse= $curl->get($uri);
-            $result = json_decode($resopnse, true);
-            Cache::put("wechat_access_token", $result['access_token'], 24*60*29);
+            $resopnse = $this->httpClient->get($uri);
+            //$curl = new CurlService();
+            //$resopnse= $curl->get($uri);
+            $result = json_decode($resopnse->getBody()->getContents(), true);
+            Cache::put("baidu_access_token", $result['access_token'], 24*60*29);
             return $result['access_token'];
         }
         return $access_token;
@@ -57,10 +59,26 @@ class BaiduService
 
         $data = array_merge($data, $options);
 
-        $curl = new CurlService();
+        $access_token = $this->getAccessToken();
+
+        $resopnse = $this->httpClient->post($this->url . "rest/2.0/ocr/v1/health_code?access_token=".$access_token,['form_params' => $data]);
+
+        return json_decode($resopnse->getBody()->getContents(),true);
+
+    }
+
+    public function trip_code($image, $options=array())
+    {
+        $data = array();
+
+        $data['image'] = base64_encode($image);
+
+        $data = array_merge($data, $options);
+
+        $access_token = $this->getAccessToken();
 
-        $resopnse = $this->httpClient->post($this->url . "rest/2.0/ocr/v1/health_code",['form_params' => $data]);
+        $resopnse = $this->httpClient->post($this->url . "rest/2.0/ocr/v1/travel_card?access_token=".$access_token,['form_params' => $data]);
 
-        dd($resopnse->getBody()->getContents());
+        return json_decode($resopnse->getBody()->getContents(),true);
     }
 }

+ 2 - 2
libs/repositories/laravel-admin/resources/views/form/datetimerange.blade.php

@@ -10,14 +10,14 @@
             <div class="col-lg-6">
                 <div class="input-group">
                     <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                    <input type="text" name="{{$name['start']}}" value="{{ old($column['start'], $value['start']) }}" class="form-control {{$class['start']}}" style="width: 160px" {!! $attributes !!} />
+                    <input type="text" name="{{$name['start']}}" value="{{ old($column['start'], is_array($value) && array_key_exists('start',$value) ? $value['start'] : null) }}" class="form-control {{$class['start']}}" style="width: 160px" {!! $attributes !!} />
                 </div>
             </div>
 
             <div class="col-lg-6">
                 <div class="input-group">
                     <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                    <input type="text" name="{{$name['end']}}" value="{{ old($column['end'], $value['end']) }}" class="form-control {{$class['end']}}" style="width: 160px" {!! $attributes !!} />
+                    <input type="text" name="{{$name['end']}}" value="{{ old($column['end'], is_array($value) && array_key_exists('end',$value) ? $value['end'] : null) }}" class="form-control {{$class['end']}}" style="width: 160px" {!! $attributes !!} />
                 </div>
             </div>
         </div>

+ 9 - 8
public/themes/default/views/app/recruit/health.blade.php

@@ -66,7 +66,7 @@
         </div>
         <div role="alert" class="el-message el-message--success" style="position:relative" v-if="user.h_status == 1">
             <i class="el-message__icon el-icon-success"></i>
-            <p class="el-message__content">您的报名资料已审核成功</p>
+            <p class="el-message__content">您的报名资料已审核成功,请返回报名界面并刷新下载准考证</p>
         </div>
 
         <p style="text-align:center;line-height:37px;margin-top: 30px">
@@ -178,15 +178,16 @@
             },
             methods: {
                 validhealth(rule, value, callback){
-                    console.log(this.user.health_code.length)
-                    if(this.user.health_code.length == 0){
-                        callback(new Error('请上传健康码'));
-                    }else{
-                        callback();
-                    }
+                    callback();
+                    // console.log(this.user.health_code.length)
+                    // if(this.user.health_code.length == 0){
+                    //     callback(new Error('请上传健康码'));
+                    // }else{
+                    //     callback();
+                    // }
                 },
                 validtrip(rule, value, callback){
-                    if(this.user.health_code.length == 0){
+                    if(this.user.trip_code.length == 0){
                         callback(new Error('请上传行程码'));
                     }else{
                         callback();

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 30 - 40
public/themes/default/views/app/recruit/preview.blade.php


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

@@ -497,6 +497,13 @@
                         disapperTooltip("remind", "非准考证打印时间!");
                         return false;
                     }
+                    if(pen_ticket == -2){
+                        disapperTooltip("remind", "健康信息未上传,即将自动跳转至上传界面!");
+                        setTimeout(function(){
+                            window.location.href="{!! route('recruit.health_info',array('id'=>$recruit->id,'type' => 'pen')) !!}"
+                        },2000);
+                        return false;
+                    }
 
                     if (isVisitorutype == '1') {
                         disapperTooltip("remind", "只有登录个人会员才可打印!");

+ 1 - 0
public/themes/default/views/app/recruit/sign_up.blade.php

@@ -768,6 +768,7 @@
                             <td valign="center" colspan="4" >
                                 <el-form-item prop="special_condition">
                                     <el-select v-model="user.special.condition" placeholder="请选择您符合的加分条件" @change="postChange" :disabled="special_switch">
+                                        <el-option label="无" value="无"></el-option>
                                         <el-option label="退役军人" value="退役军人"></el-option>
                                         <el-option label="获得三等功的退役军人" value="获得三等功的退役军人"></el-option>
                                         <el-option label="获得二等功及以上的退役军人" value="获得二等功及以上的退役军人"></el-option>

+ 7 - 6
resources/views/admin/recruit/appoint_list.blade.php

@@ -393,8 +393,8 @@
                                                 <button class='btn btn-primary btn-xs business ButCompared' data-param="{{$v->id}}" data-url="{{ route('recruit.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 == 16 || $recruit->id == 17)
-                                                    <button class='btn btn-primary btn-xs health' data-param="{{$v->id}}" style="margin-bottom: 10px">健康信息审核</button>
+                                                @if($recruit->pen_health == 1)
+                                                    <button class='btn btn-primary btn-xs health' data-param="{{$v->id}}" data-type="pen" style="margin-bottom: 10px">笔试健康信息审核</button>
                                                 @endif
                                                 @if($recruit->id == 5 || $recruit->id == 16)
                                                     <button class='btn btn-primary btn-xs supplement' data-param="{{$v->id}}" style="margin-bottom: 10px">补登材料审核</button>
@@ -600,8 +600,8 @@
     }
 
     //材料补登
-    this.health = function(type = 0){
-        var ids = show(type);
+    this.health = function(param = 0,type = 'pen'){
+        var ids = show(param);
         if(!ids){
             return false;
         }
@@ -630,7 +630,8 @@
             var recruit_id = $(this).attr('recruit_id');
             $.getJSON("/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/recruit/ajax_health", {
                 recruit_id: recruit_id,
-                ids: ids
+                ids: ids,
+                type: 'pen'
             }, function(result) {
                 if (result.status == 1) {
                     qsDialog.setContent(result.data);
@@ -651,7 +652,7 @@
             supplement($(this).data('param'));
         });
         $(document).off("click",'.health').on('click','.health',function () {
-            health($(this).data('param'));
+            health($(this).data('param'),$(this).data("type"));
         });
         $(document).off("click",'.fetch_word').on('click','.fetch_word',function () {
             var recruit_id = $(this).attr('data-rid'),appoint_id = $(this).attr('data-aid');

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác