修改开班计划逻辑
This commit is contained in:
parent
1a0a4fbe89
commit
f4c9f20420
@ -42,7 +42,7 @@ public class ClassPlanController extends DefaultBaseController {
|
|||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@PostMapping("save")
|
@PostMapping("save")
|
||||||
@CheckRequestBodyAnnotation
|
@CheckRequestBodyAnnotation
|
||||||
public SuccessResult save(@RequestBody JSONObject obj) {
|
public SuccessResult save(@RequestBody JSONObject obj) throws Exception{
|
||||||
classPlanService.saveJson(obj);
|
classPlanService.saveJson(obj);
|
||||||
return new SuccessResult();
|
return new SuccessResult();
|
||||||
}
|
}
|
||||||
|
@ -60,4 +60,17 @@ public interface ITeacherDao {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String, Object> count(Map<String, Object> params);
|
Map<String, Object> count(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据身份证查询讲师授课列表
|
||||||
|
* @param idCardNumber
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> listTeacherLessonsTime(String idCardNumber);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存讲师授课记录
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
void saveTeacherLessonsTime(Map<String, Object> params);
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ public interface IClassPlanService {
|
|||||||
* 保存培训计划
|
* 保存培训计划
|
||||||
* @param obj
|
* @param obj
|
||||||
*/
|
*/
|
||||||
void saveJson(JSONObject obj);
|
void saveJson(JSONObject obj) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交培训计划报备
|
* 提交培训计划报备
|
||||||
|
@ -9,6 +9,7 @@ import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO;
|
|||||||
import cn.com.tenlion.pojo.dtos.classplan.ClassPlanReportExamDTO;
|
import cn.com.tenlion.pojo.dtos.classplan.ClassPlanReportExamDTO;
|
||||||
import cn.com.tenlion.pojo.dtos.distributioncard.DistributionCardDTO;
|
import cn.com.tenlion.pojo.dtos.distributioncard.DistributionCardDTO;
|
||||||
import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO;
|
import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO;
|
||||||
|
import cn.com.tenlion.pojo.dtos.teacher.TeacherDTO;
|
||||||
import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO;
|
import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO;
|
||||||
import cn.com.tenlion.pojo.pos.classplan.ClassPlanPO;
|
import cn.com.tenlion.pojo.pos.classplan.ClassPlanPO;
|
||||||
import cn.com.tenlion.pojo.vos.classplan.ClassPlanVO;
|
import cn.com.tenlion.pojo.vos.classplan.ClassPlanVO;
|
||||||
@ -19,26 +20,27 @@ import cn.com.tenlion.service.classplan.IClassPlanService;
|
|||||||
import cn.com.tenlion.service.examapply.IExamApplyService;
|
import cn.com.tenlion.service.examapply.IExamApplyService;
|
||||||
import cn.com.tenlion.service.examcheck.IExamCheckService;
|
import cn.com.tenlion.service.examcheck.IExamCheckService;
|
||||||
import cn.com.tenlion.service.examination.distributioncard.IDistributionCardService;
|
import cn.com.tenlion.service.examination.distributioncard.IDistributionCardService;
|
||||||
|
import cn.com.tenlion.service.service.ITeacherService;
|
||||||
import cn.com.tenlion.service.worktype.IWorkTypeService;
|
import cn.com.tenlion.service.worktype.IWorkTypeService;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||||
import ink.wgink.module.dictionary.service.IDataService;
|
import ink.wgink.module.dictionary.service.IDataService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
|
import ink.wgink.util.date.DateUtil;
|
||||||
import ink.wgink.util.map.HashMapUtil;
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName: ClassPlanServiceImpl
|
* @ClassName: ClassPlanServiceImpl
|
||||||
@ -71,6 +73,8 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
|
|||||||
@Autowired
|
@Autowired
|
||||||
// 准考证
|
// 准考证
|
||||||
private IDistributionCardService distributionCardService;
|
private IDistributionCardService distributionCardService;
|
||||||
|
@Autowired
|
||||||
|
private ITeacherService teacher;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(ClassPlanVO classPlanVO) {
|
public void save(ClassPlanVO classPlanVO) {
|
||||||
@ -102,8 +106,12 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveJson(JSONObject obj) {
|
public void saveJson(JSONObject obj) throws Exception{
|
||||||
|
// 校验教师是否存在授课冲突
|
||||||
|
String planStartTime = obj.getString("planStartTime");
|
||||||
|
String planEndTime = obj.getString("planEndTime");
|
||||||
String classPlanId = UUIDUtil.getUUID();
|
String classPlanId = UUIDUtil.getUUID();
|
||||||
|
//保存开班计划
|
||||||
ClassPlanVO classPlanVO = new ClassPlanVO();
|
ClassPlanVO classPlanVO = new ClassPlanVO();
|
||||||
classPlanVO.setClassPlanId(classPlanId);
|
classPlanVO.setClassPlanId(classPlanId);
|
||||||
classPlanVO.setOrgId(obj.getString("orgId"));
|
classPlanVO.setOrgId(obj.getString("orgId"));
|
||||||
@ -112,25 +120,81 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
|
|||||||
classPlanVO.setPlanType(obj.getString("planType"));
|
classPlanVO.setPlanType(obj.getString("planType"));
|
||||||
classPlanVO.setProjectCatalogId(obj.getString("projectCatalogId"));
|
classPlanVO.setProjectCatalogId(obj.getString("projectCatalogId"));
|
||||||
classPlanVO.setWorkerCatalog(obj.getString("workerCatalog"));
|
classPlanVO.setWorkerCatalog(obj.getString("workerCatalog"));
|
||||||
classPlanVO.setPlanPersonNum(Integer.parseInt(obj.getString("planPersonNum")));
|
|
||||||
classPlanVO.setPlanStartTime(obj.getString("planStartTime"));
|
classPlanVO.setPlanStartTime(obj.getString("planStartTime"));
|
||||||
classPlanVO.setPlanEndTime(obj.getString("planEndTime"));
|
classPlanVO.setPlanEndTime(obj.getString("planEndTime"));
|
||||||
classPlanVO.setSignUpStartTime(obj.getString("signUpStartTime"));
|
|
||||||
classPlanVO.setSignUpEndTime(obj.getString("signUpEndTime"));
|
|
||||||
classPlanVO.setPlanAddress(obj.getString("planAddress"));
|
classPlanVO.setPlanAddress(obj.getString("planAddress"));
|
||||||
classPlanVO.setChargePerson(obj.getString("chargePerson"));
|
classPlanVO.setChargePerson(obj.getString("chargePerson"));
|
||||||
classPlanVO.setChargePersonTel(obj.getString("chargePersonTel"));
|
classPlanVO.setChargePersonTel(obj.getString("chargePersonTel"));
|
||||||
classPlanVO.setReportType("0");
|
|
||||||
classPlanVO.setReportReason("");
|
|
||||||
Map<String, Object> params = HashMapUtil.beanToMap(classPlanVO);
|
Map<String, Object> params = HashMapUtil.beanToMap(classPlanVO);
|
||||||
params.put("classPlanId", classPlanId);
|
params.put("classPlanId", classPlanId);
|
||||||
setSaveInfo(params);
|
setSaveInfo(params);
|
||||||
classPlanDao.save(params);
|
classPlanDao.save(params);
|
||||||
|
// 开班申请提交后是否需要先将考试人员信息从报名表中转移到班级表
|
||||||
//保存课程及讲师
|
//保存课程及讲师
|
||||||
|
List<String> dayList = new ArrayList<>();
|
||||||
|
long daySub = DateUtil.getDaySub("2021-05-15", "2021-05-15");
|
||||||
|
if(daySub == 0L){
|
||||||
|
dayList.add(planStartTime);
|
||||||
|
} else {
|
||||||
|
for(long i = 0; i <= daySub; i++){
|
||||||
|
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
Date startDate = sd.parse(planStartTime);
|
||||||
|
String formatDate = sd.format(startDate.getTime() + (i * 24 * 60 * 60 * 1000));
|
||||||
|
dayList.add(formatDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
JSONArray array = obj.getJSONArray("lessonList");
|
JSONArray array = obj.getJSONArray("lessonList");
|
||||||
params.clear();
|
params.clear();
|
||||||
for(int i = 0; i < array.size(); i++){
|
for(int i = 0; i < array.size(); i++){
|
||||||
JSONObject item = array.getJSONObject(i);
|
JSONObject item = array.getJSONObject(i);
|
||||||
|
String lessonStartTime = item.getString("lessonStartTime") + ":00";
|
||||||
|
String lessonEndTime = item.getString("lessonEndTime") + ":00";
|
||||||
|
// 查询当前教师信息
|
||||||
|
TeacherDTO teacherDTO = teacher.getById(item.getString("teacherId"));
|
||||||
|
List<Map<String, Object>> tlList = teacher.listTeacherLessonsTime(teacherDTO.getIdCardNumber());
|
||||||
|
if(tlList != null && tlList.size() > 0){
|
||||||
|
for(String tempDate : dayList){
|
||||||
|
String sDateTime = tempDate + " " + lessonStartTime;
|
||||||
|
String eDateTime = tempDate + " " + lessonEndTime;
|
||||||
|
for(Map<String,Object> tlMap : tlList){
|
||||||
|
String ssDateTime = tlMap.get("start_time").toString();
|
||||||
|
String eeDateTime = tlMap.get("end_time").toString();
|
||||||
|
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
if(sd.parse(eDateTime).getTime() < sd.parse(ssDateTime).getTime()
|
||||||
|
|| sd.parse(sDateTime).getTime() > sd.parse(eeDateTime).getTime()){
|
||||||
|
//...没有发生冲突
|
||||||
|
} else {
|
||||||
|
throw new SaveException(tlMap.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
params.put("classPlanId",classPlanId);
|
||||||
|
params.put("teacherId",teacherDTO.getTeacherId());
|
||||||
|
params.put("teacherIdCard", teacherDTO.getIdCardNumber());
|
||||||
|
params.put("orgId",teacherDTO.getOrgId());
|
||||||
|
params.put("projectCatalogId",obj.getString("projectCatalogId"));
|
||||||
|
params.put("workerCatalog",obj.getString("workerCatalog"));
|
||||||
|
params.put("lessonId",item.getString("lessonId"));
|
||||||
|
params.put("startTime",sDateTime);
|
||||||
|
params.put("endTime",eDateTime);
|
||||||
|
teacher.saveTeacherLessonsTime(params);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for(String tempDate : dayList){
|
||||||
|
String sDateTime = tempDate + " " + lessonStartTime;
|
||||||
|
String eDateTime = tempDate + " " + lessonEndTime;
|
||||||
|
params.put("classPlanId",classPlanId);
|
||||||
|
params.put("teacherId",teacherDTO.getTeacherId());
|
||||||
|
params.put("teacherIdCard", teacherDTO.getIdCardNumber());
|
||||||
|
params.put("orgId",teacherDTO.getOrgId());
|
||||||
|
params.put("projectCatalogId",obj.getString("projectCatalogId"));
|
||||||
|
params.put("workerCatalog",obj.getString("workerCatalog"));
|
||||||
|
params.put("lessonId",item.getString("lessonId"));
|
||||||
|
params.put("startTime",sDateTime);
|
||||||
|
params.put("endTime",eDateTime);
|
||||||
|
teacher.saveTeacherLessonsTime(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
params.clear();
|
||||||
params.put("classPlanId",classPlanId);
|
params.put("classPlanId",classPlanId);
|
||||||
params.put("lessonId",item.getString("lessonId"));
|
params.put("lessonId",item.getString("lessonId"));
|
||||||
params.put("teacherId",item.getString("teacherId"));
|
params.put("teacherId",item.getString("teacherId"));
|
||||||
|
@ -90,4 +90,17 @@ public interface ITeacherService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String, Object> count(String orgId);
|
Map<String, Object> count(String orgId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据身份证查询教师授课记录
|
||||||
|
* @param idCardNumber
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> listTeacherLessonsTime(String idCardNumber);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存讲师授课时间记录
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
void saveTeacherLessonsTime(Map<String, Object> params);
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,15 @@ public class TeacherServiceImpl extends DefaultBaseService implements ITeacherSe
|
|||||||
return institutionDTO;
|
return institutionDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> listTeacherLessonsTime(String idCardNumber) {
|
||||||
|
return teacherDao.listTeacherLessonsTime(idCardNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveTeacherLessonsTime(Map<String, Object> params) {
|
||||||
|
teacherDao.saveTeacherLessonsTime(params);
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, Object> count(String orgId){
|
public Map<String, Object> count(String orgId){
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
@ -212,4 +212,19 @@
|
|||||||
WHERE is_delete = 0 AND org_id = #{orgId}
|
WHERE is_delete = 0 AND org_id = #{orgId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="listTeacherLessonsTime" parameterType="string" resultType="map">
|
||||||
|
select * from e_teach_lessons_time
|
||||||
|
where
|
||||||
|
teacher_id_card = #{string}
|
||||||
|
AND is_delete = '0';
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="saveTeacherLessonsTime" parameterType="map">
|
||||||
|
INSERT INTO e_teach_lessons_time (
|
||||||
|
teacher_id,teacher_id_card,org_id,project_catalog_id,worker_catalog,lesson_id,start_time,end_time
|
||||||
|
) VALUES(
|
||||||
|
#{teacherId}, #{teacherIdCard},#{orgId},#{projectCatalogId},#{workerCatalog},#{lessonId}, #{startTime},#{endTime}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -12,14 +12,14 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
<div class="layui-anim layui-anim-fadein">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header">
|
<!--<div class="layui-card-header">
|
||||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
<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>
|
</span>
|
||||||
</div>
|
</div>-->
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||||
<div class="layui-form-item layui-form-text">
|
<div class="layui-form-item layui-form-text">
|
||||||
|
@ -12,14 +12,8 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
<div class="layui-anim layui-anim-fadein">
|
||||||
<div class="layui-card">
|
<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;">
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||||
<div class="layui-form-item layui-form-text">
|
<div class="layui-form-item layui-form-text">
|
||||||
@ -164,7 +158,7 @@
|
|||||||
<!--<input type="number" id="applyAuditState" name="applyAuditState" class="layui-input" value="" placeholder="请输入报名状态 0 待审核 1用户撤回 2审核通过 3未报到 4报名完成-1审核不通过" lay-verify="required">-->
|
<!--<input type="number" id="applyAuditState" name="applyAuditState" class="layui-input" value="" placeholder="请输入报名状态 0 待审核 1用户撤回 2审核通过 3未报到 4报名完成-1审核不通过" lay-verify="required">-->
|
||||||
<!--</div>-->
|
<!--</div>-->
|
||||||
<!--</div>-->
|
<!--</div>-->
|
||||||
<div class="layui-form-item layui-layout-admin">
|
<div class="layui-form-item layui-layout-admin div-footer">
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<div class="layui-footer" style="left: 0;">
|
<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" lay-submit lay-filter="submitForm">提交编辑</button>-->
|
||||||
@ -187,10 +181,15 @@
|
|||||||
index: 'lib/index' //主入口模块
|
index: 'lib/index' //主入口模块
|
||||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||||
var $ = layui.$;
|
var $ = layui.$;
|
||||||
|
var $win = $(window);
|
||||||
var form = layui.form;
|
var form = layui.form;
|
||||||
var laytpl = layui.laytpl;
|
var laytpl = layui.laytpl;
|
||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
var applyId = top.restAjax.params(window.location.href).applyId;
|
var applyId = top.restAjax.params(window.location.href).applyId;
|
||||||
|
var hiddenFooter = top.restAjax.params(window.location.href).hiddenFooter;
|
||||||
|
if(hiddenFooter == '1'){
|
||||||
|
$('.div-footer').hide();
|
||||||
|
}
|
||||||
|
|
||||||
var wangEditor = window.wangEditor;
|
var wangEditor = window.wangEditor;
|
||||||
var wangEditorObj = {};
|
var wangEditorObj = {};
|
||||||
|
154
src/main/resources/static/route/classplan/list-signup-tree.html
Normal file
154
src/main/resources/static/route/classplan/list-signup-tree.html
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
<!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" href="assets/js/vendor/zTree3/css/metroStyle/metroStyle.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/common.css" media="all">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-row layui-col-space15">
|
||||||
|
<div class="layui-col-md2 layui-col-sm2 layui-col-xs2">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-body left-tree-wrap">
|
||||||
|
<div id="leftTreeWrap">
|
||||||
|
<ul id="leftTree" class="ztree"></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md10 layui-col-sm10 layui-col-xs10">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div id="listContentWrap" class="layui-card-body">
|
||||||
|
<blockquote id="treeTitle" class="layui-elem-quote">所有报名人员信息</blockquote>
|
||||||
|
<iframe id="listContent" frameborder="0" class="layadmin-iframe" style="margin-top: 65px;"></iframe>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||||
|
<script>
|
||||||
|
var common;
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/'
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index'
|
||||||
|
}).use(['index', 'ztree', 'common'], function() {
|
||||||
|
common = layui.common;
|
||||||
|
var $ = layui.$;
|
||||||
|
var $win = $(window);
|
||||||
|
var resizeTimeout = null;
|
||||||
|
var parentId = '0';
|
||||||
|
var parentName = '';
|
||||||
|
var orgInfo = {};
|
||||||
|
var orgId = orgInfo.institutionId;
|
||||||
|
|
||||||
|
function initData(){
|
||||||
|
initSize();
|
||||||
|
getOrgInfo();
|
||||||
|
}
|
||||||
|
initData();
|
||||||
|
|
||||||
|
// 初始化大小
|
||||||
|
function initSize() {
|
||||||
|
$('#leftTreeWrap').css({
|
||||||
|
height: $win.height() - 40,
|
||||||
|
overflow: 'auto'
|
||||||
|
});
|
||||||
|
$('#listContentWrap').css({
|
||||||
|
height: $win.height() - 120,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOrgInfo(){
|
||||||
|
top.restAjax.get(top.restAjax.path('api/teacher/getorginfo', []), {}, null, function (code, data) {
|
||||||
|
orgInfo = data;
|
||||||
|
initThree();
|
||||||
|
$('#listContent').attr('src', top.restAjax.path('route/classplan/list-signup.html?orgId={arg1}&workerCatalog={arg2}',
|
||||||
|
[orgId,'']));
|
||||||
|
}, function (code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化树
|
||||||
|
function initThree() {
|
||||||
|
var setting = {
|
||||||
|
async: {
|
||||||
|
enable: true,
|
||||||
|
autoLoad: false,
|
||||||
|
type: 'get',
|
||||||
|
url: top.restAjax.path('api/worktype/listztree', []),
|
||||||
|
autoParam: ['id'],
|
||||||
|
otherParam: {
|
||||||
|
id : function () {
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dataFilter: function (treeId, parentNode, childNodes) {
|
||||||
|
if (!childNodes) return null;
|
||||||
|
for (var i = 0, l = childNodes.length; i < l; i++) {
|
||||||
|
childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
|
||||||
|
}
|
||||||
|
return childNodes;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
callback: {
|
||||||
|
onClick: function (event, treeId, treeNode) {
|
||||||
|
if(treeNode.pId == '-1'){
|
||||||
|
$('#treeTitle').text('所有报名人员信息');
|
||||||
|
$('#listContent').attr('src', top.restAjax.path('route/classplan/list-signup.html?orgId={arg1}&workerCatalog={arg2}',
|
||||||
|
[orgId,'']));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(treeNode.isParent == true){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
parentId = treeNode.id;
|
||||||
|
parentName = treeNode.name;
|
||||||
|
$('#treeTitle').text(parentName);
|
||||||
|
initIFrame();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
var zTree = $.fn.zTree.init($("#leftTree"), setting);
|
||||||
|
zTree.addNodes(null, {
|
||||||
|
id: '0',
|
||||||
|
pId: '-1',
|
||||||
|
name: '所有工种类型',
|
||||||
|
url: 'javascript:;',
|
||||||
|
isParent: 'true'
|
||||||
|
});
|
||||||
|
common.refreshTree('leftTree');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化IFrame
|
||||||
|
function initIFrame() {
|
||||||
|
$('#listContent').attr('src', top.restAjax.path('route/classplan/list-signup.html?orgId={arg1}&workerCatalog={arg2}',
|
||||||
|
[orgId,parentId]));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 事件 - 页面变化
|
||||||
|
$win.on('resize', function() {
|
||||||
|
clearTimeout(resizeTimeout);
|
||||||
|
resizeTimeout = setTimeout(function() {
|
||||||
|
initSize();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
422
src/main/resources/static/route/classplan/list-signup.html
Normal file
422
src/main/resources/static/route/classplan/list-signup.html
Normal file
@ -0,0 +1,422 @@
|
|||||||
|
<!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">
|
||||||
|
<div class="layui-col-md4">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||||
|
已报人员数量
|
||||||
|
<span class="layui-badge layui-bg-blue layuiadmin-badge">5 人</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||||
|
已审人员数量
|
||||||
|
<span class="layui-badge layui-bg-green layuiadmin-badge">5 人</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||||
|
<span id="totalSignUpUser">总计人数</span>
|
||||||
|
<span class="layui-badge layui-bg-cyan layuiadmin-badge">10 人</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</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"
|
||||||
|
style="width: 150px" autocomplete="off" placeholder="例:姓名|手机号">
|
||||||
|
</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="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>
|
||||||
|
<button type="button" id="class-plan-btn-event" class="layui-btn layui-btn-sm layui-btn-normal">
|
||||||
|
<i class="layui-icon"></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 orgId = '';
|
||||||
|
var workerCatalog = top.restAjax.params(window.location.href).workerCatalog;
|
||||||
|
if(typeof (workerCatalog) === 'undefined' || workerCatalog == ''){
|
||||||
|
$('#totalSignUpUser').text('总计人数');
|
||||||
|
$('#class-plan-btn-event').hide();
|
||||||
|
} else {
|
||||||
|
$('#totalSignUpUser').text('预计人数');
|
||||||
|
}
|
||||||
|
|
||||||
|
function init(){
|
||||||
|
getOrgInfo();
|
||||||
|
initDate();
|
||||||
|
}
|
||||||
|
init();
|
||||||
|
|
||||||
|
function getOrgInfo(){
|
||||||
|
top.restAjax.get(top.restAjax.path('api/teacher/getorginfo', []), {}, null, function (code, data) {
|
||||||
|
orgId = data.institutionId;
|
||||||
|
initTable();
|
||||||
|
$('#listContent').attr('src', top.restAjax.path('route/classplan/list-signup.html?orgId={arg1}&workerCatalog={arg2}',
|
||||||
|
[orgId,'']));
|
||||||
|
}, 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,
|
||||||
|
limit: 10,
|
||||||
|
limits: [10, 20, 50, 100],
|
||||||
|
toolbar: false,
|
||||||
|
request: {
|
||||||
|
pageName: 'page',
|
||||||
|
limitName: 'rows'
|
||||||
|
},
|
||||||
|
where : {
|
||||||
|
orgId : orgId,
|
||||||
|
|
||||||
|
},
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
// {type:'checkbox', fixed: 'left'},
|
||||||
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
|
{field: 'applyClassName', width: 180, title: '报名计划', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'applyName', width: 180, title: '姓名', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'applySexName', width: 180, title: '性别', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'applyDataBirth', width: 180, title: '出生日期', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'applyCardTypeName', width: 180, 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: 180, title: '手机号码', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'applyAddress', width: 180, title: '通讯地址', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'applyCultureLevelName', width: 180, 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 '待审核';
|
||||||
|
}
|
||||||
|
if(rowData === 1){
|
||||||
|
return '用户撤回';
|
||||||
|
}
|
||||||
|
if(rowData === 2){
|
||||||
|
return '审核通过';
|
||||||
|
}
|
||||||
|
if(rowData === 3){
|
||||||
|
return '报名完成';
|
||||||
|
}
|
||||||
|
if(rowData === -1){
|
||||||
|
return '审核不通过';
|
||||||
|
}else{
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{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()
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
curr: currentPage
|
||||||
|
},
|
||||||
|
height: $win.height() - 115,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化日期
|
||||||
|
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,
|
||||||
|
title: '新增【' + $(parent.document.getElementById('treeTitle')).html() + '】开班计划',
|
||||||
|
closeBtn: 1,
|
||||||
|
area: ['90%', '90%'],
|
||||||
|
shadeClose: false,
|
||||||
|
anim: 2,
|
||||||
|
content: top.restAjax.path('route/classplan/save.html?orgId={arg}', [orgId]),
|
||||||
|
end: function() {
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
table.on('tool(dataTable)', function(obj) {
|
||||||
|
var layEvent = obj.event;
|
||||||
|
var data = obj.data;
|
||||||
|
if(layEvent === 'show') {
|
||||||
|
parent.layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: '报名人员详细信息',
|
||||||
|
closeBtn: 1,
|
||||||
|
area: ['80%', '80%'],
|
||||||
|
shadeClose: false,
|
||||||
|
anim: 2,
|
||||||
|
content: top.restAjax.path('route/apply/show.html?applyId={applyId}&hiddenFooter=1', [data.applyId]),
|
||||||
|
end: function() {
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (layEvent === 'audit'){
|
||||||
|
parent.layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: '审核',
|
||||||
|
closeBtn: 1,
|
||||||
|
area: ['80%', '80%'],
|
||||||
|
shadeClose: false,
|
||||||
|
anim: 2,
|
||||||
|
content: top.restAjax.path('route/apply/audit.html?applyId={applyId}', [data.applyId]),
|
||||||
|
end: function() {
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if(layEvent === 'audithistory'){
|
||||||
|
parent.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);
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, 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>
|
@ -12,31 +12,17 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
<div class="layui-anim layui-anim-fadein">
|
||||||
<div class="layui-card">
|
<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;">
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||||
<div class="layui-row">
|
<div class="layui-row">
|
||||||
<div class="layui-col-md6">
|
<div class="layui-col-md6">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label"><span style="color: red">*</span>培训机构</label>
|
<label class="layui-form-label"><span style="color: red">*</span>班次</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="hidden" id="orgId" name="orgId">
|
<input type="text" id="planNumber" name="planNumber" class="layui-input" value=""
|
||||||
<input type="text" id="orgName" name="orgName" class="layui-input" value="" readonly="readonly" maxlength="100">
|
autocomplete="off" placeholder="班次不可重复" lay-verify="required" 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="" placeholder="请输入培训计划编号" readonly="readonly" maxlength="100">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -44,9 +30,10 @@
|
|||||||
<div class="layui-row">
|
<div class="layui-row">
|
||||||
<div class="layui-col-md12">
|
<div class="layui-col-md12">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label"><span style="color: red">*</span>计划名称</label>
|
<label class="layui-form-label"><span style="color: red">*</span>班级名称</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="planName" name="planName" class="layui-input" value="" placeholder="请输入培训计划名称" lay-verify="required" maxlength="255">
|
<input type="text" id="planName" name="planName" class="layui-input" value=""
|
||||||
|
autocomplete="off" placeholder="请输入班级名称" lay-verify="required" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -59,7 +46,6 @@
|
|||||||
<select id="planType" name="planType">
|
<select id="planType" name="planType">
|
||||||
<option value="1">初训</option>
|
<option value="1">初训</option>
|
||||||
<option value="2">复训</option>
|
<option value="2">复训</option>
|
||||||
<option value="3">换证</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -75,52 +61,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label"><span style="color: red">*</span>培训工种</label>
|
<label class="layui-form-label"><span style="color: red">*</span>开班时间</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="hidden" id="workerCatalog" name="workerCatalog" value="">
|
<input type="text" id="planStartTime" name="planStartTime" class="layui-input" value="" placeholder="请选择开班时间" readonly style="cursor: pointer;" lay-verify="required">
|
||||||
<input type="text" id="workerCatalogName" name="workerCatalogName" class="layui-input" value="" style="cursor: pointer;" lay-verify="required" placeholder="请选择培训工种" readonly="readonly">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label"><span style="color: red">*</span>计划人数</label>
|
<label class="layui-form-label"><span style="color: red">*</span>结课时间</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="number" id="planPersonNum" name="planPersonNum" class="layui-input" value="0" placeholder="请输入计划人数" lay-verify="checkPlanPersonNum">
|
<input type="text" id="planEndTime" name="planEndTime" class="layui-input" value="" placeholder="请选择结课时间" readonly style="cursor: pointer;" 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"><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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-col-md3">
|
|
||||||
<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="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"><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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-col-md3">
|
|
||||||
<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="signUpEndTime" name="signUpEndTime" class="layui-input" value="" placeholder="请选择报名时间截止" readonly style="cursor: pointer;" lay-verify="required">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -130,7 +81,8 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label"><span style="color: red">*</span>负责人</label>
|
<label class="layui-form-label"><span style="color: red">*</span>负责人</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="chargePerson" name="chargePerson" class="layui-input" value="" placeholder="请输入负责人" lay-verify="required" maxlength="50">
|
<input type="text" id="chargePerson" name="chargePerson" class="layui-input" value=""
|
||||||
|
autocomplete="off" placeholder="请输入负责人" lay-verify="required" maxlength="50">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -138,7 +90,8 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label"><span style="color: red">*</span>联系方式</label>
|
<label class="layui-form-label"><span style="color: red">*</span>联系方式</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="chargePersonTel" name="chargePersonTel" class="layui-input" value="" placeholder="请输入联系方式" lay-verify="required" maxlength="255">
|
<input type="text" id="chargePersonTel" name="chargePersonTel" class="layui-input" value=""
|
||||||
|
autocomplete="off" placeholder="请输入联系方式" lay-verify="required" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -149,18 +102,27 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label"><span style="color: red">*</span>培训地点</label>
|
<label class="layui-form-label"><span style="color: red">*</span>培训地点</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="planAddress" name="planAddress" class="layui-input" value="" placeholder="请输入培训地点" lay-verify="required" maxlength="255">
|
<input type="text" id="planAddress" name="planAddress" class="layui-input" value=""
|
||||||
|
autocomplete="off" placeholder="请输入培训地点" lay-verify="required" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-row">
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md12">
|
||||||
|
<button type="button" id="teacher-lessons-event" class="layui-btn layui-btn layui-btn-info">
|
||||||
|
<i class="fa fa-lg fa-plus"></i> 配置课程及讲师
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row teacher-lessons-div" style="display:;">
|
||||||
<div class="layui-col-md12">
|
<div class="layui-col-md12">
|
||||||
<table class="layui-table" id="dataTable" lay-filter="dataTable">
|
<table class="layui-table" id="dataTable" lay-filter="dataTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 50px; text-align: center"><b>确认课程</b></th>
|
<th style="width: 50px; text-align: center"><b>确认课程</b></th>
|
||||||
<th style="width: 200px; text-align: center"><b>选择讲师</b></th>
|
<th style="width: 100px; 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: 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>
|
||||||
<th style="width: 100px; text-align: center"><b>授课方式</b></th>
|
<th style="width: 100px; text-align: center"><b>授课方式</b></th>
|
||||||
@ -181,6 +143,19 @@
|
|||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="test-table-reload-btn">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="date-start-{{item.lessonId}}" class="layui-input search-item lessons-date"
|
||||||
|
style="width: 150px" placeholder="上午" readonly>
|
||||||
|
</div>
|
||||||
|
至
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="date-end-{{item.lessonId}}" class="layui-input search-item lessons-date"
|
||||||
|
style="width: 150px" placeholder="下午" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
<td style="text-align: center">
|
<td style="text-align: center">
|
||||||
{{item.lessonName}}
|
{{item.lessonName}}
|
||||||
</td>
|
</td>
|
||||||
@ -232,31 +207,36 @@
|
|||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
var teacherList = [];
|
var teacherList = [];
|
||||||
var orgId = top.restAjax.params(window.location.href).orgId;
|
var orgId = top.restAjax.params(window.location.href).orgId;
|
||||||
var orgName = top.restAjax.params(window.location.href).orgName;
|
|
||||||
|
|
||||||
// 初始化内容
|
// 初始化内容
|
||||||
function initData() {
|
function initData() {
|
||||||
//生成计划编号
|
$('.layui-card').height($(window).height());
|
||||||
var date = new Date();
|
|
||||||
var planNumber = '';
|
|
||||||
planNumber += date.getFullYear();
|
|
||||||
planNumber += (date.getMonth() + 1) + '';
|
|
||||||
planNumber += date.getDate();
|
|
||||||
planNumber += date.getTime();
|
|
||||||
var dataObj = {}
|
|
||||||
dataObj['planNumber'] = planNumber;
|
|
||||||
dataObj['orgId'] = orgId;
|
|
||||||
dataObj['orgName'] = orgName;
|
|
||||||
form.val('dataForm',dataObj);
|
|
||||||
form.render();
|
|
||||||
initPlanStartTimeDateTime();
|
initPlanStartTimeDateTime();
|
||||||
initPlanEndTimeDateTime();
|
initPlanEndTimeDateTime();
|
||||||
initSignUpStartTimeDateTime();
|
|
||||||
initSignUpEndTimeDateTime();
|
|
||||||
initTeacherList();
|
initTeacherList();
|
||||||
}
|
}
|
||||||
initData();
|
initData();
|
||||||
|
|
||||||
|
// 初始化培训开始时间时间戳
|
||||||
|
function initPlanStartTimeDateTime() {
|
||||||
|
laydate.render({
|
||||||
|
elem: '#planStartTime',
|
||||||
|
type: 'date',
|
||||||
|
trigger: 'click',
|
||||||
|
min : 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化培训结束时间时间戳
|
||||||
|
function initPlanEndTimeDateTime() {
|
||||||
|
laydate.render({
|
||||||
|
elem: '#planEndTime',
|
||||||
|
type: 'date',
|
||||||
|
trigger: 'click',
|
||||||
|
min : 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//查询课程列表
|
//查询课程列表
|
||||||
function initLessonsList(){
|
function initLessonsList(){
|
||||||
var dataObj = {};
|
var dataObj = {};
|
||||||
@ -277,6 +257,17 @@
|
|||||||
document.getElementById('lessonTbodyBox').innerHTML = html;
|
document.getElementById('lessonTbodyBox').innerHTML = html;
|
||||||
});
|
});
|
||||||
form.render();
|
form.render();
|
||||||
|
$.each($('.lessons-date'),function(){
|
||||||
|
var _this = this;
|
||||||
|
laydate.render({
|
||||||
|
format : 'HH:mm',
|
||||||
|
elem: _this,
|
||||||
|
type: 'time',
|
||||||
|
trigger: 'click',
|
||||||
|
min: '08:00:00',
|
||||||
|
max: '21:00:00'
|
||||||
|
});
|
||||||
|
});
|
||||||
},function(code,data){
|
},function(code,data){
|
||||||
top.dialog.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
});
|
});
|
||||||
@ -291,21 +282,82 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 配置讲师及课程按钮事件
|
||||||
|
$('#teacher-lessons-event').on('click',function(){
|
||||||
|
if($('#projectCatalogId').val() == ''){
|
||||||
|
layer.msg('必须先选择培训项目');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if($('#planStartTime').val() == ''){
|
||||||
|
layer.msg('必须先选择开班时间');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if($('#planEndTime').val() == ''){
|
||||||
|
layer.msg('必须先选择结课时间');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initLessonsList();
|
||||||
|
$('.teacher-lessons-div').show();
|
||||||
|
});
|
||||||
|
|
||||||
form.on('checkbox(lessonCheckBox)',function(data){
|
form.on('checkbox(lessonCheckBox)',function(data){
|
||||||
var lessonId = $(data.elem).attr('data-lesson-id');
|
var lessonId = $(data.elem).attr('data-lesson-id');
|
||||||
var teacherId = $('#select-' + lessonId).val();
|
var teacherId = $('#select-' + lessonId).val();
|
||||||
if(data.elem.checked == false){
|
var dateStartTime = $('#date-start-' + lessonId).val();
|
||||||
$('#select-' + lessonId).removeAttr("disabled");
|
var dateEndTime = $('#date-end-' + lessonId).val();
|
||||||
form.render();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(teacherId == ''){
|
if(teacherId == ''){
|
||||||
data.elem.checked = false;
|
data.elem.checked = false;
|
||||||
form.render();
|
form.render();
|
||||||
layer.msg('先选择讲师');
|
layer.msg('先选择讲师');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(dateStartTime == '' || dateEndTime == ''){
|
||||||
|
data.elem.checked = false;
|
||||||
|
$('#date-start-' + lessonId).removeAttr("disabled");
|
||||||
|
$('#date-end-' + lessonId).removeAttr("disabled");
|
||||||
|
form.render();
|
||||||
|
layer.msg('授课时间存在空值');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
dateStartTime = '1970-12-12 ' + dateStartTime + ':00';
|
||||||
|
dateEndTime = '1970-12-12 ' + dateEndTime + ':00';
|
||||||
|
if(verifyDate(dateStartTime,dateEndTime) != -1){
|
||||||
|
data.elem.checked = false;
|
||||||
|
$('#date-start-' + lessonId).removeAttr("disabled");
|
||||||
|
$('#date-end-' + lessonId).removeAttr("disabled");
|
||||||
|
form.render();
|
||||||
|
layer.msg('授课起止时间冲突');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//校验所有时间是否合法
|
||||||
|
var checkedList = $('input[name="lessonCheckBox"]:checked');
|
||||||
|
var checkPass = true;
|
||||||
|
if(checkedList.length -1 != 0){
|
||||||
|
$.each(checkedList,function(i,e){
|
||||||
|
var tempLessonId = $(e).attr('data-lesson-id');
|
||||||
|
var _tempStart = '1970-12-12 ' + $('#date-start-' + tempLessonId).val() + ':00';
|
||||||
|
var _tempEnd = '1970-12-12 ' + $('#date-end-' + tempLessonId).val() + ':00';
|
||||||
|
if((verifyDate(dateEndTime, _tempStart) == -1)
|
||||||
|
|| (verifyDate(dateStartTime, _tempEnd) == 1)){
|
||||||
|
checkPass = true;
|
||||||
|
} else if( tempLessonId != lessonId){
|
||||||
|
data.elem.checked = false;
|
||||||
|
layer.msg('课程时间存在冲突');
|
||||||
|
form.render();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if(data.elem.checked == false){
|
||||||
|
$('#select-' + lessonId).removeAttr("disabled");
|
||||||
|
$('#date-start-' + lessonId).removeAttr("disabled");
|
||||||
|
$('#date-end-' + lessonId).removeAttr("disabled");
|
||||||
|
form.render();
|
||||||
|
return;
|
||||||
|
}
|
||||||
$('#select-' + lessonId).attr("disabled","disabled");
|
$('#select-' + lessonId).attr("disabled","disabled");
|
||||||
|
$('#date-start-' + lessonId).attr("disabled","disabled");
|
||||||
|
$('#date-end-' + lessonId).attr("disabled","disabled");
|
||||||
form.render();
|
form.render();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -327,7 +379,9 @@
|
|||||||
form.val('dataForm',obj);
|
form.val('dataForm',obj);
|
||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
top.dialog.dialogTreeData.selectedNodes = {};
|
top.dialog.dialogTreeData.selectedNodes = {};
|
||||||
initLessonsList();
|
if($('#projectCatalogId').val() == ''){
|
||||||
|
$('.teacher-lessons-div').hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -353,42 +407,6 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 初始化培训开始时间时间戳
|
|
||||||
function initPlanStartTimeDateTime() {
|
|
||||||
laydate.render({
|
|
||||||
elem: '#planStartTime',
|
|
||||||
type: 'date',
|
|
||||||
trigger: 'click'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化培训结束时间时间戳
|
|
||||||
function initPlanEndTimeDateTime() {
|
|
||||||
laydate.render({
|
|
||||||
elem: '#planEndTime',
|
|
||||||
type: 'date',
|
|
||||||
trigger: 'click'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化报名时间开始时间戳
|
|
||||||
function initSignUpStartTimeDateTime() {
|
|
||||||
laydate.render({
|
|
||||||
elem: '#signUpStartTime',
|
|
||||||
type: 'date',
|
|
||||||
trigger: 'click'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化报名时间截止时间戳
|
|
||||||
function initSignUpEndTimeDateTime() {
|
|
||||||
laydate.render({
|
|
||||||
elem: '#signUpEndTime',
|
|
||||||
type: 'date',
|
|
||||||
trigger: 'click'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 提交表单
|
// 提交表单
|
||||||
form.on('submit(submitForm)', function(formData) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
var checkedList = $('input[name="lessonCheckBox"]:checked');
|
var checkedList = $('input[name="lessonCheckBox"]:checked');
|
||||||
@ -397,6 +415,9 @@
|
|||||||
var obj = {};
|
var obj = {};
|
||||||
obj['lessonId'] = $(e).attr('data-lesson-id');
|
obj['lessonId'] = $(e).attr('data-lesson-id');
|
||||||
obj['teacherId'] = $('#select-' + obj['lessonId']).val();
|
obj['teacherId'] = $('#select-' + obj['lessonId']).val();
|
||||||
|
obj['teacherId'] = $('#select-' + obj['lessonId']).val();
|
||||||
|
obj['lessonStartTime'] = $('#date-start-' + obj['lessonId']).val();
|
||||||
|
obj['lessonEndTime'] = $('#date-end-' + obj['lessonId']).val();
|
||||||
lessonList.push(obj);
|
lessonList.push(obj);
|
||||||
});
|
});
|
||||||
if(lessonList.length == 0){
|
if(lessonList.length == 0){
|
||||||
|
@ -44,9 +44,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md6">
|
<div class="layui-col-md6">
|
||||||
<div class="layui-form-item">
|
<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">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="certificateNo" name="certificateNo" class="layui-input" autocomplete="off" value="" placeholder="资格证号">
|
<input type="text" id="idCardNumber" name="idCardNumber" class="layui-input" value="" autocomplete="off" placeholder="请输入公民身份证号" lay-verify="identity">
|
||||||
|
</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="telephone" name="telephone" class="layui-input" autocomplete="off" value="" placeholder="请输入联系方式(手机号)" lay-verify="phone">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -64,21 +72,13 @@
|
|||||||
</script>
|
</script>
|
||||||
</div>
|
</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="idCardNumber" name="idCardNumber" class="layui-input" value="" autocomplete="off" placeholder="请输入公民身份证号">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-row">
|
<div class="layui-row">
|
||||||
<div class="layui-col-md6">
|
<div class="layui-col-md6">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label"><span style="color: red">*</span>联系方式</label>
|
<label class="layui-form-label">资格证号</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="telephone" name="telephone" class="layui-input" autocomplete="off" value="" placeholder="请输入联系方式(手机号)" lay-verify="phone">
|
<input type="text" id="certificateNo" name="certificateNo" class="layui-input" autocomplete="off" value="" placeholder="资格证号">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">所属机构</label>
|
<label class="layui-form-label">所属机构</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="orgId" name="orgId" class="layui-input" value="" autocomplete="off" placeholder="所属机构" readonly="readonly">
|
<input type="hidden" id="orgId" name="orgId">
|
||||||
|
<input type="text" id="orgName" name="orgName" class="layui-input" value="" autocomplete="off" placeholder="所属机构" readonly="readonly">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -43,9 +44,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md6">
|
<div class="layui-col-md6">
|
||||||
<div class="layui-form-item">
|
<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">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="certificateNo" name="certificateNo" class="layui-input" autocomplete="off" value="" placeholder="资格证号">
|
<input type="text" id="idCardNumber" name="idCardNumber" class="layui-input" value="" autocomplete="off" placeholder="请输入公民身份证号" lay-verify="identity">
|
||||||
|
</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="telephone" name="telephone" class="layui-input" autocomplete="off" value="" placeholder="请输入联系方式(手机号)" lay-verify="phone">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -63,21 +72,13 @@
|
|||||||
</script>
|
</script>
|
||||||
</div>
|
</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="idCardNumber" name="idCardNumber" class="layui-input" value="" autocomplete="off" placeholder="请输入公民身份证号">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-row">
|
<div class="layui-row">
|
||||||
<div class="layui-col-md6">
|
<div class="layui-col-md6">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label"><span style="color: red">*</span>联系方式</label>
|
<label class="layui-form-label">资格证号</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="telephone" name="telephone" class="layui-input" autocomplete="off" value="" placeholder="请输入联系方式(手机号)" lay-verify="phone">
|
<input type="text" id="certificateNo" name="certificateNo" class="layui-input" autocomplete="off" value="" placeholder="资格证号">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user