添加考试申请对接逻辑
This commit is contained in:
parent
b96b4151c9
commit
49978c26a0
@ -118,7 +118,7 @@ public class ClassPlanController extends DefaultBaseController {
|
||||
params.put("examNowDate", DateUtil.getTime());
|
||||
params.put("reportType", "2");
|
||||
page.setParams(params);
|
||||
return classPlanService.listPage(page);
|
||||
return classPlanService.listPageExam(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "统计", notes = "统计接口")
|
||||
@ -141,4 +141,15 @@ public class ClassPlanController extends DefaultBaseController {
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "提交考试申请", notes = "提交考试申请接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "classPlanId", value = "ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update-exam/{classPlanId}")
|
||||
public SuccessResult updateExamType(@PathVariable("classPlanId") String classPlanId, @RequestBody ClassPlanVO classPlanVO) {
|
||||
classPlanService.updateExamType(classPlanId, classPlanVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
}
|
@ -67,6 +67,12 @@ public class ClassPlanDTO {
|
||||
private String orgName;
|
||||
@ApiModelProperty(name = "classPlanLessons", value = "计划下课程列表")
|
||||
private List<Map<String,Object>> classPlanLessons;
|
||||
@ApiModelProperty(name = "signUpUserCount", value = "已报名完成人数")
|
||||
private Integer signUpUserCount;
|
||||
@ApiModelProperty(name = "examType", value = "考试申请状态0未审核1审核通过2审核驳回")
|
||||
private String examType;
|
||||
@ApiModelProperty(name = "examReason", value = "考试申请原因")
|
||||
private String examReason;
|
||||
|
||||
|
||||
public String getPlanNumber() {
|
||||
@ -239,4 +245,28 @@ public class ClassPlanDTO {
|
||||
public void setClassPlanLessons(List<Map<String, Object>> classPlanLessons) {
|
||||
this.classPlanLessons = classPlanLessons;
|
||||
}
|
||||
|
||||
public Integer getSignUpUserCount() {
|
||||
return signUpUserCount;
|
||||
}
|
||||
|
||||
public void setSignUpUserCount(Integer signUpUserCount) {
|
||||
this.signUpUserCount = signUpUserCount;
|
||||
}
|
||||
|
||||
public String getExamType() {
|
||||
return examType == null ? "" : examType;
|
||||
}
|
||||
|
||||
public void setExamType(String examType) {
|
||||
this.examType = examType;
|
||||
}
|
||||
|
||||
public String getExamReason() {
|
||||
return examReason == null ? "" : examReason;
|
||||
}
|
||||
|
||||
public void setExamReason(String examReason) {
|
||||
this.examReason = examReason;
|
||||
}
|
||||
}
|
||||
|
@ -48,6 +48,12 @@ public class ClassPlanVO {
|
||||
private String reportType;
|
||||
@ApiModelProperty(name = "reportReason", value = "报备审核原因")
|
||||
private String reportReason;
|
||||
@ApiModelProperty(name = "estimateStart", value = "预计考试开始时间")
|
||||
private String estimateStart;
|
||||
@ApiModelProperty(name = "estimateEnd", value = "预计考试结束时间")
|
||||
private String estimateEnd;
|
||||
@ApiModelProperty(name = "examType", value = "考试申请类型1理论2实操3理论与实操")
|
||||
private String examType;
|
||||
|
||||
public String getPlanNumber() {
|
||||
return planNumber == null ? "" : planNumber.trim();
|
||||
@ -184,4 +190,28 @@ public class ClassPlanVO {
|
||||
public void setReportReason(String reportReason) {
|
||||
this.reportReason = reportReason;
|
||||
}
|
||||
|
||||
public String getExamType() {
|
||||
return examType == null ? "" : examType;
|
||||
}
|
||||
|
||||
public void setExamType(String examType) {
|
||||
this.examType = examType;
|
||||
}
|
||||
|
||||
public String getEstimateStart() {
|
||||
return estimateStart == null ? "" : estimateStart;
|
||||
}
|
||||
|
||||
public void setEstimateStart(String estimateStart) {
|
||||
this.estimateStart = estimateStart;
|
||||
}
|
||||
|
||||
public String getEstimateEnd() {
|
||||
return estimateEnd == null ? "" : estimateEnd;
|
||||
}
|
||||
|
||||
public void setEstimateEnd(String estimateEnd) {
|
||||
this.estimateEnd = estimateEnd;
|
||||
}
|
||||
}
|
||||
|
@ -206,4 +206,17 @@ public interface IClassPlanService {
|
||||
*/
|
||||
void updateReportType(String classPlanId, ClassPlanVO classPlanVO);
|
||||
|
||||
/**
|
||||
* 查询考试计划分页列表
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<ClassPlanDTO>> listPageExam(ListPage page);
|
||||
|
||||
/**
|
||||
* 提交考试申请接口
|
||||
* @param classPlanId
|
||||
* @param classPlanVO
|
||||
*/
|
||||
void updateExamType(String classPlanId, ClassPlanVO classPlanVO);
|
||||
}
|
@ -4,12 +4,17 @@ import cn.com.tenlion.dao.classplan.IClassPlanDao;
|
||||
import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO;
|
||||
import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService;
|
||||
import cn.com.tenlion.pojo.bos.classplan.ClassPlanBO;
|
||||
import cn.com.tenlion.pojo.dtos.apply.ApplyDTO;
|
||||
import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO;
|
||||
import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO;
|
||||
import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO;
|
||||
import cn.com.tenlion.pojo.pos.classplan.ClassPlanPO;
|
||||
import cn.com.tenlion.pojo.vos.classplan.ClassPlanVO;
|
||||
import cn.com.tenlion.pojo.vos.examapply.ExamApplyVO;
|
||||
import cn.com.tenlion.pojo.vos.examcheck.ExamCheckVO;
|
||||
import cn.com.tenlion.service.apply.IApplyService;
|
||||
import cn.com.tenlion.service.classplan.IClassPlanService;
|
||||
import cn.com.tenlion.service.examapply.IExamApplyService;
|
||||
import cn.com.tenlion.service.examcheck.IExamCheckService;
|
||||
import cn.com.tenlion.service.worktype.IWorkTypeService;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@ -43,15 +48,22 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
|
||||
|
||||
@Autowired
|
||||
private IClassPlanDao classPlanDao;
|
||||
|
||||
@Autowired
|
||||
private IExamCheckService examCheckService;
|
||||
@Autowired
|
||||
private IDataService dataService;
|
||||
//工种信息
|
||||
@Autowired
|
||||
private IWorkTypeService workTypeService;
|
||||
//机构信息
|
||||
@Autowired
|
||||
private IInstitutionService iInstitutionService;
|
||||
//报名情况
|
||||
@Autowired
|
||||
private IApplyService applyService;
|
||||
//考试申请
|
||||
@Autowired
|
||||
private IExamApplyService examApplyService;
|
||||
|
||||
@Override
|
||||
public void save(ClassPlanVO classPlanVO) {
|
||||
@ -285,6 +297,7 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
|
||||
}
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<ClassPlanDTO> classPlanDTOs = list(page.getParams());
|
||||
Map<String,Object> queryMap = getHashMap(4);
|
||||
for(ClassPlanDTO item : classPlanDTOs){
|
||||
//处理培训项目
|
||||
DataDTO dataDTO = dataService.get(item.getProjectCatalogId());
|
||||
@ -292,7 +305,49 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
|
||||
//处理工种类型
|
||||
WorkTypeDTO workTypeDTO = workTypeService.get(item.getWorkerCatalog());
|
||||
item.setWorkerCatalogName(workTypeDTO.getWorkTypeName());
|
||||
//查询已报名人数
|
||||
queryMap.put("applyClassId",item.getClassPlanId());
|
||||
List<String> applyAuditStates = new ArrayList<>();
|
||||
applyAuditStates.add("3");
|
||||
queryMap.put("applyAuditStates",applyAuditStates);
|
||||
List<ApplyDTO> list = applyService.list(queryMap);
|
||||
item.setSignUpUserCount(list == null ? 0 : list.size());
|
||||
}
|
||||
PageInfo<ClassPlanDTO> pageInfo = new PageInfo<>(classPlanDTOs);
|
||||
return new SuccessResultList<>(classPlanDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<ClassPlanDTO>> listPageExam(ListPage page) {
|
||||
if(page.getParams().get("orgId") == null
|
||||
|| page.getParams().get("orgId").toString().length() == 0){
|
||||
return new SuccessResultList<>(new ArrayList<>(), 0, 0L);
|
||||
}
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<ClassPlanDTO> classPlanDTOs = list(page.getParams());
|
||||
Map<String,Object> queryMap = getHashMap(4);
|
||||
for(ClassPlanDTO item : classPlanDTOs){
|
||||
//处理培训项目
|
||||
DataDTO dataDTO = dataService.get(item.getProjectCatalogId());
|
||||
item.setProjectCatalogName(dataDTO.getDataName());
|
||||
//处理工种类型
|
||||
WorkTypeDTO workTypeDTO = workTypeService.get(item.getWorkerCatalog());
|
||||
item.setWorkerCatalogName(workTypeDTO.getWorkTypeName());
|
||||
//查询已报名人数
|
||||
queryMap.put("applyClassId",item.getClassPlanId());
|
||||
List<String> applyAuditStates = new ArrayList<>();
|
||||
applyAuditStates.add("3");
|
||||
queryMap.put("applyAuditStates",applyAuditStates);
|
||||
List<ApplyDTO> list = applyService.list(queryMap);
|
||||
item.setSignUpUserCount(list == null ? 0 : list.size());
|
||||
//查询计划申请状态
|
||||
queryMap.clear();
|
||||
queryMap.put("examId",item.getClassPlanId());
|
||||
ExamApplyDTO examApplyDTO = examApplyService.get(queryMap);
|
||||
item.setExamType("");
|
||||
if(examApplyDTO != null){
|
||||
item.setExamType(examApplyDTO.getCheckStatus() + "");
|
||||
}
|
||||
}
|
||||
PageInfo<ClassPlanDTO> pageInfo = new PageInfo<>(classPlanDTOs);
|
||||
return new SuccessResultList<>(classPlanDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
@ -304,4 +359,17 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateExamType(String classPlanId, ClassPlanVO classPlanVO) {
|
||||
ExamApplyVO examApplyVO = new ExamApplyVO();
|
||||
examApplyVO.setExamId(classPlanId);
|
||||
examApplyVO.setExamType(Integer.parseInt(classPlanVO.getExamType()));
|
||||
examApplyVO.setTheoryExamStartTime(classPlanVO.getEstimateStart());
|
||||
examApplyVO.setTheoryExamEndTime(classPlanVO.getEstimateEnd());
|
||||
if("3".equals(classPlanVO.getExamType())){
|
||||
examApplyVO.setPracticeExamStartTime(classPlanVO.getEstimateStart());
|
||||
examApplyVO.setPracticeExamEndTime(classPlanVO.getEstimateEnd());
|
||||
}
|
||||
examApplyService.save(examApplyVO);
|
||||
}
|
||||
}
|
@ -21,10 +21,10 @@
|
||||
<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>
|
||||
<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>
|
||||
<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> 搜索
|
||||
@ -93,7 +93,7 @@
|
||||
height: $win.height() - 90,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
toolbar: '#headerToolBar',
|
||||
toolbar: false,
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
@ -103,30 +103,26 @@
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{width:100, title: '操作', fixed: 'left', align:'center',
|
||||
templet: function(row) {
|
||||
var dom = '';
|
||||
if(row['reportType'] === '0'){
|
||||
return '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="reportEvent">报备</a>';
|
||||
if(row['examType'] === ''){
|
||||
dom += '<a type="button" class="layui-btn layui-btn-info layui-btn-xs" lay-event="examEvent">考试申请</a>';
|
||||
return dom;
|
||||
}
|
||||
if(row['reportType'] === '1'){
|
||||
return '<a type="button" class="layui-btn layui-btn-warm layui-btn-xs">报备待审</a>';
|
||||
if(row['examType'] === '0'){
|
||||
dom += '<a type="button" class="layui-btn layui-btn-warm layui-btn-xs">审核中</a>';
|
||||
return dom;
|
||||
}
|
||||
if(row['reportType'] === '2'){
|
||||
return '<a type="button" class="layui-btn layui-btn-info layui-btn-xs">审核通过</a>';
|
||||
if(row['examType'] === '1'){
|
||||
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs">审核通过</a>';
|
||||
return dom;
|
||||
}
|
||||
return dom;
|
||||
}
|
||||
},
|
||||
{field: 'planNumber', width: 180, title: '培训计划编号', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
if(row['examType'] === '2'){
|
||||
dom += '<a type="button" class="layui-btn layui-btn-warm layui-btn-xs">审核驳回</a>';
|
||||
return dom;
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'planName', width: 180, title: '培训计划名称', align:'center',
|
||||
@ -138,6 +134,22 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
|
||||
{field: 'planNumber', width: 180, title: '培训计划编号', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{width: 150, title: '培训结束时间', align:'center',
|
||||
templet: function(row) {
|
||||
var end = row['planEndTime'];
|
||||
return end.substring(0,10);
|
||||
}
|
||||
},
|
||||
{field: 'planType', width: 120, title: '培训类型', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
@ -171,55 +183,13 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'planPersonNum', width: 120, title: '计划人数', align:'center',
|
||||
{field: 'signUpUserCount', width: 120, title: '报名人数', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
|
||||
{field: 'planAddress', width: 180, title: '培训地点', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[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[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[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{width: 330, title: '培训时间', align:'center',
|
||||
templet: function(row) {
|
||||
var start = row['planStartTime'];
|
||||
var end = row['planEndTime'];
|
||||
return start + ' ~ ' + end;
|
||||
}
|
||||
},
|
||||
{width: 330, title: '报名时间', align:'center',
|
||||
templet: function(row) {
|
||||
var start = row['signUpStartTime'];
|
||||
var end = row['signUpEndTime'];
|
||||
return start + ' ~ ' + end;
|
||||
return '<span style="color: #0a54a6">' + rowData + '</span> 人';
|
||||
}
|
||||
},
|
||||
]
|
||||
@ -266,29 +236,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 删除
|
||||
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/classplan/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);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
clearTimeout(resizeTimeout);
|
||||
@ -300,96 +247,22 @@
|
||||
$(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') {
|
||||
if(typeof (orgInfo.institutionId) === 'undefined'
|
||||
|| orgInfo.institutionId == ''){
|
||||
layer.msg('当前用户未绑定机构信息');
|
||||
return;
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/classplan/save.html?orgId={orgId}&orgName={orgName}',
|
||||
[orgInfo.institutionId,orgInfo.institutionName]),
|
||||
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 {
|
||||
if(checkDatas[0].reportType == '1'){
|
||||
layer.msg('报备待审状态下无法修改');
|
||||
return;
|
||||
}
|
||||
if(checkDatas[0].reportType == '2'){
|
||||
layer.msg('报备通过后无法修改');
|
||||
return;
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/classplan/update.html?classPlanId={classPlanId}', [checkDatas[0].classPlanId]),
|
||||
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['classPlanId'];
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
if(layEvent == 'reportEvent'){
|
||||
top.dialog.msg('确认提交报备?', {
|
||||
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.put(top.restAjax.path('api/classplan/update-report/{classPlanId}', [obj.data.classPlanId]), {reportType: '1'}, null, function (code, data) {
|
||||
top.dialog.msg('提交成功', {time: 1000});
|
||||
reloadTable();
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
layIndex = top.dialog.msg('提交中', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
top.dialog.close(layIndex);
|
||||
});
|
||||
if(layEvent == 'examEvent'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '提交考试申请',
|
||||
closeBtn: 1,
|
||||
area: ['30%', '60%'],
|
||||
shadeClose: false,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/classplan/save-report-exam.html?classPlanId={classPlanId}', [obj.data.classPlanId]),
|
||||
end: function () {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
|
322
src/main/resources/static/route/classplan/list-signup-user.html
Normal file
322
src/main/resources/static/route/classplan/list-signup-user.html
Normal file
@ -0,0 +1,322 @@
|
||||
<!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="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>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select id="applyAuditStates" name="applyAuditStates" lay-search>
|
||||
<option value="">查看全部</option>
|
||||
<option value="0">待审核</option>
|
||||
<option value="1">自行撤回</option>
|
||||
<option value="2">审核通过</option>
|
||||
<option value="3">报名完成</option>
|
||||
<option value="-1">审核不通过</option>
|
||||
</select>
|
||||
</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>
|
||||
</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 classPlanId = top.restAjax.params(window.location.href).classPlanId;
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 60,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
where :{
|
||||
applyClassId: classPlanId
|
||||
},
|
||||
toolbar: false,
|
||||
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: 'applyName', width: 120, title: '姓名', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'applySexName', width: 100, title: '性别', align:'center',
|
||||
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;
|
||||
}
|
||||
},
|
||||
{field: 'applyPhone', width: 140, title: '联系方式', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'gmtCreate', width: 180, title: '报名时间', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'applyAuditState', width: 180, title: '报名状态', align:'center', fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(rowData === 0){
|
||||
return '<span style="color: #ffb836">待审核</span>';
|
||||
}
|
||||
if(rowData === 1){
|
||||
return '自行撤回';
|
||||
}
|
||||
if(rowData === 2){
|
||||
return '<span style="color: #0082ff">审核通过</span>';
|
||||
}
|
||||
if(rowData === 3){
|
||||
return '<span style="color: #20ff5c">报名完成</span>';
|
||||
}
|
||||
if(rowData === -1){
|
||||
return '<span style="color: #ff0000">审核不通过</span>';
|
||||
}
|
||||
return '-';
|
||||
}
|
||||
},
|
||||
{field: 'cz', width: 180, title: '操作', align:'center', fixed: 'right',
|
||||
templet: function(row) {
|
||||
var applyAuditState = row['applyAuditState'];
|
||||
var rowData = '<div class="layui-btn-group">';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="show">详情</button>';
|
||||
if (applyAuditState === 0) {
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="audit">审核</button>';
|
||||
}
|
||||
if (applyAuditState === 2) {
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="reports">报道</button>';
|
||||
}
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-warm layui-btn-xs" lay-event="audithistory">审核记录</button>'
|
||||
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(),
|
||||
applyAuditStates:$('#applyAuditStates').val(),
|
||||
applyClassId : classPlanId
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
},
|
||||
height: $win.height() - 60,
|
||||
});
|
||||
}
|
||||
// 初始化日期
|
||||
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/apply/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('tool(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var data = obj.data;
|
||||
if(layEvent === 'show') {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/apply/show.html?applyId={applyId}', [data.applyId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if (layEvent === 'audit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/apply/audit.html?applyId={applyId}', [data.applyId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'audithistory'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 1,
|
||||
area: ['70%', '70%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/applyauditlog/show.html?applyId={applyId}', [data.applyId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if (layEvent === 'reports') {
|
||||
top.dialog.confirm('确定要对该报名信息进行报道?', function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/apply/updateAuditStateReport/{applyId}/', [data.applyId]), null, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg('报道成功!', {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
}, 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);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -38,7 +38,7 @@
|
||||
<i class="fa fa-lg fa-plus"></i> 新增
|
||||
</button>
|
||||
<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 type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||
<i class="fa fa-lg fa-trash"></i> 删除
|
||||
@ -105,7 +105,7 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{width:100, title: '操作', fixed: 'left', align:'center',
|
||||
{width:200, title: '操作', fixed: 'left', align:'center',
|
||||
templet: function(row) {
|
||||
var dom = '';
|
||||
if(row['reportType'] === '0'){
|
||||
@ -115,7 +115,9 @@
|
||||
return '<a type="button" class="layui-btn layui-btn-warm layui-btn-xs">报备待审</a>';
|
||||
}
|
||||
if(row['reportType'] === '2'){
|
||||
return '<a type="button" class="layui-btn layui-btn-info layui-btn-xs">审核通过</a>';
|
||||
dom += '<a type="button" class="layui-btn layui-btn-info layui-btn-xs">审核通过</a>';
|
||||
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="signUpUserEvent">报名人员</a>'
|
||||
return dom;
|
||||
}
|
||||
if(row['reportType'] === '3'){
|
||||
return '<a type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="unPassEvent">审核不通过</a>';
|
||||
@ -123,7 +125,7 @@
|
||||
return dom;
|
||||
}
|
||||
},
|
||||
{field: 'planNumber', width: 180, title: '培训计划编号', align:'center',
|
||||
{field: 'planNumber', width: 190, title: '培训计划编号', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -141,7 +143,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'planType', width: 120, title: '培训类型', align:'center',
|
||||
{field: 'planType', width: 90, title: '培训类型', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(rowData == '1'){
|
||||
@ -174,7 +176,34 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'planPersonNum', width: 120, title: '计划人数', align:'center',
|
||||
{field: 'planPersonNum', width: 90, title: '计划人数', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return '<span style="color: #b83023">' + rowData + '</span> 人';
|
||||
}
|
||||
},
|
||||
{field: 'signUpUserCount', width: 90, title: '完成报名', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') {
|
||||
return '-';
|
||||
}
|
||||
return '<span style="color: #0a54a6">' + rowData + '</span> 人';
|
||||
}
|
||||
},
|
||||
{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 == '') {
|
||||
@ -193,24 +222,6 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'chargePerson', width: 180, title: '负责人', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[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[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{width: 330, title: '培训时间', align:'center',
|
||||
templet: function(row) {
|
||||
var start = row['planStartTime'];
|
||||
@ -327,18 +338,27 @@
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
}
|
||||
if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
top.dialog.msg('请勾选要 修改/查看 的数据');
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
if(checkDatas[0].reportType == '1'){
|
||||
layer.msg('报备待审状态下无法修改');
|
||||
return;
|
||||
}
|
||||
if(checkDatas[0].reportType == '2'){
|
||||
layer.msg('报备通过后无法修改');
|
||||
if(checkDatas[0].reportType == '1'
|
||||
|| checkDatas[0].reportType == '2'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/classplan/show.html?classPlanId={classPlanId}', [checkDatas[0].classPlanId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
layer.open({
|
||||
@ -410,6 +430,19 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
if(layEvent == 'signUpUserEvent') {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: obj.data.planName,
|
||||
closeBtn: 1,
|
||||
area: ['90%', '90%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/classplan/list-signup-user.html?classPlanId={classPlanId}', [obj.data.classPlanId]),
|
||||
end: function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
126
src/main/resources/static/route/classplan/save-report-exam.html
Normal file
126
src/main/resources/static/route/classplan/save-report-exam.html
Normal file
@ -0,0 +1,126 @@
|
||||
<!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-card">
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<input type="hidden" id="orgId" name="orgId">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;">选择考试类型</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<select id="examType" name="examType" lay-verify="required">
|
||||
<option value="1">理论考试</option>
|
||||
<option value="2">实操考试</option>
|
||||
<option value="1">理论与实操</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;"><span style="color: red">*</span>预计考试时间始</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" id="estimateStart" name="estimateStart" class="layui-input" value="" placeholder="请选择预计考试开始时间" readonly style="cursor: pointer;" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;"><span style="color: red">*</span>预计考试时间止</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" id="estimateEnd" name="estimateEnd" class="layui-input" value="" placeholder="请选择预计考试结束时间" readonly style="cursor: pointer;" lay-verify="required">
|
||||
</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/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 $win = $(window);
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var classPlanId = top.restAjax.params(window.location.href).classPlanId;
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
$('.layui-card').height($win.height());
|
||||
laydate.render({
|
||||
elem: '#estimateStart',
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#estimateEnd',
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/classplan/update-exam/{classPlanId}', [classPlanId]), 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();
|
||||
});
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -23,30 +23,30 @@
|
||||
<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-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">培训机构</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>培训机构</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="orgId" name="orgId">
|
||||
<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>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>计划编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="planNumber" name="planNumber" class="layui-input" value="" placeholder="请输入培训计划编号" readonly="readonly" maxlength="100">
|
||||
<input type="text" id="planNumber" name="planNumber" class="layui-input" value="" placeholder="请输入培训计划编号" readonly="readonly" maxlength="100">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6">
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">计划名称</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>计划名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="planName" name="planName" class="layui-input" value="" placeholder="请输入培训计划名称" maxlength="255">
|
||||
<input type="text" id="planName" name="planName" class="layui-input" value="" placeholder="请输入培训计划名称" lay-verify="required" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -54,7 +54,7 @@
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">培训类型</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>培训类型</label>
|
||||
<div class="layui-input-block">
|
||||
<select id="planType" name="planType">
|
||||
<option value="1">初训</option>
|
||||
@ -66,27 +66,27 @@
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">培训项目</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>培训项目</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="projectCatalogId" name="projectCatalogId" value="">
|
||||
<input type="text" id="projectCatalogName" name="projectCatalogName" class="layui-input" value="" style="cursor: pointer;" placeholder="请选择培训项目" readonly="readonly">
|
||||
<input type="text" id="projectCatalogName" name="projectCatalogName" class="layui-input" value="" style="cursor: pointer;" lay-verify="required" placeholder="请选择培训项目" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">培训工种</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>培训工种</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="workerCatalog" name="workerCatalog" value="">
|
||||
<input type="text" id="workerCatalogName" name="workerCatalogName" class="layui-input" value="" style="cursor: pointer;" placeholder="请选择培训工种" readonly="readonly">
|
||||
<input type="text" id="workerCatalogName" name="workerCatalogName" class="layui-input" value="" style="cursor: pointer;" lay-verify="required" placeholder="请选择培训工种" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">计划人数</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>计划人数</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" id="planPersonNum" name="planPersonNum" class="layui-input" value="0" placeholder="请输入计划人数" lay-verify="required">
|
||||
<input type="number" id="planPersonNum" name="planPersonNum" class="layui-input" value="0" placeholder="请输入计划人数" lay-verify="checkPlanPersonNum">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -94,7 +94,7 @@
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开始时间</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>开始时间</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>
|
||||
@ -102,7 +102,7 @@
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">结束时间</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>结束时间</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>
|
||||
@ -110,7 +110,7 @@
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">报名时间</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>报名时间</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>
|
||||
@ -118,7 +118,7 @@
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">报名截止</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>报名截止</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>
|
||||
@ -128,17 +128,17 @@
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">负责人</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>负责人</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="chargePerson" name="chargePerson" class="layui-input" value="" placeholder="请输入负责人" maxlength="50">
|
||||
<input type="text" id="chargePerson" name="chargePerson" class="layui-input" value="" placeholder="请输入负责人" lay-verify="required" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">联系方式</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>联系方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="chargePersonTel" name="chargePersonTel" class="layui-input" value="" placeholder="请输入联系方式" maxlength="255">
|
||||
<input type="text" id="chargePersonTel" name="chargePersonTel" class="layui-input" value="" placeholder="请输入联系方式" lay-verify="required" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -147,9 +147,9 @@
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">培训地点</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>培训地点</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="planAddress" name="planAddress" class="layui-input" value="" placeholder="请输入培训地点" maxlength="255">
|
||||
<input type="text" id="planAddress" name="planAddress" class="layui-input" value="" placeholder="请输入培训地点" lay-verify="required" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -441,6 +441,11 @@
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
checkPlanPersonNum : function(value){
|
||||
if(value <= 0){
|
||||
return '计划人数必须大于0';
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
322
src/main/resources/static/route/classplan/show.html
Normal file
322
src/main/resources/static/route/classplan/show.html
Normal file
@ -0,0 +1,322 @@
|
||||
<!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="hidden" id="orgId" name="orgId">
|
||||
<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="" readonly="readonly" 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="" readonly="readonly" maxlength="255">
|
||||
</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">
|
||||
<select id="planType" name="planType" readonly="readonly">
|
||||
<option value="1">初训</option>
|
||||
<option value="2">复训</option>
|
||||
<option value="3">换证</option>
|
||||
</select>
|
||||
</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="hidden" id="projectCatalogId" name="projectCatalogId" value="">
|
||||
<input type="text" id="projectCatalogName" name="projectCatalogName" class="layui-input" value="" style="cursor: pointer;" readonly="readonly">
|
||||
</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="hidden" id="workerCatalog" name="workerCatalog" value="">
|
||||
<input type="text" id="workerCatalogName" name="workerCatalogName" class="layui-input" value="" style="cursor: pointer;" readonly="readonly">
|
||||
</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="number" id="planPersonNum" name="planPersonNum" class="layui-input" value="0" readonly="readonly" 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="" readonly="readonly" 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="" readonly="readonly" 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="" readonly="readonly" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<table class="layui-table" id="dataTable" lay-filter="dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50px; text-align: center"><b>确认课程</b></th>
|
||||
<th style="width: 200px; text-align: center"><b>选择讲师</b></th>
|
||||
<th style="width: 260px; text-align: center"><b>课程名称</b></th>
|
||||
<th style="width: 100px; text-align: center"><b>课程类型</b></th>
|
||||
<th style="width: 100px; text-align: center"><b>授课方式</b></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="lessonTbodyBox"></tbody>
|
||||
<script type="text/html" id="lessonTbodyTemplate">
|
||||
{{# for(var i = 0, item; item = d.lesson[i++];) { }}
|
||||
<tr id="lesson-{{item.lessonId}}" data-lesson-id="{{item.lessonId}}">
|
||||
<td style="text-align: center">
|
||||
<input data-lesson-id="{{item.lessonId}}" type="checkbox" name="lessonCheckBox" lay-skin="primary" lay-filter="lessonCheckBox" disabled>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<select id="select-{{item.lessonId}}">
|
||||
<option value="">请选择</option>
|
||||
{{# for(var j = 0, teacher; teacher = d.teacher[j++];) { }}
|
||||
<option value="{{teacher.teacherId}}">{{teacher.teacherName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
{{item.lessonName}}
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
{{# if(item.lessonType == '1'){ }}
|
||||
必修
|
||||
{{# } }}
|
||||
{{# if(item.lessonType == '2'){ }}
|
||||
选修
|
||||
{{# } }}
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
{{# if(item.teachWay == '1'){ }}
|
||||
面授
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</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 teacherList = [];
|
||||
var classPlanLessons = [];
|
||||
var classPlanId = top.restAjax.params(window.location.href).classPlanId;
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
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;
|
||||
}, 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 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}, 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 reloadLessonsList(){
|
||||
if(typeof (classPlanLessons) != 'undefined' && classPlanLessons.length > 0)
|
||||
$.each(classPlanLessons,function(i,e){
|
||||
var checkBox = $('#lesson-' + e.lessonId).find('input[name="lessonCheckBox"]').get(0);
|
||||
$(checkBox).attr('checked', 'checked');
|
||||
$('#select-' + e.lessonId).val(e.teacherId);
|
||||
$('#select-' + e.lessonId).attr("disabled","disabled");
|
||||
});
|
||||
form.render();
|
||||
}
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -17,37 +17,37 @@
|
||||
<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>
|
||||
<a href="javascript:void(0);"><cite>修改计划</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<blockquote id="report-reason-block" class="layui-elem-quote" style="border-left: 5px solid #cc0200;display: none;">引用区域的文字</blockquote>
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">培训机构</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>培训机构</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="orgId" name="orgId">
|
||||
<input type="text" id="orgName" name="orgName" class="layui-input" value="" readonly="readonly" maxlength="100">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><span style="color: red">*</span>计划编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="planNumber" name="planNumber" 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>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>计划名称</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">
|
||||
<input type="text" id="planName" name="planName" class="layui-input" value="" placeholder="请输入培训计划名称" lay-verify="required" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -55,9 +55,9 @@
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">培训类型</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>培训类型</label>
|
||||
<div class="layui-input-block">
|
||||
<select id="planType" name="planType">
|
||||
<select id="planType" name="planType" lay-verify="required">
|
||||
<option value="1">初训</option>
|
||||
<option value="2">复训</option>
|
||||
<option value="3">换证</option>
|
||||
@ -67,27 +67,27 @@
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">培训项目</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>培训项目</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="projectCatalogId" name="projectCatalogId" value="">
|
||||
<input type="text" id="projectCatalogName" name="projectCatalogName" class="layui-input" value="" style="cursor: pointer;" placeholder="请选择培训项目" readonly="readonly">
|
||||
<input type="text" id="projectCatalogName" name="projectCatalogName" class="layui-input" value="" style="cursor: pointer;" placeholder="请选择培训项目" lay-verify="required" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">培训工种</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>培训工种</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="workerCatalog" name="workerCatalog" value="">
|
||||
<input type="text" id="workerCatalogName" name="workerCatalogName" class="layui-input" value="" style="cursor: pointer;" placeholder="请选择培训工种" readonly="readonly">
|
||||
<input type="text" id="workerCatalogName" name="workerCatalogName" class="layui-input" value="" style="cursor: pointer;" placeholder="请选择培训工种" lay-verify="required" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">计划人数</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>计划人数</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" id="planPersonNum" name="planPersonNum" class="layui-input" value="0" placeholder="请输入计划人数" lay-verify="required">
|
||||
<input type="number" id="planPersonNum" name="planPersonNum" class="layui-input" value="0" placeholder="请输入计划人数" lay-verify="checkPlanPersonNum">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -95,7 +95,7 @@
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开始时间</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>开始时间</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>
|
||||
@ -103,7 +103,7 @@
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">结束时间</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>结束时间</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>
|
||||
@ -111,7 +111,7 @@
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">报名时间</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>报名时间</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>
|
||||
@ -119,7 +119,7 @@
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">报名截止</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>报名截止</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>
|
||||
@ -129,17 +129,17 @@
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">负责人</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>负责人</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="chargePerson" name="chargePerson" class="layui-input" value="" placeholder="请输入负责人" maxlength="50">
|
||||
<input type="text" id="chargePerson" name="chargePerson" class="layui-input" value="" placeholder="请输入负责人" lay-verify="required" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">联系方式</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>联系方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="chargePersonTel" name="chargePersonTel" class="layui-input" value="" placeholder="请输入联系方式" maxlength="255">
|
||||
<input type="text" id="chargePersonTel" name="chargePersonTel" class="layui-input" value="" placeholder="请输入联系方式" lay-verify="required" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -148,9 +148,9 @@
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">培训地点</label>
|
||||
<label class="layui-form-label"><span style="color: red">*</span>培训地点</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="planAddress" name="planAddress" class="layui-input" value="" placeholder="请输入培训地点" maxlength="255">
|
||||
<input type="text" id="planAddress" name="planAddress" class="layui-input" value="" placeholder="请输入培训地点" lay-verify="required" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -207,7 +207,7 @@
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;z-index: 10">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
||||
<button type="button" class="layui-btn submit-form-btn" lay-submit lay-filter="submitForm">保存修改</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -233,9 +233,6 @@
|
||||
var admin = layui.admin;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
var teacherList = [];
|
||||
var classPlanLessons = [];
|
||||
var classPlanId = top.restAjax.params(window.location.href).classPlanId;
|
||||
@ -254,7 +251,7 @@
|
||||
dataFormData['signUpEndTime'] = dataFormData['signUpEndTime'].substring(0,10);
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
if(dataFormData['reportReason'] = ''){
|
||||
if(dataFormData['reportReason'] != ''){
|
||||
$('#report-reason-block').show();
|
||||
}
|
||||
initPlanStartTimeDateTime();
|
||||
@ -471,6 +468,11 @@
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
checkPlanPersonNum : function(value){
|
||||
if(value <= 0){
|
||||
return '计划人数必须大于0';
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -51,6 +51,8 @@
|
||||
function initData(){
|
||||
initSize();
|
||||
initThree();
|
||||
$('#listContent').attr('src', top.restAjax.path('route/lessons/list.html?projectCatalogId={parentId}&parentName={parentName}',
|
||||
['','']));
|
||||
}
|
||||
initData();
|
||||
|
||||
|
@ -234,6 +234,11 @@
|
||||
layer.msg('当前用户未绑定机构信息');
|
||||
return;
|
||||
}
|
||||
if(typeof (projectCatalogId) === 'undefined'
|
||||
|| projectCatalogId === ''){
|
||||
layer.msg('请先在左侧选择培训项目');
|
||||
return;
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
|
Loading…
Reference in New Issue
Block a user