index.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. @extends('app.hardware.layout.hardware')
  2. @push('meta')
  3. @endpush
  4. @push('css')
  5. <link rel="stylesheet" href="{{theme_asset('app/css/aio/common.css')}}" />
  6. <link rel="stylesheet" href="{{theme_asset('app/css/aio/joblist/newjoblist.css')}}" />
  7. <link rel="stylesheet" href="{{theme_asset('app/css/aio/footer.css')}}" />
  8. <link rel="stylesheet" href="{{theme_asset('app/css/aio/pagers.css')}}" />
  9. <style>
  10. .MyDiv-header .divtitle{position: relative;}
  11. .apply_resume{position: absolute;top: -22px;left: 0px;width: 100%;}
  12. .apply_resume .top-select-style{margin-top: 5px;border: 1px solid #558fd9; margin-left: 0px;width: 280px;background-position: 245px 20px;}
  13. </style>
  14. @endpush
  15. @push('js')
  16. <script type="text/javascript" src="{{theme_asset('app/js/aio/myDiv.js')}}"></script>
  17. @endpush
  18. @section('content')
  19. <div class="newjoblist-content">
  20. <div class="content-top-search">
  21. <form method="get" action="{{route('hardware.aio.job')}}">
  22. <input class="top-search-left" type="text" value="" placeholder="搜索职位" name="key"/>
  23. <button class="top-search-right" type="submit">搜索</button>
  24. </form>
  25. <div class="clear"></div>
  26. </div>
  27. <div class="content-top-select" style="padding-left:50px;">
  28. @if($categories['AIX_trade'])
  29. <select id="trade" class="top-select-style select-change" style="margin-left:0;" onChange=javascript:window.location.href=this.options[this.selectedIndex].id>
  30. <option class="top-option-style" value="" id="{{route('hardware.aio.job',array_merge($params, array('trade'=>'')))}}">职位类别</option>
  31. @foreach($categories['AIX_trade'] as $k=>$v)
  32. <option class="top-option-style" @if(array_get($params,'trade')==$v['id']) selected="selected" @endif id="{{route('hardware.aio.job',array_merge($params, array('trade'=>$v['id'])))}}" value="{{$v['id']}}">{{$v['demand']}}</option>
  33. @endforeach
  34. </select>
  35. @endif
  36. @if($categories['AIX_education'])
  37. <select id="education" class="top-select-style select-change" onChange=javascript:window.location.href=this.options[this.selectedIndex].id>
  38. <option class="top-option-style" value="" id="{{route('hardware.aio.job',array_merge($params, array('education'=>'')))}}">学历要求</option>
  39. @foreach($categories['AIX_education'] as $k=>$v)
  40. <option class="top-option-style" @if(array_get($params,'education')==$v['id']) selected="selected" @endif id="{{route('hardware.aio.job',array_merge($params, array('education'=>$v['id'])))}}" >{{$v['demand']}}</option>
  41. @endforeach
  42. </select>
  43. @endif
  44. @if($categories['AIX_wage'])
  45. <select id="wage" class="top-select-style select-change" onChange=javascript:window.location.href=this.options[this.selectedIndex].id>
  46. <option class="top-option-style" value="" id="{{route('hardware.aio.job',array_merge($params, array('wage'=>'')))}}">薪资</option>
  47. @foreach($categories['AIX_wage'] as $k=>$v)
  48. <option class="top-option-style" @if(array_get($params,'wage')==$v['id']) selected="selected" @endif id="{{route('hardware.aio.job',array_merge($params, array('wage'=>$v['id'])))}}" >{{$v['demand']}}</option>
  49. @endforeach
  50. </select>
  51. @endif
  52. <!--地区-->
  53. <select id="area" class="top-select-style select-change" onChange=javascript:window.location.href=this.options[this.selectedIndex].id>
  54. <option class="top-option-style" value="" id="{{route('hardware.aio.job',array_merge($params, array('citycategory'=>'')))}}">所在地区</option>
  55. @if($arealist)
  56. @if(array_has($arealist, 'parent'))
  57. <option class="top-option-style" value="{{$arealist['parent']['citycategory']}}" @if(array_get($params, 'citycategory') && $params['citycategory'] ==$arealist['parent']['citycategory']) selected="selected" @endif id="{{route('hardware.aio.job',array_merge($params, array('citycategory'=>$arealist['parent']['citycategory'])))}}">
  58. 全{{$arealist['parent']['name']}}
  59. </option>
  60. @else
  61. <option class="top-option-style" value="{{$arealist['select']['citycategory']}}" @if(array_get($params, 'citycategory') && $params['citycategory'] ==$arealist['select']['citycategory']) selected="selected" @endif id="{{route('hardware.aio.job',array_merge($params, array('citycategory'=>$arealist['select']['citycategory'])))}}">
  62. 全{{$arealist['select']['name']}}
  63. </option>
  64. @endif
  65. @foreach($arealist['list'] as $k=>$district)
  66. <option class="top-option-style" value="{{$district['citycategory']}}" @if(array_get($params, 'citycategory') && $params['citycategory'] ==$district['citycategory']) selected="selected" @endif id="{{route('hardware.aio.job',array_merge($params, array('citycategory'=>$district['citycategory'])))}}">
  67. {{$district['name']}}
  68. </option>
  69. @endforeach
  70. @endif
  71. </select>
  72. </div>
  73. <div class="content_top"></div>
  74. <div class="content-top-infolist">
  75. @if($list->total()>0)
  76. <table cellspacing="0" cellpadding="0" border="0" class="jobslist_table" >
  77. @foreach($list_items as $key => $val)
  78. <tr>
  79. <td class="jname" title="{{$val->jobs_name}}">{{cut_str($val->jobs_name, 10, 0, "...")}}</td>
  80. <td class="jwage">{{$val->wage_cn}}</td>
  81. <td>{{$val->district_cn}}</td>
  82. <td>@if($val->sex_cn=='不限')
  83. {{"性别".$val->sex_cn}}
  84. @else
  85. {{$val->sex_cn}}
  86. @endif
  87. @if($val->education_cn)
  88. /{{$val->education_cn or ''}}
  89. @endif
  90. @if($val->experience_cn)
  91. /{{$val->experience_cn}}
  92. @endif
  93. </td>
  94. <td><a href="{{route('hardware.aio.job.detail', ['id'=>$val->id])}}" class="li-table-btn">详情</a></td>
  95. <td><a href="javascript:;" class="li-table-btn apply_jobs" data-jid="{{$val->id}}">投递</a></td>
  96. </tr>
  97. @endforeach
  98. </table>
  99. @else
  100. <div class="list_empty_group">
  101. <p>未找到符合条件的信息!</p>
  102. </div>
  103. @endif
  104. <div class="clearfix"></div>
  105. </div>
  106. <div class="content_bottom"></div>
  107. <div class="pagers" style="width: 1500px;">
  108. <div class="pagers-content">
  109. {{ $list->appends($params)->links('module.widgets.pagination') }}
  110. </div>
  111. </div>
  112. <div class="newjoblist-footer">
  113. @include('app.hardware.layout.footer')
  114. </div>
  115. </div>
  116. <script type="text/javascript" src="{{theme_asset('app/js/aio/countdown.js')}}"></script>
  117. @endsection
  118. @section('script')
  119. <script>
  120. var isVisitor = 0;
  121. var utype = 0;
  122. @if($user)
  123. isVisitor = 1;
  124. @if($user->utype == 1)
  125. utype = 1;
  126. @else
  127. utype = 2;
  128. @endif
  129. @endif
  130. function apply_job(jid){
  131. var url = "{{route('hardware.aio.job.apply')}}";
  132. $.getJSON(url,{jobs_id:jid},function(result){
  133. closeDialog();
  134. if(result.status==1){
  135. dialogDiv(result.html,'确定','closeDialog');
  136. return false;
  137. }else if(result.status==2){
  138. dialogDiv(result.html,'确定','apply_job_resume','取消');
  139. } else {
  140. dialogDiv(result.html,'确定','closeDialog');
  141. return false;
  142. }
  143. }).error(function(error){
  144. closeDialog();
  145. if(error.status == 500 || error.status == 400){
  146. var response=$.parseJSON(error.response);
  147. if (error.status==422) {//验证错误
  148. $.each(response.errors,function (key,val) {
  149. dialogDiv(val[0],'关闭','closeDialog');
  150. return false;
  151. });
  152. }
  153. else if(error.status==400) {//业务错误
  154. dialogDiv(JSON.parse(error.responseText).message,'关闭','closeDialog');
  155. return false;
  156. }
  157. }else{
  158. dialogDiv('投递失败','关闭','closeDialog');
  159. return false;
  160. }
  161. });
  162. }
  163. function apply_job_resume(){
  164. var jid = $('#apply_jobs_id').val();
  165. var resume_id = $('#apply_resume_id').val();
  166. var url = "{{route('hardware.aio.job.apply')}}";
  167. $.getJSON(url,{jobs_id:jid,resume_id:resume_id},function(result){
  168. closeDialog();
  169. if(result.status==1){
  170. dialogDiv(result.html,'确定','closeDialog');
  171. return false;
  172. }else {
  173. dialogDiv(result.html,'关闭','closeDialog');
  174. return false;
  175. }
  176. }).error(function(error){
  177. closeDialog();
  178. if(error.status == 500 || error.status == 400){
  179. var response=$.parseJSON(error.response);
  180. if (error.status==422) {//验证错误
  181. $.each(response.errors,function (key,val) {
  182. dialogDiv(val[0],'关闭','closeDialog');
  183. return false;
  184. });
  185. }
  186. else if(error.status==400) {//业务错误
  187. dialogDiv(JSON.parse(error.responseText).message,'关闭','closeDialog');
  188. return false;
  189. }
  190. }else{
  191. dialogDiv('投递失败','关闭','closeDialog');
  192. return false;
  193. }
  194. });
  195. }
  196. function closeDialog(){
  197. $(".white_content").remove();
  198. $(".black_overlay").remove();
  199. }
  200. function toIndex() {
  201. window.location.href = "{{route('hardware.aio.login')}}";
  202. return false;
  203. }
  204. $(document).ready(function () {
  205. // apply
  206. $(".apply_jobs").on('click',function(){
  207. if(isVisitor>0){
  208. if(utype == 1){
  209. dialogDiv('请登录个人账号','确定','toIndex');
  210. return false;
  211. }else{
  212. var htmltwo = '<div id="applyDiv" class="white_content" style="display:block;">'
  213. +'<div class="MyDiv-header">'
  214. +'<span class="divtitle">确认申请这个职位吗?</span>'
  215. +'</div>'
  216. +'<div class="clear"></div>'
  217. +'<div class="MyDiv-info">'
  218. +'<button class="dialog-btn dialog-btn-left" onclick="apply_job('+$(this).data("jid")+')">确定</button>'
  219. +'<button class="dialog-btn dialog-btn-right" onclick="$(this).parent().parent().remove();$(\'.black_overlay\').remove();">取消</button>'
  220. +'<div style="clear: both"></div></div></div>'
  221. +'<div id="fade" class="black_overlay" style="display:block;"></div>';
  222. $("#dialogDiv-content").append(htmltwo);
  223. }
  224. } else {
  225. //跳转到登录页面
  226. dialogDiv('请登录','确定','toIndex');
  227. return false;
  228. }
  229. });
  230. });
  231. </script>
  232. @endsection