@@ -67,7 +67,7 @@ namespace Learun.Application.Organization | |||
List<DepartmentEntity> list = GetList(companyId); | |||
if (!string.IsNullOrEmpty(keyWord)) | |||
{ | |||
list = list.FindAll(t => t.F_FullName.Contains(keyWord) || t.F_EnCode.Contains(keyWord) || t.F_ShortName.Contains(keyWord)); | |||
list = list.FindAll(t => (!string.IsNullOrEmpty(t.F_FullName) && t.F_FullName.Contains(keyWord)) || (!string.IsNullOrEmpty(t.F_EnCode) && t.F_EnCode.Contains(keyWord)) || (!string.IsNullOrEmpty(t.F_ShortName) && t.F_ShortName.Contains(keyWord))); | |||
} | |||
return list; | |||
} | |||
@@ -18,6 +18,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); | |||
private ArrangeLessonSyncIBLL arrangeLessonSyncIBLL = new ArrangeLessonSyncBLL(); | |||
private StuEnrollScoreIBLL stuEnrollScoreIBLL = new StuEnrollScoreBLL(); | |||
private ExamSubjectIBLL examSubjectIBLL = new ExamSubjectBLL(); | |||
private MajorAndSubjectIBLL majorAndSubjectIBLL = new MajorAndSubjectBLL(); | |||
#region 视图功能 | |||
@@ -51,6 +54,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 返回前五年+后五年的年份yyyy | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult GenerateNearByYear() | |||
{ | |||
return Success(WebHelper.GenerateNearByYear()); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
@@ -110,14 +121,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult Lock(string keyValue) | |||
{ | |||
cdMajorIBLL.Lock(keyValue); | |||
return Success("审核成功!"); | |||
return Success("启用成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult UnLock(string keyValue) | |||
{ | |||
cdMajorIBLL.UnLock(keyValue); | |||
return Success("去审成功!"); | |||
return Success("停用成功!"); | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
@@ -128,6 +139,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
var model = cdMajorIBLL.GetCdMajorEntity(item); | |||
int AuditCout = stuEnrollScoreIBLL.IsExistNoCheck(model.Year, keyValue); | |||
if (AuditCout > 0) | |||
{ | |||
return Fail("不能删除关联学科"); | |||
} | |||
} | |||
cdMajorIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
@@ -168,8 +190,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
entity.SyncFlag = false; | |||
} | |||
//删除所关联的科目 | |||
majorAndSubjectIBLL.DeleteEntityById(keyValue); | |||
} | |||
int AuditCout = stuEnrollScoreIBLL.IsExistNoCheck(entity.Year, keyValue); | |||
if (AuditCout > 0) | |||
{ | |||
return Fail("不能修改关联学科"); | |||
} | |||
cdMajorIBLL.SaveEntity(keyValue, entity); | |||
#region 给关联表添加科目 | |||
MajorAndSubjectEntity majorAndSubjectEntity = new MajorAndSubjectEntity(); | |||
string[] SubNo = entity.SubjectNo.Split(','); | |||
for (int i = 0; i < SubNo.Length; i++) | |||
{ | |||
majorAndSubjectEntity.MajorId = entity.ID;//关联专业主键 | |||
majorAndSubjectEntity.SubId = SubNo[i];//考试科目的主键 | |||
majorAndSubjectIBLL.SaveEntity("", majorAndSubjectEntity); | |||
} | |||
#endregion | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
@@ -100,14 +100,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult Lock(string keyValue) | |||
{ | |||
classInfoIBLL.Lock(keyValue); | |||
return Success("审核成功!"); | |||
return Success("启用成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult UnLock(string keyValue) | |||
{ | |||
classInfoIBLL.UnLock(keyValue); | |||
return Success("去审成功!"); | |||
return Success("停用成功!"); | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
@@ -117,6 +117,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
entity.AmendDate = DateTime.Now; | |||
} | |||
entity.State = 0; | |||
entity.LessonSortNo = "1"; | |||
entity.IsAllowEdit = true; | |||
entity.MakeDate = DateTime.Now; | |||
var model = classPlanIBLL.GetRepetitions(entity.F_SchoolId, entity.AcademicYearNo, entity.Semester, entity.DeptNo, entity.MajorNo, entity.Grade, entity.LessonNo); | |||
@@ -86,14 +86,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult Lock(string keyValue) | |||
{ | |||
classroomInfoIBLL.Lock(keyValue); | |||
return Success("审核成功!"); | |||
return Success("启用成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult UnLock(string keyValue) | |||
{ | |||
classroomInfoIBLL.UnLock(keyValue); | |||
return Success("去审成功!"); | |||
return Success("停用成功!"); | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
@@ -100,6 +100,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult QRCode() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 打印 | |||
/// <summary> | |||
@@ -0,0 +1,130 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-06-21 10:33 | |||
/// 描 述:考试科目基础信息 | |||
/// </summary> | |||
public class ExamSubjectController : MvcControllerBase | |||
{ | |||
private ExamSubjectIBLL examSubjectIBLL = new ExamSubjectBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = examSubjectIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var ExamSubjectData = examSubjectIBLL.GetExamSubjectEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
ExamSubject = ExamSubjectData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
examSubjectIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
ExamSubjectEntity entity = strEntity.ToObject<ExamSubjectEntity>(); | |||
var model = examSubjectIBLL.GetExamSubjectBySubjectNo(entity.SubjectNo); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
if (model != null) | |||
{ | |||
return Fail("科目编码已存在,请重命名"); | |||
} | |||
} | |||
else | |||
{ | |||
if (model != null && model.Id != keyValue) | |||
{ | |||
return Fail("科目编码已存在,请重命名!"); | |||
} | |||
} | |||
examSubjectIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,117 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:51 | |||
/// 描 述:考场安排明细 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermItemNewController : MvcControllerBase | |||
{ | |||
private Exam_ArrangeExamTermItemNewIBLL exam_ArrangeExamTermItemNewIBLL = new Exam_ArrangeExamTermItemNewBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ArrangeExamTermItemNewIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Exam_ArrangeExamTermItemNewData = exam_ArrangeExamTermItemNewIBLL.GetExam_ArrangeExamTermItemNewEntity( keyValue ); | |||
var jsonData = new { | |||
Exam_ArrangeExamTermItemNew = Exam_ArrangeExamTermItemNewData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ArrangeExamTermItemNewIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ArrangeExamTermItemNewEntity entity = strEntity.ToObject<Exam_ArrangeExamTermItemNewEntity>(); | |||
exam_ArrangeExamTermItemNewIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,165 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:00 | |||
/// 描 述:排考安排 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermNewController : MvcControllerBase | |||
{ | |||
private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexForClass() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult IndexItem() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListForClass(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ArrangeExamTermNewIBLL.GetPageListForClass(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
[HttpGet] | |||
public ActionResult GetClassTree() | |||
{ | |||
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree()); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetItemPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ArrangeExamTermNewIBLL.GetItemPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ArrangeExamTermNewIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var ArrangeExamTermNewData = exam_ArrangeExamTermNewIBLL.GetExam_ArrangeExamTermNewEntity( keyValue ); | |||
var jsonData = new { | |||
ArrangeExamTermNew = ArrangeExamTermNewData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ArrangeExamTermNewIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ArrangeExamTermNewEntity entity = strEntity.ToObject<Exam_ArrangeExamTermNewEntity>(); | |||
exam_ArrangeExamTermNewIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,176 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-12 15:47 | |||
/// 描 述:考试课程表 | |||
/// </summary> | |||
public class Exam_ExamLessonController : MvcControllerBase | |||
{ | |||
private Exam_ExamLessonIBLL exam_ExamLessonIBLL = new Exam_ExamLessonBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 导入/清空数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamLessonIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Exam_ExamLessonData = exam_ExamLessonIBLL.GetExam_ExamLessonEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Exam_ExamLesson = Exam_ExamLessonData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamLessonIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 导入开课计划 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester) | |||
{ | |||
int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
/// 按条件清空数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
{ | |||
int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamLessonEntity entity = strEntity.ToObject<Exam_ExamLessonEntity>(); | |||
//判断课程编号有无重复 | |||
var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo,entity.AcademicYearNo,entity.Semester); | |||
if (model != null && string.IsNullOrEmpty(keyValue)) | |||
{ | |||
return Fail("课程编号重复!"); | |||
} | |||
else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ELId) | |||
{ | |||
return Fail("课程编号重复!"); | |||
} | |||
exam_ExamLessonIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 启用/停用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="ELEnabled"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Lock(string keyValue, int ELEnabled) | |||
{ | |||
exam_ExamLessonIBLL.Lock(keyValue, ELEnabled); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,197 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-14 18:12 | |||
/// 描 述:考试记录表 | |||
/// </summary> | |||
public class Exam_ExamPlanController : MvcControllerBase | |||
{ | |||
private Exam_ExamPlanIBLL exam_ExamPlanIBLL = new Exam_ExamPlanBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult GenerateForm() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult ClearForm() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamPlanIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Exam_ExamPlanData = exam_ExamPlanIBLL.GetExam_ExamPlanEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Exam_ExamPlan = Exam_ExamPlanData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamPlanIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 生成排考名单 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Generate(string keyValue) | |||
{ | |||
if (!exam_ExamPlanIBLL.IsGenerate(keyValue)) | |||
{ | |||
return Fail("请先安排考试!"); | |||
} | |||
exam_ExamPlanIBLL.Generate(keyValue); | |||
return Success("生成成功!"); | |||
} | |||
/// <summary> | |||
/// 清除排考名单/清除所有排考记录 | |||
/// </summary> | |||
/// <param name="keyValue">排考记录主表Id</param> | |||
/// <param name="type">1:清除排考名单;2:清除所有排考记录</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult ClearGenerate(string keyValue, int type) | |||
{ | |||
exam_ExamPlanIBLL.ClearGenerate(keyValue, type); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamPlanEntity entity = strEntity.ToObject<Exam_ExamPlanEntity>(); | |||
exam_ExamPlanIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 生成排考名单 | |||
/// </summary> | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <param name="PlanType"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult GenerateForm(string AcademicYearNo, string Semester, string PlanType) | |||
{ | |||
int res = exam_ExamPlanIBLL.ClaerForm(AcademicYearNo, Semester, PlanType); | |||
return Success("清空(" + res + ")条数据成功!"); | |||
} | |||
/// <summary> | |||
/// 清除排考名单 | |||
/// </summary> | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <param name="PlanType"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult ClearForm(string AcademicYearNo, string Semester, string PlanType) | |||
{ | |||
int res = exam_ExamPlanIBLL.GenerateForm(AcademicYearNo, Semester, PlanType); | |||
return Success("清空(" + res + ")条数据成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,357 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System; | |||
using System.Linq; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 15:03 | |||
/// 描 述:排考安排课程 | |||
/// </summary> | |||
public class Exam_ExamPlanLessonController : MvcControllerBase | |||
{ | |||
private Exam_ExamPlanLessonIBLL exam_ExamPlanLessonIBLL = new Exam_ExamPlanLessonBLL(); | |||
private Exam_ExamPlanClassIBLL exam_ExamPlanClassIBLL = new Exam_ExamPlanClassBLL(); | |||
private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL(); | |||
private Exam_ExamPlanRoomIBLL exam_ExamPlanRoomIBLL = new Exam_ExamPlanRoomBLL(); | |||
private StuInfoBasicIBLL StuInfoBasicIBLL = new StuInfoBasicBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// </summary> | |||
/// <param name="EPId">排考记录主表Id</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index(string EPId) | |||
{ | |||
exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FormClass() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FormRoom() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FormTeacher() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FormRoomTeacher() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取班级分页列表 | |||
/// </summary> | |||
/// <param name="pagination"></param> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetClassInfoPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamStudentIBLL.GetPageListForExam(paginationobj, queryJson); | |||
//var stuList = StuInfoBasicIBLL.GetAllList(); | |||
//foreach (var item in data) | |||
//{ | |||
// item.StuNum = stuList.Count(x => x.ClassNo == item.ClassNo); | |||
//} | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetListForClass(string queryJson) | |||
{ | |||
var data = exam_ExamPlanClassIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetListForRoom(string pagination, string queryJson) | |||
{ | |||
var data = exam_ExamPlanRoomIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamPlanLessonIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormRoom(string keyValue) | |||
{ | |||
var data = exam_ExamPlanRoomIBLL.GetEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Exam_ExamPlanRoom = data, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Exam_ExamPlanLessonData = exam_ExamPlanLessonIBLL.GetExam_ExamPlanLessonEntity(keyValue); | |||
if (!string.IsNullOrEmpty(Exam_ExamPlanLessonData.ExamTime)) | |||
{ | |||
var etime = Exam_ExamPlanLessonData.ExamTime.Split('-'); | |||
Exam_ExamPlanLessonData.ExamTimeStart = etime[0]; | |||
Exam_ExamPlanLessonData.ExamTimeEnd = etime[1]; | |||
} | |||
var jsonData = new | |||
{ | |||
Exam_ExamPlanLesson = Exam_ExamPlanLessonData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取左侧树形数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetTree(string EPId) | |||
{ | |||
var data = exam_ExamPlanLessonIBLL.GetTree(EPId); | |||
return Success(data); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult ValidateRoom(string EPLId, string ClassroomNo) | |||
{ | |||
var data = exam_ExamPlanRoomIBLL.ValidateRoom(EPLId, ClassroomNo); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 初始化Exam_ExamPlanLesson,如果表中没有数据,将考试课程表数据添加进去 | |||
/// </summary> | |||
/// <param name="EPId">排考记录主表Id</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult InitExamPlanLesson(string EPId) | |||
{ | |||
exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId); | |||
return Success("初始化成功!"); | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamPlanLessonIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteClass(string keyValue) | |||
{ | |||
exam_ExamPlanClassIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteRoom(string keyValue) | |||
{ | |||
exam_ExamPlanRoomIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 审核 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Check(string keyValue, int ELCheckMark) | |||
{ | |||
if (ELCheckMark == 1) | |||
{ | |||
var entity = exam_ExamPlanLessonIBLL.GetExam_ExamPlanLessonEntity(keyValue); | |||
if (entity.ExamDate == null || entity.ExamTime == null) | |||
{ | |||
return Fail("请先设置考试时间!"); | |||
} | |||
if ((entity.RealClassNum == null || entity.RealClassNum == 0) || | |||
(entity.SeatCount == null || entity.SeatCount == 0)) | |||
{ | |||
return Fail("请先安排班级和考场!"); | |||
} | |||
if (entity.SeatCount < entity.RealStuCount) | |||
{ | |||
return Fail("考场座位数不足!"); | |||
} | |||
} | |||
exam_ExamPlanLessonIBLL.Check(keyValue, ELCheckMark); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// 设置考试时间 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamPlanLessonEntity entity = strEntity.ToObject<Exam_ExamPlanLessonEntity>(); | |||
DateTime time; | |||
bool flag = DateTime.TryParse(entity.ExamTimeStart, out time); | |||
if (!flag) | |||
{ | |||
return Fail("考试开始时间格式不正确!"); | |||
} | |||
if (!DateTime.TryParse(entity.ExamTimeEnd, out time)) | |||
{ | |||
return Fail("考试结束时间格式不正确!"); | |||
} | |||
if (!string.IsNullOrEmpty(entity.ExamTimeStart) && !string.IsNullOrEmpty(entity.ExamTimeEnd)) | |||
{ | |||
entity.ExamTime = entity.ExamTimeStart.Trim() + "-" + entity.ExamTimeEnd; | |||
} | |||
entity.EPLId = keyValue; | |||
//判断考试时间是否冲突 | |||
var res = exam_ExamPlanLessonIBLL.IsExamTimeClash(entity); | |||
if (res.flag && !string.IsNullOrEmpty(res.lessonname)) | |||
{ | |||
return Fail("考试时间与课程(" + res.lessonname + ")冲突!"); | |||
} | |||
//保存 | |||
exam_ExamPlanLessonIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveClass(string EPLId, string strEntity) | |||
{ | |||
var list = strEntity.ToObject<List<Exam_ExamPlanClassEntity>>(); | |||
exam_ExamPlanClassIBLL.SaveList(list); | |||
return Success("保存成功!"); | |||
} | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveRoomAndTeacher(string keyValue, string strEntity, string Exam_ExamPlanTeacherList) | |||
{ | |||
var entity = strEntity.ToObject<Exam_ExamPlanRoomEntity>(); | |||
var teacherList = Exam_ExamPlanTeacherList.ToObject<List<Exam_InvigilateTeacherEntity>>(); | |||
entity.EmpNo = string.Join(",", teacherList.Select(x => x.EmpNo).ToList()); | |||
entity.EmpName = string.Join(",", teacherList.Select(x => x.EmpName).ToList()); | |||
exam_ExamPlanRoomIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
//[HttpPost] | |||
//[ValidateAntiForgeryToken] | |||
//[AjaxOnly] | |||
//public ActionResult SaveRoom(List<Exam_ExamPlanRoomEntity> list) | |||
//{ | |||
// exam_ExamPlanRoomIBLL.SaveList(list); | |||
// return Success("保存成功!"); | |||
//} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,179 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-12 15:47 | |||
/// 描 述:考场表 | |||
/// </summary> | |||
public class Exam_ExamRoomController : MvcControllerBase | |||
{ | |||
private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 导入/清空数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamRoomIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Exam_ExamRoomData = exam_ExamRoomIBLL.GetExam_ExamRoomEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Exam_ExamRoom = Exam_ExamRoomData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamRoomIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 导入教室 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns) | |||
{ | |||
int res = exam_ExamRoomIBLL.Import(AcademicYearNo, Semester,SeatRows,SeatColumns); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
/// 按条件清空数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
{ | |||
int res = exam_ExamRoomIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamRoomEntity entity = strEntity.ToObject<Exam_ExamRoomEntity>(); | |||
//判断考场编号有无重复 | |||
var model = exam_ExamRoomIBLL.GetEntityByClassroomNo(entity.ClassroomNo,entity.AcademicYearNo,entity.Semester); | |||
if (model != null && string.IsNullOrEmpty(keyValue)) | |||
{ | |||
return Fail("考场编号重复!"); | |||
} | |||
else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ERId) | |||
{ | |||
return Fail("考场编号重复!"); | |||
} | |||
//计算考场座位数 | |||
entity.SeatCount = entity.SeatRows * entity.SeatColumns; | |||
exam_ExamRoomIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 启用/停用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="EREnabled"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Lock(string keyValue, int EREnabled) | |||
{ | |||
exam_ExamRoomIBLL.Lock(keyValue, EREnabled); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,187 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-12 15:47 | |||
/// 描 述:考试课程表 | |||
/// </summary> | |||
public class Exam_ExamStudentController : MvcControllerBase | |||
{ | |||
private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 导入 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormImport() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 按条件清空 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormClear() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamStudentIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Exam_ExamStudentData = exam_ExamStudentIBLL.GetExam_ExamStudentEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Exam_ExamStudent = Exam_ExamStudentData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamStudentIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamStudentEntity entity = strEntity.ToObject<Exam_ExamStudentEntity>(); | |||
#region 去重 | |||
var model = exam_ExamStudentIBLL.GetExam_ExamStudentbyStuNo(entity.StuNo); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
if (model != null && model.AcademicYearNo == entity.AcademicYearNo && model.Semester == entity.Semester && model.ESType == entity.ESType) | |||
{ | |||
return Fail("此学生考试数据已存在!"); | |||
} | |||
} | |||
else | |||
{ | |||
if (model != null && model.ESId != keyValue && model.AcademicYearNo == entity.AcademicYearNo && model.Semester == entity.Semester && model.ESType == entity.ESType) | |||
{ | |||
return Fail("此学生考试数据已存在!"); | |||
} | |||
} | |||
#endregion | |||
exam_ExamStudentIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 启用/停用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="ESEnabled"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Lock(string keyValue, int ESEnabled) | |||
{ | |||
exam_ExamStudentIBLL.Lock(keyValue, ESEnabled); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 清空数据 | |||
/// </summary> | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <param name="ESType"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
[ValidateAntiForgeryToken] | |||
public ActionResult ClearTable(string AcademicYearNo, string Semester, string ESType) | |||
{ | |||
int res = exam_ExamStudentIBLL.ClaerForm(AcademicYearNo, Semester, ESType); | |||
return Success("清空(" + res + ")条数据成功!"); | |||
} | |||
public ActionResult ImportTable(string AcademicYearNo, int Semester, string ESType) | |||
{ | |||
int res = exam_ExamStudentIBLL.ImportForm(AcademicYearNo, Semester, ESType); | |||
return Success("同步(" + res + ")条数据成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,175 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-14 09:49 | |||
/// 描 述:监考老师 | |||
/// </summary> | |||
public class Exam_InvigilateTeacherController : MvcControllerBase | |||
{ | |||
private Exam_InvigilateTeacherIBLL exam_InvigilateTeacherIBLL = new Exam_InvigilateTeacherBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_InvigilateTeacherIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Exam_InvigilateTeacherData = exam_InvigilateTeacherIBLL.GetExam_InvigilateTeacherEntity( keyValue ); | |||
var jsonData = new { | |||
Exam_InvigilateTeacher = Exam_InvigilateTeacherData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_InvigilateTeacherIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_InvigilateTeacherEntity entity = strEntity.ToObject<Exam_InvigilateTeacherEntity>(); | |||
//判断教师编号有无重复 | |||
var model = exam_InvigilateTeacherIBLL.GetEntityByWhere(entity.AcademicYearNo, entity.Semester,entity.EmpNo); | |||
if (model != null && string.IsNullOrEmpty(keyValue)) | |||
{ | |||
return Fail("教师编号重复!"); | |||
} | |||
else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ITId) | |||
{ | |||
return Fail("教师编号重复!"); | |||
} | |||
exam_InvigilateTeacherIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 启用/停用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="ITEnabled"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Lock(string keyValue, int ITEnabled) | |||
{ | |||
exam_InvigilateTeacherIBLL.Lock(keyValue, ITEnabled); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 导入教师基础数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester) | |||
{ | |||
int res = exam_InvigilateTeacherIBLL.Import(AcademicYearNo, Semester); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
/// 按条件清空数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
{ | |||
int res = exam_InvigilateTeacherIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,121 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Web.Mvc; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-06-18 11:19 | |||
/// 描 述:MajorAndSubject | |||
/// </summary> | |||
public class MajorAndSubjectController : MvcControllerBase | |||
{ | |||
private MajorAndSubjectIBLL majorAndSubjectIBLL = new MajorAndSubjectBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetList( string queryJson ) | |||
{ | |||
var data = majorAndSubjectIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取列表分页数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = majorAndSubjectIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var data = majorAndSubjectIBLL.GetEntity(keyValue); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
majorAndSubjectIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue,MajorAndSubjectEntity entity) | |||
{ | |||
majorAndSubjectIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -22,6 +22,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
private StuEnrollIBLL stuEnrollIBLL = new StuEnrollBLL(); | |||
private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | |||
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | |||
private StuEnrollScoreIBLL stuEnrollScoreIBLL = new StuEnrollScoreBLL(); | |||
#region 视图功能 | |||
@@ -34,6 +35,61 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 新生报名 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult EnrollForm() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 新生报名 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult EnrollFormView() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 新生报名 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult EnrollIndex() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 新生报名审核 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult EnrollSH() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 新生报名审核 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult EnrollLQ() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 招生统计 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult EnrollIndexTJ() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult StudentStatus() | |||
@@ -234,7 +290,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 招生统计 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetTJList( string queryJson) | |||
{ | |||
var data = stuEnrollIBLL.GetTJList(queryJson); | |||
return Success(data); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetDormitorys(string pagination, string queryJson) | |||
@@ -835,8 +902,53 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("同步成功"); | |||
} | |||
/// <summary> | |||
/// 审核页面 获取考试科目信息 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult GetExamDataByStuId(string keyValue) | |||
{ | |||
var data= stuEnrollIBLL.GetExamDataByStuId(keyValue); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 报名审核 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult UpdateEnrollStatus(string keyValue, string strEntity) | |||
{ | |||
//StuEnrollEntity entity = strEntity.ToObject<StuEnrollEntity>(); | |||
//entity.EnrollStatus = 2; | |||
stuEnrollIBLL.UpdateEnrollStatus(keyValue, 2); | |||
return Success("保存成功"); | |||
} | |||
/// <summary> | |||
/// 报名--去审核 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult NoCheck(string keyValue) | |||
{ | |||
//StuEnrollEntity entity = new StuEnrollEntity(); | |||
//entity.EnrollStatus = 0; | |||
stuEnrollIBLL.UpdateEnrollStatus(keyValue, 0); | |||
return Success("保存成功"); | |||
} | |||
/// <summary> | |||
/// 录取 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult Admission(string keyValue, int IsAdmission) | |||
{ | |||
var count= stuEnrollScoreIBLL.GetNoCheck(keyValue); | |||
if (count > 0) | |||
{ | |||
return Fail("该学生有未审核的科目成绩"); | |||
} | |||
stuEnrollIBLL.Admission(keyValue, IsAdmission); | |||
return Success("保存成功"); | |||
} | |||
#endregion | |||
@@ -0,0 +1,242 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.IO; | |||
using System.Linq; | |||
using System.Web.Mvc; | |||
using Learun.Application.Base.SystemModule; | |||
using Newtonsoft.Json; | |||
using Hangfire; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
public class StuEnrollScoreController : MvcControllerBase | |||
{ | |||
private StuEnrollScoreIBLL stuEnrollScoreIBLL = new StuEnrollScoreBLL(); | |||
#region 视图 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 新生录取管理 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult AdmissionIndex() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 新生录取管理 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult AdmissionForm() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetList(string queryJson) | |||
{ | |||
var data = stuEnrollScoreIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取学生的成绩 | |||
/// <summary> | |||
/// <param name=""></param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetScoreListByStuId(string stuid) | |||
{ | |||
var data = stuEnrollScoreIBLL.GetScoreListByStuId(stuid); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取列表分页数据--新生录取管理 | |||
/// <param name="pagination">分页参数</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListForAdmission(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = stuEnrollScoreIBLL.GetPageListForAdmission(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetEntityByJson(string queryJson) | |||
{ | |||
var data = stuEnrollScoreIBLL.GetEntityByJson(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 学年 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetYearNoData() | |||
{ | |||
var data = stuEnrollScoreIBLL.GetYearNoData(); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 学科 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetSubjectData() | |||
{ | |||
var data = stuEnrollScoreIBLL.GetSubjectData(); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 专业 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetMajorData() | |||
{ | |||
var data = stuEnrollScoreIBLL.GetMajorData(); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 开始录入:占用成绩 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult StartInputScore(string queryJson) | |||
{ | |||
var loginInfo = LoginUserInfo.Get(); | |||
var name = loginInfo.account + "_" + loginInfo.realName + "_新生成绩录入"; | |||
stuEnrollScoreIBLL.StartInputScore(queryJson); | |||
////添加任务 | |||
//var newDate = DateTime.Now.AddMinutes(30); | |||
//RecurringJob.AddOrUpdate(name, | |||
// () => SaveInputScoreStatus2(queryJson, name), | |||
// string.Format("{0} {1} * * *", newDate.Minute, newDate.Hour), TimeZoneInfo.Local); | |||
return Success("操作成功"); | |||
} | |||
/// <summary> | |||
/// 提交成绩:取消占用【服务】 | |||
/// <summary> | |||
/// <returns></returns> | |||
public ActionResult SaveInputScoreStatus2(string queryJson, string name) | |||
{ | |||
stuEnrollScoreIBLL.SaveInputScoreStatus2(queryJson, name); | |||
//删除任务 | |||
//RecurringJob.RemoveIfExists(name); | |||
return Success("操作成功"); | |||
} | |||
/// <summary> | |||
/// 续时 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult AddMinutes(string queryJson, int minutes) | |||
{ | |||
var loginInfo = LoginUserInfo.Get(); | |||
var name = loginInfo.account + "_" + loginInfo.realName + "_新生成绩录入"; | |||
var newDate = DateTime.Now.AddMinutes(minutes); | |||
RecurringJob.AddOrUpdate(name, | |||
() => SaveInputScoreStatus2(queryJson, name), | |||
string.Format("{0} {1} * * *", newDate.Minute, newDate.Hour), TimeZoneInfo.Local); | |||
return Success("操作成功"); | |||
} | |||
/// <summary> | |||
/// 提交成绩 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SaveInputScore(string data) | |||
{ | |||
var list = JsonConvert.DeserializeObject<List<StuEnrollScoreEntity>>(data); | |||
if (list.Any()) | |||
{ | |||
stuEnrollScoreIBLL.SaveInputScore(list); | |||
} | |||
return Success("操作成功"); | |||
} | |||
/// <summary> | |||
/// 提交成绩:取消占用 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SaveInputScoreStatus(string queryJson) | |||
{ | |||
var loginInfo = LoginUserInfo.Get(); | |||
var name = loginInfo.account + "_" + loginInfo.realName + "_新生成绩录入"; | |||
stuEnrollScoreIBLL.SaveInputScoreStatus(queryJson); | |||
//删除任务 | |||
//RecurringJob.RemoveIfExists(name); | |||
return Success("操作成功"); | |||
} | |||
/// <summary> | |||
/// 审核成绩 | |||
/// </summary> | |||
/// <param name="queryJson"></param> | |||
/// <param name="Status">已审核:1;未审核:0;</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoCheckScore(string queryJson, int Status) | |||
{ | |||
stuEnrollScoreIBLL.DoCheckScore(queryJson, Status); | |||
return Success("操作成功"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -86,7 +86,14 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "性别", name: "AGender", width: 200, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "男" : "女"; | |||
if (cellvalue == true) { | |||
return '男'; | |||
} else if (cellvalue == false) { | |||
return '女'; | |||
} else { | |||
return ''; | |||
} | |||
//return cellvalue == true ? "男" : "女"; | |||
} | |||
}, | |||
{ label: '单位名称', name: 'ACompany', width: 200, align: "left" }, | |||
@@ -15,14 +15,31 @@ | |||
<div class="lr-form-item-title">学制<font face="宋体">*</font></div> | |||
<input id="LengthOfSchooling" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<div class="lr-form-item-title">学科门类</div> | |||
<div id="SubjectSpeciesNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<div class="lr-form-item-title">校区<font face="宋体">*</font></div> | |||
<div id="F_SchoolId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<div class="lr-form-item-title">考试科目<font face="宋体">*</font></div> | |||
<div id="SubjectNo" isvalid="yes" checkexpession="NotNull"></div> | |||
<input id="SubjectName" type="hidden" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<div class="lr-form-item-title">年度<font face="宋体">*</font></div> | |||
<div id="Year" isvalid="yes" checkexpession="Num"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<div class="lr-form-item-title">地市<font face="宋体">*</font></div> | |||
<div id="City" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<div class="lr-form-item-title">县区<font face="宋体">*</font></div> | |||
<div id="Area" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<div class="lr-form-item-title">学科门类</div> | |||
<div id="SubjectSpeciesNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<div class="lr-form-item-title">系别</div> | |||
<div id="DeptNo"></div> | |||
@@ -15,6 +15,46 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#Year').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GenerateNearByYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#SubjectNo').lrselect({ | |||
type: 'multiple', | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ExamSubject', | |||
value: 'id', | |||
text: 'subjectname', | |||
maxHeight: 200 | |||
}); | |||
$('#City').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', | |||
param: { strWhere: " cparent= 650000 " }, | |||
value: 'ccode', | |||
text: 'cname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var Citys = $("#City").lrselectGet(); | |||
if (Citys != null && Citys != "" && Citys != undefined) { | |||
$('#Area').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||
param: { strWhere: " 1=1 and aparent in (" + Citys + ")" }, | |||
value: "acode", | |||
text: "aname", | |||
maxHeight: 200 | |||
}); | |||
} else { | |||
$('#Area').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||
param: { strWhere: " 1=1 and aparent ='' " }, | |||
value: "acode", | |||
text: "aname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}) | |||
$("#Area").lrselect(); | |||
$('#SubjectSpeciesNo').lrDataItemSelect({ code: 'SubjectSpecies' }); | |||
$('#F_SchoolId').lrDataSourceSelect({ | |||
code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { | |||
@@ -54,6 +94,8 @@ var bootstrap = function ($, learun) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
$("#SubjectName").val($("#SubjectNo").find(".lr-select-placeholder").text()); | |||
var sss = $("#SubjectName").val($("#SubjectNo").find(".lr-select-placeholder").text()); | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
@@ -17,6 +17,8 @@ var bootstrap = function ($, learun) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#Area').lrDataSourceSelect({ code: 'DIC_AREA', value: 'acode', text: 'aname' }); | |||
$('#City').lrDataSourceSelect({ code: 'DIC_CITY', value: 'ccode', text: 'cname' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
@@ -29,7 +31,7 @@ var bootstrap = function ($, learun) { | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/Form', | |||
width: 1000, | |||
height: 600, | |||
height: 700, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
@@ -45,7 +47,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark === "true") { | |||
learun.alert.warning("当前项目已审核不能编辑!"); | |||
learun.alert.warning("当前项目已启用不能编辑!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
@@ -53,7 +55,7 @@ var bootstrap = function ($, learun) { | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
height: 700, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
@@ -82,7 +84,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//审核 | |||
//启用 | |||
$('#lr_lock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
@@ -95,7 +97,7 @@ var bootstrap = function ($, learun) { | |||
// learun.alert.warning("当前项目已审核无需再审!"); | |||
// return; | |||
//} | |||
learun.layerConfirm('是否确认审核该项!', function (res) { | |||
learun.layerConfirm('是否确认启用该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/Lock', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
@@ -104,7 +106,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//去审核 | |||
//停用 | |||
$('#lr_unlock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
@@ -117,7 +119,7 @@ var bootstrap = function ($, learun) { | |||
// learun.alert.warning("当前项目还未审核不需要去审核!"); | |||
// return; | |||
//} | |||
learun.layerConfirm('是否确认去审核该项!', function (res) { | |||
learun.layerConfirm('是否确认停用该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/UnLock', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
@@ -207,6 +209,48 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
} | |||
}, | |||
//{ | |||
// label: "考试科目", name: "SubjectNo", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getsAsync('custmerData', | |||
// { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ExamSubject', | |||
// key: value, | |||
// keyId: 'Id', | |||
// textId: 'subjectname', | |||
// callback: function (text) { | |||
// callback(text); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ label: "年度", name: "Year", width: 100, align: "left" }, | |||
{ | |||
label: "地市", name: "City", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', | |||
key: value, | |||
keyId: 'ccode', | |||
callback: function (_data) { | |||
callback(_data['cname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "县区", name: "Area", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA', | |||
key: value, | |||
keyId: 'acode', | |||
callback: function (_data) { | |||
callback(_data['aname']); | |||
} | |||
}); | |||
} | |||
} | |||
], | |||
mainId: 'ID', | |||
@@ -110,7 +110,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//审核 | |||
//启用 | |||
$('#lr_lock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ClassId'); | |||
if (learun.checkrow(keyValue)) { | |||
@@ -132,7 +132,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//去审核 | |||
//停用 | |||
$('#lr_unlock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ClassId'); | |||
if (learun.checkrow(keyValue)) { | |||
@@ -40,7 +40,7 @@ var bootstrap = function ($, learun) { | |||
maxHeight: 200, | |||
select: function (item) { | |||
var NDeptNo = $("#DeptNo").lrselectGet(); | |||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | |||
@@ -51,7 +51,7 @@ var bootstrap = function ($, learun) { | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200 | |||
@@ -59,14 +59,20 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}) | |||
$("#MajorNo").lrselect(); | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
value: 'value', | |||
text: 'text' | |||
$("#MajorNo").lrselect({ | |||
select: function (item) { | |||
if (item) { | |||
$('#LessonNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, | |||
value: "lessonno", | |||
text: "lessonname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}); | |||
$('#LessonNo').lrselect(); | |||
$('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
}, | |||
initData: function () { | |||
@@ -83,7 +89,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
$('#StuSortNo').val('02'); | |||
$('#LessonSortNo').val('2'); | |||
$('#LessonSortNo').val('2'); | |||
$('#CheckStyleNo').val('1'); | |||
$('#ScoreRecordStyleNo').val('1'); | |||
$('#CheckMark').val('1'); | |||
@@ -97,7 +103,7 @@ var bootstrap = function ($, learun) { | |||
return false; | |||
} | |||
var nName = $("#LessonNo").find(".lr-select-placeholder").text(); | |||
var Narray= nName.split("("); | |||
var Narray = nName.split("("); | |||
$("#LessonName").val(Narray[0]); | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
@@ -35,15 +35,25 @@ var bootstrap = function ($, learun) { | |||
text: 'text' | |||
}); | |||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | |||
$("#MajorNo").lrselect(); | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200 | |||
$('#MajorNo').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200, | |||
select: function (item) { | |||
if (item) { | |||
$('#LessonNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, | |||
value: "lessonno", | |||
text: "lessonname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}); | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -175,7 +185,7 @@ var bootstrap = function ($, learun) { | |||
$('#titleinfo').text(item.text); | |||
page.search(); | |||
var NDeptNo = item.id; | |||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | |||
@@ -186,7 +196,7 @@ var bootstrap = function ($, learun) { | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200 | |||
@@ -35,15 +35,25 @@ var bootstrap = function ($, learun) { | |||
text: 'text' | |||
}); | |||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | |||
$("#MajorNo").lrselect(); | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200 | |||
$('#MajorNo').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200, | |||
select: function (item) { | |||
if (item) { | |||
$('#LessonNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, | |||
value: "lessonno", | |||
text: "lessonname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}); | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -131,7 +141,7 @@ var bootstrap = function ($, learun) { | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200 | |||
@@ -82,7 +82,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//审核 | |||
//启用 | |||
$('#lr_lock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ClassroomId'); | |||
if (learun.checkrow(keyValue)) { | |||
@@ -104,7 +104,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//去审核 | |||
//停用 | |||
$('#lr_unlock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ClassroomId'); | |||
if (learun.checkrow(keyValue)) { | |||
@@ -147,11 +147,11 @@ | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="EmpInfo"> | |||
<div class="lr-form-item-title">校区<font face="宋体">*</font></div> | |||
<div id="F_CompanyId" checkexpession="NotNull"></div> | |||
<div id="F_CompanyId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="EmpInfo"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<div id="F_DepartmentId" checkexpession="NotNull"></div> | |||
<div id="F_DepartmentId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
@*<div class="col-xs-4 lr-form-item" data-table="EmpInfo"> | |||
<div class="lr-form-item-title">系部</div> | |||
@@ -125,8 +125,8 @@ var bootstrap = function ($, learun) { | |||
$('#OverseasChineseNo').lrDataItemSelect({ code: 'BCdOverseasChinese', allowSearch: true }); | |||
$('#HealthStatusNo').lrDataItemSelect({ code: 'BCdHealthStatus', allowSearch: true }); | |||
//初始学历 | |||
$('#CultureDegreeNo').lrDataItemSelect({ code: 'CollegeType', allowSearch: true }); | |||
$('#DegreeNo').lrDataItemSelect({ code: 'BCdDegree', allowSearch: true }); | |||
$('#CultureDegreeNo').lrDataItemSelect({ code: 'RecordInSchool', allowSearch: true }); | |||
$('#DegreeNo').lrDataItemSelect({ code: 'DegreeInSchool', allowSearch: true }); | |||
$('#FamilyOriginNo').lrDataItemSelect({ code: 'BCdFamilyOrigin', allowSearch: true }); | |||
$('#SubjectSpeciesNo').lrDataItemSelect({ code: 'BCdSubjectSpecies', allowSearch: true }); | |||
$('#ForeignLanguageNo').lrDataItemSelect({ code: 'BCdForeignLanguage', allowSearch: true }); | |||
@@ -136,9 +136,11 @@ var bootstrap = function ($, learun) { | |||
//$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#PostRank').lrDataItemSelect({ code: 'BCdTitleOfTechPost', allowSearch: true }); | |||
$('#Photo').lrUploader(); | |||
$('#HighestRecord').lrDataSourceSelect({ code: 'BCdCultureDegree', value: 'culturedegreeno', text: 'culturedegree' }); | |||
//最高学历 | |||
//$('#HighestRecord').lrDataSourceSelect({ code: 'BCdCultureDegree', value: 'culturedegreeno', text: 'culturedegree' }); | |||
$('#HighestRecord').lrDataItemSelect({ code: 'RecordInSchool', allowSearch: true }); | |||
$('#ObtainWayOfHighestRecord').lrDataItemSelect({ code: 'ObtainWay' }); | |||
$('#InitialDegree').lrDataItemSelect({ code: 'BCdDegree', allowSearch: true }); | |||
$('#InitialDegree').lrDataItemSelect({ code: 'DegreeInSchool', allowSearch: true }); | |||
$('#ObtainWayOfInitialDegree').lrDataItemSelect({ code: 'ObtainWayOfDegree' }); | |||
$('#ObtainWayOfHighestDegree').lrDataItemSelect({ code: 'ObtainWayOfDegree' }); | |||
$('#PositionLevel').lrDataItemSelect({ code: 'PositionLevel' }); | |||
@@ -92,6 +92,7 @@ | |||
@*<a id="lr_switch" class="btn btn-default"><i class="fa fa-braille"></i> 注册开关</a>*@ | |||
<a id="lr_editDept" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改部门、系部</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
<a id="lr_qrcode" class="btn btn-default"><i class="fa fa-linode"></i> 生成二维码</a> | |||
</div> | |||
@*<div class=" btn-group btn-group-sm" learun-authorize="no"> | |||
<a id="lr_import" class="btn btn-default"><i class="fa fa-print"></i> 导入</a> | |||
@@ -50,8 +50,8 @@ var bootstrap = function ($, learun) { | |||
//政治面貌 | |||
$('#PartyFaceNo').lrDataItemSelect({ code: 'BCdPartyFace', allowSearch: true }); | |||
//最高学历 | |||
$('#HighestRecord').lrDataSourceSelect({ code: 'BCdCultureDegree', value: 'culturedegreeno', text: 'culturedegree' }); | |||
//$('#HighestRecord').lrDataSourceSelect({ code: 'BCdCultureDegree', value: 'culturedegreeno', text: 'culturedegree' }); | |||
$('#HighestRecord').lrDataItemSelect({ code: 'RecordInSchool', allowSearch: true }); | |||
//民族 | |||
$('#NationalityNo').lrDataItemSelect({ code: 'National', allowSearch: true }); | |||
@@ -60,7 +60,7 @@ var bootstrap = function ($, learun) { | |||
//是否审核 | |||
$('#CheckMark').lrDataItemSelect({ code: 'YesOrNoInt' }); | |||
//学位 | |||
$('#DegreeNo').lrDataItemSelect({ code: 'BCdDegree' }); | |||
$('#DegreeNo').lrDataItemSelect({ code: 'DegreeInSchool' }); | |||
// 部门选择 | |||
$('#F_DepartmentId').lrselect({ | |||
@@ -92,7 +92,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}); | |||
$('#DegreeNo').lrDataItemSelect({ code: 'BCdDegree' }); | |||
$('#DegreeNo').lrDataItemSelect({ code: 'DegreeInSchool' }); | |||
//职称 | |||
$('#ProfessionalTitle').lrDataItemSelect({ code: 'jszc' }); | |||
//校区 | |||
@@ -199,7 +199,7 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
learun.alert.warning("选中记录中包含已审核项目!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
@@ -220,7 +220,7 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目,已启用不能删除!"); | |||
learun.alert.warning("选中记录中包含已审核项目,已审核不能删除!"); | |||
return; | |||
} | |||
//if (CheckMark === true) { | |||
@@ -242,7 +242,7 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
learun.alert.warning("选中记录中包含已审核项目!"); | |||
return; | |||
} | |||
//if (CheckMark === true) { | |||
@@ -264,7 +264,7 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark.indexOf('false') != -1) { | |||
learun.alert.warning("选中记录中包含已停用项目!"); | |||
learun.alert.warning("选中记录中包含未审核项目!"); | |||
return; | |||
} | |||
//if (CheckMark === false) { | |||
@@ -358,6 +358,27 @@ var bootstrap = function ($, learun) { | |||
}, "json") | |||
}); | |||
//生成二维码 | |||
$("#lr_qrcode").on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EmpNo'); | |||
var EmpName = $('#gridtable').jfGridValue('EmpName'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录生成!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'formcard', | |||
title: '生成二维码', | |||
url: top.$.rootUrl + '/EducationalAdministration/EmpInfo/QRCode?keyValue=' + keyValue + '&EmpName=' + escape(EmpName), | |||
width: 700, | |||
height: 300, | |||
btn: null, | |||
end: function () { refreshGirdData(); } | |||
}); | |||
} | |||
}) | |||
//打印 | |||
$('#lr_print').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EmpId'); | |||
@@ -494,12 +515,19 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "最高学历", name: "HighestRecord", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdCultureDegree', | |||
//learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdCultureDegree', | |||
// key: value, | |||
// keyId: 'culturedegreeno', | |||
// callback: function (_data) { | |||
// callback(_data['culturedegree']); | |||
// } | |||
//}); | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
keyId: 'culturedegreeno', | |||
code: 'RecordInSchool', | |||
callback: function (_data) { | |||
callback(_data['culturedegree']); | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
@@ -507,9 +535,16 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "最高学位", name: "DegreeNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
//learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: 'BCdDegree', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
//}); | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'BCdDegree', | |||
code: 'DegreeInSchool', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
@@ -0,0 +1,63 @@ | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<meta name="viewport" content="width=device-width" /> | |||
<title>CardPrint</title> | |||
@Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js") | |||
<script src="/Content/js/qrcode.min.js"></script> | |||
<script src="~/PhonePage/server.js"></script> | |||
<link href="~/Content/cardprint/CardPrint.css" rel="stylesheet" /> | |||
<script> | |||
function request(d) { | |||
for (var c = location.search.slice(1).split("&"), a = 0; a < c.length; a++) { | |||
var b = c[a].split("="); | |||
if (b[0] == d) | |||
if ("undefined" == unescape(b[1])) break; | |||
else return unescape(b[1]) | |||
} | |||
return "" | |||
}; | |||
</script> | |||
</head> | |||
<body style=""> | |||
<div id="qrcodeBox" style="text-align:center;margin-top:20px;"> | |||
<div class="qrcodeBox" style="display:inline-block"> | |||
<div id="qrcode" style="margin:0 auto 5px;"></div> | |||
<div class="qrcodeTxt" style="font-size:12px;"></div> | |||
</div> | |||
</div> | |||
<!--<div id="btnprint" type="button" class="btns" value="打印">打印</div>--> | |||
<script> | |||
//标签打印 | |||
var qrcode = new QRCode(document.getElementById("qrcode"), { | |||
width: 80, | |||
height: 80 | |||
}); | |||
var keyValue = request('keyValue');//二维码 | |||
var EmpName = request('EmpName'); | |||
$('.qrcodeTxt').html(unescape(EmpName)); | |||
$(function () { | |||
var url = currentUrl + '/EducationalAdministration/StuEnrollPhone/Link?EmpNo=' + keyValue; | |||
qrcode.makeCode(url); | |||
//$("#btnprint").on("click", function () { | |||
// AddPrintContent3() | |||
//}); | |||
}); | |||
// 打印表单 | |||
function AddPrintContent3() { | |||
$('#btnprint').css('display', 'none') | |||
window.print(); | |||
$('#btnprint').css('display', 'block') | |||
} | |||
</script> | |||
</body> | |||
</html> |
@@ -0,0 +1,31 @@ | |||
@{ | |||
ViewBag.Title = "考试科目基础信息"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">科目编码<font face="宋体">*</font></div> | |||
<input id="SubjectNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">科目名称<font face="宋体">*</font></div> | |||
<input id="SubjectName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">考试地点<font face="宋体">*</font></div> | |||
<input id="Address" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div> | |||
<input id="BeginTime" type="text" class="form-control lr-input-wdatepicker" autocomplete="off" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm', onpicked: function() { $('#BeginTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">结束日期<font face="宋体">*</font></div> | |||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" autocomplete="off" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm', onpicked: function() { $('#EndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">是否启用</div> | |||
<div id="IsFlag"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ExamSubject/Form.js") |
@@ -0,0 +1,54 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-06-21 10:33 | |||
* 描 述:考试科目基础信息 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#IsFlag').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ExamSubject/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
$('#BeginTime').val(data[id].BeginTime); | |||
$('#EndTime').val(data[id].EndTime); | |||
} | |||
}); | |||
} | |||
$('#IsFlag').val('true'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ExamSubject/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,44 @@ | |||
@{ | |||
ViewBag.Title = "考试科目基础信息"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">科目编码</div> | |||
<input id="SubjectNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">科目名称</div> | |||
<input id="SubjectName" type="text" class="form-control" /> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">是否启用</div> | |||
<input id="IsFlag" type="text" class="form-control" /> | |||
</div>*@ | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ExamSubject/Index.js") |
@@ -0,0 +1,102 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-06-21 10:33 | |||
* 描 述:考试科目基础信息 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 150, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/ExamSubject/Form', | |||
width: 400, | |||
height: 420, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/ExamSubject/Form?keyValue=' + keyValue, | |||
width: 400, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var IsFlag = $('#gridtable').jfGridValue('IsFlag'); | |||
if (IsFlag == true) { | |||
learun.alert.warning("已启用项不能删除!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ExamSubject/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ExamSubject/GetPageList', | |||
headData: [ | |||
{ label: "科目编码", name: "SubjectNo", width: 200, align: "center" }, | |||
{ label: "科目名称", name: "SubjectName", width: 200, align: "center" }, | |||
{ label: "考试地点", name: "Address", width: 200, align: "center" }, | |||
{ label: "开始时间", name: "BeginTime", width: 200, align: "center" }, | |||
{ label: "结束日期", name: "EndTime", width: 200, align: "center" }, | |||
{ | |||
label: "是否启用", name: "IsFlag", width: 200, align: "center", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,51 @@ | |||
@{ | |||
ViewBag.Title = "考场安排明细"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">课程编号</div> | |||
<input id="LessonNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">考试日期</div> | |||
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">考试时间</div> | |||
<input id="ExamTime" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">监考老师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">监考老师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">座位号</div> | |||
<input id="SitNumber" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">学生编号</div> | |||
<input id="StuNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">学生姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.js") |
@@ -0,0 +1,50 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-22 16:51 | |||
* 描 述:考场安排明细 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,68 @@ | |||
@{ | |||
ViewBag.Title = "考场安排明细"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程编号</div> | |||
<input id="LessonNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">监考老师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">监考老师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学生编号</div> | |||
<input id="StuNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学生姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">考试日期</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.js") |
@@ -0,0 +1,101 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-22 16:51 | |||
* 描 述:考场安排明细 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPIId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPIId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/GetPageList', | |||
headData: [ | |||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left"}, | |||
{ label: "课程名称", name: "LessonName", width: 100, align: "left"}, | |||
{ label: "考试日期", name: "ExamDate", width: 100, align: "left"}, | |||
{ label: "考试时间", name: "ExamTime", width: 100, align: "left"}, | |||
{ label: "监考老师编号", name: "EmpNo", width: 100, align: "left"}, | |||
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left"}, | |||
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left"}, | |||
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left"}, | |||
{ label: "座位号", name: "SitNumber", width: 100, align: "left"}, | |||
{ label: "学生编号", name: "StuNo", width: 100, align: "left"}, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left"}, | |||
], | |||
mainId:'EPIId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "排考安排"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">课程编号</div> | |||
<input id="LessonNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">考试日期</div> | |||
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">考试时间</div> | |||
<input id="ExamTime" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">监考老师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">监考老师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.js") |
@@ -0,0 +1,50 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-22 16:00 | |||
* 描 述:排考安排 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,60 @@ | |||
@{ | |||
ViewBag.Title = "排考安排"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">考试日期</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">课程编号</div> | |||
<input id="LessonNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">监考老师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">监考老师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.js") |
@@ -0,0 +1,98 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-22 16:00 | |||
* 描 述:排考安排 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPIId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPIId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetPageList', | |||
headData: [ | |||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left"}, | |||
{ label: "课程名称", name: "LessonName", width: 100, align: "left"}, | |||
{ label: "考试日期", name: "ExamDate", width: 100, align: "left"}, | |||
{ label: "考试时间", name: "ExamTime", width: 100, align: "left"}, | |||
{ label: "监考老师编号", name: "EmpNo", width: 100, align: "left"}, | |||
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left"}, | |||
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left"}, | |||
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left"}, | |||
], | |||
mainId:'EPIId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,51 @@ | |||
@{ | |||
ViewBag.Title = "排考2021新"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout lr-layout-left-center"> | |||
<div class="lr-layout-left"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title lrlt ">班级信息</div> | |||
<div id="dataTree" class="lr-layout-body"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title"> | |||
<span id="titleinfo" class="lrlt">班级信息</span> | |||
</div> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="LessonNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="ClassRoomNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="EmpNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch" class="datetime"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js") |
@@ -0,0 +1,132 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-12-08 12:19 | |||
* 描 述:排考2021新 | |||
*/ | |||
var selectedRow; | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var datebegin = ''; | |||
var dateend = ''; | |||
var ClassNo = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 初始化左侧树形数据 | |||
$('#dataTree').lrtree({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassTree', | |||
nodeClick: function (item) { | |||
ClassNo = item.id; | |||
page.search({ ClassNo: item.id }); | |||
} | |||
}); | |||
$('.datetime').each(function () { | |||
$(this).lrdate({ | |||
dfdata: [ | |||
{ name: '清空', begin: function () { return '' }, end: function () { return '' } }, | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '0', | |||
selectfn: function (begin, end) { | |||
datebegin = begin; | |||
dateend = end; | |||
} | |||
}); | |||
}); | |||
// 查询 | |||
$('#btn_Search').on('click', function () { | |||
page.search({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//课程 | |||
//$('#LessonNo').lrselect({ | |||
// placeholder: "请选择课程", | |||
// allowSearch: true, | |||
// url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
// value: 'value', | |||
// text: 'text' | |||
//}); | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); | |||
$('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetPageListForClass', | |||
headData: [ | |||
{ label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 60, align: "left" }, | |||
{ label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { | |||
return learun.formatDate(v, "yyyy-MM-dd"); | |||
} }, | |||
{ label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, | |||
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" }, | |||
{ label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, | |||
{ label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" }, | |||
{ label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, | |||
{ label: '教室名称', name: 'ClassroomName', width: 100, align: "left" }, | |||
{ label: '班级名称', name: 'ClassName', width: 100, align: "left" }, | |||
{ label: '班级人数', name: 'ClassStuNum', width: 60, align: "left" }, | |||
{ label: '学号范围', name: 'StuNoRange', width: 200, align: "left" } | |||
], | |||
mainId: 'AETId', | |||
sidx: 'examdate,examtime,lessonno,classroomname ', | |||
sord:'asc', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = datebegin; | |||
param.EndTime = dateend; | |||
//console.log(param); | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,51 @@ | |||
@{ | |||
ViewBag.Title = "排考2021新"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout lr-layout-left-center"> | |||
<div class="lr-layout-left"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title lrlt ">班级信息</div> | |||
<div id="dataTree" class="lr-layout-body"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title"> | |||
<span id="titleinfo" class="lrlt">班级信息</span> | |||
</div> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="LessonNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="ClassRoomNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="EmpNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch" class="datetime"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js") |
@@ -0,0 +1,134 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-12-08 12:19 | |||
* 描 述:排考2021新 | |||
*/ | |||
var selectedRow; | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var datebegin = ''; | |||
var dateend = ''; | |||
var ClassNo = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 初始化左侧树形数据 | |||
$('#dataTree').lrtree({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassTree', | |||
nodeClick: function (item) { | |||
ClassNo = item.id; | |||
page.search({ ClassNo: item.id }); | |||
} | |||
}); | |||
$('.datetime').each(function () { | |||
$(this).lrdate({ | |||
dfdata: [ | |||
{ name: '清空', begin: function () { return '' }, end: function () { return '' } }, | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '0', | |||
selectfn: function (begin, end) { | |||
datebegin = begin; | |||
dateend = end; | |||
} | |||
}); | |||
}); | |||
// 查询 | |||
$('#btn_Search').on('click', function () { | |||
page.search({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//课程 | |||
//$('#LessonNo').lrselect({ | |||
// placeholder: "请选择课程", | |||
// allowSearch: true, | |||
// url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
// value: 'value', | |||
// text: 'text' | |||
//}); | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); | |||
$('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetItemPageList', | |||
headData: [ | |||
{ label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 60, align: "left" }, | |||
{ | |||
label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { | |||
return learun.formatDate(v, "yyyy-MM-dd"); | |||
} | |||
}, | |||
{ label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, | |||
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" }, | |||
{ label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, | |||
{ label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" }, | |||
{ label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, | |||
{ label: '教室名称', name: 'ClassroomName', width: 100, align: "left" }, | |||
{ label: '班级名称', name: 'ClassName', width: 100, align: "left" }, | |||
{ label: '学生编号', name: 'StuNo', width: 100, align: "left" }, | |||
{ label: '学生姓名', name: 'StuName', width: 200, align: "left" }, | |||
{ label: '座位编号', name: 'SitNumber', width: 100, aligndd: "left" } | |||
], | |||
mainId: 'AETId', | |||
sidx: 'ExamDate asc, LessonNo asc,ClassRoomNo asc,ClassNo asc,SitNumber asc', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = datebegin; | |||
param.EndTime = dateend; | |||
console.log(param); | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,43 @@ | |||
@{ | |||
ViewBag.Title = "考试课程表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">系<font face="宋体">*</font></div> | |||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">年级<font face="宋体">*</font></div> | |||
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">课程编号<font face="宋体">*</font></div> | |||
<input id="LessonNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">课程名称<font face="宋体">*</font></div> | |||
<input id="LessonName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">排序号</div> | |||
<input id="ELOrder" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div> | |||
<div id="ELEnabled" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js") |
@@ -0,0 +1,105 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考试课程表 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//年级 | |||
$('#Grade').lrselect({ | |||
placeholder: "请选择年级", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#DeptNo').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
value: 'deptno', | |||
text: 'deptname', | |||
maxHeight: 200, | |||
select: function(item) { | |||
var NDeptNo = $("#DeptNo").lrselectGet(); | |||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200 | |||
}); | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}); | |||
$("#MajorNo").lrselect(); | |||
$('#ELEnabled').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoBit', | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "考试课程表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js") |
@@ -0,0 +1,83 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考试课程表 | |||
*/ | |||
var acceptClick; | |||
var type = request('type'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
//page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200, | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
initData: function () { | |||
//if (!!keyValue) { | |||
// $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) { | |||
// for (var id in data) { | |||
// if (!!data[id].length && data[id].length > 0) { | |||
// $('#' + id ).jfGridSet('refreshdata', data[id]); | |||
// } | |||
// else { | |||
// $('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
// } | |||
// } | |||
// }); | |||
//} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet() | |||
}; | |||
//从开课计划导入 | |||
if (type == 1) { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Import', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} else if (type == 2) { | |||
//按条件清空数据 | |||
learun.layerConfirm('是否确认清空!', function (res) { | |||
if (res) { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/DeleteWhere', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,56 @@ | |||
@{ | |||
ViewBag.Title = "考试课程表"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程编号</div> | |||
<input id="LessonNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a>*@ | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | |||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 停用</a> | |||
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i> 从开课计划导入</a> | |||
<a id="lr_emptyWhere" class="btn btn-default"><i class="fa fa-trash-o"></i> 按条件清空数据</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js") |
@@ -0,0 +1,224 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考试课程表 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ELId'); | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
return false; | |||
} | |||
if (learun.checkrow(keyValue)) { | |||
var ELEnabled = $('#gridtable').jfGridValue('ELEnabled'); | |||
if (ELEnabled.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录已启用!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 导入 | |||
$('#lr_importByBasic').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form_import', | |||
title: '导入', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormYearSemester?type=1', | |||
width: 500, | |||
height: 300, | |||
btn: ['一键导入', '关闭'], | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 按条件清空数据 | |||
$('#lr_emptyWhere').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form_empty', | |||
title: '清空数据', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormYearSemester?type=2', | |||
width: 500, | |||
height: 300, | |||
btn: ['清空', '关闭'], | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ELId'); | |||
if (learun.checkrow(keyValue)) { | |||
var ELEnabled = $('#gridtable').jfGridValue('ELEnabled'); | |||
if (ELEnabled.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//启用 | |||
$('#lr_lock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ELId'); | |||
if (learun.checkrow(keyValue)) { | |||
var ELEnabled = $('#gridtable').jfGridValue('ELEnabled'); | |||
if (ELEnabled.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认启用选中记录!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Lock', { keyValue: keyValue, ELEnabled: 1 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//禁用 | |||
$('#lr_unlock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ELId'); | |||
if (learun.checkrow(keyValue)) { | |||
var ELEnabled = $('#gridtable').jfGridValue('ELEnabled'); | |||
if (ELEnabled.indexOf('false') != -1) { | |||
learun.alert.warning("选中记录中包含已停用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认停用选中记录!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Lock', { keyValue: keyValue, ELEnabled: 0 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
//{ | |||
// label: "系部", name: "DeptNo", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
// key: value, | |||
// keyId: 'deptno', | |||
// callback: function (_data) { | |||
// callback(_data['deptname']); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
//{ | |||
// label: "专业", name: "MajorNo", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
// key: value, | |||
// keyId: 'majorno', | |||
// callback: function (_data) { | |||
// callback(_data['majorname']); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ label: "年级", name: "Grade", width: 50, align: "left" }, | |||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" }, | |||
{ label: "课程名称", name: "LessonName", width: 200, align: "left" }, | |||
//{ label: "排序号", name: "ELOrder", width: 100, align: "left" }, | |||
{ | |||
label: "是否启用", name: "ELEnabled", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
mainId: 'ELId', | |||
isMultiselect: true, | |||
isPage: true, | |||
sidx: 'AcademicYearNo desc,Semester desc,ELOrder asc,LessonNo asc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,19 @@ | |||
@{ | |||
ViewBag.Title = "考试课程表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan"> | |||
<div class="lr-form-item-title">考试类型</div> | |||
<div id="PlanType"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.js") |
@@ -0,0 +1,58 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考试课程表 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200, | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#PlanType').lrDataItemSelect({ code: 'StudentType' }); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet(), | |||
PlanType: $('#PlanType').lrselectGet() | |||
}; | |||
learun.layerConfirm('是否确认清空!', function (res) { | |||
if (res) { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/ClearTable', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "考试记录表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">排考名称<font face="宋体">*</font></div> | |||
<input id="PlanName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">排考类型<font face="宋体">*</font></div> | |||
<div id="PlanType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">排考编号<font face="宋体">*</font></div> | |||
<input id="PlanCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">是否随机座位<font face="宋体">*</font></div> | |||
<div id="EPRandom" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">是否生成<font face="宋体">*</font></div> | |||
<div id="EPGenarate" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">排序号<font face="宋体">*</font></div> | |||
<input id="EPOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js") |
@@ -0,0 +1,68 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-14 18:12 | |||
* 描 述:考试记录表 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#PlanType').lrDataItemSelect({ code: 'StudentType' }); | |||
$('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,19 @@ | |||
@{ | |||
ViewBag.Title = "考试课程表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan"> | |||
<div class="lr-form-item-title">考试类型<font face="宋体">*</font></div> | |||
<div id="PlanType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.js") |
@@ -0,0 +1,69 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考试课程表 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200, | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#PlanType').lrDataItemSelect({ code: 'StudentType' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet(), | |||
PlanType: $('#PlanType').lrselectGet() | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GenerateForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,67 @@ | |||
@{ | |||
ViewBag.Title = "考试记录表"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">排考名称</div> | |||
<input id="PlanName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">排考类型</div> | |||
<div id="PlanType"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">排考编号</div> | |||
<input id="PlanCode" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">生成座位</div> | |||
<div id="EPRandom"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">是否生成</div> | |||
<div id="EPGenarate"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_generate" class="btn btn-default"><i class="fa fa-plus"></i> 生成排考名单</a> | |||
<a id="lr_cleargenerate" class="btn btn-default"><i class="fa fa-plus"></i> 清除排考名单</a> | |||
<a id="lr_cleardata" class="btn btn-default"><i class="fa fa-plus"></i> 清除排考记录</a> | |||
<a id="lr_planks" class="btn btn-default"><i class="fa fa-plus"></i> 安排考试</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js") |
@@ -0,0 +1,201 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-14 18:12 | |||
* 描 述:考试记录表 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#PlanType').lrDataItemSelect({ code: 'StudentType' }); | |||
$('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
if (learun.checkrow(keyValue)) { | |||
//是否生成 | |||
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate'); | |||
if (EPGenarate == true) { | |||
return learun.alert.warning("已生成排考名单,不可编辑!"); | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
if (learun.checkrow(keyValue)) { | |||
//是否生成 | |||
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate'); | |||
if (EPGenarate == true) { | |||
return learun.alert.warning("已生成排考名单,不可删除!"); | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
// 生成排考名单 | |||
$('#lr_generate').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认生成排考名单!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Generate', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 清除排考名单 | |||
$('#lr_cleargenerate').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认清除排考名单!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/ClearGenerate', { keyValue: keyValue, type: 1 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//清除排考记录 | |||
$('#lr_cleardata').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认清除所有排考记录!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/ClearGenerate', { keyValue: keyValue, type: 2 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 安排考试 | |||
$('#lr_planks').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
var PlanName = $('#gridtable').jfGridValue('PlanName'); | |||
if (learun.checkrow(keyValue)) | |||
learun.frameTab.open({ | |||
F_ModuleId: keyValue, | |||
F_Icon: 'fa magic', | |||
F_FullName: PlanName + '--安排考试', | |||
F_UrlAddress: '/EducationalAdministration/Exam_ExamPlanLesson/Index?EPId=' + keyValue | |||
}); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ label: "排考名称", name: "PlanName", width: 300, align: "left" }, | |||
{ | |||
label: "排考类型", name: "PlanType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'StudentType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "排考编号", name: "PlanCode", width: 200, align: "left" }, | |||
{ label: "排考总人数", name: "EPStuCount", width: 100, align: "left" }, | |||
{ | |||
label: "是否随机座位", name: "EPRandom", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "是" : "否"; | |||
} | |||
}, | |||
{ | |||
label: "是否生成", name: "EPGenarate", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
{ label: "排序号", name: "EPOrder", width: 100, align: "left", }, | |||
], | |||
mainId: 'EPId', | |||
isPage: true, | |||
sidx: "EPOrder asc " | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,19 @@ | |||
@{ | |||
ViewBag.Title = "排考安排课程"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanLesson"> | |||
<div class="lr-form-item-title">考试日期<font face="宋体">*</font></div> | |||
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson"> | |||
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div> | |||
<input id="ExamTimeStart" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:09:00"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson"> | |||
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div> | |||
<input id="ExamTimeEnd" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:12:00"/> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js") |
@@ -0,0 +1,50 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-15 15:03 | |||
* 描 述:排考安排课程 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,44 @@ | |||
@{ | |||
ViewBag.Title = "添加排考班级"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级名称</div> | |||
<input id="ClassName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级编号</div> | |||
<input id="ClassNo" type="text" class="form-control" /> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div>*@ | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js") |
@@ -0,0 +1,137 @@ | |||
| |||
var refreshGirdData; | |||
var acceptClick; | |||
//考试安排课程表Id | |||
var EPLId = request('EPLId'); | |||
var EPId = request('EPId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetClassInfoPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
//{ | |||
// label: "班级名称", name: "ClassName", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
// key: row.ClassNo, | |||
// keyId: 'classno', | |||
// callback: function (_data) { | |||
// callback(_data['classname']); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ label: "班级名称", name: "ClassName", width: 100, align: "left" }, | |||
{ label: "班级编号", name: "ClassNo", width: 100, align: "left" }, | |||
{ label: "学生人数", name: "StuNum", width: 80, align: "left" }, | |||
//{ | |||
// label: "班主任", name: "ClassDiredctorNo", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', | |||
// key: value, | |||
// keyId: 'f_encode', | |||
// callback: function (_data) { | |||
// callback(_data['f_realname']); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
//{ | |||
// label: "辅导员", name: "ClassTutorNo", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', | |||
// key: value, | |||
// keyId: 'f_encode', | |||
// callback: function (_data) { | |||
// callback(_data['f_realname']); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
], | |||
mainId: 'ESId', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'ClassNo', | |||
sord: 'ASC' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
//考试安排课程表Id | |||
param.EPLId = EPLId; | |||
param.EPId = EPId; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack,i) { | |||
var selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (selectedRow.length == 0) { | |||
return learun.alert.warning("请选择班级!"); | |||
} | |||
var list = []; | |||
$.each(selectedRow, | |||
function (i, item) { | |||
var name = ''; | |||
if (!!item.ClassNo) { | |||
learun.clientdata.getAsync('custmerData', | |||
{ | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: item.ClassNo, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
name = _data['classname']; | |||
} | |||
}); | |||
} | |||
var entity = { | |||
ClassName: name, | |||
ClassNo: item.ClassNo, | |||
ClassStuNum: item.StuNum, | |||
EPCId: learun.newGuid(), | |||
EPLId: EPLId | |||
} | |||
list.push(entity); | |||
}); | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify(list); | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveClass?EPLId=' + EPLId, postData, function (res) { | |||
//console.log(res); | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, '', i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,44 @@ | |||
@{ | |||
ViewBag.Title = "添加排考考场"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js") |
@@ -0,0 +1,87 @@ | |||
| |||
var refreshGirdData; | |||
var acceptClick; | |||
//考试安排课程表Id | |||
var EPLId = request('EPLId'); | |||
var EPId = request('EPId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left" }, | |||
{ label: "考场名称", name: "ClassroomName", width: 200, align: "left" }, | |||
{ label: "座位行数", name: "SeatRows", width: 100, align: "left" }, | |||
{ label: "座位列数", name: "SeatColumns", width: 100, align: "left" }, | |||
{ label: "考场座位数", name: "SeatCount", width: 100, align: "left" }, | |||
//{ | |||
// label: "是否启用", name: "EREnabled", width: 100, align: "left", | |||
// formatter: function (cellvalue) { | |||
// return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
// } | |||
//}, | |||
], | |||
mainId: 'ERId', | |||
isPage: true, | |||
//isMultiselect: true, | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
//考试安排课程表Id | |||
param.EPLId = EPLId; | |||
param.SqlParameter = " and t.EREnabled=1"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
var selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (!!selectedRow) { | |||
learun.layerClose(window.name); | |||
callBack(selectedRow); | |||
} else { | |||
return learun.alert.warning("请选择考场!"); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,28 @@ | |||
@{ | |||
ViewBag.Title = "添加排考考场"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanRoom"> | |||
<div class="lr-form-item-title">考场名称<font face="宋体">*</font></div> | |||
<input id="ClassroomName" type="text" readonly="readonly" class="form-control" style="width: 85%;" /> | |||
<button class="btn btn-primary" id="selectRoom" style="float: right;margin-top: -28px;margin-right: 20px;">选择考场</button> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanRoom"> | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" readonly="readonly" type="text" class="form-control"> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanRoom"> | |||
<div class="lr-form-item-title">考场座位数</div> | |||
<input id="SeatCount" readonly="readonly" type="text" class="form-control"> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">监考老师</div> | |||
<input id="detailadd" type="button" class="btn btn-success" value="新增明细" /> | |||
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="Exam_ExamPlanTeacher"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js") |
@@ -0,0 +1,182 @@ | |||
| |||
//考试安排课程表Id | |||
var EPLId = request('EPLId'); | |||
var EPId = request('EPId'); | |||
var keyValue = request('keyValue'); | |||
var acceptClick; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var refreshGirdData; | |||
var refreshRoomData; | |||
var selectedRow; | |||
var tempdatra = new Array(); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
$("#detailadd").on('click', function () { | |||
selectedRow = null; | |||
learun.layerForm({ | |||
id: 'formitem', | |||
title: '新增明细', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormTeacher?EPLId=' + EPLId + '&EPRId=' + keyValue, | |||
width: 860, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
$("#detaildel").on('click', function () { | |||
var keyValue = $('#Exam_ExamPlanTeacher').jfGridValue('EmpNo'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||
if (res) { | |||
$.each(tempdatra, function (key, val) { | |||
if (!!val && val.EmpNo === keyValue) { | |||
tempdatra.splice(key, 1); | |||
} | |||
}); | |||
$('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra); | |||
top.layer.close(index); | |||
} | |||
}); | |||
} | |||
}); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$("#selectRoom").on('click', function () { | |||
selectedRow = null; | |||
learun.layerForm({ | |||
id: 'formroom1', | |||
title: '新增考场', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoom?EPLId=' + EPLId, | |||
width: 850, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshRoomData); | |||
} | |||
}); | |||
}); | |||
$('#Exam_ExamPlanTeacher').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '编号', name: 'EmpNo', width: 150, align: 'left' | |||
}, | |||
{ | |||
label: '姓名', name: 'EmpName', width: 150, align: 'left' | |||
} | |||
], | |||
height: 400, | |||
mainId: 'AAIId', | |||
reloadSelected: false, | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm( | |||
top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetFormRoom?keyValue=' + keyValue, | |||
function (data) { | |||
tempdatra = []; | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
var empnoArr = data[id].EmpNo.split(','); | |||
var empnameArr = data[id].EmpName.split(','); | |||
$.each(empnoArr, function (i, val) { | |||
tempdatra.push({ EmpNo: val, EmpName: empnameArr[i] }); | |||
}); | |||
$('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
refreshGirdData = function (temprow) { | |||
//console.log('temprow', temprow); | |||
if (!!temprow) { | |||
//求数组并集 | |||
//两数组连接(包括重复值) | |||
var arr3 = tempdatra.concat(temprow); | |||
//var result = []; | |||
var obj = []; | |||
//去重 | |||
tempdatra = arr3.reduce(function (prev, cur, index, arr) { | |||
//console.log(prev, cur); | |||
obj[cur.EmpNo] ? '' : obj[cur.EmpNo] = true && prev.push(cur); | |||
return prev; | |||
}, []); | |||
$('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra); | |||
} | |||
}; | |||
refreshRoomData = function (temprow) { | |||
// console.log('teacherRow', temprow); | |||
learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/ValidateRoom?EPLId=' + EPLId + '&ClassroomNo=' + temprow.ClassroomNo, function (res) { | |||
if (res.data == true) { | |||
return learun.alert.warning("考场不可重复选择!"); | |||
} else { | |||
$("#ClassroomName").val(temprow.ClassroomName); | |||
$('#ClassroomNo').val(temprow.ClassroomNo); | |||
$('#SeatCount').val(temprow.SeatCount); | |||
} | |||
}); | |||
}; | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('.lr-form-wrap').lrValidform()) { | |||
return false; | |||
} | |||
var ClassroomName = $('#ClassroomName').val(); | |||
if (!ClassroomName) { | |||
learun.alert.warning("请选择考场!"); | |||
return false; | |||
} | |||
var datas = $('#Exam_ExamPlanTeacher').jfGridGet('rowdatas'); | |||
if (datas == null || datas.length == 0) { | |||
learun.alert.warning("请先新增监考老师!"); | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack, i) { | |||
var bool = validForm(); | |||
if (bool) { | |||
var postData = {}; | |||
var formData = $('[data-table="Exam_ExamPlanRoom"]').lrGetFormData(); | |||
if (!formData.ClassroomName) { | |||
return learun.alert.warning("请选择考场!"); | |||
} | |||
formData.EPLId = EPLId; | |||
postData.strEntity = JSON.stringify(formData); | |||
postData.Exam_ExamPlanTeacherList = JSON.stringify($('#Exam_ExamPlanTeacher').jfGridGet('rowdatas')); | |||
$.lrSaveForm( | |||
top.$.rootUrl + | |||
'/EducationalAdministration/Exam_ExamPlanLesson/SaveRoomAndTeacher?keyValue=' + | |||
keyValue, | |||
postData, | |||
function(res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, formData, i); | |||
} | |||
}); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,44 @@ | |||
@{ | |||
ViewBag.Title = "添加排考监考老师"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
@*<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">教师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">教师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.js") |
@@ -0,0 +1,105 @@ | |||
| |||
var refreshGirdData; | |||
var acceptClick; | |||
//考试安排课程表Id | |||
var EPLId = request('EPLId'); | |||
//安排考场表Id | |||
var EPRId = request('EPRId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ label: "教师姓名", name: "EmpName", width: 100, align: "left" }, | |||
{ | |||
label: "是否启用", name: "ITEnabled", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
mainId: 'ITId', | |||
isPage: true, | |||
isMultiselect: true, | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
//考试安排课程表Id | |||
param.EPLId = EPLId; | |||
//安排考场表Id | |||
param.EPRId = EPRId; | |||
param.SqlParameter = " and t.ITEnabled=1"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
var selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
learun.layerClose(window.name); | |||
callBack(selectedRow); | |||
//var list = []; | |||
//$.each(selectedRow, | |||
// function (i, item) { | |||
// var entity = { | |||
// ClassroomName: item.ClassroomName, | |||
// ClassroomNo: item.ClassroomNo, | |||
// SeatCount: item.SeatCount, | |||
// EPRId: learun.newGuid(), | |||
// EPLId: EPLId | |||
// } | |||
// list.push(entity); | |||
// }); | |||
//$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveRoom?EPLId=' + EPLId, | |||
// { list: list }), function (res) { | |||
// // 保存成功后才回调 | |||
// if (!!callBack) { | |||
// callBack(); | |||
// } | |||
// }; | |||
//if (!!callBack) { | |||
// callBack(); | |||
//} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,84 @@ | |||
@{ | |||
ViewBag.Title = "排考安排课程"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<style> | |||
#div_gridtable_Class { | |||
float: left; | |||
width: 50%; | |||
height: 50%; | |||
} | |||
#div_gridtable_Room { | |||
float: right; | |||
width: 50%; | |||
height: 50%; | |||
padding-left: 10px; | |||
} | |||
.tbTitle { | |||
float: left; | |||
line-height: 32px; | |||
color: #666; | |||
padding-left: 15px; | |||
} | |||
.examTimeShow { | |||
line-height: 60px; | |||
font-size: 12px; | |||
margin-right: 15px; | |||
} | |||
</style> | |||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||
<div class="lr-layout-left"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title lrlg ">考试课程</div> | |||
<div id="dataTree" class="lr-layout-body"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap "> | |||
<div class="lr-layout-title"> | |||
<span id="titleinfo" class="lrlg">列表信息</span> | |||
</div> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<span class="examTimeShow">考试日期:<span id="examDate"></span></span> | |||
<span class="examTimeShow"> 考试时间:<span id="examTime"></span></span> | |||
<span id="checkspan" style="color: red;"></span> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_ExamTime" class="btn btn-default"><i class="fa fa-plus"></i> 设置考试时间</a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-plus"></i> 审核</a> | |||
<a id="lr_nocheck" class="btn btn-default"><i class="fa fa-plus"></i> 去审</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div id="div_gridtable_Class"> | |||
<div> | |||
<div class="tbTitle"><span>班级信息</span></div> | |||
<div class=" btn-group btn-group-sm" style="float: right;" learun-authorize="yes"> | |||
<a id="lr_add_Class" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_delete_Class" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable_Class"></div> | |||
</div> | |||
<div id="div_gridtable_Room"> | |||
<div class="tbTitle"><span>考场信息</span></div> | |||
<div class=" btn-group btn-group-sm" style="float: right;" learun-authorize="yes"> | |||
<a id="lr_add_Room" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit_Room" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete_Room" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable_Room"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js") |
@@ -0,0 +1,278 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-15 15:03 | |||
* 描 述:排考安排课程 | |||
*/ | |||
var refreshGirdData; | |||
//排考记录Id | |||
var EPId = request('EPId'); | |||
//安排课程表Id | |||
var EPLId; | |||
var ELCheckMark; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 初始化左侧树形数据 | |||
$('#dataTree').lrtree({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetTree?EPId=' + EPId, | |||
nodeClick: function (item) { | |||
//安排课程表ID(Exam_ExamPlanLesson) | |||
EPLId = item.id; | |||
//显示考试时间 | |||
page.show(EPLId); | |||
page.search({ EPLId: item.id }); | |||
$('#titleinfo').html(item.text); | |||
} | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//设置考试时间 | |||
$('#lr_ExamTime').on('click', function () { | |||
if (!!EPLId) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning('该项已审核!'); | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '设置考试时间', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form?keyValue=' + EPLId, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
//审核 | |||
$('#lr_check').on('click', function () { | |||
if (!!EPLId) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning('该项已审核!'); | |||
} | |||
learun.layerConfirm('是否确认审核!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Check', { keyValue: EPLId, ELCheckMark: 1 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
//去审核 | |||
$('#lr_nocheck').on('click', function () { | |||
if (!!EPLId) { | |||
learun.layerConfirm('是否确认去审核!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Check', { keyValue: EPLId, ELCheckMark: 0 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
//班级 新增 | |||
$('#lr_add_Class').on('click', function () { | |||
if (!!EPLId) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning("该项已审核!"); | |||
} | |||
learun.layerForm({ | |||
id: 'formclass', | |||
title: '新增班级', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormClass?EPLId=' + EPLId + '&EPId=' + EPId, | |||
width: 850, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
// 班级删除 | |||
$('#lr_delete_Class').on('click', function () { | |||
var keyValue = $('#gridtable_Class').jfGridValue('EPCId'); | |||
if (learun.checkrow(keyValue)) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning("该项已审核!"); | |||
} | |||
learun.layerConfirm('是否确认删除选中记录!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteClass', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//考场 新增 | |||
$('#lr_add_Room').on('click', function () { | |||
if (!!EPLId) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning("该项已审核!"); | |||
} | |||
learun.layerForm({ | |||
id: 'formteacherRoom', | |||
title: '新增考场', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoomTeacher?EPLId=' + EPLId + '&EPId=' + EPId, | |||
width: 850, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
//考场 编辑 | |||
$('#lr_edit_Room').on('click', function () { | |||
if (!!EPLId) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning("该项已审核!"); | |||
} | |||
var keyValue = $('#gridtable_Room').jfGridValue('EPRId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formteacherRoom', | |||
title: '编辑考场', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoomTeacher?EPLId=' + EPLId + '&EPId=' + EPId + '&keyValue=' + keyValue, | |||
width: 850, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
// 考场删除 | |||
$('#lr_delete_Room').on('click', function () { | |||
var keyValue = $('#gridtable_Room').jfGridValue('EPRId'); | |||
if (learun.checkrow(keyValue)) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning("该项已审核!"); | |||
} | |||
learun.layerConfirm('是否确认删除选中记录!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteRoom', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
//班级 | |||
$('#gridtable_Class').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForClass', | |||
headData: [ | |||
{ label: "班级名称", name: "ClassName", width: 100, align: "left" }, | |||
{ label: "班级编号", name: "ClassNo", width: 100, align: "left" }, | |||
{ label: "班级人数", name: "ClassStuNum", width: 100, align: "left" }, | |||
], | |||
mainId: 'EPCId', | |||
//isPage: true, | |||
isMultiselect: true, | |||
}); | |||
//考场 | |||
$('#gridtable_Room').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForRoom', | |||
headData: [ | |||
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left" }, | |||
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left" }, | |||
{ label: "考场座位数", name: "SeatCount", width: 100, align: "left" }, | |||
{ label: "监考老师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left" }, | |||
], | |||
mainId: 'EPRId', | |||
//isPage: true, | |||
isMultiselect: true, | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
if (!!EPLId) { | |||
param = param || {}; | |||
param.EPId = EPId; | |||
$('#gridtable_Class').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
$('#gridtable_Room').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}, | |||
//显示考试时间 | |||
show: function () { | |||
if (!!EPLId) { | |||
var res = learun.httpGet(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetFormData?keyValue=' + EPLId); | |||
var data = res.data.Exam_ExamPlanLesson; | |||
ELCheckMark = data.ELCheckMark; | |||
if (ELCheckMark == 1) { | |||
$('#checkspan').html('(已审核)'); | |||
} else { | |||
$('#checkspan').html('(未审核)'); | |||
} | |||
if (!!data.ExamDate) { | |||
$('#examDate').html(learun.formatDate(data.ExamDate, 'yyyy-MM-dd')); | |||
$('#examTime').html(data.ExamTime); | |||
} else { | |||
$('#examDate').html(''); | |||
$('#examTime').html(''); | |||
//未设置考试时间 | |||
learun.layerConfirm('请先设置考试时间!', function (res) { | |||
if (res) { | |||
if (!!EPLId) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '设置考试时间', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form?keyValue=' + EPLId, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
if (!!EPLId) { | |||
$('#gridtable_Room').jfGridSet('reload'); | |||
$('#gridtable_Class').jfGridSet('reload'); | |||
page.show(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "考场表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">考场编号<font face="宋体">*</font></div> | |||
<input id="ClassroomNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">考场名称<font face="宋体">*</font></div> | |||
<input id="ClassroomName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">座位行数<font face="宋体">*</font></div> | |||
<input id="SeatRows" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">座位列数<font face="宋体">*</font></div> | |||
<input id="SeatColumns" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">排序号</div> | |||
<input id="EROrder" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div> | |||
<div id="EREnabled" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.js") |
@@ -0,0 +1,70 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考场表 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#EREnabled').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoBit', | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,23 @@ | |||
@{ | |||
ViewBag.Title = "考场表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item SeatClass" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">座位行数<font face="宋体">*</font></div> | |||
<input id="SeatRows" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item SeatClass" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">座位列数<font face="宋体">*</font></div> | |||
<input id="SeatColumns" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.js") |
@@ -0,0 +1,80 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考场表 | |||
*/ | |||
var acceptClick; | |||
var type = request('type'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200, | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
initData: function () { | |||
//从教室导入 | |||
if (type == 1) { | |||
$('body').find('.SeatClass').show(); | |||
$('body').find('.SeatClass input').attr('isvalid', 'yes'); | |||
$('body').find('.SeatClass input').attr('checkexpession', 'PositiveInteger'); | |||
} else if (type == 2) {//按条件清空 | |||
$('body').find('.SeatClass input').removeAttr('isvalid'); | |||
$('body').find('.SeatClass input').removeAttr('checkexpession'); | |||
$('body').find('.SeatClass').hide(); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = $('body').lrGetFormData(); | |||
//从教室导入 | |||
if (type == 1) { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/Import', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} else if (type == 2) { | |||
//按条件清空数据 | |||
learun.layerConfirm('是否确认清空!', function (res) { | |||
if (res) { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/DeleteWhere', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,55 @@ | |||
@{ | |||
ViewBag.Title = "考场表"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a>*@ | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | |||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 停用</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i> 从教室导入</a> | |||
<a id="lr_emptyWhere" class="btn btn-default"><i class="fa fa-trash-o"></i> 按条件清空数据</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js") |
@@ -0,0 +1,196 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考场表 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ERId'); | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
return false; | |||
} | |||
var EREnabled = $('#gridtable').jfGridValue('EREnabled'); | |||
if (EREnabled == "true") { | |||
learun.alert.warning("选中记录已启用!"); | |||
return false; | |||
} | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 导入 | |||
$('#lr_importByBasic').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form_import', | |||
title: '导入', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/FormYearSemester?type=1', | |||
width: 500, | |||
height: 300, | |||
btn: ['一键导入', '关闭'], | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 按条件清空数据 | |||
$('#lr_emptyWhere').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form_empty', | |||
title: '清空数据', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/FormYearSemester?type=2', | |||
width: 500, | |||
height: 300, | |||
btn: ['清空', '关闭'], | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ERId'); | |||
if (learun.checkrow(keyValue)) { | |||
var EREnabled = $('#gridtable').jfGridValue('EREnabled'); | |||
if (EREnabled.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//启用 | |||
$('#lr_lock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ERId'); | |||
if (learun.checkrow(keyValue)) { | |||
var EREnabled = $('#gridtable').jfGridValue('EREnabled'); | |||
if (EREnabled.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认启用选中记录!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/Lock', { keyValue: keyValue, EREnabled: 1 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//禁用 | |||
$('#lr_unlock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ERId'); | |||
if (learun.checkrow(keyValue)) { | |||
var EREnabled = $('#gridtable').jfGridValue('EREnabled'); | |||
if (EREnabled.indexOf('false') != -1) { | |||
learun.alert.warning("选中记录中包含已停用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认停用选中记录!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/Lock', { keyValue: keyValue, EREnabled: 0 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left" }, | |||
{ label: "考场名称", name: "ClassroomName", width: 200, align: "left" }, | |||
{ label: "座位行数", name: "SeatRows", width: 100, align: "left" }, | |||
{ label: "座位列数", name: "SeatColumns", width: 100, align: "left" }, | |||
{ label: "考场座位数", name: "SeatCount", width: 100, align: "left" }, | |||
{ | |||
label: "是否启用", name: "EREnabled", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
mainId: 'ERId', | |||
isMultiselect: true, | |||
isPage: true, | |||
sidx: 'AcademicYearNo desc,Semester desc,EROrder asc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "考试课程表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">学生学号<font face="宋体">*</font></div> | |||
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">学生姓名<font face="宋体">*</font></div> | |||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">考试类型<font face="宋体">*</font></div> | |||
<div id="ESType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">排序号</div> | |||
<input id="ESOrder" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div> | |||
<div id="ESEnabled" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.js") |
@@ -0,0 +1,101 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考试课程表 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#ESEnabled').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoBit', | |||
}); | |||
//监听学号 | |||
$("#StuNo").on('blur', function () { | |||
var StuNo = $(this).val(); | |||
if (StuNo) { | |||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfo?Account=' + StuNo, '', function (data) { | |||
if (data) { | |||
$("#StuNo").val(data.StuNo); | |||
$("#StuName").val(data.StuName); | |||
} else { | |||
learun.alert.warning("学生不存在!"); | |||
//return false; | |||
} | |||
}); | |||
} | |||
}); | |||
//监听姓名 | |||
$("#StuName").on('blur', function () { | |||
var StuName = $(this).val().trim(); | |||
if (StuName) { | |||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfoBasicEntityByStuName?name=' + StuName, '', function (data) { | |||
if (data) { | |||
$("#StuNo").val(data.StuNo); | |||
$("#StuName").val(data.StuName); | |||
} else { | |||
learun.alert.warning("学生不存在!"); | |||
return false; | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,19 @@ | |||
@{ | |||
ViewBag.Title = "考试课程表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">考试类型</div> | |||
<div id="ESType"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.js") |
@@ -0,0 +1,58 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考试课程表 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200, | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet(), | |||
ESType: $('#ESType').lrselectGet() | |||
}; | |||
learun.layerConfirm('是否确认清空!', function (res) { | |||
if (res) { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/ClearTable', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,19 @@ | |||
@{ | |||
ViewBag.Title = "考试课程表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">考试类型<font face="宋体">*</font></div> | |||
<div id="ESType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.js") |
@@ -0,0 +1,69 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考试课程表 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200, | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet(), | |||
ESType: $('#ESType').lrselectGet() | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/ImportTable?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,63 @@ | |||
@{ | |||
ViewBag.Title = "考试课程表"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学生学号</div> | |||
<input id="StuNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学生名称</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">考试类型</div> | |||
<div id="ESType"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a>*@ | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | |||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 停用</a> | |||
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_importBy" class="btn btn-default"><i class="fa fa-plus"></i> 一键生成考生信息</a> | |||
<a id="lr_clearBy" class="btn btn-default"><i class="fa fa-plus"></i> 按条件清空学生考试信息</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js") |
@@ -0,0 +1,217 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考试课程表 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 245, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ESId'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ESId'); | |||
if (learun.checkrow(keyValue)) { | |||
var ESEnabled = $('#gridtable').jfGridValue('ESEnabled'); | |||
if (ESEnabled.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//启用 | |||
$('#lr_lock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ESId'); | |||
if (learun.checkrow(keyValue)) { | |||
var ESEnabled = $('#gridtable').jfGridValue('ESEnabled'); | |||
if (ESEnabled.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认启用选中记录!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Lock', { keyValue: keyValue, ESEnabled: 1 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//禁用 | |||
$('#lr_unlock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ESId'); | |||
if (learun.checkrow(keyValue)) { | |||
var ESEnabled = $('#gridtable').jfGridValue('ESEnabled'); | |||
if (ESEnabled.indexOf('false') != -1) { | |||
learun.alert.warning("选中记录中包含已停用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认停用选中记录!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Lock', { keyValue: keyValue, ESEnabled: 0 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
// 一键生成 | |||
$('#lr_importBy').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form_import', | |||
title: '生成考生信息', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/FormImport', | |||
width: 500, | |||
height: 300, | |||
btn: ['一键生成', '关闭'], | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 导入 | |||
$('#lr_clearBy').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form_clear', | |||
title: '按条件清空学生考试信息', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/FormClear', | |||
width: 500, | |||
height: 300, | |||
btn: ['确定', '关闭'], | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ | |||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "学生编号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "考试类型", name: "ESType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'StudentType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "是否启用", name: "ESEnabled", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
mainId: 'ESId', | |||
isMultiselect: true, | |||
isPage: true, | |||
sidx: 'AcademicYearNo desc,Semester desc', | |||
sord: 'ASC' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,31 @@ | |||
@{ | |||
ViewBag.Title = "监考老师"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" > | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" > | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" > | |||
<div class="lr-form-item-title">教师编号<font face="宋体">*</font></div> | |||
<input id="EmpNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" > | |||
<div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div> | |||
<input id="EmpName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" > | |||
<div class="lr-form-item-title">排序号</div> | |||
<input id="ITOrder" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" > | |||
<div class="lr-form-item-title">是否启用</div> | |||
<div id="ITEnabled"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.js") |
@@ -0,0 +1,69 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-14 09:50 | |||
* 描 述:监考老师 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ITEnabled').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoBit', | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "考试课程表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.js") |
@@ -0,0 +1,83 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考试课程表 | |||
*/ | |||
var acceptClick; | |||
var type = request('type'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
//page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200, | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
initData: function () { | |||
//if (!!keyValue) { | |||
// $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) { | |||
// for (var id in data) { | |||
// if (!!data[id].length && data[id].length > 0) { | |||
// $('#' + id ).jfGridSet('refreshdata', data[id]); | |||
// } | |||
// else { | |||
// $('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
// } | |||
// } | |||
// }); | |||
//} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet() | |||
}; | |||
//导入 | |||
if (type == 1) { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Import', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} else if (type == 2) { | |||
//按条件清空数据 | |||
learun.layerConfirm('是否确认清空!', function (res) { | |||
if (res) { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/DeleteWhere', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,54 @@ | |||
@{ | |||
ViewBag.Title = "监考老师"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">教师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">教师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a>*@ | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | |||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 停用</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i> 从教师信息导入</a> | |||
<a id="lr_emptyWhere" class="btn btn-default"><i class="fa fa-trash-o"></i> 按条件清空数据</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.js") |
@@ -0,0 +1,219 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-14 09:50 | |||
* 描 述:监考老师 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, | |||
220, | |||
400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', | |||
function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', | |||
function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('ITId'); | |||
if (learun.checkrow(keyValue)) { | |||
var ITEnabled = $('#gridtable').jfGridValue('ITEnabled'); | |||
if (ITEnabled.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录已启用!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + | |||
'/EducationalAdministration/Exam_InvigilateTeacher/Form?keyValue=' + | |||
keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('ITId'); | |||
if (learun.checkrow(keyValue)) { | |||
var ITEnabled = $('#gridtable').jfGridValue('ITEnabled'); | |||
if (ITEnabled.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录已启用!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', | |||
function (res) { | |||
if (res) { | |||
learun.deleteForm( | |||
top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/DeleteForm', | |||
{ keyValue: keyValue }, | |||
function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', | |||
function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
//启用 | |||
$('#lr_lock').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('ITId'); | |||
if (learun.checkrow(keyValue)) { | |||
var ITEnabled = $('#gridtable').jfGridValue('ITEnabled'); | |||
if (ITEnabled.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认启用选中记录!', | |||
function (res) { | |||
if (res) { | |||
learun.deleteForm( | |||
top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Lock', | |||
{ keyValue: keyValue, ITEnabled: 1 }, | |||
function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//禁用 | |||
$('#lr_unlock').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('ITId'); | |||
if (learun.checkrow(keyValue)) { | |||
var ELEnabled = $('#gridtable').jfGridValue('ITEnabled'); | |||
if (ELEnabled.indexOf('false') != -1) { | |||
learun.alert.warning("选中记录中包含已停用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认停用选中记录!', | |||
function (res) { | |||
if (res) { | |||
learun.deleteForm( | |||
top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Lock', | |||
{ keyValue: keyValue, ITEnabled: 0 }, | |||
function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 导入 | |||
$('#lr_importByBasic').on('click', | |||
function () { | |||
learun.layerForm({ | |||
id: 'form_import', | |||
title: '导入', | |||
url: top.$.rootUrl + | |||
'/EducationalAdministration/Exam_InvigilateTeacher/FormYearSemester?type=1', | |||
width: 500, | |||
height: 300, | |||
btn: ['一键导入', '关闭'], | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 按条件清空数据 | |||
$('#lr_emptyWhere').on('click', | |||
function () { | |||
learun.layerForm({ | |||
id: 'form_empty', | |||
title: '清空数据', | |||
url: top.$.rootUrl + | |||
'/EducationalAdministration/Exam_InvigilateTeacher/FormYearSemester?type=2', | |||
width: 500, | |||
height: 300, | |||
btn: ['清空', '关闭'], | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ label: "教师姓名", name: "EmpName", width: 100, align: "left" }, | |||
{ | |||
label: "是否启用", name: "ITEnabled", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
mainId: 'ITId', | |||
isMultiselect: true, | |||
isPage: true, | |||
sidx: 'AcademicYearNo desc,Semester desc,ITOrder asc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -40,7 +40,7 @@ var bootstrap = function ($, learun) { | |||
$('#LessonTypeId').lrDataSourceSelect({ | |||
code: 'CdLessonType', value: 'ltid', text: 'lessontypename', select: function (item) { | |||
if (item != null && item != undefined) { | |||
if (item.lessontypename === "公开课") { | |||
if (item.lessontypename.indexOf('公开') || item.lessontypename.indexOf('公共')) { | |||
$("#TeachMajorNo").removeAttr("isvalid"); | |||
$("#TeachMajorNo").removeAttr("NotNull"); | |||
} else { | |||
@@ -0,0 +1,19 @@ | |||
@{ | |||
ViewBag.Title = "MajorAndSubject"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">Id<font face="宋体">*</font></div> | |||
<input id="Id" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">MajorId<font face="宋体">*</font></div> | |||
<input id="MajorId" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">SubId<font face="宋体">*</font></div> | |||
<input id="SubId" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/MajorAndSubject/Form.js") |
@@ -0,0 +1,38 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-06-18 11:19 | |||
* 描 述:MajorAndSubject | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var selectedRow = learun.frameTab.currentIframe().selectedRow; | |||
var page = { | |||
init: function () { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
if (!!selectedRow) { | |||
$('#form').lrSetFormData(selectedRow); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/MajorAndSubject/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "MajorAndSubject"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||
<div class="lr-layout-left"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title">树形目录</div> | |||
<div id="tree" class="lr-layout-body"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title">标题</div> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/MajorAndSubject/Index.js") |
@@ -0,0 +1,92 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-06-18 11:19 | |||
* 描 述:MajorAndSubject | |||
*/ | |||
var selectedRow; | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 查询 | |||
$('#btn_Search').on('click', function () { | |||
var keyword = $('#txt_Keyword').val(); | |||
page.search({ keyword: keyword }); | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
selectedRow = null; | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/MajorAndSubject/Form', | |||
width: 700, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/MajorAndSubject/Form?keyValue=' + keyValue, | |||
width: 700, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/MajorAndSubject/DeleteForm', { keyValue: keyValue}, function () { | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/MajorAndSubject/GetPageList', | |||
headData: [ | |||
{ label: 'Id', name: 'Id', width: 200, align: "left" }, | |||
{ label: 'MajorId', name: 'MajorId', width: 200, align: "left" }, | |||
{ label: 'SubId', name: 'SubId', width: 200, align: "left" }, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -13,7 +13,7 @@ | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学生姓名</div> | |||
<div class="lr-form-item-title">申请人</div> | |||
<input id="StuName" type="text" class="form-control"/> | |||
</div> | |||
</div> | |||