need_info.blade.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. @extends('mobile.module.layouts.content')
  2. @push('meta')
  3. <meta name="csrf-token" content="{{ csrf_token() }}">
  4. @endpush
  5. @push('css')
  6. <link rel="stylesheet" href="{{theme_asset('mobile/css/company.css')}}">
  7. <link href="{{ theme_asset('mobile/css/nprogress.css') }}" rel="stylesheet">
  8. <style>
  9. .hide,.hide_type {display:none;}
  10. </style>
  11. @endpush
  12. @section('content')
  13. <form action="" id="form">
  14. <input type="hidden" name="id" id="id" value="{{$info['id'] or ''}}">
  15. <div class="list_height plist-txt notarrow">
  16. <div class="pic"></div>
  17. <div class="tit font14">岗位名称<span class="font_red_light">*</span></div>
  18. <div class="describe font13">
  19. <input type="text" name="job" id="job" required placeholder="请输入岗位名称" class="font13" value="{{ $info['job'] or '' }}">
  20. </div>
  21. <div class="arrow"></div>
  22. <div class="clear"></div>
  23. </div>
  24. <div class="list_height plist-txt">
  25. <div class="pic"></div>
  26. <div class="tit font14">类型<span class="font_red_light">*</span></div>
  27. <div class="describe font13">
  28. <span class="for-select"></span>
  29. <select id="type" name="type">
  30. @foreach($type as $k => $v)
  31. <option value="{{$k}}" @if($info['type']==$k) selected @endif>{{$v}}</option>
  32. @endforeach
  33. </select>
  34. </div>
  35. <div class="arrow"></div>
  36. <div class="clear"></div>
  37. </div>
  38. <div class="list_height plist-txt notarrow">
  39. <div class="pic"></div>
  40. <div class="tit font14">招聘人数<span class="font_red_light">*</span></div>
  41. <div class="describe font13">
  42. <input type="number" id="people" name="people" required placeholder="请输入招聘人数" class="font13" value="{{ $info['people'] or 1 }}">
  43. </div>
  44. <div class="arrow"></div>
  45. <div class="clear"></div>
  46. </div>
  47. <div class="split-block"></div>
  48. <div class="type_1 hide_type">
  49. <div class="list_height plist-txt">
  50. <div class="pic"></div>
  51. <div class="tit font14">合作意向<span class="font_red_light">*</span></div>
  52. <div class="describe font13">
  53. <span class="for-select"></span>
  54. <select id="cooperation" name="cooperation" class="type_1_form other" data-index="4" data-id="cooperation_other_form">
  55. @foreach($cooperation as $k => $v)
  56. <option value="{{$k}}" @if(!empty($info['cooperation'])) @if($info['cooperation']==$k) selected @endif @endif>{{$v}}</option>
  57. @endforeach
  58. </select>
  59. </div>
  60. <div class="arrow"></div>
  61. <div class="clear"></div>
  62. </div>
  63. <div class="list_height plist-txt notarrow @if(empty($info['cooperation']) || $info['cooperation']!=4) hide @endif" id="cooperation_other_form">
  64. <div class="pic"></div>
  65. <div class="tit font14">合作意向<span class="font_red_light">*</span></div>
  66. <div class="describe font13">
  67. <input type="text" name="cooperation_other" placeholder="请输入合作意向" class="font13 type_1_form" value="{{ $info['cooperation_other'] or '' }}">
  68. </div>
  69. <div class="arrow"></div>
  70. <div class="clear"></div>
  71. </div>
  72. <div class="list_height plist-txt notarrow">
  73. <div class="pic"></div>
  74. <div class="tit font14">研究领域<span class="font_red_light">*</span></div>
  75. <div class="describe font13">
  76. <input type="text" name="cooperation_research_field" required placeholder="请输入研究领域" class="font13 type_1_form" value="{{ $info['cooperation_research_field'] or '' }}">
  77. </div>
  78. <div class="arrow"></div>
  79. <div class="clear"></div>
  80. </div>
  81. <div class="list_height plist-txt">
  82. <div class="pic"></div>
  83. <div class="tit font14">拟提供的待遇<span class="font_red_light">*</span></div>
  84. <a href="#cooperation_treatment" class="describe font13 cooperation_treatmentText">{{ $info['cooperation_treatment'] or '请输入拟提供的待遇' }}</a>
  85. <div class="arrow"></div>
  86. <div class="clear"></div>
  87. </div>
  88. <script type="text/html" id="tpl-cooperation_treatment">
  89. <div class="headernavfixed">
  90. <div class="headernav font18"><div class="title">拟提供的待遇<div class="return js-back"></div></div></div>
  91. </div>
  92. <div class="split-block"></div>
  93. <div class="com-introduce">
  94. <textarea placeholder="请输入拟提供的待遇" maxlength="2000" id="tpl_cooperation_treatment"></textarea>
  95. </div>
  96. <div class="com-introduce-tip">
  97. <div class="text-num">最多可输入2000字</div>
  98. <div class="J_empty text-clear cooperation_treatment_clear">清空</div>
  99. <div class="clear"></div>
  100. </div>
  101. <div class="split-block"></div>
  102. <div class="btn-spacing">
  103. <div id="cooperation_treatmentBtn" class="qs-btn qs-btn-blue font18" title="确定">确定</div>
  104. </div>
  105. </script>
  106. </div>
  107. <div class="type_2 hide_type">
  108. <div class="list_height plist-txt">
  109. <div class="pic"></div>
  110. <div class="tit font14">人才层级<span class="font_red_light">*</span></div>
  111. <div class="describe font13">
  112. <span class="for-select"></span>
  113. <select id="manager_level" name="manager_level" class="type_2_form">
  114. @foreach($manager_level as $k => $v)
  115. <option value="{{$k}}" @if(!empty($info['manager_level'])) @if($info['manager_level']==$k) selected @endif @endif>{{$v}}</option>
  116. @endforeach
  117. </select>
  118. </div>
  119. <div class="arrow"></div>
  120. <div class="clear"></div>
  121. </div>
  122. <div class="list_height plist-txt">
  123. <div class="pic"></div>
  124. <div class="tit font14">资质要求<span class="font_red_light">*</span></div>
  125. <div class="describe font13">
  126. <span class="for-select"></span>
  127. <select id="manager_qualification" name="manager_qualification" class="type_2_form other" data-index="3" data-id="manager_qualification_other_form">
  128. @foreach($manager_qualification as $k => $v)
  129. <option value="{{$k}}" @if(!empty($info['manager_qualification'])) @if($info['manager_qualification']==$k) selected @endif @endif>{{$v}}</option>
  130. @endforeach
  131. </select>
  132. </div>
  133. <div class="arrow"></div>
  134. <div class="clear"></div>
  135. </div>
  136. <div class="list_height plist-txt notarrow @if(empty($info['manager_qualification']) || $info['manager_qualification']!=3) hide @endif" id="manager_qualification_other_form">
  137. <div class="pic"></div>
  138. <div class="tit font14">资质要求<span class="font_red_light">*</span></div>
  139. <div class="describe font13">
  140. <input type="text" name="manager_qualification_other" required placeholder="请输入资质要求" class="font13 type_2_form" value="{{ $info['manager_qualification_other'] or '' }}">
  141. </div>
  142. <div class="arrow"></div>
  143. <div class="clear"></div>
  144. </div>
  145. <div class="list_height plist-txt">
  146. <div class="pic"></div>
  147. <div class="tit font14">学历要求<span class="font_red_light">*</span></div>
  148. <div class="describe font13">
  149. <span class="for-select"></span>
  150. <select id="manager_education" name="manager_education" class="type_2_form other" data-index="4" data-id="manager_education_other_form">
  151. @foreach($manager_education as $k => $v)
  152. <option value="{{$k}}" @if(!empty($info['manager_education'])) @if($info['manager_education']==$k) selected @endif @endif>{{$v}}</option>
  153. @endforeach
  154. </select>
  155. </div>
  156. <div class="arrow"></div>
  157. <div class="clear"></div>
  158. </div>
  159. <div class="list_height plist-txt notarrow @if(empty($info['manager_education']) || $info['manager_education']!=4) hide @endif" id="manager_education_other_form">
  160. <div class="pic"></div>
  161. <div class="tit font14">学历要求<span class="font_red_light">*</span></div>
  162. <div class="describe font13">
  163. <input type="text" name="manager_education_other" required placeholder="请输入学历要求" class="font13 type_2_form" value="{{ $info['manager_education_other'] or '' }}">
  164. </div>
  165. <div class="arrow"></div>
  166. <div class="clear"></div>
  167. </div>
  168. <div class="list_height plist-txt notarrow">
  169. <div class="pic"></div>
  170. <div class="tit font14">拟提供岗位<span class="font_red_light">*</span></div>
  171. <div class="describe font13">
  172. <input type="text" name="manager_job" required placeholder="请输入拟提供岗位" class="font13 type_2_form" value="{{ $info['manager_job'] or '' }}">
  173. </div>
  174. <div class="arrow"></div>
  175. <div class="clear"></div>
  176. </div>
  177. <div class="list_height plist-txt notarrow">
  178. <div class="pic"></div>
  179. <div class="tit font14">拟提供年薪<span class="font_red_light">*</span></div>
  180. <div class="describe font13">
  181. <input type="text" name="manager_salary" required placeholder="请输入拟提供年薪" class="font13 type_2_form" value="{{ $info['manager_salary'] or '' }}">
  182. </div>
  183. <div class="arrow"></div>
  184. <div class="clear"></div>
  185. </div>
  186. </div>
  187. <div class="type_3 hide_type">
  188. <div class="list_height plist-txt">
  189. <div class="pic"></div>
  190. <div class="tit font14">人才层级<span class="font_red_light">*</span></div>
  191. <div class="describe font13">
  192. <span class="for-select"></span>
  193. <select id="technology_level" name="technology_level" class="type_3_form">
  194. @foreach($technology_level as $k => $v)
  195. <option value="{{$k}}" @if(!empty($info['technology_level'])) @if($info['technology_level']==$k) selected @endif @endif>{{$v}}</option>
  196. @endforeach
  197. </select>
  198. </div>
  199. <div class="arrow"></div>
  200. <div class="clear"></div>
  201. </div>
  202. <div class="list_height plist-txt notarrow">
  203. <div class="pic"></div>
  204. <div class="tit font14">需求专业<span class="font_red_light">*</span></div>
  205. <div class="describe font13">
  206. <input type="text" name="technology_major" required placeholder="请输入需求专业" class="font13 type_3_form" value="{{ $info['technology_major'] or '' }}">
  207. </div>
  208. <div class="arrow"></div>
  209. <div class="clear"></div>
  210. </div>
  211. <div class="list_height plist-txt">
  212. <div class="pic"></div>
  213. <div class="tit font14">学历要求<span class="font_red_light">*</span></div>
  214. <div class="describe font13">
  215. <span class="for-select"></span>
  216. <select id="technology_education" name="technology_education" class="type_3_form other" data-index="4" data-id="technology_education_other_form">
  217. @foreach($technology_education as $k => $v)
  218. <option value="{{$k}}" @if(!empty($info['technology_education'])) @if($info['technology_education']==$k) selected @endif @endif>{{$v}}</option>
  219. @endforeach
  220. </select>
  221. </div>
  222. <div class="arrow"></div>
  223. <div class="clear"></div>
  224. </div>
  225. <div class="list_height plist-txt notarrow @if(empty($info['technology_education']) || $info['technology_education']!=4) hide @endif" id="technology_education_other_form">
  226. <div class="pic"></div>
  227. <div class="tit font14">学历要求<span class="font_red_light">*</span></div>
  228. <div class="describe font13">
  229. <input type="text" name="technology_education_other" required placeholder="请输入学历要求" class="font13 type_3_form" value="{{ $info['technology_education_other'] or '' }}">
  230. </div>
  231. <div class="arrow"></div>
  232. <div class="clear"></div>
  233. </div>
  234. <div class="list_height plist-txt notarrow">
  235. <div class="pic"></div>
  236. <div class="tit font14">拟提供岗位<span class="font_red_light">*</span></div>
  237. <div class="describe font13">
  238. <input type="text" name="technology_job" required placeholder="请输入拟提供岗位" class="font13 type_3_form" value="{{ $info['technology_job'] or '' }}">
  239. </div>
  240. <div class="arrow"></div>
  241. <div class="clear"></div>
  242. </div>
  243. <div class="list_height plist-txt notarrow">
  244. <div class="pic"></div>
  245. <div class="tit font14">拟提供年薪<span class="font_red_light">*</span></div>
  246. <div class="describe font13">
  247. <input type="text" name="technology_salary" required placeholder="请输入拟提供年薪" class="font13 type_3_form" value="{{ $info['technology_salary'] or '' }}">
  248. </div>
  249. <div class="arrow"></div>
  250. <div class="clear"></div>
  251. </div>
  252. </div>
  253. <div class="type_4 hide_type">
  254. <div class="list_height plist-txt">
  255. <div class="pic"></div>
  256. <div class="tit font14">人才层级<span class="font_red_light">*</span></div>
  257. <div class="describe font13">
  258. <span class="for-select"></span>
  259. <select id="skill_level" name="skill_level" class="type_4_form">
  260. @foreach($skill_level as $k => $v)
  261. <option value="{{$k}}" @if(!empty($info['skill_level'])) @if($info['skill_level']==$k) selected @endif @endif>{{$v}}</option>
  262. @endforeach
  263. </select>
  264. </div>
  265. <div class="arrow"></div>
  266. <div class="clear"></div>
  267. </div>
  268. <div class="list_height plist-txt notarrow">
  269. <div class="pic"></div>
  270. <div class="tit font14">专业领域<span class="font_red_light">*</span></div>
  271. <div class="describe font13">
  272. <input type="text" name="skill_major" required placeholder="请输入专业领域" class="font13 type_4_form" value="{{ $info['skill_major'] or '' }}">
  273. </div>
  274. <div class="arrow"></div>
  275. <div class="clear"></div>
  276. </div>
  277. <div class="list_height plist-txt notarrow">
  278. <div class="pic"></div>
  279. <div class="tit font14">拟提供岗位<span class="font_red_light">*</span></div>
  280. <div class="describe font13">
  281. <input type="text" name="skill_job" required placeholder="请输入拟提供岗位" class="font13 type_4_form" value="{{ $info['skill_job'] or '' }}">
  282. </div>
  283. <div class="arrow"></div>
  284. <div class="clear"></div>
  285. </div>
  286. <div class="list_height plist-txt notarrow">
  287. <div class="pic"></div>
  288. <div class="tit font14">拟提供年薪<span class="font_red_light">*</span></div>
  289. <div class="describe font13">
  290. <input type="text" name="skill_salary" required placeholder="请输入拟提供年薪" class="font13 type_4_form" value="{{ $info['skill_salary'] or '' }}">
  291. </div>
  292. <div class="arrow"></div>
  293. <div class="clear"></div>
  294. </div>
  295. </div>
  296. <div class="type_5 hide_type">
  297. <div class="list_height plist-txt notarrow">
  298. <div class="pic"></div>
  299. <div class="tit font14">人才类型<span class="font_red_light">*</span></div>
  300. <div class="describe font13">
  301. <input type="text" name="other_name" required placeholder="请输入人才类型" class="font13 type_5_form" value="{{ $info['other_name'] or '' }}">
  302. </div>
  303. <div class="arrow"></div>
  304. <div class="clear"></div>
  305. </div>
  306. <div class="list_height plist-txt notarrow">
  307. <div class="pic"></div>
  308. <div class="tit font14">拟提供年薪<span class="font_red_light">*</span></div>
  309. <div class="describe font13">
  310. <input type="text" name="other_salary" required placeholder="请输入拟提供年薪" class="font13 type_5_form" value="{{ $info['other_salary'] or '' }}">
  311. </div>
  312. <div class="arrow"></div>
  313. <div class="clear"></div>
  314. </div>
  315. <div class="list_height plist-txt">
  316. <div class="pic"></div>
  317. <div class="tit font14">拟提供的待遇<span class="font_red_light">*</span></div>
  318. <a href="#other_treatment" class="describe font13 other_treatmentText">{{ $info['other_treatment'] or '请输入拟提供的待遇' }}</a>
  319. <div class="arrow"></div>
  320. <div class="clear"></div>
  321. </div>
  322. <script type="text/html" id="tpl-other_treatment">
  323. <div class="headernavfixed">
  324. <div class="headernav font18"><div class="title">拟提供的待遇<div class="return js-back"></div></div></div>
  325. </div>
  326. <div class="split-block"></div>
  327. <div class="com-introduce">
  328. <textarea placeholder="请输入拟提供的待遇" maxlength="2000" id="tpl_other_treatment"></textarea>
  329. </div>
  330. <div class="com-introduce-tip">
  331. <div class="text-num">最多可输入2000字</div>
  332. <div class="J_empty text-clear other_treatment_clear">清空</div>
  333. <div class="clear"></div>
  334. </div>
  335. <div class="split-block"></div>
  336. <div class="btn-spacing">
  337. <div id="other_treatmentBtn" class="qs-btn qs-btn-blue font18" title="确定">确定</div>
  338. </div>
  339. </script>
  340. </div>
  341. <div class="split-block"></div>
  342. <div class="btn-spacing">
  343. <a href="javascript:void(0)" style="width:100%;" class="submit qs-btn qs-btn-blue font18">保存</a>
  344. </div>
  345. <div class="split-block"></div>
  346. <div class="btn-spacing">
  347. <input type="hidden" id="cooperation_treatment" name="cooperation_treatment" class="type_1_form" value="{{$info['cooperation_treatment'] or ''}}">
  348. <input type="hidden" id="other_treatment" name="other_treatment" class="type_5_form" value="{{$info['other_treatment'] or ''}}">
  349. </div>
  350. </form>
  351. @endsection
  352. @section('script')
  353. <script src="{{ theme_asset('mobile/js/popWin.js') }}"></script>
  354. <script src="{{ theme_asset('mobile/js/mobileBUGFix.mini.js') }}"></script>
  355. <script src="{{ theme_asset('mobile/js/nprogress.js') }}"></script>
  356. <script type="text/javascript">
  357. let type = "{{$info['type']}}";
  358. $('.type_'+type).show();
  359. $('#type').on('change',function(){
  360. $('.hide_type').hide();
  361. type = $(this).val();
  362. $('.type_'+type).show();
  363. });
  364. $('.other').on('change',function(){
  365. let index = $(this).data('index');
  366. let id = $(this).data('id');
  367. let value = $(this).val();
  368. if (index == value) {
  369. $('#'+id).show();
  370. } else {
  371. $('#'+id).hide();
  372. }
  373. });
  374. var cooperation_treatmentTemp = $('#tpl-cooperation_treatment').html();
  375. $(".cooperation_treatmentText").on('click', function() {
  376. popWin.init({
  377. from:"right",
  378. html:cooperation_treatmentTemp,
  379. handle:function(a){
  380. if ($('#cooperation_treatment').val().length) {
  381. $('#tpl_cooperation_treatment').val($('#cooperation_treatment').val());
  382. }
  383. $('.cooperation_treatment_clear').on('click',function(){
  384. $('#tpl_cooperation_treatment').val('');
  385. });
  386. $('#cooperation_treatmentBtn').on('click',function(){
  387. if ($.trim($('#tpl_cooperation_treatment').val()) == "") {
  388. qsToast({type:2,context: '请输入拟提供的待遇'});
  389. return false;
  390. }
  391. if ($.trim($('#tpl_cooperation_treatment').val().length) > 2000) {
  392. qsToast({type:2,context: '拟提供的待遇请勿大于2000字符'});
  393. return false;
  394. }
  395. $('#cooperation_treatment').val($('#tpl_cooperation_treatment').val());
  396. $('.cooperation_treatmentText').html($('#tpl_cooperation_treatment').val());
  397. a.close();
  398. });
  399. }
  400. })
  401. });
  402. var other_treatmentTemp = $('#tpl-other_treatment').html();
  403. $(".other_treatmentText").on('click', function() {
  404. popWin.init({
  405. from:"right",
  406. html:other_treatmentTemp,
  407. handle:function(a){
  408. if ($('#other_treatment').val().length) {
  409. $('#tpl_other_treatment').val($('#other_treatment').val());
  410. }
  411. $('.other_treatment_clear').on('click',function(){
  412. $('#tpl_other_treatment').val('');
  413. });
  414. $('#other_treatmentBtn').on('click',function(){
  415. if ($.trim($('#tpl_other_treatment').val()) == "") {
  416. qsToast({type:2,context: '请输入拟提供的待遇'});
  417. return false;
  418. }
  419. if ($.trim($('#tpl_other_treatment').val().length) > 2000) {
  420. qsToast({type:2,context: '拟提供的待遇请勿大于2000字符'});
  421. return false;
  422. }
  423. $('#other_treatment').val($('#tpl_other_treatment').val());
  424. $('.other_treatmentText').html($('#tpl_other_treatment').val());
  425. a.close();
  426. });
  427. }
  428. })
  429. });
  430. // 验证表单并提交
  431. $('.submit').click(function() {
  432. let data = {};
  433. data.job = $('#id').val();
  434. data.job = $('#job').val();
  435. data.type = type;
  436. data.people = $('#people').val();
  437. if (!data.job) {
  438. qsToast({type:2,context: '请输入岗位名称!'});
  439. return false;
  440. }
  441. if (!data.people) {
  442. qsToast({type:2,context: '请输入招聘人数!'});
  443. return false;
  444. }
  445. $('.type_'+type+'_form').each(function(k,v){
  446. data[$(v).attr('name')] = $(v).val();
  447. });
  448. console.log(data);
  449. switch (type) {
  450. case '1':
  451. if (data.cooperation == 4 && !data.cooperation_other) {
  452. qsToast({type:2,context: '请输入合作意向!'});
  453. return false;
  454. }
  455. if (!data.cooperation_research_field) {
  456. qsToast({type:2,context: '请输入研究领域!'});
  457. return false;
  458. }
  459. if (!data.cooperation_treatment) {
  460. qsToast({type:2,context: '请输入拟提供的待遇!'});
  461. return false;
  462. }
  463. break;
  464. case '2':
  465. if (data.manager_qualification == 3 && !data.manager_qualification_other) {
  466. qsToast({type:2,context: '请输入资质要求!'});
  467. return false;
  468. }
  469. if (data.manager_education == 4 && !data.manager_education_other) {
  470. qsToast({type:2,context: '请输入学历要求!'});
  471. return false;
  472. }
  473. if (!data.manager_job) {
  474. qsToast({type:2,context: '请输入拟提供岗位!'});
  475. return false;
  476. }
  477. if (!data.manager_salary) {
  478. qsToast({type:2,context: '请输入拟提供年薪!'});
  479. return false;
  480. }
  481. break;
  482. case '3':
  483. if (!data.technology_major) {
  484. qsToast({type:2,context: '请输入需求专业!'});
  485. return false;
  486. }
  487. if (data.technology_education == 4 && !data.technology_education_other) {
  488. qsToast({type:2,context: '请输入学历要求!'});
  489. return false;
  490. }
  491. if (!data.technology_job) {
  492. qsToast({type:2,context: '请输入拟提供岗位!'});
  493. return false;
  494. }
  495. if (!data.technology_salary) {
  496. qsToast({type:2,context: '请输入拟提供年薪!'});
  497. return false;
  498. }
  499. break;
  500. case '4':
  501. if (!data.skill_major) {
  502. qsToast({type:2,context: '请输入专业领域!'});
  503. return false;
  504. }
  505. if (!data.skill_job) {
  506. qsToast({type:2,context: '请输入拟提供岗位!'});
  507. return false;
  508. }
  509. if (!data.skill_salary) {
  510. qsToast({type:2,context: '请输入拟提供年薪!'});
  511. return false;
  512. }
  513. break;
  514. case '5':
  515. if (!data.other_name) {
  516. qsToast({type:2,context: '请输入人才类型!'});
  517. return false;
  518. }
  519. if (!data.other_salary) {
  520. qsToast({type:2,context: '请输入拟提供年薪!'});
  521. return false;
  522. }
  523. if (!data.other_treatment) {
  524. qsToast({type:2,context: '请输入拟提供的待遇!'});
  525. return false;
  526. }
  527. break;
  528. default:
  529. qsToast({type:2,context: '人才类型选择有误!'});
  530. return false;
  531. }
  532. $.ajax({
  533. headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
  534. url: "{{ url('mobile/company/talent/need_info_save') }}",
  535. type: 'POST',
  536. dataType: 'json',
  537. data: data,
  538. success : function(result){
  539. qsToast({type:1,context:'保存成功!'});
  540. setTimeout(function () {
  541. location.href = "{{url('mobile/company/talent/need_list')}}";
  542. },2000);
  543. },
  544. error: function (errorData) {
  545. if (errorData.status==422) {//验证错误
  546. $.each(JSON.parse(errorData.response).errors,function (key,val) {
  547. qsToast({type:2,context: val[0]});
  548. return false;
  549. });
  550. }
  551. else if(errorData.status==400) {//业务错误
  552. qsToast({type:2,context: JSON.parse(errorData.response).message});
  553. return false;
  554. }
  555. }
  556. })
  557. return false;
  558. });
  559. </script>
  560. @endsection