考试申请功能修改。

This commit is contained in:
Renpc-kilig 2021-05-11 15:00:34 +08:00
parent 49978c26a0
commit d6fda44964
7 changed files with 728 additions and 64 deletions

View File

@ -193,5 +193,4 @@ public interface IExamApplyService {
* @return * @return
*/ */
Integer count(Map<String, Object> params); Integer count(Map<String, Object> params);
} }

View File

@ -139,7 +139,7 @@ public class ExamApplyServiceImpl extends DefaultBaseService implements IExamApp
} }
examApplyDao.update(params); examApplyDao.update(params);
// 如果受理通过则新增一条考场分配数据 // 如果受理通过则新增一条考场分配数据
if(1 == examApplyVO.getCheckStatus()) { if(!StringUtils.isBlank(examApplyVO.getCertificateOffice())) {
// 申请考场信息开始 // 申请考场信息开始
DistributionSaveVO dstributionSaveVO = new DistributionSaveVO(); DistributionSaveVO dstributionSaveVO = new DistributionSaveVO();
dstributionSaveVO.setPlanId(examApplyVO.getExamId()); dstributionSaveVO.setPlanId(examApplyVO.getExamId());

View File

@ -312,6 +312,9 @@
management_exam_apply t1 management_exam_apply t1
WHERE WHERE
t1.is_delete = 0 t1.is_delete = 0
<if test="checkStatus != null">
AND t1.check_status = #{checkStatus}
</if>
<if test="keywords != null and keywords != ''"> <if test="keywords != null and keywords != ''">
AND ( AND (
<!-- 这里添加其他条件 --> <!-- 这里添加其他条件 -->

View File

@ -0,0 +1,361 @@
<!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">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
</div>
<div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
</div>
<div class="layui-inline">
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
</div>
<button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索
</button>
</div>
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
<!-- 表头按钮组 -->
<script type="text/html" id="headerToolBar">
<div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 考试申请审核
</button>
</div>
</script>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laydate', 'common'], function() {
var $ = layui.$;
var $win = $(window);
var table = layui.table;
var admin = layui.admin;
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var tableUrl = 'api/examapply/listpage';
// 初始化表格
function initTable() {
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, []),
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>'},
{field: 'planName', width: 180, title: '计划名称', align:'center',
templet: function(row) {
var rowData = row.classPlanDTO[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'planType', width: 180, title: '计划类型', align:'center',
templet: function(row) {
var rowData = row.classPlanDTO[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
if('1' == rowData) {
rowData = '初训';
}else if('2' == rowData) {
rowData = '复训';
}else if('3' == rowData) {
rowData = '换证 ';
}
return rowData;
}
},
{field: 'orgId', width: 180, title: '考试机构', align:'center',
templet: function(row) {
var rowData = row.classPlanDTO[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'planPersonNum', width: 180, title: '计划人数', align:'center',
templet: function(row) {
var rowData = row.classPlanDTO[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'planStartTime', width: 180, title: '计划开始时间', align:'center',
templet: function(row) {
var rowData = row.classPlanDTO[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'planEndTime', width: 180, title: '计划结束时间', align:'center',
templet: function(row) {
var rowData = row.classPlanDTO[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'chargePerson', width: 180, title: '负责人', align:'center',
templet: function(row) {
var rowData = row.classPlanDTO[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'chargePersonTel', width: 180, title: '联系方式', align:'center',
templet: function(row) {
var rowData = row.classPlanDTO[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'checkStatus', width: 150, title: '审批状态', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData === null || rowData === '') {
return '-';
}
if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">待审批</a>';
}
if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>';
}
if(rowData == '2') {
rowData = '<a class="layui-btn layui-btn-xs">审批驳回</a>';
}
return rowData;
}
},
{field: 'reason', width: 150, title: '审核原因', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData === null || rowData === '') {
return '-';
}
return rowData;
}
}
]
],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
}
});
}
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(tableUrl, []),
where: {
keywords: $('#keywords').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val()
},
page: {
curr: currentPage
},
height: $win.height() - 90,
});
}
// 初始化日期
function initDate() {
// 日期选择
laydate.render({
elem: '#startTime',
format: 'yyyy-MM-dd'
});
laydate.render({
elem: '#endTime',
format: 'yyyy-MM-dd'
});
}
// 删除
function removeData(ids) {
top.dialog.msg(top.dataMessage.delete, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function (index) {
top.dialog.close(index);
var layIndex;
top.restAjax.delete(top.restAjax.path('api/examapply/remove/{ids}', [ids]), {}, null, function (code, data) {
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
reloadTable();
}, function (code, data) {
top.dialog.msg(data.msg);
}, function () {
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
}, function () {
top.dialog.close(layIndex);
});
}
});
}
initTable();
initDate();
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
reloadTable();
}, 500);
});
// 事件 - 搜索
$(document).on('click', '#search', function() {
reloadTable(1);
});
// 事件 - 增删改
table.on('toolbar(dataTable)', function(obj) {
var layEvent = obj.event;
var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data;
if(layEvent === 'saveEvent') {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/examapply/save.html', []),
end: function() {
reloadTable();
}
});
} else if(layEvent === 'updateEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/examapply/update-check.html?examApplyId={examApplyId}&classPlanId={classPlanId}', [checkDatas[0].examApplyId, checkDatas[0].examId]),
end: function() {
reloadTable();
}
});
}
} else if(layEvent === 'removeEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectDelete);
} else {
var ids = '';
for(var i = 0, item; item = checkDatas[i++];) {
if(i > 1) {
ids += '_';
}
ids += item['examApplyId'];
}
removeData(ids);
}
}
});
// 分配监考老师
function sendExamination(data) {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/examination/sel-exam-user?examId={examId}',
[data.examId]), {}, null, function(code, resultData) {
if(null != resultData && resultData.length > 0) {
top.dialog.msg('监考老师分配失败');
}
reloadTable();
}, 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);
});
}
function selOther(data) {
top.dialog.open({
url: top.restAjax.path('route/examinationuser/view-list.html?startTime={startTime}', [data.theoryExamStartTime]),
title: "剩余考务人员",
width: '80%',
height: '80%',
onClose: function() {
reloadTable();
}
});
}
//监听行单击事件
table.on('tool(dataTable)', function(obj){
var data = obj.data;
if('sendExamination' == obj.event) {
// 分配监考老司机哦
sendExamination(data);
}else if('selOther' == obj.event) {
// 查看剩余监考老师
selOther(data);
}
});
});
</script>
</body>
</html>

