Browse Source

就业意向

zmw 3 months ago
parent
commit
5ac93d469d

+ 18 - 8
app/Admin/Controllers/Health/IndexController.php

@@ -27,6 +27,7 @@ class IndexController extends Controller
      */
     public function index(Content $content)
     {
+        Permission::check('presentation');
         return $content
             ->header('宣讲会管理')
             ->description('')
@@ -154,7 +155,7 @@ class IndexController extends Controller
 
     public function appointList(Content $content, Request $request)
     {
-        Permission::check('presentation_appoint_list');
+        Permission::check('health_appoint_list');
         $id = $request->id;
         $presentation = Presentation::find($id);
         if (empty($presentation)) {
@@ -271,7 +272,7 @@ class IndexController extends Controller
     }
 
     public function jyyxInfoList(Content $content, Request $request){
-        Permission::check('presentation_appoint_list');
+        Permission::check('appoint_list');
 
         $search_data = $request->all();
 
@@ -293,11 +294,7 @@ class IndexController extends Controller
             ->paginate($perpage);
 
         foreach ($list as $k => $v){
-            if($v->sex == 0){
-                $list[$k]['sex'] = '女';
-            }else{
-                $list[$k]['sex'] = '男';
-            }
+
             if($v->status == 0){
                 $list[$k]['status'] = '未下载';
             }else{
@@ -307,13 +304,26 @@ class IndexController extends Controller
 
         return $content
             ->header('信息管理')
-            ->description('就业单身人员信息列表')
+            ->description('就业意向人员信息列表')
             ->body(view('admin.health.jyyx_appoint_list')->with([
                 'list' => $list,
                 'search_data' => $search_data
             ]));
     }
 
+    public function jyyxStatus(Request $request){
+
+        $info = JyyxAppoint::where(['id' => $request->id])->first();
+        if($info){
+            $info->status = 1;
+            $info->save();
+            return response()->json(['status' => 1, 'msg' => '跳转下载中!', 'data' => 'ok', 'url' => $info->attachment]);
+        }else{
+            return response()->json(['status' => 0, 'msg' => '找不到记录!', 'data' => 'fail']);
+        }
+        //return "/storage/recruit/word/" . $recruit->name_en . '/' .$appoint->audit .$word_url;
+    }
+
     public function postInfoList(Content $content, Request $request){
         Permission::check('presentation_appoint_list');
 

+ 1 - 0
app/Admin/routes.php

@@ -521,5 +521,6 @@ Route::group([
         $router->get('jyyx_appoint_list', 'IndexController@jyyxInfoList')->name('Health.jyyx_appoint_list');//就业意向人员信息列表
         $router->get('post_appoint_list', 'IndexController@postInfoList')->name('Health.post_appoint_list');//就业意向人员信息列表
         $router->post('qjwjStatus', 'IndexController@qjwjStatus')->name('Health.qjwjStatus');//下载简历
+        $router->post('jyyxStatus', 'IndexController@jyyxStatus')->name('Health.jyyxStatus');//下载简历
     });
 });

+ 10 - 61
resources/views/admin/health/jyyx_appoint_list.blade.php

@@ -4,42 +4,6 @@
             <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="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>
-                    <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="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>
                     <div class="col-md-3 clearfix">
                         <div class="box-body table-responsive" style="padding:5px;">
                             <div class="form-group clearfix" style="margin-bottom:0;">
@@ -70,14 +34,11 @@
                                     <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 width="150">姓名</th>
+                                    <th width="150">电话</th>
+                                    <th>备注</th>
+                                    <th width="150">下载情况</th>
+                                    <th width="150">操作</th>
                                 </tr>
                                 </thead>
                                 <tbody>
@@ -89,23 +50,11 @@
                                             </td>
                                             <td>
                                                 <span style="color: #0A246A; margin-right: 3px;">{!! $v->realname !!}</span>
-                                                <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:#0F73AC; margin-right: 3px;">{{$v->native_place}}</span>
                                             </td>
                                             <td>
                                                 {{ $v->mobile }}
                                             </td>
-                                            <td>{!! $v->education !!}</td>
-                                            <td>{!! $v->school !!}</td>
-                                            <td>{!! $v->dep !!}</td>
-                                            <td>
-                                                {{ $v->pro_type }}
-                                            </td>
-                                            <td>
-                                                {{ $v->pro_text }}
-                                            </td>
+                                            <td>{!! $v->remark !!}</td>
                                             <td>
 
                                                 <button class='btn btn-primary btn-xs fetch_word' data-aid="{{$v->id}}" style="margin-bottom: 10px">下载简历</button>
@@ -212,15 +161,15 @@
             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');
+            var appoint_id = $(this).attr('data-aid');
 
             var qsDialog = $(this).dialog({
-                title: 'word简历生成',
+                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) {
+                    $.post("{{ route('Health.jyyxStatus') }}", {_token:'{{ csrf_token() }}',id:appoint_id}, function(result) {
                         if (result.status == 1) {
                             disapperTooltip('success', result.msg);
                             window.location.href = result.url;
@@ -236,7 +185,7 @@
                 }
             });
             qsDialog.setCloseDialog(false);
-            qsDialog.setContent("重新生成会覆盖原有简历,请确认?");
+            qsDialog.setContent("即将下载简历,请确认?");
             qsDialog.showFooter(true);
         });
         $("#ButtonAudit").click(function() {