瀏覽代碼

修改村务考室生成表格(自动) word

sandm 2 年之前
父節點
當前提交
bf3835ccec

+ 116 - 0
app/Admin/Controllers/Recruit/RecruitController.php

@@ -968,6 +968,67 @@ class RecruitController extends Controller
         return response(['data' => view('admin.recruit.ajax_supplement')->with($view_data)->render(), 'status' => 1], '200');
     }
 
+    /**
+     * 健康信息审核
+     * @param Request $request
+     * @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response|mixed|\Psr\Container\ContainerInterface|\Symfony\Component\HttpFoundation\Response|\think\Response
+     * @throws \Throwable
+     */
+    public function ajax_health(Request $request)
+    {
+        Permission::check('recruit_ajax_health');
+        $ids = $request->ids;
+        $view_data['ids'] = $ids;
+        $info = RecruitSupplement::where('appoint_id',$ids)->first();
+        if(!$info){
+            $view_data['switch'] = 0;
+        }else{
+            $view_data['switch'] = 1;
+            $photos = [
+                'health_code'=>[],
+                'trip_code' => []
+            ];
+            $info->health_code = json_decode($info->health_code);
+            $photo_data = [];
+            foreach ($info->health_code as $k => $v) {
+                if($v->status){
+                    $photo_data[] = [
+                        'alt' => $v->name,
+                        'pid' => $v->uid,
+                        'src' => $v->response->path,
+                    ];
+                }
+            }
+            $photos['health_code'] = [
+                'title' => '健康码',
+                'id' => 1,
+                'start' => 0,
+                'data' =>$photo_data
+            ];
+            $info->trip_code = json_decode($info->trip_code);
+            $photo_data = [];
+            foreach ($info->trip_code as $k => $v) {
+                if($v->status){
+                    $photo_data[] = [
+                        'alt' => $v->name,
+                        'pid' => $v->uid,
+                        'src' => $v->response->path,
+                    ];
+                }
+            }
+            $photos['trip_code'] = [
+                'title' => '行程码',
+                'id' => 1,
+                'start' => 0,
+                'data' =>$photo_data
+            ];
+            $view_data['info'] = $info;
+            $view_data['photos'] = $photos;
+        }
+
+        return response(['data' => view('admin.recruit.ajax_health')->with($view_data)->render(), 'status' => 1], '200');
+    }
+
     /**
      * 报名记录审核处理
      * @param Request $request
@@ -1231,6 +1292,61 @@ class RecruitController extends Controller
         return response()->json(['status' => 1, 'msg' => '操作成功!', 'data' => 'ok']);
     }
 
+    /**
+     * 健康信息处理
+     * @param Request $request
+     * @return \Illuminate\Http\JsonResponse
+     */
+    public function health(Request $request)
+    {
+        Permission::check('ajax_health');
+        $ids = $request->ids;
+        if (empty($ids)) {
+            return response()->json(['status' => 0, 'msg' => '请选择审核记录!'], '200');
+        }
+        $status = $request->h_status;
+        $reason = $request->reason;
+        if(empty($status)){
+            return response()->json(['status' => 0, 'msg' => '请选择审核状态!'], '200');
+        }
+        if($status == -1 && empty($reason)){
+            return response()->json(['status' => 0, 'msg' => '请输入审核原因!'], '200');
+        }
+        if($status == -1){
+            $info = RecruitSupplement::where('appoint_id', $ids)->first();
+            //写日志
+            $log = [
+                'type'  =>  2,
+                'step' => 1,
+                'appoint_id' => $ids,
+                'uid' => Admin::user()->id,
+                'log' => '健康信息审核未通过,原因是:'.$reason
+            ];
+            RecruitAppointLog::create($log);
+            $info->h_status = -1;
+            $info->h_msg = $reason;
+            $info->save();
+        }
+        if($status == 1){
+            $reason = $reason ?? '符合报考条件';
+            $info = RecruitSupplement::where('appoint_id', $ids)->first();
+            //写日志
+            $log = [
+                'type'  =>  2,
+                'step' => 1,
+                'appoint_id' => $ids,
+                'uid' => Admin::user()->id,
+                'log' => '审核通过,原因是:' . $reason
+            ];
+            RecruitAppointLog::create($log);
+            $info->h_status = 1;
+            $info->h_msg = $reason;
+            $info->save();
+        }
+
+        return response()->json(['status' => 1, 'msg' => '操作成功!', 'data' => 'ok']);
+    }
+
     public function fetchWord(Request $request)
     {
         $recruit_id = $request->recruit_id;

+ 162 - 8
app/Http/Controllers/Web/Recruit/IndexController.php

@@ -1393,15 +1393,15 @@ 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');
-        }
+//        if($appoint_info->pen_audit != 1){
+//            return $this->showMessage('抱歉,您未入闱,无需考察审核!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
+//        }
 