View File

@ -35,7 +35,7 @@
<script type="text/html" id="headerToolBar"> <script type="text/html" id="headerToolBar">
<div class="layui-btn-group"> <div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent"> <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 填写考试申请 <i class="fa fa-lg fa-edit"></i> 考试信息分配
</button> </button>
</div> </div>
</script> </script>
@ -59,7 +59,7 @@
var laydate = layui.laydate; var laydate = layui.laydate;
var common = layui.common; var common = layui.common;
var resizeTimeout = null; var resizeTimeout = null;
var tableUrl = 'api/examapply/listpage'; var tableUrl = 'api/examapply/listpage?checkStatus=1';
// 初始化表格 // 初始化表格
function initTable() { function initTable() {
@ -159,6 +159,54 @@
return rowData; return rowData;
} }
}, },
{field: 'checkStatus', width: 150, title: '审批状态', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData === null || rowData === '') {
return '-';
}
if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">待审批</a>';
}
if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>';
}
if(rowData == '2') {
rowData = '<a class="layui-btn layui-btn-xs">审批驳回</a>';
}
return rowData;
}
},
{field: 'status', width: 150, title: '考场分配状态', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData === null || rowData === '') {
return '-';
}
if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">未分配</a>';
}
if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">已分配</a>';
}
return rowData;
}
},
{field: 'userStatus', width: 150, title: '监考老师分配状态', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData === null || rowData === '') {
return '-';
}
if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">未分配</a>';
}
if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">已分配</a>';
}
return rowData;
}
},
{field: 'certificateOffice', width: 180, title: '发证机关', align:'center', {field: 'certificateOffice', width: 180, title: '发证机关', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
@ -230,36 +278,6 @@
return rowData; return rowData;
} }
}, },
{field: 'status', width: 150, title: '审批状态', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">待审批</a>';
}
if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">已审批</a>';
}
return rowData;
}
},
{field: 'userStatus', width: 150, title: '监考老师分配状态', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">未分配</a>';
}
if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">已分配</a>';
}
return rowData;
}
},
{field: 'selOther', fixed: 'right', width: 150, title: '查看剩余监考老师', align:'center', {field: 'selOther', fixed: 'right', width: 150, title: '查看剩余监考老师', align:'center',
templet: function(row) { templet: function(row) {
var status = row['status']; var status = row['status'];

View File

@ -0,0 +1,311 @@
<!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">计划人数</label>
<div class="layui-input-block">
<input type="number" id="planPersonNum" name="planPersonNum" 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;
var dataFormData = {};
for (var i in data) {
dataFormData[i] = data[i] + '';
}
if ('1' == data.planType) {
data.planType = '初训';
} else if ('2' == data.planType) {
data.planType = '复训';
} else if ('3' == data.planType) {
data.planType = '换证 ';
}
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) {
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);
});
});
return false;
});
$('.close').on('click', function() {
closeBox();
});
// 校验
form.verify({
});
});
</script>
</body>
</html>

