371 lines
17 KiB
HTML
371 lines
17 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<base href="/signup/">
|
|
<meta charset="utf-8">
|
|
<meta name="renderer" content="webkit">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
|
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
|
</head>
|
|
<body>
|
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
|
<div class="layui-card">
|
|
<div class="layui-card-header">
|
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
|
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
|
<a href="javascript:void(0);"><cite>新增内容</cite></a>
|
|
</span>
|
|
</div>
|
|
<div class="layui-card-body" style="padding: 15px;">
|
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
|
<div class="layui-row">
|
|
<div class="layui-col-md12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">培训机构</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="orgName" name="orgName" class="layui-input" value="" readonly="readonly" maxlength="100">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md6">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">计划编号</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="planNumber" name="planNumber" class="layui-input" value="" placeholder="请输入培训计划编号" maxlength="100">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md6">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">计划名称</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="planName" name="planName" class="layui-input" value="" placeholder="请输入培训计划名称" maxlength="255">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md4">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">培训类型</label>
|
|
<div class="layui-input-block">
|
|
<select id="planType" name="planType">
|
|
<option value="1">初训</option>
|
|
<option value="2">复训</option>
|
|
<option value="3">换证</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">培训工种</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="workerCatalog" name="workerCatalog" class="layui-input" value="" placeholder="请选择培训工种" readonly="readonly" maxlength="255">
|
|
</div>
|
|
<!--<div class="layui-input-block layui-form" id="workerCatalogSelectTemplateBox" lay-filter="workerCatalogSelectTemplateBox"></div>
|
|
<script id="workerCatalogSelectTemplate" type="text/html">
|
|
<select id="workerCatalog" name="workerCatalog" lay-verify="required">
|
|
<option value="">请选择培训工种</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>-->
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">计划人数</label>
|
|
<div class="layui-input-block">
|
|
<input type="number" id="planPersonNum" name="planPersonNum" class="layui-input" value="0" placeholder="请输入计划人数" lay-verify="required">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md3">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">开始时间</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="planStartTime" name="planStartTime" class="layui-input" value="" placeholder="请选择培训开始时间" readonly style="cursor: pointer;" lay-verify="required">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md3">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">结束时间</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="planEndTime" name="planEndTime" class="layui-input" value="" placeholder="请选择培训结束时间" readonly style="cursor: pointer;" lay-verify="required">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md3">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">报名时间</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="signUpStartTime" name="signUpStartTime" class="layui-input" value="" placeholder="请选择报名时间开始" readonly style="cursor: pointer;" lay-verify="required">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md3">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">报名截止</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="signUpEndTime" name="signUpEndTime" class="layui-input" value="" placeholder="请选择报名时间截止" readonly style="cursor: pointer;" lay-verify="required">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md6">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">负责人</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="chargePerson" name="chargePerson" class="layui-input" value="" placeholder="请输入负责人" maxlength="50">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md6">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">联系方式</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="chargePersonTel" name="chargePersonTel" class="layui-input" value="" placeholder="请输入联系方式" maxlength="255">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">培训地点</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="planAddress" name="planAddress" class="layui-input" value="" placeholder="请输入培训地点" maxlength="255">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md6">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">培训项目</label>
|
|
<div class="layui-input-block">
|
|
<select id="projectCatalogId" name="projectCatalogId">
|
|
<option value="1">培训项目一</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md6">
|
|
<div class="layui-form-item">
|
|
<select id="projectCatalogId1" name="projectCatalogId1">
|
|
<option value="2">培训项目一</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md12">
|
|
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-layout-admin">
|
|
<div class="layui-input-block">
|
|
<div class="layui-footer" style="left: 0;">
|
|
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
|
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
|
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
|
<script>
|
|
layui.config({
|
|
base: 'assets/layuiadmin/' //静态资源所在路径
|
|
}).extend({
|
|
index: 'lib/index' //主入口模块
|
|
}).use(['index', 'table', 'form', 'laydate', 'laytpl'], function(){
|
|
var $ = layui.$;
|
|
var $win = $(window);
|
|
var table = layui.table;
|
|
var form = layui.form;
|
|
var admin = layui.admin;
|
|
var laytpl = layui.laytpl;
|
|
var laydate = layui.laydate;
|
|
var wangEditor = window.wangEditor;
|
|
var wangEditorObj = {};
|
|
var viewerObj = {};
|
|
|
|
// 初始化内容
|
|
function initData() {
|
|
initPlanStartTimeDateTime();
|
|
initPlanEndTimeDateTime();
|
|
initSignUpStartTimeDateTime();
|
|
initSignUpEndTimeDateTime();
|
|
initWorkerCatalogSelect();
|
|
}
|
|
initData();
|
|
|
|
$(document).on('click', '#workerCatalog', function() {
|
|
layer.open({
|
|
type: 2,
|
|
title: '选择工种',
|
|
closeBtn: 1,
|
|
area: ['200px', '400px'],
|
|
shadeClose: false,
|
|
anim: 2,
|
|
content: top.restAjax.path('route/classplan/select-tree.html', []),
|
|
end: function() {
|
|
}
|
|
});
|
|
});
|
|
|
|
// 初始化培训工种下拉选择
|
|
function initWorkerCatalogSelect() {
|
|
/*top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/cbb5f8a8-595c-4df4-b38e-7cbb715f754f', []), {}, null, function(code, data, args) {
|
|
laytpl(document.getElementById('workerCatalogSelectTemplate').innerHTML).render(data, function(html) {
|
|
document.getElementById('workerCatalogSelectTemplateBox').innerHTML = html;
|
|
});
|
|
form.render('select', 'workerCatalogSelectTemplateBox');
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});*/
|
|
}
|
|
|
|
// 初始化表格
|
|
function initTable() {
|
|
table.render({
|
|
elem: '#dataTable',
|
|
id: 'dataTable',
|
|
url: top.restAjax.path('', []),
|
|
width: admin.screen() > 1 ? '100%' : '',
|
|
height: $win.height() - 90,
|
|
limit: 20,
|
|
limits: [20, 40, 60, 80, 100, 200],
|
|
toolbar: '#headerToolBar',
|
|
request: {
|
|
pageName: 'page',
|
|
limitName: 'rows'
|
|
},
|
|
cols: [
|
|
[
|
|
{type: 'checkbox', fixed: 'left'},
|
|
{
|
|
field: 'rowNum',
|
|
width: 80,
|
|
title: '序号',
|
|
fixed: 'left',
|
|
align: 'center',
|
|
templet: '<span>{{d.LAY_INDEX}}</span>'
|
|
}
|
|
]
|
|
],
|
|
page: false,
|
|
parseData: function (data) {
|
|
return {
|
|
'code': 0,
|
|
'msg': '',
|
|
'count': data.total,
|
|
'data': data.rows
|
|
};
|
|
}
|
|
});
|
|
}
|
|
|
|
function closeBox() {
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
}
|
|
|
|
// 初始化培训开始时间时间戳
|
|
function initPlanStartTimeDateTime() {
|
|
laydate.render({
|
|
elem: '#planStartTime',
|
|
type: 'datetime',
|
|
value: new Date(),
|
|
trigger: 'click'
|
|
});
|
|
}
|
|
|
|
// 初始化培训结束时间时间戳
|
|
function initPlanEndTimeDateTime() {
|
|
laydate.render({
|
|
elem: '#planEndTime',
|
|
type: 'datetime',
|
|
value: new Date(),
|
|
trigger: 'click'
|
|
});
|
|
}
|
|
|
|
// 初始化报名时间开始时间戳
|
|
function initSignUpStartTimeDateTime() {
|
|
laydate.render({
|
|
elem: '#signUpStartTime',
|
|
type: 'datetime',
|
|
value: new Date(),
|
|
trigger: 'click'
|
|
});
|
|
}
|
|
|
|
// 初始化报名时间截止时间戳
|
|
function initSignUpEndTimeDateTime() {
|
|
laydate.render({
|
|
elem: '#signUpEndTime',
|
|
type: 'datetime',
|
|
value: new Date(),
|
|
trigger: 'click'
|
|
});
|
|
}
|
|
|
|
// 提交表单
|
|
form.on('submit(submitForm)', function(formData) {
|
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
|
top.dialog.close(index);
|
|
var loadLayerIndex;
|
|
top.restAjax.post(top.restAjax.path('api/classplan/save', []), formData.field, null, function(code, data) {
|
|
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
|
time: 0,
|
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
|
shade: 0.3,
|
|
yes: function(index) {
|
|
top.dialog.close(index);
|
|
window.location.reload();
|
|
},
|
|
btn2: function() {
|
|
closeBox();
|
|
}
|
|
});
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
}, function() {
|
|
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
|
}, function() {
|
|
top.dialog.close(loadLayerIndex);
|
|
});
|
|
});
|
|
return false;
|
|
});
|
|
|
|
$('.close').on('click', function() {
|
|
closeBox();
|
|
});
|
|
|
|
// 校验
|
|
form.verify({
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |