Files
orico-official-website-old/app/admin/view/job/edit.html
2024-10-29 14:04:59 +08:00

303 lines
17 KiB
HTML
Executable File

<!-- Select2 -->
<link rel="stylesheet" href="__PUBLIC__/adminlte/bower_components/select2/dist/css/select2.min.css">
<style>
.select2-container--default .select2-selection--single {
background-color: #fff;
border: 1px solid #d2d6de;
border-radius: 0;
}
.select2-container .select2-selection--single{height:34px;}
</style>
<!-- Select2 -->
<script src="__PUBLIC__/adminlte/bower_components/select2/dist/js/select2.full.min.js"></script>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
新增招聘信息
</h1>
<ol class="breadcrumb">
<li><a href="<?php echo url('/admin');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
<li><a href="<?php echo url('/admin/job/lists');?>"> 招聘列表</a></li>
<li class="active"> 招聘</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-10">
<form class="form-horizontal" action="<?php echo url('/admin/job/update');?>" method="post" name="productform">
<input type="hidden" name="id" value="<?php echo $job['id']; ?>">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#navfirst" data-toggle="tab"><i class="fa fa-edit text-green"></i> 基本信息</a></li>
<li><a href="#navsecond" data-toggle="tab">详细信息</a></li>
</ul>
<div class="tab-content">
<div class="active tab-pane" id="navfirst">
<div class="form-group">
<label for="department" class="col-sm-2 control-label">部门<em style="color:red;">*</em></label>
<div class="col-sm-5">
<input type="text" value="<?php echo $job['department']; ?>" class="form-control" name="department" id="department" required value="">
</div>
<div class="col-sm-5">
<span class="help-block">(部门)</span>
</div>
</div>
<div class="form-group">
<label for="job_name" class="col-sm-2 control-label">招聘岗位<em style="color:red;">*</em></label>
<div class="col-sm-5">
<input type="text" value="<?php echo $job['job_name']; ?>" class="form-control" name="job_name" id="job_name" required value="">
</div>
<div class="col-sm-5">
<span class="help-block">(岗位名称)</span>
</div>
</div>
<div class="form-group">
<label for="count" class="col-sm-2 control-label">招聘人数<em style="color:red;">*</em></label>
<div class="col-sm-5">
<input type="text" value="<?php echo $job['count']; ?>" class="form-control" name="count" id="count" required value="">
</div>
<div class="col-sm-5">
<span class="help-block">(招聘人数)</span>
</div>
</div>
<div class="form-group">
<label for="experience_requirement" class="col-sm-2 control-label">经验要求<em style="color:red;">*</em></label>
<div class="col-sm-5">
<input type="text" value="<?php echo $job['experience_requirement']; ?>" class="form-control" name="experience_requirement" id="experience_requirement">
</div>
<div class="col-sm-5">
<span class="help-block">(经验要求)</span>
</div>
</div>
<div class="form-group">
<label for="education" class="col-sm-2 control-label">学历要求<em style="color:red;">*</em></label>
<div class="col-sm-5">
<input type="text" value="<?php echo $job['education']; ?>" class="form-control" name="education" id="education">
</div>
<div class="col-sm-5">
<span class="help-block">(学历要求)</span>
</div>
</div>
<div class="form-group">
<label for="job_address" class="col-sm-2 control-label">工作地址<em style="color:red;">*</em></label>
<div class="col-sm-5">
<input type="text" value="<?php echo $job['job_address']; ?>" class="form-control" name="job_address" id="job_address">
</div>
<div class="col-sm-5">
<span class="help-block">(工作地址)</span>
</div>
</div>
<div class="form-group">
<label for="salary" class="col-sm-2 control-label">薪资待遇<em style="color:red;">*</em></label>
<div class="col-sm-5">
<input type="text" value="<?php echo $job['salary']; ?>" class="form-control" name="salary" id="salary">
</div>
<div class="col-sm-5">
<span class="help-block">(薪资待遇)</span>
</div>
</div>
<div class="form-group">
<label for="workfare" class="col-sm-2 control-label">福利<em style="color:red;">*</em></label>
<div class="col-sm-5">
<input type="text" value="<?php echo $job['workfare']; ?>" class="form-control" name="workfare" id="workfare">
</div>
<div class="col-sm-5">
<span class="help-block">(福利)</span>
</div>
</div>
<div class="form-group">
<label for="sort" class="col-sm-2 control-label">排序<em style="color:red;">*</em></label>
<div class="col-sm-2">
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $job['sort']; ?>">
</div>
<div class="col-sm-5 col-sm-offset-3">
<span class="help-block">(排序)</span>
</div>
</div>
<div class="form-group">
<label for="publish_time" class="col-sm-2 control-label">发布日期<em style="color:red;">*</em></label>
<div class="col-sm-5">
<div class="input-group">
<input type="text" class="form-control" name="publish_time" id="publish_time" value="<?php echo date('Y-m-d H:i:s', strtotime($job['publish_time'])); ?>" onclick="laydate_datetime('#publish_time')" readonly>
<span class="input-group-btn">
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#publish_time')">选择日期</button>
</span>
</div>
</div>
<div class="col-sm-5">
<span class="help-block">(发布日期)</span>
</div>
</div>
<div class="form-group">
<label for="end_time" class="col-sm-2 control-label">截止日期<em style="color:red;">*</em></label>
<div class="col-sm-5">
<div class="input-group">
<input type="text" class="form-control" name="end_time" id="end_time" value="<?php echo date('Y-m-d H:i:s', strtotime($job['end_time'])); ?>" onclick="laydate_datetime('#end_time')" readonly>
<span class="input-group-btn">
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#end_time')">选择日期</button>
</span>
</div>
</div>
<div class="col-sm-5">
<span class="help-block">(截止日期)</span>
</div>
</div>
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="navsecond">
<div class="form-group">
<div class="col-sm-12">
<div class="table-responsive">
<div class="box-header">
<h3 class="box-title">详情</h3>
<!-- tools box -->
<div class="form-group">
<label for="job_responsibility" class="col-sm-2 control-label">岗位职责<em style="color:red;">*</em></label>
<div class="col-sm-5">
<textarea class="form-control" id="job_responsibility" name="job_responsibility" rows="20"><?php echo $job['job_responsibility']; ?></textarea>
</div>
<div class="col-sm-5 col-sm-offset-2">
<span class="help-block">(岗位职责,每行一项)</span>
</div>
</div>
<div class="form-group">
<label for="job_requirement" class="col-sm-2 control-label">岗位要求<em style="color:red;">*</em></label>
<div class="col-sm-5">
<textarea class="form-control" id="job_requirement" name="job_requirement" rows="20"><?php echo $job['job_requirement']; ?></textarea>
</div>
<div class="col-sm-5 col-sm-offset-2">
<span class="help-block">(岗位要求,每行一项)</span>
</div>
</div>
<!-- /.tools -->
</div>
</div>
</div>
</div>
</div>
<!-- /.tab-pane -->
</div>
<!-- /.tab-content -->
<div class="nav-footer row">
<div class="col-sm-2 col-sm-offset-2">
<p><button id="reset-btn" type="button" class="btn btn-warning btn-block">重置</button></p>
</div>
<div class="col-sm-2">
<p><button id="submit-btn" type="submit" class="btn btn-danger btn-block">提交</button></p>
</div>
<!-- /. row -->
</div>
</div>
<!-- /.nav-tabs-custom -->
</form>
</div>
</div>
</section>
<!-- /.content -->
</div>
<style>
.table thead > tr > td, .table tbody > tr > td {
vertical-align: middle;
}
</style>
<!-- /.content-wrapper -->
<?php echo editor('#content');?>
<script type="text/javascript">
function parseInt_value(ele) {
elementObj = document.forms['productform'].elements[ele];
elementObj.value = parseInt(elementObj.value);
}
function mathRound_value(ele) {
elementObj = document.forms['productform'].elements[ele];
elementObj.value = Math.round(elementObj.value); //Math.floor() Math.ceil()
}
function toFixed_value(ele) {
elementObj = document.forms['productform'].elements[ele];
elementObj.value = elementObj.value.toFixed(2);
}
function addSpec(obj) {
var trObj = obj.parentNode.parentNode;
var idx = trObj.rowIndex;
var tableObj = document.getElementById('type_attr_table');
var row = tableObj.insertRow(idx + 1);
var cell1 = row.insertCell(-1);
var cell2 = row.insertCell(-1);
var cell3 = row.insertCell(-1);
cell1.innerHTML = trObj.childNodes[0].innerHTML;
cell2.innerHTML = trObj.childNodes[1].innerHTML.replace(/readOnly([^\s|>]*)/i, '');
cell3.innerHTML = trObj.childNodes[2].innerHTML.replace(/(.*)(addSpec)(.*)(fa-plus-circle)/i, "$1removeSpec$3fa-minus-circle");
}
function removeSpec(obj) {
var trObj = obj.parentNode.parentNode;
var idx = trObj.rowIndex;
var tableObj = document.getElementById('type_attr_table');
tableObj.deleteRow(idx);
}
</script>
<script type="text/javascript">
$(function() {
$("#reset-btn").click(function(e) {
if (confirm('确认重置所有表单项吗?')) {
this.form.reset();
}
});
$("form.form-horizontal").submit(function(e) {
var nameObj = document.getElementById('name');
if (isNull(nameObj.value)) {
alert('名称必须填写');
nameObj.focus();
return false;
}
var sortObj = document.getElementById('sort');
if (isNaN(sortObj.value)) {
alert('排序值必须是数字');
sortObj.focus();
return false;
}
var cidObj = document.getElementById('cid');
if (isNaN(cidObj.value) || !parseInt(cidObj.value)) {
alert('所属分类值无效');
cidObj.focus();
return false;
}
// var agree = $("input[name='agree']", this).prop('checked');
// if (agree) {
// alert("Submitted");
// e.preventDefault();
// } else {
// e.preventDefault();
// alert("Submit prevented"); // }
});
$("[data-cod='related']").click(function(event) {
var param = {};
param.callback = $(this).data('callback');
//var $element = $(this).parent().parent();
//param.inputid = $element.find('input[type=hidden]').attr('id');
//param.titleid = $element.find('input[type=text]').attr('id');
$('#modal-product').remove();
$.ajax({
url: "<?php echo url('/admin/product/modallists');?>",
data: param,
dataType: 'html',
success: function(html) {
$('body').append('<div id="modal-product" class="modal fade">' + html + '</div>');
$('#modal-product').modal({show: true, backdrop: 'static'});
}
});
});
//Initialize Select2 Elements
$('.select2').select2();
});
</script>