123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580 |
- @extends('mobile.module.layouts.content')
- @push('meta')
- <meta name="csrf-token" content="{{ csrf_token() }}">
- @endpush
- @push('css')
- <link rel="stylesheet" href="{{theme_asset('mobile/css/company.css')}}">
- <link href="{{ theme_asset('mobile/css/nprogress.css') }}" rel="stylesheet">
- <style>
- .hide,.hide_type {display:none;}
- </style>
- @endpush
- @section('content')
- <form action="" id="form">
- <input type="hidden" name="id" id="id" value="{{$info['id'] or ''}}">
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">岗位名称<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="job" id="job" required placeholder="请输入岗位名称" class="font13" value="{{ $info['job'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">类型<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <span class="for-select"></span>
- <select id="type" name="type">
- @foreach($type as $k => $v)
- <option value="{{$k}}" @if($info['type']==$k) selected @endif>{{$v}}</option>
- @endforeach
- </select>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">招聘人数<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="number" id="people" name="people" required placeholder="请输入招聘人数" class="font13" value="{{ $info['people'] or 1 }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="split-block"></div>
- <div class="type_1 hide_type">
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">合作意向<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <span class="for-select"></span>
- <select id="cooperation" name="cooperation" class="type_1_form other" data-index="4" data-id="cooperation_other_form">
- @foreach($cooperation as $k => $v)
- <option value="{{$k}}" @if(!empty($info['cooperation'])) @if($info['cooperation']==$k) selected @endif @endif>{{$v}}</option>
- @endforeach
- </select>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow @if(empty($info['cooperation']) || $info['cooperation']!=4) hide @endif" id="cooperation_other_form">
- <div class="pic"></div>
- <div class="tit font14">合作意向<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="cooperation_other" placeholder="请输入合作意向" class="font13 type_1_form" value="{{ $info['cooperation_other'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">研究领域<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="cooperation_research_field" required placeholder="请输入研究领域" class="font13 type_1_form" value="{{ $info['cooperation_research_field'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">拟提供的待遇<span class="font_red_light">*</span></div>
- <a href="#cooperation_treatment" class="describe font13 cooperation_treatmentText">{{ $info['cooperation_treatment'] or '请输入拟提供的待遇' }}</a>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <script type="text/html" id="tpl-cooperation_treatment">
- <div class="headernavfixed">
- <div class="headernav font18"><div class="title">拟提供的待遇<div class="return js-back"></div></div></div>
- </div>
- <div class="split-block"></div>
- <div class="com-introduce">
- <textarea placeholder="请输入拟提供的待遇" maxlength="2000" id="tpl_cooperation_treatment"></textarea>
- </div>
- <div class="com-introduce-tip">
- <div class="text-num">最多可输入2000字</div>
- <div class="J_empty text-clear cooperation_treatment_clear">清空</div>
- <div class="clear"></div>
- </div>
- <div class="split-block"></div>
- <div class="btn-spacing">
- <div id="cooperation_treatmentBtn" class="qs-btn qs-btn-blue font18" title="确定">确定</div>
- </div>
- </script>
- </div>
- <div class="type_2 hide_type">
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">人才层级<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <span class="for-select"></span>
- <select id="manager_level" name="manager_level" class="type_2_form">
- @foreach($manager_level as $k => $v)
- <option value="{{$k}}" @if(!empty($info['manager_level'])) @if($info['manager_level']==$k) selected @endif @endif>{{$v}}</option>
- @endforeach
- </select>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">资质要求<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <span class="for-select"></span>
- <select id="manager_qualification" name="manager_qualification" class="type_2_form other" data-index="3" data-id="manager_qualification_other_form">
- @foreach($manager_qualification as $k => $v)
- <option value="{{$k}}" @if(!empty($info['manager_qualification'])) @if($info['manager_qualification']==$k) selected @endif @endif>{{$v}}</option>
- @endforeach
- </select>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow @if(empty($info['manager_qualification']) || $info['manager_qualification']!=3) hide @endif" id="manager_qualification_other_form">
- <div class="pic"></div>
- <div class="tit font14">资质要求<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="manager_qualification_other" required placeholder="请输入资质要求" class="font13 type_2_form" value="{{ $info['manager_qualification_other'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">学历要求<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <span class="for-select"></span>
- <select id="manager_education" name="manager_education" class="type_2_form other" data-index="4" data-id="manager_education_other_form">
- @foreach($manager_education as $k => $v)
- <option value="{{$k}}" @if(!empty($info['manager_education'])) @if($info['manager_education']==$k) selected @endif @endif>{{$v}}</option>
- @endforeach
- </select>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow @if(empty($info['manager_education']) || $info['manager_education']!=4) hide @endif" id="manager_education_other_form">
- <div class="pic"></div>
- <div class="tit font14">学历要求<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="manager_education_other" required placeholder="请输入学历要求" class="font13 type_2_form" value="{{ $info['manager_education_other'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">拟提供岗位<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="manager_job" required placeholder="请输入拟提供岗位" class="font13 type_2_form" value="{{ $info['manager_job'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">拟提供年薪<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="manager_salary" required placeholder="请输入拟提供年薪" class="font13 type_2_form" value="{{ $info['manager_salary'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- </div>
- <div class="type_3 hide_type">
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">人才层级<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <span class="for-select"></span>
- <select id="technology_level" name="technology_level" class="type_3_form">
- @foreach($technology_level as $k => $v)
- <option value="{{$k}}" @if(!empty($info['technology_level'])) @if($info['technology_level']==$k) selected @endif @endif>{{$v}}</option>
- @endforeach
- </select>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">需求专业<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="technology_major" required placeholder="请输入需求专业" class="font13 type_3_form" value="{{ $info['technology_major'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">学历要求<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <span class="for-select"></span>
- <select id="technology_education" name="technology_education" class="type_3_form other" data-index="4" data-id="technology_education_other_form">
- @foreach($technology_education as $k => $v)
- <option value="{{$k}}" @if(!empty($info['technology_education'])) @if($info['technology_education']==$k) selected @endif @endif>{{$v}}</option>
- @endforeach
- </select>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow @if(empty($info['technology_education']) || $info['technology_education']!=4) hide @endif" id="technology_education_other_form">
- <div class="pic"></div>
- <div class="tit font14">学历要求<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="technology_education_other" required placeholder="请输入学历要求" class="font13 type_3_form" value="{{ $info['technology_education_other'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">拟提供岗位<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="technology_job" required placeholder="请输入拟提供岗位" class="font13 type_3_form" value="{{ $info['technology_job'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">拟提供年薪<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="technology_salary" required placeholder="请输入拟提供年薪" class="font13 type_3_form" value="{{ $info['technology_salary'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- </div>
- <div class="type_4 hide_type">
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">人才层级<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <span class="for-select"></span>
- <select id="skill_level" name="skill_level" class="type_4_form">
- @foreach($skill_level as $k => $v)
- <option value="{{$k}}" @if(!empty($info['skill_level'])) @if($info['skill_level']==$k) selected @endif @endif>{{$v}}</option>
- @endforeach
- </select>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">专业领域<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="skill_major" required placeholder="请输入专业领域" class="font13 type_4_form" value="{{ $info['skill_major'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">拟提供岗位<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="skill_job" required placeholder="请输入拟提供岗位" class="font13 type_4_form" value="{{ $info['skill_job'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">拟提供年薪<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="skill_salary" required placeholder="请输入拟提供年薪" class="font13 type_4_form" value="{{ $info['skill_salary'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- </div>
- <div class="type_5 hide_type">
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">人才类型<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="other_name" required placeholder="请输入人才类型" class="font13 type_5_form" value="{{ $info['other_name'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">拟提供年薪<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" name="other_salary" required placeholder="请输入拟提供年薪" class="font13 type_5_form" value="{{ $info['other_salary'] or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">拟提供的待遇<span class="font_red_light">*</span></div>
- <a href="#other_treatment" class="describe font13 other_treatmentText">{{ $info['other_treatment'] or '请输入拟提供的待遇' }}</a>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <script type="text/html" id="tpl-other_treatment">
- <div class="headernavfixed">
- <div class="headernav font18"><div class="title">拟提供的待遇<div class="return js-back"></div></div></div>
- </div>
- <div class="split-block"></div>
- <div class="com-introduce">
- <textarea placeholder="请输入拟提供的待遇" maxlength="2000" id="tpl_other_treatment"></textarea>
- </div>
- <div class="com-introduce-tip">
- <div class="text-num">最多可输入2000字</div>
- <div class="J_empty text-clear other_treatment_clear">清空</div>
- <div class="clear"></div>
- </div>
- <div class="split-block"></div>
- <div class="btn-spacing">
- <div id="other_treatmentBtn" class="qs-btn qs-btn-blue font18" title="确定">确定</div>
- </div>
- </script>
- </div>
- <div class="split-block"></div>
- <div class="btn-spacing">
- <a href="javascript:void(0)" style="width:100%;" class="submit qs-btn qs-btn-blue font18">保存</a>
- </div>
- <div class="split-block"></div>
- <div class="btn-spacing">
- <input type="hidden" id="cooperation_treatment" name="cooperation_treatment" class="type_1_form" value="{{$info['cooperation_treatment'] or ''}}">
- <input type="hidden" id="other_treatment" name="other_treatment" class="type_5_form" value="{{$info['other_treatment'] or ''}}">
- </div>
- </form>
- @endsection
- @section('script')
- <script src="{{ theme_asset('mobile/js/popWin.js') }}"></script>
- <script src="{{ theme_asset('mobile/js/mobileBUGFix.mini.js') }}"></script>
- <script src="{{ theme_asset('mobile/js/nprogress.js') }}"></script>
- <script type="text/javascript">
- let type = "{{$info['type']}}";
- $('.type_'+type).show();
- $('#type').on('change',function(){
- $('.hide_type').hide();
- type = $(this).val();
- $('.type_'+type).show();
- });
- $('.other').on('change',function(){
- let index = $(this).data('index');
- let id = $(this).data('id');
- let value = $(this).val();
- if (index == value) {
- $('#'+id).show();
- } else {
- $('#'+id).hide();
- }
- });
- var cooperation_treatmentTemp = $('#tpl-cooperation_treatment').html();
- $(".cooperation_treatmentText").on('click', function() {
- popWin.init({
- from:"right",
- html:cooperation_treatmentTemp,
- handle:function(a){
- if ($('#cooperation_treatment').val().length) {
- $('#tpl_cooperation_treatment').val($('#cooperation_treatment').val());
- }
- $('.cooperation_treatment_clear').on('click',function(){
- $('#tpl_cooperation_treatment').val('');
- });
- $('#cooperation_treatmentBtn').on('click',function(){
- if ($.trim($('#tpl_cooperation_treatment').val()) == "") {
- qsToast({type:2,context: '请输入拟提供的待遇'});
- return false;
- }
- if ($.trim($('#tpl_cooperation_treatment').val().length) > 2000) {
- qsToast({type:2,context: '拟提供的待遇请勿大于2000字符'});
- return false;
- }
- $('#cooperation_treatment').val($('#tpl_cooperation_treatment').val());
- $('.cooperation_treatmentText').html($('#tpl_cooperation_treatment').val());
- a.close();
- });
- }
- })
- });
- var other_treatmentTemp = $('#tpl-other_treatment').html();
- $(".other_treatmentText").on('click', function() {
- popWin.init({
- from:"right",
- html:other_treatmentTemp,
- handle:function(a){
- if ($('#other_treatment').val().length) {
- $('#tpl_other_treatment').val($('#other_treatment').val());
- }
- $('.other_treatment_clear').on('click',function(){
- $('#tpl_other_treatment').val('');
- });
- $('#other_treatmentBtn').on('click',function(){
- if ($.trim($('#tpl_other_treatment').val()) == "") {
- qsToast({type:2,context: '请输入拟提供的待遇'});
- return false;
- }
- if ($.trim($('#tpl_other_treatment').val().length) > 2000) {
- qsToast({type:2,context: '拟提供的待遇请勿大于2000字符'});
- return false;
- }
- $('#other_treatment').val($('#tpl_other_treatment').val());
- $('.other_treatmentText').html($('#tpl_other_treatment').val());
- a.close();
- });
- }
- })
- });
- // 验证表单并提交
- $('.submit').click(function() {
- let data = {};
- data.job = $('#id').val();
- data.job = $('#job').val();
- data.type = type;
- data.people = $('#people').val();
- if (!data.job) {
- qsToast({type:2,context: '请输入岗位名称!'});
- return false;
- }
- if (!data.people) {
- qsToast({type:2,context: '请输入招聘人数!'});
- return false;
- }
- $('.type_'+type+'_form').each(function(k,v){
- data[$(v).attr('name')] = $(v).val();
- });
- console.log(data);
- switch (type) {
- case '1':
- if (data.cooperation == 4 && !data.cooperation_other) {
- qsToast({type:2,context: '请输入合作意向!'});
- return false;
- }
- if (!data.cooperation_research_field) {
- qsToast({type:2,context: '请输入研究领域!'});
- return false;
- }
- if (!data.cooperation_treatment) {
- qsToast({type:2,context: '请输入拟提供的待遇!'});
- return false;
- }
- break;
- case '2':
- if (data.manager_qualification == 3 && !data.manager_qualification_other) {
- qsToast({type:2,context: '请输入资质要求!'});
- return false;
- }
- if (data.manager_education == 4 && !data.manager_education_other) {
- qsToast({type:2,context: '请输入学历要求!'});
- return false;
- }
- if (!data.manager_job) {
- qsToast({type:2,context: '请输入拟提供岗位!'});
- return false;
- }
- if (!data.manager_salary) {
- qsToast({type:2,context: '请输入拟提供年薪!'});
- return false;
- }
- break;
- case '3':
- if (!data.technology_major) {
- qsToast({type:2,context: '请输入需求专业!'});
- return false;
- }
- if (data.technology_education == 4 && !data.technology_education_other) {
- qsToast({type:2,context: '请输入学历要求!'});
- return false;
- }
- if (!data.technology_job) {
- qsToast({type:2,context: '请输入拟提供岗位!'});
- return false;
- }
- if (!data.technology_salary) {
- qsToast({type:2,context: '请输入拟提供年薪!'});
- return false;
- }
- break;
- case '4':
- if (!data.skill_major) {
- qsToast({type:2,context: '请输入专业领域!'});
- return false;
- }
- if (!data.skill_job) {
- qsToast({type:2,context: '请输入拟提供岗位!'});
- return false;
- }
- if (!data.skill_salary) {
- qsToast({type:2,context: '请输入拟提供年薪!'});
- return false;
- }
- break;
- case '5':
- if (!data.other_name) {
- qsToast({type:2,context: '请输入人才类型!'});
- return false;
- }
- if (!data.other_salary) {
- qsToast({type:2,context: '请输入拟提供年薪!'});
- return false;
- }
- if (!data.other_treatment) {
- qsToast({type:2,context: '请输入拟提供的待遇!'});
- return false;
- }
- break;
- default:
- qsToast({type:2,context: '人才类型选择有误!'});
- return false;
- }
- $.ajax({
- headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
- url: "{{ url('mobile/company/talent/need_info_save') }}",
- type: 'POST',
- dataType: 'json',
- data: data,
- success : function(result){
- qsToast({type:1,context:'保存成功!'});
- setTimeout(function () {
- location.href = "{{url('mobile/company/talent/need_list')}}";
- },2000);
- },
- error: function (errorData) {
- if (errorData.status==422) {//验证错误
- $.each(JSON.parse(errorData.response).errors,function (key,val) {
- qsToast({type:2,context: val[0]});
- return false;
- });
- }
- else if(errorData.status==400) {//业务错误
- qsToast({type:2,context: JSON.parse(errorData.response).message});
- return false;
- }
- }
- })
- return false;
- });
- </script>
- @endsection
|