diff --git a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java index b26fbc7..2243f20 100644 --- a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java @@ -357,6 +357,24 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl dto.setReportType(examCheck.getCheckStatus() + ""); dto.setReportReason(examCheck.getReason()); } + // 补充考试申请时提交的图片及PDF + params.put("classPlanId", classPlanId); + Map examFile = classPlanDao.getExamFile(params); + if(examFile != null && examFile.get("examImages") != null){ + dto.setExamImages(examFile.get("examImages").toString()); + } + if(examFile != null && examFile.get("examPDF") != null){ + dto.setExamPDF(examFile.get("examPDF").toString()); + } + // 补充考试申请退回原因 + params.put("examId",classPlanId); + ExamApplyDTO examApplyDTO = examApplyService.get(params); + if(examApplyDTO != null && examApplyDTO.getCheckStatus() != null){ + dto.setExamType(examApplyDTO.getCheckStatus() + ""); + } + if(examApplyDTO != null && examApplyDTO.getReason() != null){ + dto.setExamReason(examApplyDTO.getReason()); + } return dto; } @@ -481,14 +499,10 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl // 查询工种类型 WorkTypeDTO workTypeDTO = workTypeService.get(item.getWorkerCatalog()); item.setWorkerCatalogName(workTypeDTO == null ? "" : workTypeDTO.getWorkTypeName()); - //查询已报名人数 - queryMap.put("applyClassId",item.getClassPlanId()); - List applyAuditStates = new ArrayList<>(); - applyAuditStates.add("3"); - queryMap.put("applyAuditStates",applyAuditStates); - List list = applyService.list(queryMap); - item.setSignUpUserCount(list == null ? 0 : list.size()); - //查询计划申请状态 + //查询申考人员 + List applyStudentsDTOS = studentsService.listByClssId(item.getClassPlanId()); + item.setSignUpUserCount(applyStudentsDTOS == null ? 0 : applyStudentsDTOS.size()); + //查询考试申请状态 queryMap.clear(); queryMap.put("examId",item.getClassPlanId()); ExamApplyDTO examApplyDTO = examApplyService.get(queryMap); diff --git a/src/main/resources/static/route/classplan/list-report-exam.html b/src/main/resources/static/route/classplan/list-report-exam.html index 4917b6f..6c90fbd 100644 --- a/src/main/resources/static/route/classplan/list-report-exam.html +++ b/src/main/resources/static/route/classplan/list-report-exam.html @@ -98,7 +98,7 @@ cols: [ [ {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, - {width:150, title: '操作', fixed: 'left', align:'center', + {width:100, title: '操作', fixed: 'left', align:'center', templet: function(row) { var dom = ''; if(row['examType'] === ''){ @@ -106,15 +106,15 @@ return dom; } if(row['examType'] === '0'){ - dom += '查看详情'; + dom += '查看申请'; return dom; } if(row['examType'] === '1'){ - dom += '查看详情'; + dom += '查看申请'; return dom; } if(row['examType'] === '-1'){ - dom += '修改重申'; + dom += '修改重申'; return dom; } } @@ -153,7 +153,8 @@ if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') { return '-'; } - return '' + rowData + ' 人'; + var dom = '查看'; + return '' + rowData + ' 人 ' + dom; } }, {field: 'planNumber', width: 400, title: '班次及培训名称', align:'center', @@ -178,7 +179,17 @@ return end.substring(0,10); } }, - {field: 'projectCatalogName', width: 180, title: '培训项目', align:'center', + + {field: 'chargePerson', width: 110, title: '负责人', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { + return '-'; + } + return rowData; + } + }, + {field: 'chargePersonTel', width: 120, title: '联系方式', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { @@ -262,12 +273,12 @@ if(layEvent == 'showEvent'){ layer.open({ type: 2, - title: '查看申请结果', + title: '查看申请', closeBtn: 1, area: ['80%', '80%'], shadeClose: false, anim: 2, - content: top.restAjax.path('route/classplan/show-report-exam.html?classPlanId={classPlanId}', [obj.data.classPlanId]), + content: top.restAjax.path('route/classplan/update-exam-commit.html?classPlanId={classPlanId}', [obj.data.classPlanId]), end: function () { } }); @@ -275,12 +286,27 @@ if(layEvent == 'updateEvent'){ layer.open({ type: 2, - title: '查看申请信息', + title: '修改重申', closeBtn: 1, area: ['60%', '80%'], shadeClose: false, anim: 2, - content: top.restAjax.path('route/classplan/update-report-exam.html?classPlanId={classPlanId}', [obj.data.classPlanId]), + content: top.restAjax.path('route/classplan/update-exam-commit.html?classPlanId={classPlanId}', [obj.data.classPlanId]), + end: function () { + reloadTable(); + } + }); + } + if(layEvent == 'signUpUserEvent') { + layer.open({ + type: 2, + title: '报名人员列表', + closeBtn: 1, + area: ['90%', '90%'], + shadeClose: true, + anim: 2, + content: top.restAjax.path('route/classplan/list-signup-user.html?classPlanId={arg}&reportType={arg1}&orgId={arg2}&workerCatalog={arg3}', + [obj.data.classPlanId,'1', obj.data.orgId,obj.data.workerCatalog]), end: function () { reloadTable(); } diff --git a/src/main/resources/static/route/classplan/list-signup-user.html b/src/main/resources/static/route/classplan/list-signup-user.html index 69a55f3..c1397ea 100644 --- a/src/main/resources/static/route/classplan/list-signup-user.html +++ b/src/main/resources/static/route/classplan/list-signup-user.html @@ -61,7 +61,7 @@ var orgId = top.restAjax.params(window.location.href).orgId; var workerCatalog = top.restAjax.params(window.location.href).workerCatalog; var tableUrl = ''; - if(reportType == '2'){ + if(reportType == '1'){ tableUrl = 'api/applystudents/listpage'; } else{ $('#add-apply-user').show(); @@ -82,7 +82,7 @@ where :{ applyInstitutionId: orgId, applyWorkTypeId : workerCatalog, - applyClassId : reportType == "2" ? classPlanId : '', + applyClassId : reportType == "1" ? classPlanId : '', applyAuditStates : '2' }, toolbar: false, diff --git a/src/main/resources/static/route/classplan/list.html b/src/main/resources/static/route/classplan/list.html index 7069924..9289ad1 100644 --- a/src/main/resources/static/route/classplan/list.html +++ b/src/main/resources/static/route/classplan/list.html @@ -93,17 +93,17 @@ templet: function(row) { var dom = ''; if(row['reportType'] === '0'){ - dom += '报名人员'; + dom += '参培人员'; dom += '查看申请'; return dom; } if(row['reportType'] === '1'){ - dom += '报名人员'; + dom += '参培人员'; dom += '申请通过'; return dom; } if(row['reportType'] === '-1'){ - dom += '报名人员'; + dom += '参培人员'; dom += '修改重申'; return dom; } diff --git a/src/main/resources/static/route/classplan/show-exam-commit.html b/src/main/resources/static/route/classplan/show-exam-commit.html index 8a4e2ae..5490c15 100644 --- a/src/main/resources/static/route/classplan/show-exam-commit.html +++ b/src/main/resources/static/route/classplan/show-exam-commit.html @@ -21,15 +21,14 @@
- +
- -
-
+
- +
@@ -42,7 +41,7 @@
- @@ -51,32 +50,23 @@
- +
- - +
- +
- -
-
-
-
-
- -
- +
-
+
@@ -85,7 +75,7 @@
-
+
@@ -94,9 +84,7 @@
-
-
-
+
@@ -107,14 +95,14 @@
-
+
- +
- -
- -
-
-
-
-
-
-
- -
- -
- -
-
-
-
@@ -290,7 +198,7 @@ var classPlanLessons = []; var classPlanId = top.restAjax.params(window.location.href).classPlanId; var orgId = ''; - var planImagesViewerObj = {}; + var lessonTeacherArray = []; var examImagesViewerObj = {}; // 初始化内容 @@ -303,24 +211,23 @@ } dataFormData['planStartTime'] = dataFormData['planStartTime'].substring(0,10); dataFormData['planEndTime'] = dataFormData['planEndTime'].substring(0,10); - dataFormData['signUpStartTime'] = dataFormData['signUpStartTime'].substring(0,10); - dataFormData['signUpEndTime'] = dataFormData['signUpEndTime'].substring(0,10); form.val('dataForm', dataFormData); form.render(null, 'dataForm'); if(dataFormData['reportReason'] = ''){ $('#report-reason-block').show(); } - //初始化课程列表 - initTeacherList(data.orgId); - classPlanLessons = data.classPlanLessons; orgId = data.orgId; - initPlanImagesUploadFile(); - initPlanPDFUploadFile(); + lessonTeacherArray = data['classPlanLessons']; + initLessonTeacher(); initExamImagesUploadFile(); initExamPDFUploadFile(); setTimeout(function(){ - $('.layui-card').height($('.layui-card').height()); - },1000); + if($win.height() < $('.layui-card').height()){ + $('.layui-card').height($('.layui-card').height()); + } else { + $('.layui-card').height($win.height()); + } + },100); }, function(code, data) { top.dialog.msg(data.msg); }, function() { @@ -331,143 +238,10 @@ } initData(); - //查询讲师列表 - function initTeacherList(orgId){ - top.restAjax.get(top.restAjax.path('api/teacher/list',[]), {orgId : orgId}, null, function(code,data){ - teacherList = data; - initLessonsList(); - },function(code,data){ - top.dialog.msg(data.msg); - }); - } - - //查询课程列表 - function initLessonsList(){ - var dataObj = {}; - var projectCatalogId = $('#projectCatalogId').val(); - if(projectCatalogId == ''){ - dataObj['lesson'] = []; - dataObj['teacher'] = []; - laytpl(document.getElementById('lessonTbodyTemplate').innerHTML).render(dataObj, function(html) { - document.getElementById('lessonTbodyBox').innerHTML = html; - }); - form.render(); - return; - } - top.restAjax.get(top.restAjax.path('api/lessons/list',[]), {projectCatalogId : projectCatalogId, orgId: orgId}, null, function(code,data){ - dataObj['lesson'] = data; - dataObj['teacher'] = teacherList; - laytpl(document.getElementById('lessonTbodyTemplate').innerHTML).render(dataObj, function(html) { - document.getElementById('lessonTbodyBox').innerHTML = html; - }); - form.render(); - reloadLessonsList(); - },function(code,data){ - top.dialog.msg(data.msg); - }); - } - - // 初始化图片上传 - function initPlanImagesUploadFile() { - var files = $('#planImages').val(); - initFileList('planImages', files, function(fileName) { - var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false}); - planImagesViewerObj[fileName] = viewer; - }); - - form.on('button(planImagesUploadFile)', function(obj) { - var name = this.dataset.name; - var explain = this.dataset.explain; - top.dialog.file({ - type: 'image', - title: '上传'+ explain, - width: '400px', - height: '420px', - maxFileCount: '1', - onClose: function() { - var uploadFileArray = top.dialog.dialogData.uploadFileArray; - if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) { - var files = $('#'+ name).val(); - for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) { - if(files.length > 0) { - files += ','; - } - files += file.data; - } - initFileList(name, files, function(fileName) { - planImagesViewerObj[fileName].update(); - }); - } - } - }); - }); - - form.on('button(planImagesRemoveFile)', function(obj) { - var name = this.dataset.name; - var id = this.dataset.id; - var files = $('#'+ name).val().replace(id, ''); - files = files.replace(/\,+/g, ','); - if(files.charAt(0) == ',') { - files = files.substring(1); - } - if(files.charAt(files.length - 1) == ',') { - files = files.substring(0, files.length - 1); - } - initFileList(name, files, function(fileName) { - planImagesViewerObj[fileName].update(); - }); - }); - } - - // 初始化PDF上传 - function initPlanPDFUploadFile() { - var files = $('#planPDF').val(); - initFileList('planPDF', files, function(fileName) { - $(document).on('click', '.pdf-open-show', function(obj){ - var fileId = this.dataset.id; - window.open('route/file/download/true/' + fileId); - }) - }); - - form.on('button(planPDFUploadFile)', function(obj) { - var name = this.dataset.name; - var explain = this.dataset.explain; - top.dialog.file({ - type: 'file', - title: '上传'+ explain, - width: '400px', - height: '420px', - maxFileCount: '1', - onClose: function() { - var uploadFileArray = top.dialog.dialogData.uploadFileArray; - if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) { - var files = $('#'+ name).val(); - for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) { - if(files.length > 0) { - files += ','; - } - files += file.data; - } - initFileList(name, files, function(fileName) { - }); - } - } - }); - }); - - form.on('button(planPDFRemoveFile)', function(obj) { - var name = this.dataset.name; - var id = this.dataset.id; - var files = $('#'+ name).val().replace(id, ''); - files = files.replace(/\,+/g, ','); - if(files.charAt(0) == ',') { - files = files.substring(1); - } - if(files.charAt(files.length - 1) == ',') { - files = files.substring(0, files.length - 1); - } - initFileList(name, files, function(fileName) { - }); + // 加载已添加的课程及讲师 + function initLessonTeacher(){ + laytpl(document.getElementById('lessonTeacherTemplate').innerHTML).render(lessonTeacherArray, function(html) { + document.getElementById('lessonTeacherBox').innerHTML = html; }); } diff --git a/src/main/resources/static/route/classplan/update-exam-commit.html b/src/main/resources/static/route/classplan/update-exam-commit.html index f511c82..4f971fe 100644 --- a/src/main/resources/static/route/classplan/update-exam-commit.html +++ b/src/main/resources/static/route/classplan/update-exam-commit.html @@ -128,8 +128,12 @@ initExamImagesUploadFile(); initExamPDFUploadFile(); setTimeout(function(){ - $('.layui-card').height($('.layui-card').height()); - },1000); + if($win.height() < $('.layui-card').height()){ + $('.layui-card').height($('.layui-card').height()); + } else { + $('.layui-card').height($win.height()); + } + },100); }, function(code, data) { top.dialog.msg(data.msg); }, function() {