312 lines
14 KiB
HTML
312 lines
14 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;">
|
|
<blockquote class="site-text layui-elem-quote">
|
|
考试申请基本信息
|
|
</blockquote>
|
|
<form class="layui-form layui-form-pane" lay-filter="initDataForm">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">培训计划</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="plan" name="plan" class="layui-input" value="培训计划" placeholder="请输入培训计划" maxlength="255" readonly>
|
|
</div>
|
|
</div>
|
|
<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" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">计划类型</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="planType" name="planType" class="layui-input" value="" placeholder="请输入计划名称" maxlength="255" readonly>
|
|
</div>
|
|
</div>
|
|
<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="" placeholder="请输入考试机构" maxlength="255" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label" style="width: 120px;">计划开始时间</label>
|
|
<div class="layui-input-block" style="margin-left: 120px;">
|
|
<input type="text" id="planStartTime" name="planStartTime" class="layui-input" value="" placeholder="请输入计划人数" maxlength="255" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label" style="width: 120px;">计划结束时间</label>
|
|
<div class="layui-input-block" style="margin-left: 120px;">
|
|
<input type="text" id="planEndTime" name="planEndTime" class="layui-input" value="" placeholder="请输入计划人数" maxlength="255" readonly>
|
|
</div>
|
|
</div>
|
|
<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" readonly>
|
|
</div>
|
|
</div>
|
|
<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="255" readonly>
|
|
</div>
|
|
</div>
|
|
<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" readonly>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<blockquote class="site-text layui-elem-quote">
|
|
审核信息
|
|
</blockquote>
|
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
|
<div class="layui-form-item" pane>
|
|
<label class="layui-form-label">审核状态</label>
|
|
<div class="layui-input-block layui-form">
|
|
<input type="radio" lay-filter="checkStatus" name="checkStatus" value="1" title="受理" checked>
|
|
<input type="radio" lay-filter="checkStatus" name="checkStatus" value="2" title="退回">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-form-text" style="display: none;" id="reasonDiv">
|
|
<label class="layui-form-label">审核失败原因</label>
|
|
<div class="layui-input-block">
|
|
<textarea type="text" id="reason" name="reason" class="layui-textarea" value="" placeholder="请输入审核结果,审核失败原因"></textarea>
|
|
</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" id="subBtn" 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', 'form', 'laydate', 'laytpl'], function() {
|
|
var $ = layui.$;
|
|
var form = layui.form;
|
|
var laytpl = layui.laytpl;
|
|
var laydate = layui.laydate;
|
|
var examApplyId = top.restAjax.params(window.location.href).examApplyId;
|
|
var classPlanId = top.restAjax.params(window.location.href).classPlanId;
|
|
|
|
var wangEditor = window.wangEditor;
|
|
var wangEditorObj = {};
|
|
var viewerObj = {};
|
|
|
|
form.on('radio(checkStatus)', function (data) {
|
|
var val = data.value;
|
|
if (2 == val) {
|
|
$('#reasonDiv').show();
|
|
} else {
|
|
$('#reasonDiv').hide();
|
|
}
|
|
});
|
|
|
|
function closeBox() {
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
}
|
|
|
|
function refreshDownloadTemplet(fileName, file) {
|
|
var dataRander = {};
|
|
dataRander[fileName] = file;
|
|
|
|
laytpl(document.getElementById(fileName + 'FileDownload').innerHTML).render(dataRander, function (html) {
|
|
document.getElementById(fileName + 'FileBox').innerHTML = html;
|
|
});
|
|
}
|
|
|
|
// 初始化文件列表
|
|
function initFileList(fileName, ids, callback) {
|
|
var dataForm = {};
|
|
dataForm[fileName] = ids;
|
|
form.val('dataForm', dataForm);
|
|
|
|
if (!ids) {
|
|
refreshDownloadTemplet(fileName, []);
|
|
if (callback) {
|
|
callback(fileName, []);
|
|
}
|
|
return;
|
|
}
|
|
|
|
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
|
ids: ids
|
|
}, null, function (code, data) {
|
|
refreshDownloadTemplet(fileName, data);
|
|
if (callback) {
|
|
callback(fileName, data);
|
|
}
|
|
}, function (code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化内容
|
|
function initData() {
|
|
initExamBaseInfo();
|
|
var loadLayerIndex;
|
|
top.restAjax.get(top.restAjax.path('api/examapply/get/{examApplyId}', [examApplyId]), {}, null, function (code, data) {
|
|
var dataFormData = {};
|
|
for (var i in data) {
|
|
dataFormData[i] = data[i] + '';
|
|
}
|
|
if ('3' == data.checkStatus) {
|
|
$('#reasonDiv').show();
|
|
}
|
|
if (null == data.checkStatus || '' == data.checkStatus || typeof (data.checkStatus) == 'undefined') {
|
|
$('#subBtn').show();
|
|
} else {
|
|
$('#subBtn').hide();
|
|
}
|
|
form.val('dataForm', dataFormData);
|
|
form.render(null, 'dataForm');
|
|
}, function (code, data) {
|
|
top.dialog.msg(data.msg);
|
|
}, function () {
|
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
|
}, function () {
|
|
top.dialog.close(loadLayerIndex);
|
|
});
|
|
}
|
|
|
|
initData();
|
|
|
|
// 获取考试申请基本信息
|
|
function initExamBaseInfo() {
|
|
var loadLayerIndex;
|
|
top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function (code, data) {
|
|
orgNameFun.getOrgName(data.orgId, function(nameData) {
|
|
data['orgName'] = nameData.institutionName;
|
|
if ('1' == data.planType) {
|
|
data.planType = '初训';
|
|
} else if ('2' == data.planType) {
|
|
data.planType = '复训';
|
|
} else if ('3' == data.planType) {
|
|
data.planType = '换证 ';
|
|
}
|
|
var dataFormData = {};
|
|
for (var i in data) {
|
|
dataFormData[i] = data[i] + '';
|
|
}
|
|
form.val('initDataForm', dataFormData);
|
|
form.render(null, 'initDataForm');
|
|
})
|
|
}, function (code, data) {
|
|
top.dialog.msg(data.msg);
|
|
}, function () {
|
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
|
}, function () {
|
|
top.dialog.close(loadLayerIndex);
|
|
});
|
|
}
|
|
|
|
var orgNameFun = {
|
|
getOrgName: function (orgId, callback){
|
|
var loadLayerIndex;
|
|
top.restAjax.get(top.restAjax.path('api/institution/get/{orgId}', [orgId]), {}, null, function (code, data) {
|
|
if (null != data) {
|
|
callback(data);
|
|
}
|
|
}, function (code, data) {
|
|
top.dialog.msg(data.msg);
|
|
}, function () {
|
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
|
}, function () {
|
|
top.dialog.close(loadLayerIndex);
|
|
});
|
|
}
|
|
}
|
|
|
|
// 提交表单
|
|
form.on('submit(submitForm)', function(formData) {
|
|
layer.confirm('审核一旦通过,将无法进行修改', {
|
|
btn: ['确定','取消'] //按钮
|
|
}, function(){
|
|
if(3 == formData.field.checkStatus) {
|
|
if(null == formData.field.reason || '' == formData.field.reason || typeof(formData.field.reason) == "undefined") {
|
|
top.dialog.msg('退回原因必填');
|
|
return false;
|
|
}
|
|
}
|
|
formData.field.examId = classPlanId;
|
|
formData.field.planName = $('#planName').val();
|
|
formData.field.planPersonNum = $('#planPersonNum').val();
|
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
|
top.dialog.close(index);
|
|
var loadLayerIndex;
|
|
top.restAjax.put(top.restAjax.path('api/examapply/update/{examApplyId}', [examApplyId]), formData.field, null, function(code, data) {
|
|
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
|
|
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);
|
|
});
|
|
});
|
|
}, function(){
|
|
return false;
|
|
});
|
|
|
|
return false;
|
|
});
|
|
|
|
$('.close').on('click', function() {
|
|
closeBox();
|
|
});
|
|
|
|
// 校验
|
|
form.verify({
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |