2021-05-15 14:43:37 +08:00
|
|
|
<!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-anim layui-anim-fadein">
|
|
|
|
<div class="layui-row">
|
|
|
|
<div class="layui-col-md12">
|
|
|
|
<div class="layui-card">
|
|
|
|
<div class="layui-card-body">
|
|
|
|
<div class="layui-row layui-col-space10">
|
2021-10-23 13:43:26 +08:00
|
|
|
<div class="layui-col-md3 layui-col-xs3">
|
2021-05-15 14:43:37 +08:00
|
|
|
<div class="layui-card">
|
|
|
|
<div class="layui-card-header" style="background-color: #d7dee2">
|
2021-10-23 13:43:26 +08:00
|
|
|
总人数
|
|
|
|
<span id="signUpAllCounts" class="layui-badge layui-bg-blue layuiadmin-badge">0 人</span>
|
2021-05-15 14:43:37 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-23 13:43:26 +08:00
|
|
|
<div class="layui-col-md2 layui-col-xs2">
|
2021-05-15 14:43:37 +08:00
|
|
|
<div class="layui-card">
|
|
|
|
<div class="layui-card-header" style="background-color: #d7dee2">
|
2021-10-23 13:43:26 +08:00
|
|
|
待审数量
|
|
|
|
<span id="signUpWaitCounts" class="layui-badge layui-bg-orange layuiadmin-badge">0 人</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="layui-col-md2 layui-col-xs2">
|
|
|
|
<div class="layui-card">
|
|
|
|
<div class="layui-card-header" style="background-color: #d7dee2">
|
|
|
|
已审数量
|
2021-05-17 14:20:03 +08:00
|
|
|
<span id="signUpPassCounts" class="layui-badge layui-bg-green layuiadmin-badge">0 人</span>
|
2021-05-15 14:43:37 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-23 13:43:26 +08:00
|
|
|
<div class="layui-col-md2 layui-col-xs2">
|
|
|
|
<div class="layui-card">
|
|
|
|
<div class="layui-card-header" style="background-color: #d7dee2">
|
|
|
|
不通过数量
|
|
|
|
<span id="signUpUnPassCounts" class="layui-badge layui-bg-red layuiadmin-badge">0 人</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="layui-col-md3 layui-col-xs3">
|
2021-05-15 14:43:37 +08:00
|
|
|
<div class="layui-card">
|
|
|
|
<div class="layui-card-header" style="background-color: #d7dee2">
|
2021-05-19 15:56:06 +08:00
|
|
|
<span id="totalSignUpUser">通过率</span>
|
|
|
|
<span id="ratio" class="layui-badge layui-bg-cyan layuiadmin-badge">-</span>
|
2021-05-15 14:43:37 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-05-17 14:20:03 +08:00
|
|
|
</div>
|
2021-05-15 14:43:37 +08:00
|
|
|
</div>
|
|
|
|
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
|
|
|
<div class="layui-inline">
|
|
|
|
<input type="text" id="keywords" class="layui-input search-item"
|
2021-08-25 18:08:59 +08:00
|
|
|
style="width: 150px" autocomplete="off" placeholder="姓名|手机号|身份证">
|
2021-05-15 14:43:37 +08:00
|
|
|
</div>
|
|
|
|
<div class="layui-inline">
|
|
|
|
<input type="text" id="startTime" class="layui-input search-item"
|
|
|
|
style="width: 150px" placeholder="报名日期" readonly>
|
|
|
|
</div>
|
|
|
|
至
|
|
|
|
<div class="layui-inline">
|
|
|
|
<input type="text" id="endTime" class="layui-input search-item"
|
|
|
|
style="width: 150px" placeholder="报名日期" readonly>
|
|
|
|
</div>
|
|
|
|
<div class="layui-inline layui-form search-item">
|
|
|
|
<select id="applyAuditStates" name="applyAuditStates" lay-search>
|
|
|
|
<option value="">查看全部</option>
|
|
|
|
<option value="0">待审核</option>
|
|
|
|
<option value="2">审核通过</option>
|
|
|
|
<option value="-1">审核不通过</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
2021-08-25 18:08:59 +08:00
|
|
|
<div class="layui-inline layui-form search-item">
|
|
|
|
<select id="applyFenLei" name="applyFenLei">
|
|
|
|
<option value="">初复训</option>
|
|
|
|
<option value="1">初训</option>
|
|
|
|
<option value="2">复训</option>
|
|
|
|
<option value="3">换证</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
2021-05-15 14:43:37 +08:00
|
|
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
|
|
|
<i class="fa fa-lg fa-search"></i> 搜索
|
|
|
|
</button>
|
2021-05-17 14:20:03 +08:00
|
|
|
<button type="button" id="class-plan-btn-event" class="layui-btn layui-btn-sm layui-btn-normal" style="display: none;">
|
2021-05-15 14:43:37 +08:00
|
|
|
<i class="layui-icon"></i>开班
|
|
|
|
</button>
|
2021-06-18 18:25:56 +08:00
|
|
|
<button type="button" id="is-commit-plan-btn" class="layui-btn layui-btn-sm layui-btn-warm" style="display: none;">
|
|
|
|
<i class="layui-icon"></i>已申请开班
|
|
|
|
</button>
|
2021-08-16 14:38:50 +08:00
|
|
|
<button type="button" id="add-apply-user" class="layui-btn layui-btn-sm layui-btn-normal">
|
|
|
|
<i class="fa fa-lg fa-plus"></i> 手动报名
|
|
|
|
</button>
|
2021-05-15 14:43:37 +08:00
|
|
|
</div>
|
2021-08-25 18:08:59 +08:00
|
|
|
<script type="text/html" id="headerToolBar">
|
|
|
|
<div class="layui-btn-group">
|
|
|
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="gavelEvent">
|
|
|
|
<i class="fa fa-lg fa fa-gavel"></i> 批量审查
|
|
|
|
</button>
|
2021-09-07 17:58:19 +08:00
|
|
|
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" lay-event="deleteApplyEvent">
|
|
|
|
<i class="fa fa-trash"></i> 删除学员
|
|
|
|
</button>
|
2021-08-25 18:08:59 +08:00
|
|
|
</div>
|
|
|
|
</script>
|
2021-05-15 14:43:37 +08:00
|
|
|
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
|
|
|
</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/apply/listpage';
|
|
|
|
var orgId = '';
|
|
|
|
var workerCatalog = top.restAjax.params(window.location.href).workerCatalog;
|
2021-08-25 18:08:59 +08:00
|
|
|
var workerCatalogName = top.restAjax.params(window.location.href).workerCatalogName;
|
2021-05-15 14:43:37 +08:00
|
|
|
|
|
|
|
function init(){
|
|
|
|
getOrgInfo();
|
|
|
|
initDate();
|
|
|
|
}
|
|
|
|
init();
|
|
|
|
|
2021-05-17 14:20:03 +08:00
|
|
|
// 查询机构信息
|
2021-05-15 14:43:37 +08:00
|
|
|
function getOrgInfo(){
|
|
|
|
top.restAjax.get(top.restAjax.path('api/teacher/getorginfo', []), {}, null, function (code, data) {
|
|
|
|
orgId = data.institutionId;
|
2021-05-15 19:42:31 +08:00
|
|
|
getExamCheckType();
|
2021-05-15 14:43:37 +08:00
|
|
|
$('#listContent').attr('src', top.restAjax.path('route/classplan/list-signup.html?orgId={arg1}&workerCatalog={arg2}',
|
|
|
|
[orgId,'']));
|
2021-05-17 14:20:03 +08:00
|
|
|
if(typeof (orgId) != 'undefined' && orgId != ''){
|
|
|
|
getSignUserCounts();
|
|
|
|
}
|
|
|
|
}, function (code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-08-16 14:38:50 +08:00
|
|
|
// 校验是否可以开班
|
|
|
|
function getExamCheckType(){
|
|
|
|
top.restAjax.get(top.restAjax.path('api/classplan/get-exam-check-type', []),
|
|
|
|
{orgId: orgId, workerCatalog : workerCatalog}, null, function (code, data) {
|
|
|
|
if(data.checkType == ''){
|
|
|
|
$('#add-apply-user').hide();
|
|
|
|
$('#class-plan-btn-event').hide();
|
|
|
|
$('#is-commit-plan-btn').hide();
|
|
|
|
}
|
|
|
|
// 可以开班
|
|
|
|
if(data.checkType == '1'){
|
|
|
|
$('#is-commit-plan-btn').hide();
|
|
|
|
$('#class-plan-btn-event').show();
|
|
|
|
$('#add-apply-user').show();
|
|
|
|
}
|
2021-10-15 18:08:45 +08:00
|
|
|
if(data.checkType == '0' || data.checkType == '-1'){
|
2021-08-16 14:38:50 +08:00
|
|
|
// 待审中不可开班 可以添加人
|
|
|
|
$('#is-commit-plan-btn').show();
|
|
|
|
$('#class-plan-btn-event').hide();
|
|
|
|
$('#add-apply-user').show();
|
|
|
|
}
|
2021-10-15 18:08:45 +08:00
|
|
|
initTable();
|
2021-08-16 14:38:50 +08:00
|
|
|
}, function (code, data) {
|
|
|
|
$('#class-plan-btn-event').hide();
|
|
|
|
top.dialog.msg(data.msg);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-05-17 14:20:03 +08:00
|
|
|
//查询人员数量
|
|
|
|
function getSignUserCounts(){
|
|
|
|
top.restAjax.get(top.restAjax.path('api/classplan/get-sign-user-counts', []),
|
|
|
|
{orgId : orgId,workerCatalog : workerCatalog}, null, function (code, data) {
|
2021-10-23 13:43:26 +08:00
|
|
|
var signUpAllCounts = data.signUpAllCounts;
|
|
|
|
var signUpWaitCounts = data.signUpWaitCounts;
|
|
|
|
var signUpUnPassCounts = data.signUpUnPassCounts;
|
2021-05-17 14:20:03 +08:00
|
|
|
var signUpPassCounts = data.signUpPassCounts;
|
2021-05-19 15:56:06 +08:00
|
|
|
var ratio = data.ratio;
|
2021-10-23 13:43:26 +08:00
|
|
|
$('#signUpAllCounts').html(signUpAllCounts + " 人");
|
|
|
|
$('#signUpWaitCounts').html(signUpWaitCounts + " 人");
|
|
|
|
$('#signUpUnPassCounts').html(signUpUnPassCounts + " 人");
|
2021-05-17 14:20:03 +08:00
|
|
|
$('#signUpPassCounts').html(signUpPassCounts + " 人");
|
|
|
|
if(typeof (workerCatalog) === 'undefined' || workerCatalog == ''){
|
2021-05-19 15:56:06 +08:00
|
|
|
$('#ratio').text(ratio + '%');
|
2021-05-17 14:20:03 +08:00
|
|
|
} else {
|
2021-05-19 15:56:06 +08:00
|
|
|
$('#ratio').text(ratio + '%');
|
2021-05-17 14:20:03 +08:00
|
|
|
}
|
2021-05-15 14:43:37 +08:00
|
|
|
}, function (code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// 初始化表格
|
|
|
|
function initTable() {
|
|
|
|
table.render({
|
|
|
|
elem: '#dataTable',
|
|
|
|
id: 'dataTable',
|
|
|
|
url: top.restAjax.path(tableUrl, []),
|
|
|
|
width: admin.screen() > 1 ? '100%' : '',
|
|
|
|
height: $win.height() - 115,
|
2021-08-25 18:08:59 +08:00
|
|
|
limit: 20,
|
2021-05-15 14:43:37 +08:00
|
|
|
limits: [10, 20, 50, 100],
|
2021-08-25 18:08:59 +08:00
|
|
|
toolbar: '#headerToolBar',
|
2021-05-15 14:43:37 +08:00
|
|
|
request: {
|
|
|
|
pageName: 'page',
|
|
|
|
limitName: 'rows'
|
|
|
|
},
|
|
|
|
where : {
|
2021-08-25 18:08:59 +08:00
|
|
|
applyInstitutionId : orgId,
|
2021-06-18 18:25:56 +08:00
|
|
|
applyWorkTypeId : workerCatalog,
|
2021-08-25 18:08:59 +08:00
|
|
|
applyAuditStates : '-1,0,2,3',
|
|
|
|
applyFenLei :''
|
2021-05-15 14:43:37 +08:00
|
|
|
},
|
|
|
|
cols: [
|
|
|
|
[
|
2021-08-25 18:08:59 +08:00
|
|
|
{type:'checkbox', fixed: 'left'},
|
2021-05-15 14:43:37 +08:00
|
|
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
2021-10-15 18:08:45 +08:00
|
|
|
{field: 'applyWorkTypeName', width: 180, title: '培训工种', align:'center',
|
2021-05-15 14:43:37 +08:00
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
2021-06-15 18:00:06 +08:00
|
|
|
{field: 'applyName', width: 100, title: '姓名', align:'center',
|
2021-05-15 14:43:37 +08:00
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
2021-06-15 18:00:06 +08:00
|
|
|
{field: 'applyPhone', width: 140, title: '联系方式', align:'center',
|
2021-05-15 14:43:37 +08:00
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'applyCardNumber', width: 180, title: '证件号码', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
2021-08-16 14:38:50 +08:00
|
|
|
{field: 'applyFenLei', width: 120, title: '初训复训', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(rowData == '1'){
|
|
|
|
return '初训';
|
|
|
|
}
|
|
|
|
if(rowData == '2'){
|
2021-08-25 18:08:59 +08:00
|
|
|
return '<span style="color: #0a54a6">复训</span>';
|
|
|
|
}
|
|
|
|
if(rowData == '3'){
|
|
|
|
return '<span style="color: #9900a6">换证</span>';
|
2021-08-16 14:38:50 +08:00
|
|
|
}
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
},
|
2021-06-15 18:00:06 +08:00
|
|
|
{field: 'gmtCreate', width: 110, title: '报名时间', align:'center',fixed: 'right',
|
2021-05-15 14:43:37 +08:00
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
2021-06-15 18:00:06 +08:00
|
|
|
var dom = '<span style="color: #0082ff;">' + rowData.substring(0,10) + '</span>'
|
|
|
|
return dom;
|
2021-05-15 14:43:37 +08:00
|
|
|
}
|
|
|
|
},
|
2021-08-16 14:38:50 +08:00
|
|
|
{field: 'applyAuditState', width: 120, title: '审核状态', align:'center', fixed: 'right',
|
2021-05-15 14:43:37 +08:00
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(rowData === 0){
|
|
|
|
return '待审核';
|
|
|
|
}
|
|
|
|
if(rowData === 1){
|
|
|
|
return '用户撤回';
|
|
|
|
}
|
|
|
|
if(rowData === 2){
|
|
|
|
return '审核通过';
|
|
|
|
}
|
|
|
|
if(rowData === -1){
|
2021-08-25 18:08:59 +08:00
|
|
|
return '<span style="color: #cc0000">不通过</span>';
|
2021-05-15 14:43:37 +08:00
|
|
|
}else{
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
2021-10-15 18:08:45 +08:00
|
|
|
{field: 'cz', width: 210, title: '操作', align:'left', fixed: 'right',
|
2021-05-15 14:43:37 +08:00
|
|
|
templet: function(row) {
|
|
|
|
var rowData = '<div class="layui-btn-group">';
|
2021-08-16 14:38:50 +08:00
|
|
|
rowData +='<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="audit">查审</button>';
|
|
|
|
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="show">详情</button>';
|
|
|
|
rowData +='<button type="button" class="layui-btn layui-btn-warm layui-btn-xs" lay-event="updateApplyUser">补充资料</button>'
|
2021-10-23 13:43:26 +08:00
|
|
|
rowData +='<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="archivesEvent">报名表</button>'
|
2021-05-15 14:43:37 +08:00
|
|
|
rowData +='</div>';
|
|
|
|
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(),
|
2021-06-18 18:25:56 +08:00
|
|
|
applyAuditStates:$('#applyAuditStates').val() == '' ? '-1,0,2,3' : $('#applyAuditStates').val(),
|
2021-08-25 18:08:59 +08:00
|
|
|
applyWorkTypeId : workerCatalog,
|
|
|
|
applyFenLei :$('#applyFenLei').val(),
|
|
|
|
applyInstitutionId : orgId,
|
2021-05-15 14:43:37 +08:00
|
|
|
},
|
|
|
|
page: {
|
|
|
|
curr: currentPage
|
|
|
|
},
|
|
|
|
height: $win.height() - 115,
|
|
|
|
});
|
2021-10-15 18:08:45 +08:00
|
|
|
/*getExamCheckType();
|
|
|
|
getSignUserCounts();*/
|
2021-05-15 14:43:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 初始化日期
|
|
|
|
function initDate() {
|
|
|
|
// 日期选择
|
|
|
|
laydate.render({
|
|
|
|
elem: '#startTime',
|
|
|
|
format: 'yyyy-MM-dd'
|
|
|
|
});
|
|
|
|
laydate.render({
|
|
|
|
elem: '#endTime',
|
|
|
|
format: 'yyyy-MM-dd'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// 事件 - 页面变化
|
|
|
|
$win.on('resize', function() {
|
|
|
|
clearTimeout(resizeTimeout);
|
|
|
|
resizeTimeout = setTimeout(function() {
|
|
|
|
reloadTable();
|
|
|
|
}, 500);
|
|
|
|
});
|
|
|
|
// 事件 - 搜索
|
|
|
|
$(document).on('click', '#search', function() {
|
|
|
|
reloadTable(1);
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).on('click', '#class-plan-btn-event', function() {
|
|
|
|
parent.layer.open({
|
|
|
|
type: 2,
|
2021-10-15 18:08:45 +08:00
|
|
|
title: '发起开班申请',
|
2021-05-15 14:43:37 +08:00
|
|
|
closeBtn: 1,
|
|
|
|
area: ['90%', '90%'],
|
|
|
|
shadeClose: false,
|
|
|
|
anim: 2,
|
2021-05-15 19:42:31 +08:00
|
|
|
content: top.restAjax.path('route/classplan/save.html?orgId={arg}&workerCatalog={arg1}', [orgId,workerCatalog]),
|
2021-05-15 14:43:37 +08:00
|
|
|
end: function() {
|
|
|
|
reloadTable();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2021-08-16 14:38:50 +08:00
|
|
|
$(document).on('click', '#add-apply-user', function() {
|
|
|
|
// 用于判断使用哪种页面进行报名
|
|
|
|
top.restAjax.get(top.restAjax.path('api/classplan/get-save-used-html', []),
|
|
|
|
{workerCatalog : workerCatalog}, null, function (code, data) {
|
|
|
|
var parentWorkType = data.parentWorkerCatalog;
|
|
|
|
if(typeof (data.parentWorkerCatalog) === 'undefined'){
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var url = '';
|
|
|
|
if(parentWorkType == '530279c5-32a9-44db-bbf0-a04ef1cdae66'){
|
|
|
|
url = top.restAjax.path('route/classplan/save-user-register2.html?orgId={arg}&workerCatalog={arg1}', [orgId,workerCatalog]);
|
|
|
|
} else {
|
|
|
|
url = top.restAjax.path('route/classplan/save-user-register1.html?orgId={arg}&workerCatalog={arg1}', [orgId,workerCatalog]);
|
|
|
|
}
|
2021-05-15 14:43:37 +08:00
|
|
|
parent.layer.open({
|
|
|
|
type: 2,
|
2021-08-16 14:38:50 +08:00
|
|
|
title: '添加报名人员信息',
|
2021-05-15 14:43:37 +08:00
|
|
|
closeBtn: 1,
|
2021-08-16 14:38:50 +08:00
|
|
|
area: ['50%', '90%'],
|
2021-05-15 14:43:37 +08:00
|
|
|
shadeClose: false,
|
|
|
|
anim: 2,
|
2021-08-16 14:38:50 +08:00
|
|
|
content: url,
|
2021-05-15 14:43:37 +08:00
|
|
|
end: function() {
|
|
|
|
reloadTable();
|
|
|
|
}
|
|
|
|
});
|
2021-08-16 14:38:50 +08:00
|
|
|
}, function (code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2021-09-07 17:58:19 +08:00
|
|
|
// table工具条按钮事件
|
2021-08-25 18:08:59 +08:00
|
|
|
table.on('toolbar(dataTable)', function(obj) {
|
|
|
|
var layEvent = obj.event;
|
|
|
|
var checkStatus = table.checkStatus('dataTable');
|
|
|
|
var checkDatas = checkStatus.data;
|
|
|
|
if(layEvent === 'gavelEvent'){
|
|
|
|
if(checkDatas.length === 0) {
|
|
|
|
top.dialog.msg('请勾选要审核的学员!');
|
|
|
|
} else {
|
|
|
|
var ids = '';
|
|
|
|
for(var i = 0, item; item = checkDatas[i++];) {
|
|
|
|
if(i > 1) {
|
|
|
|
ids += '_';
|
|
|
|
}
|
|
|
|
ids += item['applyId'];
|
|
|
|
}
|
|
|
|
top.dialog.msg('请选择批量审核结果?', {
|
|
|
|
time: 0,
|
|
|
|
closeBtn: 1,
|
|
|
|
btn: ['通过', '不通过'],
|
|
|
|
shade: 0.3,
|
|
|
|
yes: function (index) {
|
|
|
|
updateApplyBatchPass(ids,2);
|
|
|
|
top.dialog.close(index);
|
|
|
|
},
|
|
|
|
btn2: function(index){
|
|
|
|
updateApplyBatchPass(ids,-1);
|
|
|
|
top.dialog.close(index);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2021-09-07 17:58:19 +08:00
|
|
|
if(layEvent === 'deleteApplyEvent'){
|
|
|
|
if(checkDatas.length === 0) {
|
|
|
|
top.dialog.msg('请勾选要删除的学员!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var ids = '';
|
|
|
|
for(var i = 0, item; item = checkDatas[i++];) {
|
|
|
|
if(i > 1) {
|
|
|
|
ids += '_';
|
|
|
|
}
|
|
|
|
ids += item['applyId'];
|
|
|
|
}
|
|
|
|
top.dialog.msg('确认删已勾选的学员?', {
|
|
|
|
time: 0,
|
|
|
|
closeBtn: 1,
|
|
|
|
btn: ['确认', '取消'],
|
|
|
|
shade: 0.3,
|
|
|
|
yes: function (index) {
|
|
|
|
top.dialog.close(index);
|
|
|
|
deleteApply(ids);
|
|
|
|
},
|
|
|
|
btn2: function(index){
|
|
|
|
top.dialog.close(index);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2021-08-25 18:08:59 +08:00
|
|
|
});
|
|
|
|
|
2021-09-07 17:58:19 +08:00
|
|
|
// 删除学员
|
|
|
|
function deleteApply(ids){
|
|
|
|
top.restAjax.delete(top.restAjax.path('api/apply/remove/{ids}', [ids]), {}, null, function (code, data) {
|
|
|
|
top.dialog.msg('删除完成');
|
|
|
|
reloadTable();
|
|
|
|
}, function (code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-08-25 18:08:59 +08:00
|
|
|
function updateApplyBatchPass(ids,applyAuditState){
|
|
|
|
top.restAjax.get(top.restAjax.path('api/classplan/update-batch-pass', []),
|
|
|
|
{ids :ids,applyAuditState:applyAuditState}, null, function (code, data) {
|
|
|
|
top.dialog.msg('审核完成', {time: 1000});
|
|
|
|
reloadTable();
|
|
|
|
}, function (code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-08-16 14:38:50 +08:00
|
|
|
table.on('tool(dataTable)', function(obj) {
|
|
|
|
var layEvent = obj.event;
|
|
|
|
var data = obj.data;
|
|
|
|
if(layEvent === 'show') {
|
|
|
|
// 用于判断使用哪种页面
|
|
|
|
top.restAjax.get(top.restAjax.path('api/classplan/get-save-used-html', []),
|
|
|
|
{workerCatalog : data.applyWorkTypeId}, null, function (code, res) {
|
|
|
|
var parentWorkType = res.parentWorkerCatalog;
|
|
|
|
if(typeof (res.parentWorkerCatalog) === 'undefined'){
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var url = '';
|
|
|
|
if(parentWorkType == '530279c5-32a9-44db-bbf0-a04ef1cdae66'){
|
|
|
|
url = top.restAjax.path('route/classplan/show-user-register2.html?applyId={arg}', [data.applyId]);
|
|
|
|
} else {
|
|
|
|
url = top.restAjax.path('route/classplan/show-user-register1.html?applyId={arg}', [data.applyId]);
|
2021-05-15 14:43:37 +08:00
|
|
|
}
|
2021-08-16 14:38:50 +08:00
|
|
|
parent.layer.open({
|
|
|
|
type: 2,
|
|
|
|
title: '查看信息',
|
|
|
|
closeBtn: 1,
|
|
|
|
area: ['50%', '90%'],
|
|
|
|
shadeClose: false,
|
|
|
|
anim: 2,
|
|
|
|
content: url,
|
|
|
|
end: function() {
|
2021-08-25 18:08:59 +08:00
|
|
|
//reloadTable();
|
2021-08-16 14:38:50 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}, function (code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
2021-05-15 14:43:37 +08:00
|
|
|
});
|
2021-08-16 14:38:50 +08:00
|
|
|
}
|
|
|
|
if (layEvent === 'audit'){
|
|
|
|
// 用于判断使用哪种页面
|
|
|
|
top.restAjax.get(top.restAjax.path('api/classplan/get-save-used-html', []),
|
|
|
|
{workerCatalog : data.applyWorkTypeId}, null, function (code, res) {
|
|
|
|
var parentWorkType = res.parentWorkerCatalog;
|
|
|
|
if(typeof (res.parentWorkerCatalog) === 'undefined'){
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var url = '';
|
|
|
|
if(parentWorkType == '530279c5-32a9-44db-bbf0-a04ef1cdae66'){
|
|
|
|
url = top.restAjax.path('route/classplan/audit-user-register2.html?applyId={arg}', [data.applyId]);
|
|
|
|
} else {
|
|
|
|
url = top.restAjax.path('route/classplan/audit-user-register1.html?applyId={arg}', [data.applyId]);
|
|
|
|
}
|
|
|
|
parent.layer.open({
|
|
|
|
type: 2,
|
|
|
|
title: '信息审核',
|
|
|
|
closeBtn: 1,
|
|
|
|
area: ['50%', '90%'],
|
|
|
|
shadeClose: false,
|
|
|
|
anim: 2,
|
|
|
|
content: url,
|
|
|
|
end: function() {
|
|
|
|
reloadTable();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}, function (code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
// 补充资料
|
|
|
|
if(layEvent === 'updateApplyUser'){
|
|
|
|
// 用于判断使用哪种页面
|
|
|
|
top.restAjax.get(top.restAjax.path('api/classplan/get-save-used-html', []),
|
|
|
|
{workerCatalog : data.applyWorkTypeId}, null, function (code, res) {
|
|
|
|
var parentWorkType = res.parentWorkerCatalog;
|
|
|
|
if(typeof (res.parentWorkerCatalog) === 'undefined'){
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var url = '';
|
|
|
|
if(parentWorkType == '530279c5-32a9-44db-bbf0-a04ef1cdae66'){
|
|
|
|
url = top.restAjax.path('route/classplan/update-user-register2.html?applyId={arg}', [data.applyId]);
|
|
|
|
} else {
|
|
|
|
url = top.restAjax.path('route/classplan/update-user-register1.html?applyId={arg}', [data.applyId]);
|
|
|
|
}
|
|
|
|
parent.layer.open({
|
|
|
|
type: 2,
|
|
|
|
title: '补充报名人员信息',
|
|
|
|
closeBtn: 1,
|
|
|
|
area: ['50%', '90%'],
|
|
|
|
shadeClose: false,
|
|
|
|
anim: 2,
|
|
|
|
content: url,
|
|
|
|
end: function() {
|
|
|
|
reloadTable();
|
|
|
|
}
|
2021-05-15 14:43:37 +08:00
|
|
|
});
|
2021-08-16 14:38:50 +08:00
|
|
|
}, function (code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
2021-05-15 14:43:37 +08:00
|
|
|
});
|
|
|
|
}
|
2021-10-15 18:08:45 +08:00
|
|
|
if(layEvent === 'archivesEvent'){
|
|
|
|
top.restAjax.get(top.restAjax.path('api/classplan/get-save-used-html', []),
|
|
|
|
{workerCatalog : data.applyWorkTypeId}, null, function (code, res) {
|
|
|
|
var parentWorkType = res.parentWorkerCatalog;
|
|
|
|
if(typeof (res.parentWorkerCatalog) === 'undefined'){
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var url = '';
|
|
|
|
if(parentWorkType == '530279c5-32a9-44db-bbf0-a04ef1cdae66'){
|
|
|
|
url = top.restAjax.path('route/classplan/archives-template2.html?applyId={arg}', [data.applyId]);
|
|
|
|
} else {
|
|
|
|
url = top.restAjax.path('route/classplan/archives-template1.html?applyId={arg}', [data.applyId]);
|
|
|
|
}
|
|
|
|
window.open(url);
|
|
|
|
}, function (code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
|
|
|
});
|
|
|
|
}
|
2021-05-15 14:43:37 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|