View File

@ -95,13 +95,13 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label" style="width: 130px;">考试申请编号</label> <label class="layui-form-label" style="width: 130px;">考试申请编号</label>
<div class="layui-input-block" style="margin-left: 130px;"> <div class="layui-input-block" style="margin-left: 130px;">
<input type="text" id="examApplyNum" name="examApplyNum" class="layui-input" value="" placeholder="请输入发证机关" maxlength="255" readonly> <input type="text" id="examApplyNum" name="examApplyNum" class="layui-input" value="" placeholder="考试申请编号" maxlength="255" readonly>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">发证机关</label> <label class="layui-form-label">发证机关</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="certificateOffice" name="certificateOffice" class="layui-input" value="" placeholder="请输入发证机关" maxlength="255"> <input type="text" id="certificateOffice" name="certificateOffice" class="layui-input" value="" lay-verify="required" placeholder="请输入发证机关" maxlength="255">
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
@ -193,19 +193,6 @@
<input type="text" id="paymentVoucherNum" name="paymentVoucherNum" class="layui-input" value="" placeholder="请输入缴费凭证编号" maxlength="255"> <input type="text" id="paymentVoucherNum" name="paymentVoucherNum" class="layui-input" value="" placeholder="请输入缴费凭证编号" maxlength="255">
</div> </div>
</div> </div>
<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-form-item layui-layout-admin">
<div class="layui-input-block"> <div class="layui-input-block">
<div class="layui-footer" style="left: 0;"> <div class="layui-footer" style="left: 0;">
@ -239,15 +226,6 @@
var wangEditorObj = {}; var wangEditorObj = {};
var viewerObj = {}; var viewerObj = {};
form.on('radio(checkStatus)', function (data) {
var val = data.value;
if (2 == val) {
$('#reasonDiv').show();
} else {
$('#reasonDiv').hide();
}
});
// 初始化实操考试地点下拉选择 // 初始化实操考试地点下拉选择
function initPracticeExamAddressIdSelect(selectValue) { function initPracticeExamAddressIdSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/institution/list?institutionType=考点信息', []), {}, null, function(code, data, args) { top.restAjax.get(top.restAjax.path('api/institution/list?institutionType=考点信息', []), {}, null, function(code, data, args) {
@ -527,12 +505,6 @@
// 提交表单 // 提交表单
form.on('submit(submitForm)', function(formData) { form.on('submit(submitForm)', function(formData) {
if(2 == formData.field.checkStatus) {
if(null == formData.field.reason || '' == formData.field.reason || typeof(formData.field.reason) == "undefined") {
top.dialog.msg('退回原因必填');
return false;
}
}
var theoryExamStartTime = new Date($('#theoryExamEndTime').val()).getTime(); var theoryExamStartTime = new Date($('#theoryExamEndTime').val()).getTime();
var theoryExamEndTime = new Date($('#theoryExamStartTime').val()).getTime(); var theoryExamEndTime = new Date($('#theoryExamStartTime').val()).getTime();
if(theoryExamEndTime >= theoryExamStartTime) { if(theoryExamEndTime >= theoryExamStartTime) {