-        $uids = [169955];
-        $time = time();
-        if(!in_array($uid,$uids) || $time > 1626661200){
-            return $this->showMessage('抱歉,考察审核端口已关闭!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
-        }
+//        $uids = [169955];
+//        $time = time();
+//        if(!in_array($uid,$uids) || $time > 1626661200){
+//            return $this->showMessage('抱歉,考察审核端口已关闭!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
+//        }
 
         $info = RecruitSupplement::where('appoint_id',$appoint_info->id)->first();
         if(!$info){
@@ -1483,6 +1483,82 @@ class IndexController extends WebBaseController
         return view('app.recruit.supplement',$view_data);
     }
 
+    /**
+     * 健康信息登记
+     * @param Request $request
+     */
+    public function health_info(Request $request)
+    {
+        $user = $this->getUser();
+        if (!empty($user)) {
+            $uid = $user->id;
+        } else {
+            return redirect(route('login'));
+        }
+
+        //招考id
+        $id = $request->input('id', 0);
+        if (!$id) {
+            return $this->showMessage('请选择报名项目!', route('home'), true, '上一页', '3');
+        }
+        $recruit = Recruit::find($id);
+        if(!$recruit['status'] && !$user->recruit_test){
+            return $this->showMessage('抱歉,该项目状态不正确,请联系客服!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
+        }
+
+        $appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',$id)->first();
+        if(!$appoint_info){
+            return $this->showMessage('抱歉,您没有报名,无需登记!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
+        }
+        if($appoint_info->audit != 3){
+            return $this->showMessage('抱歉,您无需登记!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
+        }
+
+        $time = time();
+        if($time > 1653184800){
+            return $this->showMessage('抱歉,考察审核端口已关闭!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
+        }
+
+        $info = RecruitSupplement::where('appoint_id',$appoint_info->id)->first();
+        if(!$info){
+            $info = [
+                'appoint_id' => $appoint_info->id,
+                'health_code' => '',
+                'trip_code' => ''
+            ];
+        }else{
+            $info = $info->toArray();
+            if(json_decode($info['health_code'])){
+                $health_code = json_decode($info['health_code'],true);
+                foreach ($health_code as $k => $v){
+                    if(array_key_exists('response',$v)){
+                        $health_code[$k]['url'] = $v['response']['path'];
+                    }
+                }
+            }else{
+                $health_code = [];
+            }
+            $info['health_code'] = $health_code;
+
+            if(json_decode($info['trip_code'])){
+                $trip_code = json_decode($info['trip_code'],true);
+                foreach ($trip_code as $k => $v){
+                    if(array_key_exists('response',$v)){
+                        $trip_code[$k]['url'] = $v['response']['path'];
+                    }
+                }
+            }else{
+                $trip_code = [];
+            }
+            $info['trip_code'] = $trip_code;
+
+        }
+
+        $view_data['info'] = json_encode($info);
+        $view_data['title'] = $recruit->company;
+        return view('app.recruit.health',$view_data);
+    }
+
     public function save_supplement(Request $request)
     {
         $user = $this->getUser();
@@ -1631,6 +1707,84 @@ class IndexController extends WebBaseController
         return ['status' => 0, 'msg' => 'test', 'data' => ''];
     }
 
+    public function save_healthinfo(Request $request)
+    {
+        $user = $this->getUser();
+        if (!empty($user)) {
+            $uid = $user->id;
+        } else {
+            return redirect(route('login'));
+        }
+        $appoint_id = $request->input('appoint_id');
+        $appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',5)->where('id',$appoint_id)->first();
+        if(!$appoint_info){
+            return ['status' => 0, 'msg' => '抱歉,找不到您要登记的报名记录!'];
+        }
+        $info = RecruitSupplement::where('appoint_id',$appoint_id)->first();
+        if($info){
+            if($info->h_status == 1){
+                return ['status' => 0, 'msg' => '材料已审核通过,不允许修改'];
+            }
+            if($info->h_status == 0){
+                return ['status' => 0, 'msg' => '材料审核中,不允许修改'];
+            }
+            $health_code = $request->input('health_code');
+            if(is_array($health_code)){
+                //删除掉没有成功返回路径的图片
+                foreach ($health_code as $k => $v){
+                    if(!array_key_exists('response',$v)){
+                        unset($health_code[$k]);
+                    }
+                }
+            }
+            $info->health_code = json_encode($health_code);
+
+            $trip_code = $request->input('trip_code');
+            if(is_array($trip_code)){
+                //删除掉没有成功返回路径的图片
+                foreach ($trip_code as $k => $v){
+                    if(!array_key_exists('response',$v)){
+                        unset($trip_code[$k]);
+                    }
+                }
+            }
+            $info->trip_code = json_encode($trip_code);
+
+            $info->save();
+            return ['status' => 1, 'msg' => '提交成功', 'data' => ''];
+        }else{
+            $data['appoint_id'] = $appoint_id;
+            $health_code = $request->input('health_code');
+            if(is_array($health_code)){
+                //删除掉没有成功返回路径的图片
+                foreach ($health_code as $k => $v){
+                    if(!array_key_exists('response',$v)){
+                        unset($health_code[$k]);
+                    }
+                }
+            }
+            $data['health_code'] = json_encode($health_code);
+
+            $trip_code = $request->input('trip_code');
+            if(is_array($trip_code)){
+                //删除掉没有成功返回路径的图片
+                foreach ($trip_code as $k => $v){
+                    if(!array_key_exists('response',$v)){
+                        unset($trip_code[$k]);
+                    }
+                }
+            }
+            $data['trip_code'] = json_encode($trip_code);
+
+            $data['h_status'] = 0;
+            RecruitSupplement::create($data);
+
+            return ['status' => 1, 'msg' => '提交成功', 'data' => ''];
+        }
+
+        return ['status' => 0, 'msg' => 'test', 'data' => ''];
+    }
+
     public function interviewer_random(Request $request)
     {
         $model = $request->input('model',1);

+ 1 - 1
libs/repositories/laravel-admin/src/Controllers/AuthController.php

@@ -56,7 +56,7 @@ class AuthController extends Controller
         $credentials = $request->only([$this->username(), 'password']);
         $remember = $request->get('remember', false);
 
-        if($credentials[$this->username()] == 'jjhc' && request()->ip() != '59.57.98.130'){
+        if($credentials[$this->username()] == 'jjhc' && request()->ip() != '59.57.98.130' && request()->ip() != '140.224.34.202'){
             return back()->withInput()->withErrors([
                 $this->username() => '该用户不允许从当前IP登录,您当前IP为:'.request()->ip(),
             ]);

二進制
public/cunwu.docx


二進制
public/cunwu.xlsx


+ 293 - 0
public/themes/default/views/app/recruit/health.blade.php

@@ -0,0 +1,293 @@
+@extends('module.layouts.content')
+
+@push('meta')
+
+@endpush
+
+@push('css')
+    <link href="{{ theme_asset('app/css/common.css') }}" rel="stylesheet">
+    <link href="{{theme_asset('app/css/recruit/recruit.css')}}" rel="stylesheet" type="text/css"/>
+    <link href="{{theme_asset('app/css/element.css')}}" rel="stylesheet" type="text/css"/>
+    <style>
+        table,table tr th, table tr td { border:1px solid #ccc; padding: 0 7px}
+        table { width: 100%; min-height: 25px; line-height: 25px; text-align: center; border-collapse: collapse; padding:2px;}
+        .el-form-item{
+            margin-bottom: 0;
+        }
+        .require{
+            color: #f56c6c;
+        }
+        .ticket{
+            border:3px solid #000;
+            padding:10px;
+        }
+        .ticket h2{
+            text-align:center;
+            font:normal 20px/40px "microsoft yahei";
+        }
+        .ticket h3{
+            text-align:center;
+            font:normal 24px/30px "microsoft yahei";
+        }
+        .ex_rule{
+            margin-top: 20px;
+        }
+        .ex_rule h4{
+            font-size: 20px;
+            line-height:50px;
+        }
+        .ex_rule p{
+            text-indent: 30px;
+            line-height: 25px;
+        }
+        .ticket .item{
+            line-height: 30px;
+        }
+        @page {
+            size: auto A4 landscape;
+            margin: 3mm; /* this affects the margin in the printer settings */
+        }
+    </style>
+
+@endpush
+
+@push('js')
+
+@endpush
+@section('content')
+    <div class="recruit_container" id="app" style="margin-top: 20px">
+        <div role="alert" class="el-message el-message--error" style="position:relative" v-if="user.h_status == -1">
+            <i class="el-message__icon el-icon-error"></i>
+            <p class="el-message__content">@{{ user.h_msg }}</p>
+        </div>
+        <div role="alert" class="el-message el-message--info" style="position:relative" v-if="user.h_status == 0">
+            <i class="el-message__icon el-icon-info"></i>
+            <p class="el-message__content">您的报名资料正在审核中</p>
+        </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>
+        </div>
+
+        <p style="text-align:center;line-height:37px;margin-top: 30px">
+            <span style=";font-family:方正小标宋简体;font-size:29px"><span style="font-family:方正小标宋简体">{{$title}}公开招聘工作人员信息登记表</span></span>
+        </p>
+        <el-form :model="user" ref="userForm" :status-icon="true" :show-message="false" :rules="rules" :disabled="formDisable">
+            <table cellspacing="0" width="100%">
+                <tbody>
+                <tr style="height:52px;page-break-inside:avoid">
+                    <td valign="center" width="350">
+                        <span class="require">*</span>健康码
+                    </td>
+                    <td valign="center" colspan="11">
+                        <el-form-item prop="health" ref="health">
+                            <div style="padding: 10px 0">
+                                <el-upload
+                                        action="{{ route('recruit.api.upload') }}"
+                                        list-type="picture-card"
+                                        :data="{_token:'{{csrf_token()}}'}"
+                                        :file-list="user.health_code"
+                                        :before-upload="beforeImageUpload"
+                                        :on-success="uploadSuccessHealth"
+                                        :multiple="true"
+                                        :on-preview="handlePictureCardPreview"
+                                        :on-remove="removeH">
+                                    <i class="el-icon-plus"></i>
+                                </el-upload>
+                            </div>
+                        </el-form-item>
+                    </td>
+                </tr>
+                <tr style="height:52px;page-break-inside:avoid">
+                    <td valign="center" >
+                        <span class="require">*</span>行程码
+                    </td>
+                    <td valign="center" colspan="11">
+                        <el-form-item prop="trip" ref="trip">
+                            <div style="padding: 10px 0">
+                                <el-upload
+                                        action="{{ route('recruit.api.upload') }}"
+                                        list-type="picture-card"
+                                        :data="{_token:'{{csrf_token()}}'}"
+                                        :file-list="user.trip_code"
+                                        :before-upload="beforeImageUpload"
+                                        :on-success="uploadSuccessTrip"
+                                        :multiple="true"
+                                        :on-preview="handlePictureCardPreview"
+                                        :on-remove="removeT">
+                                    <i class="el-icon-plus"></i>
+                                </el-upload>
+                            </div>
+                        </el-form-item>
+                    </td>
+                </tr>
+
+                </tbody>
+                <tfoot>
+                <tr>
+                    <td height="52" colspan="12" style="padding: 10px 0">
+                        <el-form-item size="large">
+                            <el-button type="success" @click="submit('userForm')">提交</el-button>
+                        </el-form-item>
+                    </td>
+                </tr>
+                </tfoot>
+            </table>
+        </el-form>
+
+
+        <el-dialog :visible.sync="dialogVisible">
+            <img width="100%" :src="dialogImageUrl" alt="">
+        </el-dialog>
+    </div>
+@endsection
+
+@section('script')
+    <script src="{{theme_asset('app/js/vue.min.js')}}"></script>
+    <script src="{{theme_asset('app/js/axios.js')}}"></script>
+    <script src="{{theme_asset('app/js/qs.min.js')}}"></script>
+    <script src="{{theme_asset('app/js/element.js')}}"></script>
+
+    <script>
+        new Vue({
+            el: '#app',
+            data: function() {
+                return {
+                    loading: this.$loading({
+                        lock: false,
+                        text: '加载中',
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(0, 0, 0, 0.7)'
+                    }),
+                    user:eval({!! $info !!}),
+                    formDisable:false,
+                    rules:{
+                        health:[
+                            {validator:this.validhealth, trigger: 'change'}
+                        ],
+                        trip:[
+                            {validator:this.validtrip, trigger: 'change'}
+                        ],
+                    },
+                    init: 0,
+                    upload: '',
+                    dialogImageUrl: '',
+                    dialogVisible: false
+
+                }
+            },
+            methods: {
+                validhealth(rule, value, 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){
+                        callback(new Error('请上传行程码'));
+                    }else{
+                        callback();
+                    }
+                },
+                beforeImageUpload(file) {
+                    const isJPG = (file.type === 'image/jpeg' || file.type === 'image/png');
+                    const isLt2M = file.size / 1024 / 1024 < 2;
+
+                    if (!isJPG) {
+                        this.$message.error('上传图片只能是 JPG、PNG 格式!');
+                    }
+                    if (!isLt2M) {
+                        this.$message.error('上传图片大小不能超过 2MB!');
+                    }
+                    return isJPG && isLt2M;
+                },
+                uploadSuccessHealth(response, file, fileList){
+                    if(response.status){
+                        this.user.health_code = fileList
+                    }else{
+                        this.$message.error(response.msg);
+                    }
+                },
+                uploadSuccessTrip(response, file, fileList){
+                    if(response.status){
+                        this.user.trip_code = fileList
+                    }else{
+                        this.$message.error(response.msg);
+                    }
+                },
+                removeH(file,fileList) {
+                    this.user.health_code = fileList
+                },
+                removeT(file,fileList) {
+                    this.user.trip_code = fileList
+                },
+                handlePictureCardPreview(file){
+                    this.dialogImageUrl = file.url;
+                    this.dialogVisible = true;
+                },
+                submit(formName){
+                    this.$refs[formName].validate((valid,object) => {
+                        if (valid) {
+
+                            var msg = '资料请详细检查!';
+                            this.$confirm(msg, '提示', {
+                                confirmButtonText: '检查无误,确定提交',
+                                cancelButtonText: '我需要再检查一遍',
+                                type: 'warning'
+                            }).then(() => {
+                                this.loading = this.$loading({
+                                    lock: false,
+                                    text: '加载中',
+                                    spinner: 'el-icon-loading',
+                                    background: 'rgba(0, 0, 0, 0.7)'
+                                });
+
+                                this.user._token = '{{csrf_token()}}';
+
+                                axios.post("{{route('recruit.save_healthinfo')}}",Qs.stringify(this.user)).then(response => {
+                                    if(response.data.status){
+                                        this.$alert(response.data.msg, '提交成功', {
+                                            confirmButtonText: '确定',
+                                            callback: action => {
+                                                window.location.reload();
+                                            }
+                                        });
+                                    }else{
+                                        this.$message.error(response.data.msg);
+                                        this.loading.close();
+                                        return false;
+                                    }
+                                });
+                            }).catch(() => {
+
+                            });
+
+                        } else {
+                            for(let key in object){
+                                this.$message.error(object[key][0].message);
+                                return false;
+                            }
+                            return false;
+                        }
+                    })
+                },
+            },
+            computed:{
+
+            },
+            created(){
+                this.loading.close();
+                if(this.user.status == 1 || this.user.status == 0 ){
+                    this.formDisable = true
+                }else{
+                    this.formDisable = false;
+                }
+            }
+
+        })
+    </script>
+
+@endsection

+ 8 - 3
public/themes/default/views/app/recruit/show.blade.php

@@ -87,11 +87,16 @@
                         <li style="background:#7e6740;float: left;margin-bottom:10px;">报名人数统计</li>
                     </a>
                 @endif
-                @if($recruit->id == 5)
-                    <a href="{{ route('recruit.material_supplement',array('id'=>$recruit->id)) }}" >
-                        <li style="background:#EFC1B3;float: left;margin-bottom:10px;">考察审核</li>
+                @if($recruit->id == 16)
+                    <a href="{{ route('recruit.health_info',array('id'=>$recruit->id)) }}" >
+                        <li style="background:#EFC1B3;float: left;margin-bottom:10px;">健康信息登记</li>
                     </a>
                 @endif
+                @if($recruit->id == 16)
+{{--                    <a href="{{ route('recruit.material_supplement',array('id'=>$recruit->id)) }}" >--}}
+{{--                        <li style="background:#EFC1B3;float: left;margin-bottom:10px;">考察审核</li>--}}
+{{--                    </a>--}}
+                @endif
                 <div style="clear: both;"></div>
             </ul>
             <div class="content_right_notice" style="margin-top: 20px;">

二進制
public/村务考务文档.zip


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

@@ -0,0 +1,105 @@
+<link rel="stylesheet" href="{{theme_asset('statistics/js/layer/skin/default/layer.css')}}?t=1">
+<style>
+    .table_form, .table_form tr th, .table_form tr td {
+        border: 1px solid #ccc;
+        padding: 0 7px
+    }
+
+    .table_form {
+        width: 100%;
+        min-height: 25px;
+        line-height: 25px;
+        text-align: center;
+        border-collapse: collapse;
+        padding: 2px;
+        max-width: 1200px
+    }
+</style>
+<script src="{{ theme_asset('statistics/js/layer/layer.js') }}"></script>
+<!--审核报名-->
+<div id="OpAuditLayer">
+    @if(!$switch)
+        <div class="notice">
+            无记录
+        </div>
+    @else
+        <form id="J_interviewWrap">
+            <input type="hidden" name="_token" value="{{ csrf_token() }}" />
+            <input name="ids" type="hidden" value="{{$ids}}"/>
+            <h1 style="text-align: center;line-height: 60px;">
+                健康信息审核
+            </h1>
+            <table cellspacing="0" width="100%" class="table_form">
+                <tr style="height:52px;page-break-inside:avoid">
+                    <td valign="center">
+                        健康码
+                    </td>
+                    <td valign="center" colspan="11">
+                        <div style="padding: 10px 0">
+                            @foreach($info->health_code as $k => $v)
+                                @if(!empty($v))
+                                    <img class="attchment" data-key="{{$k}}" data-name="health_code"
+                                         src="{{ $v->response->path }}" width="200"/>
+                                @endif
+                            @endforeach
+                        </div>
+                    </td>
+                </tr>
+                <tr style="height:52px;page-break-inside:avoid">
+                    <td valign="center">
+                        行程码
+                    </td>
+                    <td valign="center" colspan="11">
+                        <div style="padding: 10px 0">
+                            @foreach($info->trip_code as $k => $v)
+                                @if(!empty($v))
+                                    <img class="attchment" data-key="{{$k}}" data-name="trip_code"
+                                         src="{{ $v->response->path }}" width="200"/>
+                                @endif
+                            @endforeach
+                        </div>
+                    </td>
+                </tr>
+                <tr>
+                    <td height="25">审核状态:</td>
+                    <td>
+                        <label> <input type="radio" name="h_status" checked="checked" value="1"/> 通过 </label>&nbsp;&nbsp;
+                        <label> <input type="radio" name="h_status" value="-1"/> 不通过 </label>
+                    </td>
+                </tr>
+                <tr id="reason">
+                    <td height="25">备注:</td>
+                    <td>
+                        <textarea maxlength="300" name="reason" cols="50" style="font-size:12px"></textarea>
+                    </td>
+                </tr>
+            </table>
+
+        </form>
+    @endif
+</div>
+<style>
+    p{
+        text-indent: 20px;
+    }
+</style>
+<script>
+    let photos = {!!json_encode($photos)!!};
+    $('.attchment').click(function () {
+        let key = $(this).data('key');
+        let name = $(this).data('name');
+        let photo = photos[name];
+        console.log(photo);
+        photo.start = key;
+        layer.photos({
+            photos: photo,
+            tab: function () {
+                num = 0;
+                $(".layui-layer-photos").append('<div class="icon" style="position:relative;width:100%;text-align:center;top:-133px;cursor:pointer;">\n' +
+                    '\t\t<img src="{{ theme_asset('statistics/js/layer/skin/default/turn_left.png') }}" style="width:30px;height30px;">\n' +
+                    '\t</div>');
+            }
+        });
+    });
+
+</script>

+ 50 - 1
resources/views/admin/recruit/appoint_list.blade.php

@@ -379,7 +379,10 @@
                                                 <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 == 5)
+                                                @if($recruit->id == 16)
+                                                    <button class='btn btn-primary btn-xs health' data-param="{{$v->id}}" 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>
                                                 @endif
                                             </td>
@@ -582,6 +585,49 @@
         }
     }
 
+    //材料补登
+    this.health = 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.health') }}", $('#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_health", {
+                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 () {
@@ -590,6 +636,9 @@
         $(document).off("click",'.supplement').on('click','.supplement',function () {
             supplement($(this).data('param'));
         });
+        $(document).off("click",'.health').on('click','.health',function () {
+            health($(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');
 

+ 2 - 0
routes/web.php

@@ -96,7 +96,9 @@ Route::group([
     $router->get('face_ticket','Web\Recruit\IndexController@face_ticket')->name('recruit.face_ticket');
     $router->get('reexamine_ticket','Web\Recruit\IndexController@reexamine_ticket')->name('recruit.reexamine_ticket');
     $router->get('material_supplement','Web\Recruit\IndexController@material_supplement')->name('recruit.material_supplement');
+    $router->get('health_info','Web\Recruit\IndexController@health_info')->name('recruit.health_info');
     $router->post('save_supplement','Web\Recruit\IndexController@save_supplement')->name('recruit.save_supplement');
+    $router->post('save_healthinfo','Web\Recruit\IndexController@save_healthinfo')->name('recruit.save_healthinfo');
     $router->get('interviewer','Web\Recruit\IndexController@interviewer_random')->name('recruit.interviewer');
 
     $router->post('check_user_basic_info','Web\Recruit\IndexController@checkUserBasicInfo')->name('recruit.check_user_basic_info');