jobs_list.blade.php 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. @extends('module.layouts.company')
  2. @push('meta')
  3. @endpush
  4. @push('css')
  5. <link rel="stylesheet" type="text/css" href="{{theme_asset('app/css/company/company_jobs.css')}}"/>
  6. <link rel="stylesheet" type="text/css" href="{{theme_asset('app/css/jobmoney.css')}}"/>
  7. <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/company/company_ajax_dialog.css')}}"/>
  8. <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/company/common.css') }}"/>
  9. <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/lib/layui-v2.5.4/css/layui.css')}}"/>
  10. @endpush
  11. @section('content')
  12. <div class="user_main">
  13. <div class="mleft">
  14. @include('module.section.jobs_left')
  15. </div>
  16. <div class="mright">
  17. <div class="user_pagetitle">
  18. <div class="pat_l">管理职位</div>
  19. <div class="clear"></div>
  20. </div>
  21. <div class="user_tab mt15">
  22. <a href="{{route('jobs.list')}}" class="tabli @if(request()->type =='') select @endif ">全部职位</a>
  23. <a href="{{route('jobs.list',['type'=>1])}}" class="tabli @if(request()->type ==1) select @endif ">发布中的职位</a>
  24. <a href="{{route('jobs.list',['type'=>2])}}" class="tabli @if(request()->type ==2) select @endif ">未显示的职位</a>
  25. <div class="clear"></div>
  26. @if($company_setmeal->jobs_meanwhile <= $jobsCount )
  27. <div class="btnbox">
  28. <div class="btn_yellow J_hoverbut btn_add J_addJobsDig maxsum" >发布职位</div>
  29. </div>
  30. @else
  31. <div class="btnbox">
  32. <div class="btn_yellow J_hoverbut btn_add" onclick="window.location='{{route('jobs.add')}}'">
  33. 发布职位
  34. </div>
  35. </div>
  36. @endif
  37. </div>
  38. <div class="user_tip w680">
  39. <div class="tiptit">小提示</div>
  40. <div class="tiptxt link_blue">
  41. 亲爱的HR,您的账号可同时发布 {{$company_setmeal->jobs_meanwhile or 0}} 个职位,剩余 {{ $company_setmeal->jobs_meanwhile-$jobsCount>0 ? $company_setmeal->jobs_meanwhile-$jobsCount : 0 }} 个职位。
  42. <br/>已过期或者已关闭的职位,点击恢复按钮恢复职位
  43. </div>
  44. </div>
  45. <form id="form1" action="" class="J_allListBox" method="post">
  46. <div class="jobsWrap">
  47. @if($jobsList->total())
  48. @foreach($jobsList as $key=>$val)
  49. <div class="jobsList">
  50. <div class="selWrap">
  51. <input name="y_id[]" class="selStatus J_allList" type="checkbox" value="{{ $val->id }}">
  52. </div>
  53. <div class="jobs fl">
  54. <div class="title">
  55. @if($val->deadline<time() && $val->deadline!=0)
  56. <a target="_blank" style="color:#999" href="{{ route(url_rewrite('AIX_jobsshow'),['id'=>$val->id]) }}" title="{{ $val->jobs_name }}">{{ cut_str($val->jobs_name,18) }} [已到期]</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ get_district_cn($val->district) }}
  57. @else
  58. <a target="_blank" href="{{ route(url_rewrite('AIX_jobsshow'),['id'=>$val->id]) }}" title="{{ $val->jobs_name }}">{{ cut_str($val->jobs_name,18) }}</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ get_district_cn($val->district) }}
  59. @endif
  60. </div>
  61. <div class="update">
  62. @if($val->display ==1 && $val->_audit==1)
  63. 待处理简历:
  64. <a href="{{ route('resume.apply',['jobs_id'=>$val->id]) }}"
  65. class="">{{$val->resumeCount}}</a>
  66. &nbsp;&nbsp; | &nbsp;&nbsp;
  67. @endif
  68. 更新时间:{{date('Y-m-d H:i', $val->refresh_time)}}
  69. {{-- @if($val->display ==1 && $val->_audit==1)--}}
  70. {{-- <a href="javascript:;" style="color: red" class="jobs_tojobfair" data-code="{{ $val->id }}" url="{{ route('jobs.add.toJobfair') }}">[转入招聘会职位库]</a>--}}
  71. {{-- @endif--}}
  72. </div>
  73. @if($val->display ==1 && $val->_audit==1)
  74. <div class="J_operation btns">
  75. @if($val->display ==1 && $val->_audit==1)
  76. <a href="javascript:;" class="jobs_refresh" data-type="0" url="{{ route('jobs.refresh',['id'=>$val->id]) }}">[刷新]</a>
  77. @endif
  78. <a href="{{route('jobs.edit',['id'=>$val->id])}}">修改</a>
  79. <a href="{{route(url_rewrite('AIX_resumelist'),['jobcategory'=>$val->jobcategory])}}" target="_blank">匹配</a>
  80. @if($val->auto_refresh == 1)
  81. <a href="javascript:;" class="for_hover">
  82. <font style="color:#999">智能刷新</font>
  83. <div class="des_box">
  84. <div class="desarrow"></div>
  85. <div class="des_txt">
  86. <!-- -->
  87. <strong>已购买【智能刷新】服务</strong><br />
  88. 有效时间:{{ $val->auto_refresh_starttime }} 至 {{ $val->auto_refresh_endtime }}
  89. </div>
  90. </div>
  91. </a>
  92. @else
  93. <a href="javascript:;" class="jobs_refresh" data-type="1" url="{{ route('jobs.refresh',['id'=>$val->id,'increment'=>1]) }}">智能刷新</a>
  94. @endif
  95. <a href="javascript:;" url="{{ route('jobs.close',['id'=>$val->id]) }}" class="close">关闭</a>
  96. <a href="javascript:;" url="{{route('jobs.del',['id'=>$val->id])}}" class="delete">删除</a>
  97. <a href="javascript:;" class="friend" url="{{ route('jobs.code',['id'=>$val->company_id]) }}">分享到朋友圈</a>
  98. {{-- <p>职位有效期 {{date("Y-m-d",strtotime($val->created_at))}} 至 {{date('Y-m-d',$val->deadline)}}</p> --}}
  99. </div>
  100. @endif
  101. <span style="line-height:25px;height:25px;display: inline-block">职位有效期 {{date("Y-m-d",strtotime($val->created_at))}} 至
  102. @if( $val->deadline==0)
  103. 无期限
  104. @else
  105. {{date('Y-m-d',$val->deadline)}}
  106. @endif
  107. </span>
  108. </div>
  109. @if($val->display==2 || $val->_audit != 1 || $val->audit == 2)
  110. <div class="s-t-box fl">
  111. @if($val->display == 2)
  112. <div class="status fl font_red">已关闭</div>
  113. @else
  114. @if($val->_audit == 2 || $val->audit == 2)
  115. <div class="status fl font_yellow">审核中</div>
  116. @elseif($val->_audit ==3)
  117. <div class="status fl font_red">审核未通过</div>
  118. @endif
  119. @endif
  120. </div>
  121. <div class="edit link_blue fl">
  122. @if($val->display==1 && $val->valid == 1)
  123. <a href="{{route('jobs.edit',['id'=>$val->id])}}" class="">修改</a>
  124. @endif
  125. @if($val->valid == 0 || $val->display==2)
  126. <a href="javascript:;" url="{{route('jobs.display',['id'=>$val->id])}}" class="jobs_display">恢复</a>
  127. @endif
  128. <a href="javascript:;" url="{{route('jobs.del',['id'=>$val->id])}}" class="delete">删除</a>
  129. </div>
  130. @else
  131. <div class="aloneOperation fl">
  132. <div class="box ">
  133. @if($val->stick)
  134. <div class="for_hover">
  135. <div class="btn_lightgray J_hoverbut btn_inline_small btn_border mr10" style="margin-right: 10px;">
  136. 职位置顶
  137. </div>
  138. <div class="des_box">
  139. <div class="desarrow"></div>
  140. <div class="des_txt">
  141. <strong>已购买【职位置顶】服务</strong><br/>
  142. 有效时间:{{ date('Y-m-d',$val->stickarr->starttime) }}
  143. {{ date('Y-m-d',$val->stickarr->endtime) }}
  144. </div>
  145. </div>
  146. </div>
  147. 购买置顶推广<i>{{$val->stickarr->days}}</i>天,剩余<i>{{ $val->stickDays or 0 }}</i>天
  148. <div class="clear"></div>
  149. @else
  150. <div class="btn_green J_hoverbut btn_inline_small mr10 stick_btn" style="margin-right: 10px;"
  151. data="{{$val->id}}">职位置顶
  152. </div>
  153. 职位排名始终靠前,<i>{{ $stick->price }}</i>元/{{ $stick->value }}天
  154. @endif
  155. </div>
  156. <div class="box borderTop">
  157. @if($val->emergency)
  158. <div class="for_hover">
  159. <div class="btn_lightgray J_hoverbut btn_inline_small btn_border mr10" style="margin-right: 10px;">
  160. 紧急招聘
  161. </div>
  162. <div class="des_box">
  163. <div class="desarrow"></div>
  164. <div class="des_txt">
  165. <strong>已购买【紧急招聘】服务</strong><br/>
  166. 有效时间:{{ date('Y-m-d',$val->emergencyarr->starttime) }}
  167. {{ date('Y-m-d',$val->emergencyarr->endtime) }}
  168. </div>
  169. </div>
  170. </div>
  171. 购买紧急招聘<i>{{$val->emergencyarr->days}}</i>天,剩余<i>{{ $val->emergencyDays or 0 }}</i>天
  172. <div class="clear"></div>
  173. @else
  174. <div class="btn_yellow J_hoverbut btn_inline_small mr10 emergency_btn" style="margin-right: 10px;"
  175. data="{{ $val->id }}">紧急招聘
  176. </div>
  177. 紧急标识更加醒目,<i>{{$emergency->price}}</i>元/{{$emergency->value}}天
  178. @endif
  179. </div>
  180. </div>
  181. @endif
  182. <div class="clear"></div>
  183. </div>
  184. @endforeach
  185. @endif
  186. </div>
  187. @if($jobsList->total())
  188. <div class="jobsWrap">
  189. <div class="allSelWrap">
  190. <input name="" class="allSel J_allSelected" type="checkbox">
  191. </div>
  192. @if($type == 1)
  193. <div class="btn_blue J_hoverbut btn_inline" id="refresh_all">刷新职位</div>
  194. <div class="btn_blue J_hoverbut btn_inline" id="close_all">关闭职位</div>
  195. @endif
  196. <div class="btn_lightgray J_hoverbut btn_inline btn_border" id="delete_all">删除职位</div>
  197. <div class="qspage">{{$jobsList->links('module.widgets.pagination')}}</div>
  198. <div class="clear"></div>
  199. </div>
  200. @endif
  201. </form>
  202. @if(!$jobsList->total())
  203. <div class="jobsWrap">
  204. <div class="res_empty">
  205. @if($type == 2)
  206. 暂无职位
  207. @else
  208. 亲爱的HR,您还没有显示中的职位,若已发布,请您查看审核中的职位<br>
  209. 想要快速找到合适的人才,就赶紧发布职位招揽人才吧~
  210. @endif
  211. </div>
  212. <div class="res_empty_addbox">
  213. @if($company_setmeal->jobs_meanwhile <= $jobsCount )
  214. <div class="btn_blue J_hoverbut btn_115_38 maxsum">
  215. 发布职位>>
  216. </div>
  217. @else
  218. <div class="btn_blue J_hoverbut btn_115_38" onclick="window.location='{{route('jobs.add')}}'">
  219. 发布职位>>
  220. </div>
  221. @endif
  222. </div>
  223. </div>
  224. @else
  225. @endif
  226. </div>
  227. <div class="clear"></div>
  228. </div>
  229. @endsection
  230. @section('script')
  231. <script type="text/javascript" src="{{ theme_asset('app/js/company/jquery.common.js') }}"></script>
  232. <script type="text/javascript" src="{{ theme_asset('app/js/jquery.allselected.js') }}"></script>
  233. <script type="text/javascript" src="{{ theme_asset('app/js/jquery.disappear.tooltip.js') }}"></script>
  234. <script type="text/javascript" src="{{ theme_asset('app/js/jquery.tooltip.js') }}"></script>
  235. <script type="text/javascript" src="{{theme_asset('app/lib/layui-v2.5.4/layui.all.js')}}"></script>
  236. <script type="text/javascript">
  237. $(document).ready(function () {
  238. @if(!empty(session('setmeal_message')))
  239. var layer_index=layer.msg("<p style='font-size:16px;'>{{ session('setmeal_message') }}</p>", {
  240. time: 0, //不关闭
  241. btn: ['去升级']
  242. ,btnAlign: 'c'
  243. ,shade: 0.2
  244. ,closeBtn: 0
  245. ,yes: function(index, layero){
  246. location.href="{{route('service.setmeal')}}?look=true"
  247. }
  248. });
  249. //重新定义弹窗样式
  250. layer.style(layer_index, {
  251. width: '500',
  252. });
  253. @endif
  254. $('.maxsum').click(function () {
  255. disapperTooltip("remind", "发布职位数已达上限,请升级套餐或购买增值服务");
  256. });
  257. $("#delete_all").click(function () {
  258. var listCheckedArray = $('.J_allListBox .J_allList:checked');
  259. if (!listCheckedArray.length) {
  260. disapperTooltip("remind", '请选择职位');
  261. return false;
  262. }
  263. var idarr = new Array();
  264. $.each($("input[name='y_id[]']:checked") ,function(){
  265. idarr.push($(this).val());
  266. })
  267. var url = "{{route('jobs.delAll')}}";
  268. var qsDialog = $(this).dialog({
  269. title: '删除职位',
  270. loading: true,
  271. border: false,
  272. yes: function () {
  273. $.post(url,{type:1,_token:"{{csrf_token()}}",id:idarr},function (result) {
  274. if (result.status == 1) {
  275. disapperTooltip("success", result.msg);
  276. setTimeout(function () {
  277. location.reload();
  278. }, 2000);
  279. } else {
  280. disapperTooltip('remind', result.msg);
  281. }
  282. },'json');
  283. }
  284. });
  285. $.get(url, function (result) {
  286. qsDialog.setContent(result);
  287. });
  288. });
  289. $("#refresh_all").click(function () {
  290. var listCheckedArray = $('.J_allListBox .J_allList:checked');
  291. if (!listCheckedArray.length) {
  292. disapperTooltip("remind", '请选择职位');
  293. return false;
  294. }
  295. var checkedValArr = [];
  296. $.each(listCheckedArray, function (index, val) {
  297. checkedValArr[index] = $(this).val();
  298. });
  299. var url = "{{route('jobs.refresh')}}";
  300. var yid = checkedValArr.join(',');
  301. var qsDialog = $(this).dialog({
  302. title: '职位刷新',
  303. loading: true,
  304. showFooter: false,
  305. yes: function () {
  306. $.post(url, {id: yid,_token:"{{csrf_token()}}"}, function (result) {
  307. if (result.status) {
  308. disapperTooltip("success", result.msg);
  309. setTimeout(function () {
  310. window.location.reload();
  311. }, 2000);
  312. } else {
  313. disapperTooltip("remind", result.msg);
  314. return false;
  315. }
  316. }, 'json');
  317. }
  318. });
  319. $.get(url, {id: yid}, function (result) {
  320. if (result.status == 2) {
  321. qsDialog.hide();
  322. var son_qsDialog = $(this).dialog({
  323. title: '批量刷新职位',
  324. loading: true,
  325. border: false
  326. });
  327. son_qsDialog.setBtns(['单条刷新', '取消']);
  328. son_qsDialog.setContent('<div class="refresh_jobs_all_confirm">' + result.msg + '</div>');
  329. } else {
  330. if (result.data.show_footer == 0) {
  331. qsDialog.showFooter(false);
  332. } else {
  333. qsDialog.showFooter(true);
  334. }
  335. if (result.status == 0) {
  336. qsDialog.showFooter(false);
  337. }
  338. qsDialog.setContent(result.msg);
  339. }
  340. });
  341. });
  342. $("#close_all").click(function () {
  343. var listCheckedArray = $('.J_allListBox .J_allList:checked');
  344. if (!listCheckedArray.length) {
  345. disapperTooltip("remind", '请选择职位');
  346. return false;
  347. }
  348. var idarr = new Array();
  349. $.each($("input[name='y_id[]']:checked") ,function(){
  350. idarr.push($(this).val());
  351. })
  352. var url = "{{route('jobs.closeAll')}}";
  353. var qsDialog = $(this).dialog({
  354. title: '关闭职位',
  355. loading: true,
  356. border: false,
  357. yes: function () {
  358. $.post(url, {type: 1, _token: "{{csrf_token()}}",id:idarr}, function (result) {
  359. if (result.status == 1) {
  360. disapperTooltip("success", result.msg);
  361. setTimeout(function () {
  362. location.reload();
  363. }, 2000);
  364. } else {
  365. disapperTooltip('remind', result.msg);
  366. }
  367. }, 'json');
  368. }
  369. });
  370. $.get(url,{_token:"{{csrf_token()}}"} ,function (result) {
  371. qsDialog.setContent(result);
  372. });
  373. });
  374. $(".close").click(function () {
  375. var url = $(this).attr('url');
  376. var qsDialog = $(this).dialog({
  377. title: '关闭职位',
  378. loading: true,
  379. border: false,
  380. yes: function () {
  381. $.post(url, {type: 1, _token: "{{csrf_token()}}"}, function (result) {
  382. if (result.status == 1) {
  383. disapperTooltip("success", result.msg);
  384. setTimeout(function () {
  385. location.reload();
  386. }, 2000);
  387. } else {
  388. disapperTooltip('remind', result.msg);
  389. }
  390. }, 'json');
  391. }
  392. });
  393. $.get(url, {_token: "{{csrf_token()}}"}, function (result) {
  394. qsDialog.setContent(result);
  395. });
  396. });
  397. $(".delete").click(function () {
  398. var url = $(this).attr('url');
  399. var qsDialog = $(this).dialog({
  400. title: '删除职位',
  401. loading: true,
  402. border: false,
  403. yes: function () {
  404. $.post(url, {type:1,_token:"{{csrf_token()}}"},function (result) {
  405. if (result.status == 1) {
  406. disapperTooltip("success", result.msg);
  407. setTimeout(function () {
  408. location.reload();
  409. }, 2000);
  410. } else {
  411. disapperTooltip('remind', result.msg);
  412. }
  413. }, 'json');
  414. }
  415. });
  416. $.get(url,{_token:"{{csrf_token()}}"} ,function (result) {
  417. qsDialog.setContent(result);
  418. });
  419. });
  420. // 分享到朋友圈
  421. $(".friend").click(function () {
  422. var qsDialog = $(this).dialog({
  423. loading: true,
  424. footer: false,
  425. header: false,
  426. border: false,
  427. backdrop: false
  428. });
  429. var url = $(this).attr('url');
  430. qsDialog.hide();
  431. $.get(url,function (result) {
  432. if(result.status) {
  433. var qsDialogSon = $(this).dialog({
  434. title: '分享到朋友圈',
  435. content: result.img,
  436. footer: false
  437. });
  438. } else {
  439. var qsDialogSon = $(this).dialog({
  440. title: '友情提示',
  441. content: '请重新操作',
  442. footer: false
  443. });
  444. }
  445. })
  446. });
  447. $(".jobs_refresh").click(function () {
  448. var url = $(this).attr('url');
  449. var footerShow = eval($(this).data('type'));
  450. var qsDialog = $(this).dialog({
  451. title: '职位刷新',
  452. loading: true,
  453. showFooter: false,
  454. yes: function () {
  455. $.post(url,{_token:"{{ csrf_token() }}"}, function (result) {
  456. if (result.status) {
  457. disapperTooltip("success", result.msg);
  458. setTimeout(function () {
  459. window.location.reload();
  460. }, 2000);
  461. } else {
  462. disapperTooltip("remind", result.msg);
  463. return false;
  464. }
  465. }, 'json');
  466. }
  467. });
  468. $.get(url, function (result) {
  469. if (result.data.show_footer == 0) {
  470. qsDialog.showFooter(false);
  471. } else {
  472. if (!footerShow) {
  473. qsDialog.showFooter(true);
  474. }
  475. }
  476. qsDialog.setContent(result.msg);
  477. });
  478. });
  479. $(".stick_btn").click(function () {
  480. var qsDialog = $(this).dialog({
  481. title: '职位置顶',
  482. loading: true,
  483. showFooter: false
  484. });
  485. var url = "{{route('jobs.stick')}}";
  486. var jobs_id = $(this).attr('data');
  487. $.get(url, {jobs_id: jobs_id}, function (result) {
  488. qsDialog.setContent(result.msg);
  489. });
  490. });
  491. $(".emergency_btn").click(function () {
  492. var qsDialog = $(this).dialog({
  493. title: '职位紧急',
  494. loading: true,
  495. showFooter: false
  496. });
  497. var url = "{{route('jobs.emergency')}}";
  498. var jobs_id = $(this).attr('data');
  499. $.getJSON(url, {jobs_id: jobs_id}, function (result) {
  500. qsDialog.setContent(result.msg);
  501. });
  502. });
  503. $(".jobs_display").click(function(){
  504. var url = $(this).attr('url');
  505. var qsDialog = $(this).dialog({
  506. title: '恢复职位',
  507. loading: true,
  508. border: false,
  509. yes: function () {
  510. $.post(url,{type:1,_token:"{{csrf_token()}}"}, function (result) {
  511. if (result.status == 1) {
  512. disapperTooltip("success",result.msg);
  513. setTimeout(function () {
  514. location.reload();
  515. }, 2000);
  516. } else {
  517. disapperTooltip('remind', result.msg);
  518. }
  519. },'json');
  520. }
  521. });
  522. $.get(url,{_token:"{{csrf_token()}}"}, function (result) {
  523. qsDialog.setContent(result);
  524. });
  525. });
  526. $(".jobs_tojobfair").click(function () {
  527. var url = $(this).attr('url');
  528. var jid = $(this).data('code');
  529. var qsDialog = $(this).dialog({
  530. title: '转入招聘会',
  531. loading: true,
  532. border: false,
  533. showFooter:false,
  534. yes: function () {
  535. $.post(url,{id:jid,_token:"{{ csrf_token() }}"}, function (result) {
  536. if(result.status) {
  537. disapperTooltip("success",result.msg);
  538. } else {
  539. disapperTooltip('remind', result.msg);
  540. }
  541. });
  542. }
  543. });
  544. $.getJSON(url,'',function (res) {
  545. if (res.status) {
  546. qsDialog.setContent(res.data.html);
  547. qsDialog.showFooter(true);
  548. }
  549. })
  550. });
  551. });
  552. </script>
  553. @endsection