123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- {!! $grid !!}
- <link rel="stylesheet" href="{{ theme_asset('app/css/viewer.min.css') }}">
- <script type="text/javascript" src="{{ theme_asset('app/js/viewer-jquery.min.js') }}"></script>
- <script>
- //报名审核必选
- $("input[name='flow_path[]']").eq(0).attr("disabled", true);
- $("input[name='flow_path[]']").eq(1).attr("disabled", true);
- var admin = null;
- var paper = null;
- var post = null;
- var id = {{$id}}
- $(function () {
- getAdmin();
- });
- function getAdmin() {
- if (id !== 0) {
- getPost()
- } else {
- getView()
- }
- }
- function getPost() {
- if (this.post === null) {
- $.ajax({
- url: "{{route('recruit.getRecruitPost')}}",
- data: {id: id,_token:'{{csrf_token()}}'},
- success: function ($data) {
- post = $data.post;
- editView()
- },
- });
- }
- }
- function getView() {
- var job_base = '<div style=" font-weight:700;padding-left:20px;border-bottom:1px #DFEDF7 solid;border-top:1px #DFEDF7 solid;background-color:#F0F8FD;height:30px;line-height:30px;margin-bottom:15px;"><span style="color:#f00">*<\/span>招考岗位<\/div>'
- job_base += '<div style="margin-left:20px;margin-bottom:15px;"><input type="button" id="add_post" onclick="addPost()" class="btn btn-warning" value="增行"><span> (注:岗位编号为一位或两位数字)<\/span><\/div>';
- job_base += '<div style="background:#F5F7F8;padding:20px;margin-left:20px; "><table id="post_table" border="0" cellpadding="15" cellspacing="3" >' +
- ' <tr >' +
- ' <th style="text-align: center;">岗位编号<\/th>' +
- ' <th style="text-align: center;">岗位名称<\/th>' +
- ' <th style="text-align: center;">招聘人数<\/th>' +
- ' <th style="text-align: center;">岗位限制条件(JSON格式)<\/th>' +
- ' <th style="text-align: center;"><\/th>' +
- ' <\/tr>' +
- '<tr>' +
- ' <td style="padding:8px 15px;"><input type="text" name="postcode[]" value="" class="form-control postcode" style="width:100px; " onkeyup="value=value.replace(/[^\\d.]/g,\'\')" ><\/td>' +
- ' <td style="padding:8px 15px;"><input type="text" name="postname[]" value="" class="form-control postname" style="width:400px;" maxlength="80" ><\/td>' +
- ' <td style="padding:8px 15px;"><input type="text" name="postnumber[]" value="1" class="form-control postname" style="width:100px;" maxlength="80" ><\/td>' +
- ' <td style="padding:8px 15px;"><input type="text" name="postlimit[]" value="" class="form-control limit" style="width:400px;" ><\/td>'
- ;
- job_base += ' <\/select>' +
- ' <\/td>' +
- ' <td>' +
- ' <\/td>' +
- ' <\/tr>' +
- ' <\/table><\/div>';
- $("form .box-body .fields-group").append(job_base);
- }
- function editView() {
- var job_base = '<div style=" font-weight:700;padding-left:20px;border-bottom:1px #DFEDF7 solid;border-top:1px #DFEDF7 solid;background-color:#F0F8FD;height:30px;line-height:30px;margin-bottom:15px;"><span style="color:#f00">*<\/span>招考岗位<\/div>'
- job_base += '<div style="margin-left:20px;margin-bottom:15px;"><input type="button" id="add_post" onclick="addPost()" class="btn btn-warning" value="增行"><span> (注:岗位编号为一位或两位数字)<\/span><\/div>';
- job_base += '<div style="background:#F5F7F8;padding:20px;margin-left:20px; "><table id="post_table" border="0" cellpadding="15" cellspacing="3" >' +
- ' <tr >' +
- ' <th style="text-align: center;">岗位编号<\/th>' +
- ' <th style="text-align: center;">岗位名称<\/th>' +
- ' <th style="text-align: center;">限制条件<\/th>' +
- ' <th style="text-align: center;"><\/th>' +
- ' <\/tr>';
- for (var c = 0; c < post.length; c++) {
- job_base += '<tr>' +
- ' <td style="padding:8px 15px;"><input type="text" name="postcode[]" value="' + post[c].code + '" class="form-control postcode" style="width:100px; " onkeyup="value=value.replace(/[^\\d.]/g,\'\')" ><\/td>' +
- ' <td style="padding:8px 15px;"><input type="text" name="postname[]" value="' + post[c].name + '" class="form-control postname" style="width:400px;" maxlength="80" ><\/td>' +
- ' <td style="padding:8px 15px;"><input type="text" name="postnumber[]" value="' + post[c].number + '" class="form-control postnumber" style="width:100px;" maxlength="80" ><\/td>' +
- ' <td style="padding:8px 15px;"><input type="text" id="post_' + post[c].id + '" name="postlimit[]" value="" class="form-control limit" style="width:400px;" ><\/td>'
- ;
- job_base += ' <\/select>' +
- ' <\/td>' +
- ' <td>' +
- ' <input type="button" onclick="deltr(this)"class="btn btn-danger" value="删除">' +
- ' <input type="hidden" class="btn btn-danger" name="postid_arr[]" value="' + post[c].id + '">' +
- ' <\/td>' +
- ' <\/tr>';
- }
- job_base += ' <\/table><\/div>';
- $("form .box-body .fields-group").append(job_base);
- for (var c = 0; c < post.length; c++) {
- $("#post_" + post[c].id).val(post[c].limit);
- }
- }
- function addPost() {
- var trtd = '<tr>' +
- ' <td style="padding:8px 15px;"><input type="text" name="postcode[]" value="" class="form-control postcode" style="width:100px; " onkeyup="value=value.replace(/[^\\d.]/g,\'\')" ><\/td>' +
- ' <td style="padding:8px 15px;"><input type="text" name="postname[]" value="" class="form-control postname" style="width:400px;" maxlength="80" ><\/td>' +
- ' <td style="padding:8px 15px;"><input type="text" name="postnumber[]" value="1" class="form-control postnumber" style="width:100px; " ><\/td>' +
- ' <td style="padding:8px 15px;"><input type="text" name="postlimit[]" value="" class="form-control limit" style="width:400px;" ><\/td>'
- ;
- trtd += ' <\/select>' +
- ' <\/td>' +
- ' <td><input type="button" onclick="deltr(this)"class="btn btn-danger" value="删除"><\/td>' +
- ' <\/tr>';
- var tables = $('#post_table');
- tables.append(trtd);
- }
- function deltr(obj) {
- $(obj).parent().parent().remove();
- }
- checkFlowPath();
- setInterval(function () {
- checkFlowPath();
- }, 250);
- //判断时间是否显示
- function checkFlowPath() {
- $('input[name="flow_path[]"]').each(function () {
- //笔试时间
- if ($(this).val() == 3) {
- if ($(this).is(":checked")) {
- $("input[name='preliminary_start']").parents(".form-group").css("display", "block");
- } else {
- $("input[name='preliminary_start']").parents(".form-group").css("display", "none");
- }
- }
- //上机时间
- if ($(this).val() == 4) {
- if ($(this).is(":checked")) {
- $("input[name='computer_start']").parents(".form-group").css("display", "block");
- } else {
- $("input[name='computer_start']").parents(".form-group").css("display", "none");
- }
- }
- //面试时间
- if ($(this).val() == 5) {
- if ($(this).is(":checked")) {
- $("input[name='interview_start']").parents(".form-group").css("display", "block");
- $("textarea[name='expand_id']").parents(".form-group").css("display", "block");
- } else {
- $("input[name='interview_start']").parents(".form-group").css("display", "none");
- $("textarea[name='expand_id']").parents(".form-group").css("display", "none");
- }
- }
- //复试时间
- if ($(this).val() == 6) {
- if ($(this).is(":checked")) {
- $("input[name='reexamine_start']").parents(".form-group").css("display", "block");
- } else {
- $("input[name='reexamine_start']").parents(".form-group").css("display", "none");
- }
- }
- //体检时间
- if ($(this).val() == 7) {
- if ($(this).is(":checked")) {
- $("input[name='health_start']").parents(".form-group").css("display", "block");
- } else {
- $("input[name='health_start']").parents(".form-group").css("display", "none");
- }
- }
- })
- }
- function getCookie(name) {
- var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
- if (arr = document.cookie.match(reg)) {
- return unescape(arr[2]);
- } else
- return null;
- }
- function setCookie(name, value) {
- var Days = 60000;
- var exp = new Date();
- exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
- document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
- }
- </script>
|