diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs index 9f2fffe98..e60189613 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs @@ -67,7 +67,7 @@ namespace Learun.Application.Organization List 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; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs index 8c247613b..1a7efc597 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs @@ -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 获取数据 + /// + /// 返回前五年+后五年的年份yyyy + /// + /// + public ActionResult GenerateNearByYear() + { + return Success(WebHelper.GenerateNearByYear()); + } /// /// 获取页面显示列表数据 @@ -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("停用成功!"); } /// /// 删除实体数据 @@ -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 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs index 78a9cde53..9f26f14fb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs @@ -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("停用成功!"); } /// /// 删除实体数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs index cdb33e70f..b1bbcec28 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs @@ -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); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs index 3ee6c35f8..77406a053 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs @@ -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("停用成功!"); } /// /// 删除实体数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoController.cs index eafba97c7..6f27ea109 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoController.cs @@ -100,6 +100,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + + [HttpGet] + public ActionResult QRCode() + { + return View(); + } + /// /// 打印 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ExamSubjectController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ExamSubjectController.cs new file mode 100644 index 000000000..c26372472 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ExamSubjectController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-06-21 10:33 + /// 描 述:考试科目基础信息 + /// + public class ExamSubjectController : MvcControllerBase + { + private ExamSubjectIBLL examSubjectIBLL = new ExamSubjectBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = examSubjectIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var ExamSubjectData = examSubjectIBLL.GetExamSubjectEntity(keyValue); + var jsonData = new + { + ExamSubject = ExamSubjectData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + examSubjectIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + ExamSubjectEntity entity = strEntity.ToObject(); + 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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermItemNewController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermItemNewController.cs new file mode 100644 index 000000000..ea0f05b07 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermItemNewController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-22 16:51 + /// 描 述:考场安排明细 + /// + public class Exam_ArrangeExamTermItemNewController : MvcControllerBase + { + private Exam_ArrangeExamTermItemNewIBLL exam_ArrangeExamTermItemNewIBLL = new Exam_ArrangeExamTermItemNewBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_ArrangeExamTermItemNewIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + exam_ArrangeExamTermItemNewIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Exam_ArrangeExamTermItemNewEntity entity = strEntity.ToObject(); + exam_ArrangeExamTermItemNewIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs new file mode 100644 index 000000000..dc56adc00 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-22 16:00 + /// 描 述:排考安排 + /// + public class Exam_ArrangeExamTermNewController : MvcControllerBase + { + private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单页 + /// + /// + [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(); + 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(); + var data = exam_ArrangeExamTermNewIBLL.GetItemPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_ArrangeExamTermNewIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var ArrangeExamTermNewData = exam_ArrangeExamTermNewIBLL.GetExam_ArrangeExamTermNewEntity( keyValue ); + var jsonData = new { + ArrangeExamTermNew = ArrangeExamTermNewData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + exam_ArrangeExamTermNewIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Exam_ArrangeExamTermNewEntity entity = strEntity.ToObject(); + exam_ArrangeExamTermNewIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs new file mode 100644 index 000000000..9716c671e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-12 15:47 + /// 描 述:考试课程表 + /// + public class Exam_ExamLessonController : MvcControllerBase + { + private Exam_ExamLessonIBLL exam_ExamLessonIBLL = new Exam_ExamLessonBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 导入/清空数据 + /// + /// + [HttpGet] + public ActionResult FormYearSemester() + { + return View(); + } + + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_ExamLessonIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + exam_ExamLessonIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + + /// + /// 导入开课计划 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult Import(string AcademicYearNo, string Semester) + { + int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester); + return Success("导入" + res + "条数据!"); + } + /// + /// 按条件清空数据 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteWhere(string AcademicYearNo, string Semester) + { + int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester); + return Success("清空" + res + "条数据!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Exam_ExamLessonEntity entity = strEntity.ToObject(); + //判断课程编号有无重复 + 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("保存成功!"); + } + + /// + /// 启用/停用 + /// + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult Lock(string keyValue, int ELEnabled) + { + exam_ExamLessonIBLL.Lock(keyValue, ELEnabled); + return Success("操作成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs new file mode 100644 index 000000000..0e00216e4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-14 18:12 + /// 描 述:考试记录表 + /// + public class Exam_ExamPlanController : MvcControllerBase + { + private Exam_ExamPlanIBLL exam_ExamPlanIBLL = new Exam_ExamPlanBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult GenerateForm() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult ClearForm() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_ExamPlanIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + exam_ExamPlanIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 生成排考名单 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult Generate(string keyValue) + { + if (!exam_ExamPlanIBLL.IsGenerate(keyValue)) + { + return Fail("请先安排考试!"); + } + + exam_ExamPlanIBLL.Generate(keyValue); + return Success("生成成功!"); + } + /// + /// 清除排考名单/清除所有排考记录 + /// + /// 排考记录主表Id + /// 1:清除排考名单;2:清除所有排考记录 + /// + [HttpPost] + [AjaxOnly] + public ActionResult ClearGenerate(string keyValue, int type) + { + exam_ExamPlanIBLL.ClearGenerate(keyValue, type); + return Success("操作成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Exam_ExamPlanEntity entity = strEntity.ToObject(); + exam_ExamPlanIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + + /// + /// 生成排考名单 + /// + /// + /// + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult GenerateForm(string AcademicYearNo, string Semester, string PlanType) + { + int res = exam_ExamPlanIBLL.ClaerForm(AcademicYearNo, Semester, PlanType); + return Success("清空(" + res + ")条数据成功!"); + } + /// + /// 清除排考名单 + /// + /// + /// + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult ClearForm(string AcademicYearNo, string Semester, string PlanType) + { + int res = exam_ExamPlanIBLL.GenerateForm(AcademicYearNo, Semester, PlanType); + return Success("清空(" + res + ")条数据成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs new file mode 100644 index 000000000..898802d3e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-15 15:03 + /// 描 述:排考安排课程 + /// + 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 视图功能 + + /// + /// 主页面 + /// + /// 排考记录主表Id + /// + [HttpGet] + public ActionResult Index(string EPId) + { + exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId); + return View(); + } + /// + /// 表单页 + /// + /// + [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 获取数据 + /// + /// 获取班级分页列表 + /// + /// + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetClassInfoPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + 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); + } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetListForClass(string queryJson) + { + var data = exam_ExamPlanClassIBLL.GetList(queryJson); + + return Success(data); + } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetListForRoom(string pagination, string queryJson) + { + var data = exam_ExamPlanRoomIBLL.GetList(queryJson); + + return Success(data); + } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + 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); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [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); + } + /// + /// 获取左侧树形数据 + /// + /// + [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 提交数据 + + /// + /// 初始化Exam_ExamPlanLesson,如果表中没有数据,将考试课程表数据添加进去 + /// + /// 排考记录主表Id + /// + [HttpPost] + [AjaxOnly] + public ActionResult InitExamPlanLesson(string EPId) + { + exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId); + return Success("初始化成功!"); + } + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [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("删除成功!"); + } + /// + /// 审核 + /// + /// 主键 + /// + [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("操作成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 设置考试时间 + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Exam_ExamPlanLessonEntity entity = strEntity.ToObject(); + 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>(); + exam_ExamPlanClassIBLL.SaveList(list); + return Success("保存成功!"); + } + + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveRoomAndTeacher(string keyValue, string strEntity, string Exam_ExamPlanTeacherList) + { + var entity = strEntity.ToObject(); + var teacherList = Exam_ExamPlanTeacherList.ToObject>(); + 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 list) + //{ + // exam_ExamPlanRoomIBLL.SaveList(list); + // return Success("保存成功!"); + //} + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs new file mode 100644 index 000000000..c2ee9a8f6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-12 15:47 + /// 描 述:考场表 + /// + public class Exam_ExamRoomController : MvcControllerBase + { + private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 导入/清空数据 + /// + /// + [HttpGet] + public ActionResult FormYearSemester() + { + return View(); + } + + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_ExamRoomIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + exam_ExamRoomIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + + /// + /// 导入教室 + /// + /// + [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 + "条数据!"); + } + /// + /// 按条件清空数据 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteWhere(string AcademicYearNo, string Semester) + { + int res = exam_ExamRoomIBLL.DeleteWhere(AcademicYearNo, Semester); + return Success("清空" + res + "条数据!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Exam_ExamRoomEntity entity = strEntity.ToObject(); + + //判断考场编号有无重复 + 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("保存成功!"); + } + + /// + /// 启用/停用 + /// + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult Lock(string keyValue, int EREnabled) + { + exam_ExamRoomIBLL.Lock(keyValue, EREnabled); + return Success("操作成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamStudentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamStudentController.cs new file mode 100644 index 000000000..f34ba8599 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamStudentController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-12 15:47 + /// 描 述:考试课程表 + /// + public class Exam_ExamStudentController : MvcControllerBase + { + private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 导入 + /// + /// + [HttpGet] + public ActionResult FormImport() + { + return View(); + } + /// + /// 按条件清空 + /// + /// + [HttpGet] + public ActionResult FormClear() + { + return View(); + } + + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_ExamStudentIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + exam_ExamStudentIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Exam_ExamStudentEntity entity = strEntity.ToObject(); + #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("保存成功!"); + } + + /// + /// 启用/停用 + /// + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult Lock(string keyValue, int ESEnabled) + { + exam_ExamStudentIBLL.Lock(keyValue, ESEnabled); + return Success("操作成功!"); + } + /// + /// 清空数据 + /// + /// + /// + /// + /// + [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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_InvigilateTeacherController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_InvigilateTeacherController.cs new file mode 100644 index 000000000..fa9a9fbae --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_InvigilateTeacherController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-14 09:49 + /// 描 述:监考老师 + /// + public class Exam_InvigilateTeacherController : MvcControllerBase + { + private Exam_InvigilateTeacherIBLL exam_InvigilateTeacherIBLL = new Exam_InvigilateTeacherBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult FormYearSemester() + { + return View(); + } + + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_InvigilateTeacherIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + exam_InvigilateTeacherIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Exam_InvigilateTeacherEntity entity = strEntity.ToObject(); + //判断教师编号有无重复 + 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("保存成功!"); + } + + /// + /// 启用/停用 + /// + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult Lock(string keyValue, int ITEnabled) + { + exam_InvigilateTeacherIBLL.Lock(keyValue, ITEnabled); + return Success("操作成功!"); + } + + /// + /// 导入教师基础数据 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult Import(string AcademicYearNo, string Semester) + { + int res = exam_InvigilateTeacherIBLL.Import(AcademicYearNo, Semester); + return Success("导入" + res + "条数据!"); + } + /// + /// 按条件清空数据 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteWhere(string AcademicYearNo, string Semester) + { + int res = exam_InvigilateTeacherIBLL.DeleteWhere(AcademicYearNo, Semester); + return Success("清空" + res + "条数据!"); + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/MajorAndSubjectController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/MajorAndSubjectController.cs new file mode 100644 index 000000000..640057194 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/MajorAndSubjectController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-06-18 11:19 + /// 描 述:MajorAndSubject + /// + public class MajorAndSubjectController : MvcControllerBase + { + private MajorAndSubjectIBLL majorAndSubjectIBLL = new MajorAndSubjectBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList( string queryJson ) + { + var data = majorAndSubjectIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = majorAndSubjectIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var data = majorAndSubjectIBLL.GetEntity(keyValue); + return Success(data); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + majorAndSubjectIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue,MajorAndSubjectEntity entity) + { + majorAndSubjectIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs index 68591a54d..438916491 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs @@ -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(); } + /// + /// 新生报名 + /// + /// + [HttpGet] + public ActionResult EnrollForm() + { + return View(); + } + /// + /// 新生报名 + /// + /// + [HttpGet] + public ActionResult EnrollFormView() + { + return View(); + } + + /// + /// 新生报名 + /// + /// + [HttpGet] + public ActionResult EnrollIndex() + { + return View(); + } + /// + /// 新生报名审核 + /// + /// + [HttpGet] + public ActionResult EnrollSH() + { + return View(); + } + /// + /// 新生报名审核 + /// + /// + [HttpGet] + public ActionResult EnrollLQ() + { + return View(); + } + /// + /// 招生统计 + /// + /// + [HttpGet] + public ActionResult EnrollIndexTJ() + { + return View(); + } [HttpGet] public ActionResult StudentStatus() @@ -234,7 +290,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } - + /// + /// 招生统计 + /// + /// 查询参数 + /// + [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("同步成功"); } + /// + /// 审核页面 获取考试科目信息 + /// + /// + public ActionResult GetExamDataByStuId(string keyValue) + { + var data= stuEnrollIBLL.GetExamDataByStuId(keyValue); + return Success(data); + } + /// + /// 报名审核 + /// + /// + public ActionResult UpdateEnrollStatus(string keyValue, string strEntity) + { + //StuEnrollEntity entity = strEntity.ToObject(); + //entity.EnrollStatus = 2; + stuEnrollIBLL.UpdateEnrollStatus(keyValue, 2); + return Success("保存成功"); + } + /// + /// 报名--去审核 + /// + /// + public ActionResult NoCheck(string keyValue) + { + //StuEnrollEntity entity = new StuEnrollEntity(); + //entity.EnrollStatus = 0; + stuEnrollIBLL.UpdateEnrollStatus(keyValue, 0); + return Success("保存成功"); + } + /// + /// 录取 + /// + /// + public ActionResult Admission(string keyValue, int IsAdmission) + { + var count= stuEnrollScoreIBLL.GetNoCheck(keyValue); + if (count > 0) + { + return Fail("该学生有未审核的科目成绩"); + } + stuEnrollIBLL.Admission(keyValue, IsAdmission); + return Success("保存成功"); + } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollScoreController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollScoreController.cs new file mode 100644 index 000000000..bca75f9c0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollScoreController.cs @@ -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 视图 + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 新生录取管理 + /// + /// + [HttpGet] + public ActionResult AdmissionIndex() + { + return View(); + } + /// + /// 新生录取管理 + /// + /// + [HttpGet] + public ActionResult AdmissionForm() + { + return View(); + } + + #endregion + + #region 获取数据 + + /// + /// + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList(string queryJson) + { + var data = stuEnrollScoreIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取学生的成绩 + /// + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetScoreListByStuId(string stuid) + { + var data = stuEnrollScoreIBLL.GetScoreListByStuId(stuid); + return Success(data); + } + + /// + /// 获取列表分页数据--新生录取管理 + /// 分页参数 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListForAdmission(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuEnrollScoreIBLL.GetPageListForAdmission(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + + /// + /// + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetEntityByJson(string queryJson) + { + var data = stuEnrollScoreIBLL.GetEntityByJson(queryJson); + return Success(data); + } + + /// + /// 学年 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetYearNoData() + { + var data = stuEnrollScoreIBLL.GetYearNoData(); + return Success(data); + } + /// + /// 学科 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetSubjectData() + { + var data = stuEnrollScoreIBLL.GetSubjectData(); + return Success(data); + } + /// + /// 专业 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetMajorData() + { + var data = stuEnrollScoreIBLL.GetMajorData(); + return Success(data); + } + #endregion + + #region 提交数据 + + /// + /// 开始录入:占用成绩 + /// + /// + [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("操作成功"); + } + /// + /// 提交成绩:取消占用【服务】 + /// + /// + public ActionResult SaveInputScoreStatus2(string queryJson, string name) + { + stuEnrollScoreIBLL.SaveInputScoreStatus2(queryJson, name); + //删除任务 + //RecurringJob.RemoveIfExists(name); + + return Success("操作成功"); + } + /// + /// 续时 + /// + /// + [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("操作成功"); + } + /// + /// 提交成绩 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult SaveInputScore(string data) + { + var list = JsonConvert.DeserializeObject>(data); + if (list.Any()) + { + stuEnrollScoreIBLL.SaveInputScore(list); + } + return Success("操作成功"); + } + /// + /// 提交成绩:取消占用 + /// + /// + [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("操作成功"); + } + + /// + /// 审核成绩 + /// + /// + /// 已审核:1;未审核:0; + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoCheckScore(string queryJson, int Status) + { + stuEnrollScoreIBLL.DoCheckScore(queryJson, Status); + return Success("操作成功"); + } + #endregion + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AddressBook/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AddressBook/Index.js index 43c37dec8..9476311ff 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AddressBook/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AddressBook/Index.js @@ -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" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Form.cshtml index 66ba2d1fe..06abe549b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Form.cshtml @@ -15,14 +15,31 @@
学制*
-
-
学科门类
-
-
校区*
+
+
考试科目*
+
+ +
+
+
年度*
+
+
+
+
地市*
+
+
+
+
县区*
+
+
+
+
学科门类
+
+
系别
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Form.js index 2c061f39d..a03206c16 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Form.js @@ -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()) }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js index eb7909c2e..c885dd047 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js @@ -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', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.js index 3bac36860..93c23bcf9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.js @@ -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)) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js index 28d19bcfd..eb03c43cc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js @@ -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()) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js index c22726aea..1e899e565 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js @@ -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 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js index 2755e71ab..1773be8fb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js @@ -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 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Index.js index fa66414dd..652459ef8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Index.js @@ -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)) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml index e7f808ccc..c774e91e2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml @@ -147,11 +147,11 @@
校区*
-
+
部门*
-
+
@*
系部
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js index 0ba54724e..d2c2924ce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js @@ -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' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml index 0823fc740..240cccc70 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml @@ -92,6 +92,7 @@ @* 注册开关*@  修改部门、系部  打印 +  生成二维码
@*
 导入 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js index 19174700a..eea0daac0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js @@ -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); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/QRCode.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/QRCode.cshtml new file mode 100644 index 000000000..241abcaa5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/QRCode.cshtml @@ -0,0 +1,63 @@ + + + + + + + + CardPrint + @Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js") + + + + + + + +
+
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ExamSubject/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ExamSubject/Form.cshtml new file mode 100644 index 000000000..3dadd6550 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ExamSubject/Form.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "考试科目基础信息"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
科目编码*
+ +
+
+
科目名称*
+ +
+
+
考试地点*
+ +
+
+
开始时间*
+ +
+
+
结束日期*
+ +
+
+
是否启用
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ExamSubject/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ExamSubject/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ExamSubject/Form.js new file mode 100644 index 000000000..b6c3bdd4e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ExamSubject/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ExamSubject/Index.cshtml new file mode 100644 index 000000000..994b85a12 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ExamSubject/Index.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "考试科目基础信息"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
科目编码
+ +
+
+
科目名称
+ +
+ @*
+
是否启用
+ +
*@ +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ExamSubject/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ExamSubject/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ExamSubject/Index.js new file mode 100644 index 000000000..7c6298086 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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 ? "" : ""; + } + }, + ], + 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.cshtml new file mode 100644 index 000000000..04a607d77 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.cshtml @@ -0,0 +1,51 @@ +@{ + ViewBag.Title = "考场安排明细"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
课程编号
+ +
+
+
课程名称
+ +
+
+
考试日期
+ +
+
+
考试时间
+ +
+
+
监考老师编号
+ +
+
+
监考老师姓名
+ +
+
+
考场编号
+ +
+
+
考场名称
+ +
+
+
座位号
+ +
+
+
学生编号
+ +
+
+
学生姓名
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.js new file mode 100644 index 000000000..8a837a059 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.cshtml new file mode 100644 index 000000000..4a259bbbc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.cshtml @@ -0,0 +1,68 @@ +@{ + ViewBag.Title = "考场安排明细"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
课程编号
+ +
+
+
课程名称
+ +
+
+
监考老师编号
+ +
+
+
监考老师姓名
+ +
+
+
考场编号
+ +
+
+
考场名称
+ +
+
+
学生编号
+ +
+
+
学生姓名
+ +
+
+
考试日期
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.js new file mode 100644 index 000000000..2d6e766dc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.cshtml new file mode 100644 index 000000000..3ec6a3a91 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "排考安排"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
课程编号
+ +
+
+
课程名称
+ +
+
+
考试日期
+ +
+
+
考试时间
+ +
+
+
监考老师编号
+ +
+
+
监考老师姓名
+ +
+
+
考场编号
+ +
+
+
考场名称
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.js new file mode 100644 index 000000000..8e5ce3bc7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.cshtml new file mode 100644 index 000000000..f638c27fa --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.cshtml @@ -0,0 +1,60 @@ +@{ + ViewBag.Title = "排考安排"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
考试日期
+
+
+
课程编号
+ +
+
+
课程名称
+ +
+
+
监考老师编号
+ +
+
+
监考老师姓名
+ +
+
+
考场编号
+ +
+
+
考场名称
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.js new file mode 100644 index 000000000..1987e3a45 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml new file mode 100644 index 000000000..140f63d8f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml @@ -0,0 +1,51 @@ +@{ + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
班级信息
+
+
+
+
+
+
+ 班级信息 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js new file mode 100644 index 000000000..bdfac26da --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml new file mode 100644 index 000000000..133107ba9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml @@ -0,0 +1,51 @@ +@{ + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
班级信息
+
+
+
+
+
+
+ 班级信息 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js new file mode 100644 index 000000000..2507f5f7c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.cshtml new file mode 100644 index 000000000..358eb4e0b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.cshtml @@ -0,0 +1,43 @@ +@{ + ViewBag.Title = "考试课程表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+ @*
+
*
+
+
+
+
专业*
+
+
*@ +
+
年级*
+
+
+
+
课程编号*
+ +
+
+
课程名称*
+ +
+
+
排序号
+ +
+
+
是否启用*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js new file mode 100644 index 000000000..1693b95a7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.cshtml new file mode 100644 index 000000000..abb7ca9ac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "考试课程表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js new file mode 100644 index 000000000..ed614f227 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml new file mode 100644 index 000000000..d6544f6f8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml @@ -0,0 +1,56 @@ +@{ + ViewBag.Title = "考试课程表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
课程编号
+ +
+
+
课程名称
+ +
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js new file mode 100644 index 000000000..677d4e8ac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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 ? "" : ""; + } + }, + ], + 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.cshtml new file mode 100644 index 000000000..f6c8bd6de --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "考试课程表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
考试类型
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.js new file mode 100644 index 000000000..90adffa29 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.cshtml new file mode 100644 index 000000000..dc2ca6c33 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "考试记录表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
排考名称*
+ +
+
+
排考类型*
+
+
+
+
排考编号*
+ +
+
+
是否随机座位*
+
+
+ @*
+
是否生成*
+
+
*@ +
+
排序号*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js new file mode 100644 index 000000000..7a12a2cb2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.cshtml new file mode 100644 index 000000000..60718af63 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "考试课程表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
考试类型*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.js new file mode 100644 index 000000000..28fd099b4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.cshtml new file mode 100644 index 000000000..5c4065e36 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.cshtml @@ -0,0 +1,67 @@ +@{ + ViewBag.Title = "考试记录表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
排考名称
+ +
+
+
排考类型
+
+
+
+
排考编号
+ +
+
+
生成座位
+
+
+
+
是否生成
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js new file mode 100644 index 000000000..f4a3d87c7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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 ? "" : ""; + } + }, + { 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml new file mode 100644 index 000000000..5d3a838e4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "排考安排课程"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
考试日期*
+ +
+
+
开始时间*
+ +
+
+
结束时间*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js new file mode 100644 index 000000000..60264e6da --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.cshtml new file mode 100644 index 000000000..1d79f9e86 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "添加排考班级"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
班级名称
+ +
+
+
班级编号
+ +
+ @*
+
系部
+
+
+
+
专业
+
+
*@ +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js new file mode 100644 index 000000000..4c35a6d24 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.cshtml new file mode 100644 index 000000000..f4697b424 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "添加排考考场"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
考场编号
+ +
+
+
考场名称
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js new file mode 100644 index 000000000..6c2b15e78 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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 ? "" : ""; + // } + //}, + ], + 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml new file mode 100644 index 000000000..8c4e3feee --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml @@ -0,0 +1,28 @@ +@{ + ViewBag.Title = "添加排考考场"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
考场名称*
+ + +
+
+
考场编号
+ +
+
+
考场座位数
+ +
+
+
监考老师
+ + +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js new file mode 100644 index 000000000..244a8d55d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.cshtml new file mode 100644 index 000000000..04f6bf75c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "添加排考监考老师"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ @*
+
学年
+
+
+
+
学期
+
+
*@ +
+
教师编号
+ +
+
+
教师姓名
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.js new file mode 100644 index 000000000..93d2ea740 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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 ? "" : ""; + } + }, + ], + 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml new file mode 100644 index 000000000..9af6aae3b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml @@ -0,0 +1,84 @@ +@{ + ViewBag.Title = "排考安排课程"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+
+
+
考试课程
+
+
+
+
+
+
+ 列表信息 +
+
+
+ 考试日期: + 考试时间: + +
+ +
+
+
+
班级信息
+ +
+
+
+
+
考场信息
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js new file mode 100644 index 000000000..79cddea67 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.cshtml new file mode 100644 index 000000000..bd483f007 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "考场表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
考场编号*
+ +
+
+
考场名称*
+ +
+
+
座位行数*
+ +
+
+
座位列数*
+ +
+
+
排序号
+ +
+
+
是否启用*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.js new file mode 100644 index 000000000..dbab0ce76 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.cshtml new file mode 100644 index 000000000..925f7362f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "考场表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
座位行数*
+ +
+
+
座位列数*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.js new file mode 100644 index 000000000..34afd6899 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml new file mode 100644 index 000000000..05a38db32 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml @@ -0,0 +1,55 @@ +@{ + ViewBag.Title = "考场表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
考场编号
+ +
+
+
考场名称
+ +
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js new file mode 100644 index 000000000..922009c4f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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 ? "" : ""; + } + }, + ], + 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.cshtml new file mode 100644 index 000000000..836946cfa --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "考试课程表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
学生学号*
+ +
+
+
学生姓名*
+ +
+
+
班级*
+
+
+
+
考试类型*
+
+
+
+
排序号
+ +
+
+
是否启用*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.js new file mode 100644 index 000000000..9cafc568f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.cshtml new file mode 100644 index 000000000..4ebb6a098 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "考试课程表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
考试类型
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.js new file mode 100644 index 000000000..aba076183 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.cshtml new file mode 100644 index 000000000..bcab1d3bd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "考试课程表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
考试类型*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.js new file mode 100644 index 000000000..3fa15ee32 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml new file mode 100644 index 000000000..00ee8dad1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml @@ -0,0 +1,63 @@ +@{ + ViewBag.Title = "考试课程表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
班级
+
+
+
+
学生学号
+ +
+
+
学生名称
+ +
+
+
考试类型
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js new file mode 100644 index 000000000..83ec5e56b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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 ? "" : ""; + } + }, + ], + 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.cshtml new file mode 100644 index 000000000..3b4264d51 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "监考老师"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
教师编号*
+ +
+
+
教师姓名*
+ +
+
+
排序号
+ +
+
+
是否启用
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.js new file mode 100644 index 000000000..77b4f45b6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.cshtml new file mode 100644 index 000000000..74924978e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "考试课程表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.js new file mode 100644 index 000000000..7172be57e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.cshtml new file mode 100644 index 000000000..6edcfcc99 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.cshtml @@ -0,0 +1,54 @@ +@{ + ViewBag.Title = "监考老师"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
教师编号
+ +
+
+
教师姓名
+ +
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.js new file mode 100644 index 000000000..ba0df12a6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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 ? "" : ""; + } + }, + ], + 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js index 80607a514..1b4d824ae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js @@ -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 { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/MajorAndSubject/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/MajorAndSubject/Form.cshtml new file mode 100644 index 000000000..9c99ef899 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/MajorAndSubject/Form.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "MajorAndSubject"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
Id*
+ +
+
+
MajorId*
+ +
+
+
SubId*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/MajorAndSubject/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/MajorAndSubject/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/MajorAndSubject/Form.js new file mode 100644 index 000000000..37daa42ad --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/MajorAndSubject/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/MajorAndSubject/Index.cshtml new file mode 100644 index 000000000..3e66f53b7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/MajorAndSubject/Index.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "MajorAndSubject"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
树形目录
+
+
+
+
+
+
标题
+
+
+
+ +
+
+  查询 +
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/MajorAndSubject/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/MajorAndSubject/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/MajorAndSubject/Index.js new file mode 100644 index 000000000..6d2a180f0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml index e7161b238..00d305947 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml @@ -13,7 +13,7 @@
-
学生姓名
+
申请人
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollForm.cshtml new file mode 100644 index 000000000..c384114a8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollForm.cshtml @@ -0,0 +1,83 @@ +@{ + ViewBag.Title = "新生报名编辑"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
姓名*
+ +
+
+
性别*
+
+
+
+
民族*
+
+
+
+
身份证号*
+ +
+
+
住址*
+ +
+
+
手机号*
+ +
+
+
中考总分*
+ +
+
+
毕业学校*
+ +
+
+
特长
+ +
+
+
地市*
+
+
+
+
县区*
+
+ @* *@ +
+
+
专业*
+
+
+
+
身份证正面照片*
+
+
+
+
身份证反面照片*
+
+
+
+
初中毕业证照片*
+
+
+
+
中考成绩截图*
+
+
+
+
推荐教师*
+
+
+
+
备注
+ +
+ + +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/EnrollForm.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollForm.js new file mode 100644 index 000000000..3d2e951b2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollForm.js @@ -0,0 +1,138 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日  期:2021-06-15 17:30 + * 描  述:新生报名 + */ +var acceptClick; +var keyValue = request('keyValue'); +var MajorNo; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + + }, + bind: function () { + $('#IdCardPto1').lrUploader(); + $('#IdCardPto2').lrUploader(); + $('#MidDiplomaPto').lrUploader(); + $('#MidAchievementPto').lrUploader(); + $('#Gender').lrDataItemSelect({ code: 'usersexbit' }); + $('#Nationals').lrDataItemSelect({ code: 'National' }); + + //地市 + $('#City').lrselect({ + allowSearch: true, + //type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_CITY', + param: { strWhere: "1=1 and cparent='650000'" }, + value: "ccode", + text: "cname", + maxHeight: 200, + select: function (item) { + if (item) { + var code = $("#City").lrselectGet(); + //县区 + $('#County').lrselectRefresh({ + allowSearch: true, + //type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', + param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " }, + value: "acode", + text: "aname", + maxHeight: 200, + }); + } + } + }); + //县区 + $('#County').lrselect({ + allowSearch: true, + //type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', + param: { strWhere: "1=1 " }, + value: "acode", + text: "aname", + maxHeight: 200, + select: function (item) { + if (item) { + var countyCode = $("#County").lrselectGet(); + + //专业 + $('#MajorNo').lrselectRefresh({ + url: top.$.rootUrl + + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { + strWhere: "1=1 and Area='" + countyCode + "'" + }, + value: "id", + text: "majorname", + maxHeight: 200, + }); + if (MajorNo) { + $('#MajorNo').lrselectSet(MajorNo); + MajorNo = ''; + } + } + + } + }); + //专业 + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + //$('#MajorNo').lrselectRefresh({ + // url: top.$.rootUrl + + // '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + // param: { + // strWhere: "1=1" + // }, + // value: "id", + // text: "majorname", + // maxHeight: 200, + //}); + + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('#form').lrSetFormData(data[id]); + } + } + MajorNo = data.StuEnroll.MajorNo; + + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollPhone/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); + //console.log('MajorNo=', MajorNo); + //if (MajorNo) { + // console.log(333); + // $('#MajorNo').lrselectSet(MajorNo); + //} +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollFormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollFormView.cshtml new file mode 100644 index 000000000..a04af730c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollFormView.cshtml @@ -0,0 +1,93 @@ +@{ + ViewBag.Title = "新生报名管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
姓名*
+ +
+
+
性别*
+
+
+
+
民族*
+
+
+
+
身份证号*
+ +
+
+
住址*
+ +
+
+
手机号*
+ +
+
+
中考总分*
+ +
+
+
毕业学校*
+ +
+
+
特长
+ +
+
+
地市*
+
+
+
+
县区*
+
+
+
+
专业*
+
+
+
+
身份证正面照片*
+
+
+
+
身份证反面照片*
+
+
+
+
初中毕业证照片*
+
+
+
+
中考成绩截图*
+
+
+
+
推荐教师*
+
+
+
+
是否录取
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/EnrollFormView.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollFormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollFormView.js new file mode 100644 index 000000000..927656f2e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollFormView.js @@ -0,0 +1,121 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-07-17 11:20 + * 描 述:新生报名信息 + */ +var acceptClick; +var keyValue = request('keyValue'); +var MajorNo; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + + $('#MajorNo').lrselectSet(MajorNo); + }, + bind: function () { + $('#form1').find('input').attr('readonly', 'readonly'); + $('#form1').find('div').attr('readonly', 'readonly'); + $('#IsAdmission').lrRadioCheckbox({ + type: 'radio', + code: 'YesOrNoBit', + }); + $('#IdCardPto1').lrUploader({ isUpload:false}); + $('#IdCardPto2').lrUploader({ isUpload: false }); + $('#MidDiplomaPto').lrUploader({ isUpload: false }); + $('#MidAchievementPto').lrUploader({ isUpload: false }); + $('#Gender').lrDataItemSelect({ code: 'usersexbit' }); + $('#Nationals').lrDataItemSelect({ code: 'National' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + //地市 + $('#City').lrselect({ + allowSearch: true, + //type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_CITY', + param: { strWhere: "1=1 and cparent='650000'" }, + value: "ccode", + text: "cname", + maxHeight: 200, + //select: function (item) { + // if (item) { + // var code = $("#City").lrselectGet(); + // //县区 + // $('#County').lrselectRefresh({ + // allowSearch: true, + // //type: 'multiple', + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', + // param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " }, + // value: "acode", + // text: "aname", + // maxHeight: 200, + // select: function (item) { + // if (item) { + // var countyCode = $("#County").lrselectGet(); + // //专业 + // $('#MajorNo').lrselectRefresh({ + // url: top.$.rootUrl + + // '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + // param: { + // strWhere: "1=1 and City='" + code + "' and Area='" + countyCode + "'" + // }, + // value: "id", + // text: "majorname", + // maxHeight: 200, + // }); + // } + // } + // }); + // } + //} + }); + //县区 + $('#County').lrselect({ + allowSearch: true, + //type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', + param: { strWhere: "1=1 " }, + value: "acode", + text: "aname", + maxHeight: 200, + + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetFormData?keyValue=' + keyValue, function (data) { + // $(".headImg").attr("src", data.StuEnroll.PhotoUrl); + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('#form1').lrSetFormData(data[id]); + } + } + MajorNo = data.StuEnroll.MajorNo; + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndex.cshtml new file mode 100644 index 000000000..e1180b954 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndex.cshtml @@ -0,0 +1,82 @@ +@{ + ViewBag.Title = "新生报名管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
姓名
+ +
+
+
身份证号
+ +
+
+
手机号
+ +
+
+
推荐教师
+
+
+ @*
+
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
学年
+
+
+ +
+
是否报到
+
+
+ +
+
报名号
+ +
+
+
录取方式
+
+
*@ +
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndex.js new file mode 100644 index 000000000..da6319f1b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndex.js @@ -0,0 +1,288 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-07-17 11:20 + * 描 述:新生录取管理 + */ +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); + + + + $('#MajorNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + value: "id", + text: "majorname", + param: { strWhere: "1=1 AND CheckMark=1" }, + + }); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + //新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollForm', + width: 700, + height: 700, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('StuId'); + if (learun.checkrow(keyValue)) { + var enrollStatus = $('#gridtable').jfGridValue('EnrollStatus'); + if (enrollStatus != '0') { + return learun.alert.warning('选中记录已审核不可编辑!'); + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollForm?keyValue=' + keyValue, + width: 700, + height: 700, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('StuId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('StuId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollFormView?keyValue=' + keyValue, + width: 800, + height: 700, + btn: null + }); + } + }); + + // 审核 + $('#lr_yes').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('StuId'); + if (learun.checkrow(keyValue)) { + var status = $('#gridtable').jfGridValue('EnrollStatus'); + if (status == '2') { + return learun.alert.warning('选中项目已审核!'); + } + learun.layerForm({ + id: 'form', + title: '审核', + url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollSH?keyValue=' + keyValue, + width: 700, + height: 700, + btn: ['确认审核', '取消'], + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + //var data = $('#gridtable').jfGridGet('rowdata'); + //if (data.length > 0) { + + //} + }); + // 去审 + $('#lr_nocheck').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('StuId'); + var status = $('#gridtable').jfGridValue('EnrollStatus'); + if (status == '0') { + return learun.alert.warning('选中项目未审核!'); + } + //是否录取 + var IsAdmission = $('#gridtable').jfGridValue('IsAdmission'); + if (IsAdmission == 1) { + return learun.alert.warning('选中项目已录取!'); + } + learun.layerConfirm('是否确认去审选中项目!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/NoCheck', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + }); + // 录取 + $('#lr_lq').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('StuId'); + if (learun.checkrow(keyValue)) { + var status = $('#gridtable').jfGridValue('EnrollStatus'); + if (status != 2) { + return learun.alert.warning('请选择审核通过的数据操作!'); + } + learun.layerForm({ + id: 'form', + title: '录取', + url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollLQ?keyValue=' + keyValue, + width: 500, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList', + headData: [ + { label: "姓名", name: "StuName", width: 100, align: "left" }, + { + label: "性别", name: "Gender", width: 100, align: "left", + formatter: function (value) { + if (value == '0') { + return '女'; + } else { + return '男'; + } + } + }, + { + label: "民族", name: "Nationals", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'National', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "身份证号", name: "IDCard", width: 100, align: "left" }, + { label: "住址", name: "HomeAddress", width: 100, align: "left" }, + { label: "手机号", name: "StuMobile", width: 100, align: "left" }, + { label: "中考总分", name: "MidTermExam", width: 100, align: "left" }, + { label: "毕业学校", name: "FromSchool", width: 100, align: "left" }, + { label: "特长", name: "Specialty", 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: "County", 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']); + } + }); + } + }, + { + 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: 'id', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "推荐教师", name: "EmpNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: value, + keyId: 'empno', + callback: function (_data) { + callback(_data['empname']); + } + }); + } + }, + { + label: "状态", name: "EnrollStatus", width: 100, align: "left", + formatter: function (value) { + if (value == 2) { + return "审核通过"; + } else if (value == 0) { + return "待审核"; + } + } + }, + { + label: "是否录取", name: "IsAdmission", width: 100, align: "left", + formatter: function (value) { + if (value == 1) { + return ""; + } else { + return ""; + } + } + }, + ], + //isMultiselect: true, + mainId: 'StuId', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + //param.Grade = "20"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.cshtml new file mode 100644 index 000000000..0e91fd8e2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.cshtml @@ -0,0 +1,66 @@ +@{ + ViewBag.Title = "新生报名管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
地市
+
+
+
+
县区
+
+
+
+
专业
+
+
+
+
年度
+
+
+
+
姓名
+ +
+
+
身份证号
+ +
+
+
手机号
+ +
+
+
推荐教师
+
+
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js new file mode 100644 index 000000000..e91dbb490 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js @@ -0,0 +1,153 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-07-17 11:20 + * 描 述:新生录取管理 + */ +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); + }, 400, 400); + + //地市 + $('#City').lrselect({ + allowSearch: true, + type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_CITY', + param: { strWhere: "1=1 and cparent='650000'" }, + value: "ccode", + text: "cname", + maxHeight: 200, + select: function (item) { + if (item) { + var code = $("#City").lrselectGet(); + //县区 + $('#County').lrselectRefresh({ + allowSearch: true, + type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', + param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " }, + value: "acode", + text: "aname", + maxHeight: 200, + //select: function(item) { + // if (item) { + // var countyCode = $("#County").lrselectGet(); + // //专业 + // $('#MajorNo').lrselectRefresh({ + // type: 'multiple', + // url: top.$.rootUrl + + // '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + // param: { + // strWhere: "1=1 and City='" + code + "' and Area='" + countyCode + "'" + // }, + // value: "majorno", + // text: "majorname", + // maxHeight: 200, + // }); + // } + //} + }); + } + } + }); + //县区 + $('#County').lrselect({ + allowSearch: true, + type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', + param: { strWhere: "1=1 " }, + value: "acode", + text: "aname", + maxHeight: 200, + + }); + //专业 + $('#MajorNo').lrselect({ + allowSearch: true, + type: 'multiple', + url: top.$.rootUrl + + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { + strWhere: "1=1 " + }, + value: "id", + text: "majorname", + maxHeight: 200, + }); + //老师 + $('#EmpNo').lrselect({ + type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', + param: { strWhere: "1=1 " }, + value: "empno", + text: "empname", + maxHeight: 200, + }); + //年度 + $('#Year').lrselect({ + type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorYear', + param: { strWhere: "1=1 " }, + value: "year", + text: "year", + maxHeight: 200, + }); + + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetTJList', + headData: [ + { label: "教师编号", name: "empno", width: 100, align: "left" }, + { + label: "教师姓名", name: "empno", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: value, + keyId: 'empno', + callback: function (_data) { + callback(_data['empname']); + } + }); + } + }, + { label: "人数", name: "num", width: 100, align: "left" }, + ], + mainId: 'StuId', + isPage: false + + }); + page.search(); + }, + search: function (param) { + param = param || {}; + //param.Grade = "20"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollLQ.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollLQ.cshtml new file mode 100644 index 000000000..858d6ff60 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollLQ.cshtml @@ -0,0 +1,16 @@ +@{ + ViewBag.Title = "新生录取"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
考试成绩*
+ +
+
+
是否录取
+
+
+ +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/EnrollLQ.js") \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollLQ.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollLQ.js new file mode 100644 index 000000000..49fda3000 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollLQ.js @@ -0,0 +1,56 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日  期:2021-06-15 17:30 + * 描  述:新生报名审核 + */ +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 () { + $('#IsAdmission').lrRadioCheckbox({ + type: 'radio', + code: 'YesOrNoBit', + }); + }, + initData: function () { + if (!!keyValue) { + //$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/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/StuEnroll/Admission?keyValue=' + keyValue, + postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollSH.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollSH.cshtml new file mode 100644 index 000000000..c7ad0787d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollSH.cshtml @@ -0,0 +1,93 @@ +@{ + ViewBag.Title = "新生报名审核"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
姓名*
+ +
+
+
性别*
+
+
+
+
民族*
+
+
+
+
身份证号*
+ +
+
+
住址*
+ +
+
+
手机号*
+ +
+
+
中考总分*
+ +
+
+
毕业学校*
+ +
+
+
特长
+ +
+
+
地市*
+
+
+
+
县区*
+
+
+
+
专业*
+
+
+
+
身份证正面照片*
+
+
+
+
身份证反面照片*
+
+
+
+
初中毕业证照片*
+
+
+
+
中考成绩截图*
+
+
+
+
推荐教师*
+
+
+
+
考试信息
+
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/EnrollSH.js") \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollSH.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollSH.js new file mode 100644 index 000000000..f2bde2911 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollSH.js @@ -0,0 +1,141 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日  期:2021-06-15 17:30 + * 描  述:新生报名审核 + */ +var acceptClick; +var keyValue = request('keyValue'); +var MajorNo; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#form1').find('input').attr('readonly', 'readonly'); + $('#form1').find('div').attr('readonly', 'readonly'); + $('#IsAdmission').lrRadioCheckbox({ + type: 'radio', + code: 'YesOrNoBit', + }); + $('#IdCardPto1').lrUploader(); + $('#IdCardPto2').lrUploader(); + $('#MidDiplomaPto').lrUploader(); + $('#MidAchievementPto').lrUploader(); + $('#Gender').lrDataItemSelect({ code: 'usersexbit' }); + $('#Nationals').lrDataItemSelect({ code: 'National' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + //地市 + $('#City').lrselect({ + allowSearch: true, + //type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_CITY', + param: { strWhere: "1=1 and cparent='650000'" }, + value: "ccode", + text: "cname", + maxHeight: 200, + //select: function (item) { + // if (item) { + // var code = $("#City").lrselectGet(); + // //县区 + // $('#County').lrselectRefresh({ + // allowSearch: true, + // //type: 'multiple', + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', + // param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " }, + // value: "acode", + // text: "aname", + // maxHeight: 200, + // select: function (item) { + // if (item) { + // var countyCode = $("#County").lrselectGet(); + // //专业 + // $('#MajorNo').lrselectRefresh({ + // url: top.$.rootUrl + + // '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + // param: { + // strWhere: "1=1 and City='" + code + "' and Area='" + countyCode + "'" + // }, + // value: "id", + // text: "majorname", + // maxHeight: 200, + // }); + // } + // } + // }); + // } + //} + }); + //县区 + $('#County').lrselect({ + allowSearch: true, + //type: 'multiple', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', + param: { strWhere: "1=1 " }, + value: "acode", + text: "aname", + maxHeight: 200, + + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetFormData?keyValue=' + keyValue, function (data) { + // $(".headImg").attr("src", data.StuEnroll.PhotoUrl); + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('#form1').lrSetFormData(data[id]); + } + } + MajorNo = data.StuEnroll.MajorNo; + }); + learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetExamDataByStuId?keyValue=' + keyValue, function (res) { + var html = ''; + if (res.code == 200) { + var data = res.data; + if (data) { + for (var i = 0; i < data.length; i++) { + var etime = data[i].BeginTime + '~' + data[i].EndTime; + html += '
'; + html += '
科目
'; + html += ''; + html += '
'; + html += '
'; + html += '
时间
'; + html += ''; + html += '
'; + } + } + $('#examDiv').html(html); + } + + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/UpdateEnrollStatus?keyValue=' + keyValue, + postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionForm.cshtml new file mode 100644 index 000000000..0fe0e7f8e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionForm.cshtml @@ -0,0 +1,22 @@ +@{ + ViewBag.Title = "新生录取"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+ @*
+
姓名*
+ +
*@ +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionForm.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionForm.js new file mode 100644 index 000000000..d2137ce1b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionForm.js @@ -0,0 +1,68 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日  期:2021-06-15 17:30 + * 描  述:新生录取 + */ +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) { + learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetScoreListByStuId?stuid=' + keyValue, function (data) { + //learun.loading(false); + + if (data.code == 200) { + var data = data.data; + var html = ''; + for (var i = 0; i < data.length; i++) { + html += '
'; + html += '
' + data[i].SubjectName + ':
'; + html += ''; + html += '
'; + } + $('#form').html(html); + } + else { + learun.layerClose(window.name); + learun.alert.error('数据获取失败,请重新获取!'); + learun.httpErrorLog(data.info); + } + }); + + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + //var postData = { + // strEntity: JSON.stringify($('body').lrGetFormData()) + //}; + learun.layerConfirm('是否确认录取当前学生!', function (res) { + if (res) { + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Admission?keyValue=' + keyValue, + { IsAdmission: 1 }, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + } + }); + + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionIndex.cshtml new file mode 100644 index 000000000..1683efd84 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionIndex.cshtml @@ -0,0 +1,52 @@ +@{ + ViewBag.Title = "新生录取管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ @*
+
姓名
+ +
+
+
身份证号
+ +
+
+
手机号
+ +
*@ +
+
年度
+
+
+
+
专业
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionIndex.js new file mode 100644 index 000000000..ee19b45a6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionIndex.js @@ -0,0 +1,198 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2021-06-18 11:20 + * 描 述:新生录取管理 + */ +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); + //专业 + $('#MajorNo').lrselect({ + placeholder: "请选择专业", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetMajorData', + value: 'value', + text: 'text' + + }); + //年度 + $('#Year').lrselect({ + placeholder: "请选择年度", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetYearNoData', + value: 'value', + text: 'text' + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + //查看成绩 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('StuId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '查看成绩', + url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/AdmissionForm?keyValue=' + keyValue, + width: 500, + height: 400, + btn: null + }); + } + }); + // 录取 + $('#lr_lq').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('StuId'); + if (learun.checkrow(keyValue)) { + var IsAdmission = $('#gridtable').jfGridValue('IsAdmission'); + if (IsAdmission == 1) { + return learun.alert.warning('该学生已被录取!'); + } + learun.layerForm({ + id: 'form', + title: '录取', + url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/AdmissionForm?keyValue=' + keyValue, + width: 500, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 取消录取 + $('#lr_nolq').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('StuId'); + if (learun.checkrow(keyValue)) { + var IsAdmission = $('#gridtable').jfGridValue('IsAdmission'); + if (IsAdmission == 0) { + return learun.alert.warning('该学生未被录取!'); + } + learun.layerConfirm('是否确认取消录取当前学生!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Admission?keyValue=' + keyValue, { IsAdmission: 0 }, function () { + refreshGirdData(); + }); + } + }); + + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetPageListForAdmission', + headData: [ + { label: "姓名", name: "StuName", width: 100, align: "left" }, + { + label: "性别", name: "Gender", width: 100, align: "left", + formatter: function (value) { + if (value == '0') { + return '女'; + } else { + return '男'; + } + } + }, + { + label: "民族", name: "Nationals", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'National', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "身份证号", name: "IDCard", width: 100, align: "left" }, + { label: "手机号", name: "StuMobile", width: 100, align: "left" }, + { label: "中考总分", name: "MidTermExam", width: 100, align: "left" }, + { label: "毕业学校", name: "FromSchool", 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: "County", 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']); + } + }); + } + }, + { + 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: 'id', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { label: "总分", name: "ExamScore", width: 100, align: "left" }, + { + label: "是否录取", name: "IsAdmission", width: 100, align: "left", + formatter: function (value) { + if (value == 1) { + return ""; + } else { + return ""; + } + } + }, + ], + //isMultiselect: true, + mainId: 'StuId', + isPage: true, + sidx: 'ExamScore', + sord: 'ASC', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + //param.Grade = "20"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/Index.cshtml new file mode 100644 index 000000000..0ef2ab278 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/Index.cshtml @@ -0,0 +1,103 @@ +@{ ViewBag.Title = "新生考试成绩录入"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+ + +
+
+ +
提示:录入完成后,请务必点击“保存成绩”按钮,避免成绩丢失!
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnrollScore/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/Index.js new file mode 100644 index 000000000..cbd956220 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollScore/Index.js @@ -0,0 +1,416 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2021-06-18 11:02 + * 描 述:全院学生成绩录入(新) + */ +var selectedRow; +var refreshGirdData; +var refreshGirdData2; +var judgeSelect; //判断下拉框是否选择 +var modifyDate; //成绩被占用,且是登录用户时,成绩表中的编辑时间; +var timer; //计时器 +var submitScoreTimer; //五分钟提交成绩计时器 +var headData; //常规列头 +var headDataEdit; //可编辑列头 +var headDataNoEdit; //不可编辑列头 +var headDataFinally; //最终列头 +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + headData = [ + { + label: '状态', name: 'Status', width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == "1" ? "已审核" : "未审核"; + } + }, + { label: '姓名', name: 'StuName', width: 100, align: "left" }, + { label: '手机号', name: 'StuMobile', width: 100, align: "left" }, + { label: '身份证号', name: 'IdCard', width: 100, align: "left" }, + { + label: "性别", name: "Gender", width: 40, align: "left", + formatter: function (cellvalue) { + return cellvalue == '1' ? "男" : "女"; + } + }, { label: '年度', name: 'YearNo', width: 100, align: "left" }, + { + label: "专业", name: "MajorId", 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: 'id', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "科目", name: "SubjectId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ExamSubject', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['subjectname']); + } + }); + } + }, + + ]; + headDataEdit = [ + { + label: '成绩', name: 'Score', width: 100, align: "left", + edit: { + type: 'input', + inputType: 'number', + change: function (row, rownum) { + //row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(0); + $('#gridtable').jfGridSet('updateRow', rownum); + }, + } + }, + { + label: '备注', name: 'Remark', width: 100, align: "left", + edit: { + type: 'input', + } + }, + ]; + headDataNoEdit = [ + { label: '成绩', name: 'Score', width: 80, align: "left" }, + { + label: '备注', name: 'Remark', width: 100, align: "left" + }, + ]; + headDataFinally = headData.concat(headDataNoEdit); + + page.initGird(); + page.bind(); + page.bindSelect(); + }, + bind: function () { + //多条件选择 + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 500); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + //查询 + $('#btn_Search').on('click', function () { + refreshGirdData2(); + }); + //// 成绩初始化 + //$('#lr_add').on('click', function () { + // //提示弹框 + // learun.layerConfirm('确认初始化成绩吗!', function (res) { + // if (res) { + // //审核成绩 + // learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollScoreAdd', { queryJson: JSON.stringify(query), checkMark: 1 }, function (res) { + // if (res.code == 200) { + // refreshGirdData2(); + // } else { + // learun.alert.warning("审核成绩失败!"); + // return false; + // } + // }); + + // } + // }); + //}); + // 开始录入 + $('#lr_input').on('click', function () { + //提示弹框 + learun.layerConfirm('录入完成后,请务必点击“提交成绩”按钮,避免成绩丢失!', function (res) { + if (res) { + var query = judgeSelect(); + if (query) { + + //判断是否已审核;判断是否被其他教师占用 + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data != null) { + if (data.Status != 0) { + learun.alert.warning("学生成绩已审核!"); + return false; + } + if (data.IsEditable == 0) { + if (data.EditUserId == learun.clientdata.get(['userinfo']).account) { + modifyDate = data.ModifyDate; + } else { + learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!"); + return false; + } + } else { + //占用成绩 + learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/StartInputScore', { queryJson: JSON.stringify(query) }, function (res) { }); + } + //显示可编辑列头 + headDataFinally = headData.concat(headDataEdit); + $("#gridtable")[0].dfop = undefined; + page.initGird(); + page.search(query); + + //显示“提交成绩”按钮 + $('#lr_save').show(); + //隐藏“开始录入”按钮 + $('#lr_input').hide(); + //隐藏审核按钮 + page.displaySubmit(0); + ////显示“倒计时” + //$('.timeBox').show(); + //$('#minutes').html($('#minutes').attr('data-minutes')); + ////开始倒计时 + //page.countDown(); + //五分钟提交成绩 + page.submitScore(); + } else { + learun.alert.warning("学生成绩不存在!"); + return false; + } + }); + + } + + } + }); + }); + //提交成绩 + $('#lr_save').on('click', function () { + var query = judgeSelect(); + if (query) { + //成绩被占用,且是登录用户时,根据编辑时间判断是否是本人; + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data != null) { + if (data.Status != 0) { + learun.alert.warning("学生成绩已审核!"); + return false; + } + if (data.IsEditable == 0) { + if (data.EditUserId == learun.clientdata.get(['userinfo']).account) { + if (modifyDate != null && modifyDate != data.ModifyDate) { + learun.alert.warning("当前科目成绩被修改,请重新获取!"); + return false; + } + } else { + learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!"); + return false; + } + } else if (data.IsEditable == 1) { + learun.alert.warning("学生成绩已提交!"); + return false; + } + + //提交成绩 + var rowdatas = $('#gridtable').jfGridGet('rowdatas'); + learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) { + if (res.code == 200) { + //提交成绩:取消占用 + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/SaveInputScoreStatus', { queryJson: JSON.stringify(query) }, function (res) { + if (res.code == 200) { + refreshGirdData2(); + modifyDate = null; + //隐藏“提交成绩”按钮 + $('#lr_save').hide(); + //显示“开始录入”按钮 + $('#lr_input').show(); + //显示审核按钮 + page.displaySubmit(1); + //隐藏“倒计时” + //$('.timeBox').hide(); + ////停止倒计时 + //clearInterval(timer); + //停止五分钟提交成绩 + clearInterval(submitScoreTimer); + } else { + learun.alert.warning("提交成绩:取消占用失败!"); + return false; + } + }); + } else { + learun.alert.warning("提交成绩失败!"); + return false; + } + }); + + } else { + learun.alert.warning("学生成绩不存在!"); + return false; + } + }); + } + }); + // 审核 + $('#lr_check').on('click', function () { + var query = judgeSelect(); + if (query) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data != null) { + if (data.Status != 0) { + learun.alert.warning("学生成绩已审核!"); + return false; + } + learun.layerConfirm('是否确认审核当前科目的学生成绩!', function (res) { + if (res) { + //审核成绩 + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/DoCheckScore', { queryJson: JSON.stringify(query), Status: 1 }, function (res) { + if (res.code == 200) { + refreshGirdData2(); + } else { + learun.alert.warning("审核成绩失败!"); + return false; + } + }); + } + }); + } else { + learun.alert.warning("学生成绩不存在!"); + return false; + } + }); + } + }); + // 去审核 + $('#lr_uncheck').on('click', function () { + var query = judgeSelect(); + if (query) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data != null) { + if (data.Status != 1) { + learun.alert.warning("学生成绩未审核!"); + return false; + } + learun.layerConfirm('是否确认去审核科目的学生成绩!', function (res) { + if (res) { + //去审核成绩 + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/DoCheckScore', { queryJson: JSON.stringify(query), Status: 0 }, function (res) { + if (res.code == 200) { + refreshGirdData2(); + } else { + learun.alert.warning("去审核成绩失败!"); + return false; + } + }); + } + }); + } else { + learun.alert.warning("学生成绩不存在!"); + return false; + } + }); + } + }); + + }, + bindSelect: function () { + //年度 + $('#Year').lrselect({ + placeholder: "请选择年度", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetYearNoData', + value: 'value', + text: 'text' + }); + //科目 + $('#SubjectId').lrselect({ + placeholder: "请选择科目", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetSubjectData', + value: 'value', + text: 'text' + }); + }, + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetList', + headData: headDataFinally, + mainId: 'Id', + isPage: false, + + }); + //page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + }, + countDown: function () { + //var minutes = $('#minutes').html(); + //var minutesTemp = minutes; + //var seconds = $('#seconds').attr('data-seconds'); + //$('#seconds').html(seconds); + //var secondsTemp = seconds; + //timer = setInterval(function () { + // secondsTemp--; + // $('#seconds').html(secondsTemp); + // if (secondsTemp == 0) { + // secondsTemp = seconds; + // minutesTemp--; + // $('#minutes').html(minutesTemp); + // if (minutesTemp == 0) { + // //停止倒计时 + // clearInterval(timer); + // //自动提交成绩 + // $('#lr_save').trigger("click"); + // } + // } + //}, 1000); + }, + //提交成绩 + submitScore: function () { + submitScoreTimer = setInterval(function () { + var rowdatas = $('#gridtable').jfGridGet('rowdatas'); + learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) { + }); + }, 300000); + }, + displaySubmit: function (type) { + //显示隐藏审核按钮 + if (type == 1) { + //显示 + $('#lr_check').show(); + $('#lr_uncheck').show(); + } else { + //隐藏 + $('#lr_check').hide(); + $('#lr_uncheck').hide(); + } + } + }; + refreshGirdData = function () { + page.search(); + }; + refreshGirdData2 = function () { + var query = judgeSelect(); + if (query) { + //显示不可编辑列头 + headDataFinally = headData.concat(headDataNoEdit); + $("#gridtable")[0].dfop = undefined; + page.initGird(); + + page.search(query); + //page.searchScale(query); + } + }; + judgeSelect = function () { + var $content = $('body').find('.lr-layout-tool-left'); + var query = $content.lrGetFormData(); + if (query.Year == null || query.Year == "") { + learun.alert.warning("请选择年度!"); + return false; + } + if (query.SubjectId == null || query.SubjectId == "") { + learun.alert.warning("请选择科目!"); + return false; + } + + return query; + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js index 729f8ccc6..422017273 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js @@ -19,6 +19,7 @@ var bootstrap = function ($, learun) { var keyword = $('#txt_Keyword').val(); page.search({ keyword: keyword }); }); + $('#PerfectStatus').lrDataItemSelect({ code: "PerfectStatus", placeholder: "请选完善状态" }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js index b22d61222..93f552b0e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js @@ -177,10 +177,9 @@ var bootstrap = function ($, learun) { { label: '姓名', name: 'StuName', width: 100, align: "left" }, { label: '是否完善信息', name: 'ID', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DirectRelatives', - key: row.ID, + key: value, keyId: 'stuinfofreshid', callback: function (_data) { var a = _data['id']; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/ShowAuthorizeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/ShowAuthorizeController.cs new file mode 100644 index 000000000..4872dfa64 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/ShowAuthorizeController.cs @@ -0,0 +1,116 @@ +using Learun.Util; +using System.Data; +using System.Web.Mvc; +using System.Collections.Generic; +using Learun.Application.OA; + +namespace Learun.Application.Web.Areas.LR_Desktop.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-07 11:18 + /// 描 述:授权查看 + /// + public class ShowAuthorizeController : MvcControllerBase + { + private ShowAuthorizeIBLL showAuthorizeIBLL = new ShowAuthorizeBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = showAuthorizeIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData() + { + var ShowAuthorizeData = showAuthorizeIBLL.GetShowAuthorizeEntity(); + var jsonData = new { + ShowAuthorize = ShowAuthorizeData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + showAuthorizeIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + ShowAuthorizeEntity entity = strEntity.ToObject(); + showAuthorizeIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Form.cshtml new file mode 100644 index 000000000..a7ad8f5fa --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Form.cshtml @@ -0,0 +1,34 @@ +@{ + ViewBag.Title = "授权查看"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
到期前提醒
+
+
+
+
到期时间
+
+
+
+
邮件地址
+ +
+
+
邮件标题
+ +
+
+
邮件内容
+ +
+ +
+@Html.AppendJsFile("/Areas/LR_Desktop/Views/ShowAuthorize/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Form.js new file mode 100644 index 000000000..d590d50cd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Form.js @@ -0,0 +1,66 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-04-07 11:18 + * 描 述:授权查看 + */ +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 () { + $('#IsRemind').lrRadioCheckbox({ + type: 'radio', + code: 'YesOrNoInt', + }); + //$('#ExpirationTime').lrDataItemSelect({ code: 'ExpirationTime' }); + $('#ExpirationTime').lrselect({ + url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList', + param: { itemCode: 'ExpirationTime' }, + value: 'F_ItemValue', + text: 'F_ItemName', + allowSearch: true + }); + + //保存 + $('#lr_submit').on('click', function () { + acceptClick(); + }); + + }, + initData: function () { + $.lrSetForm(top.$.rootUrl + '/LR_Desktop/ShowAuthorize/GetFormData', function (data) { + for (var id in data) { + if (!!data[id] && !!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 + '/LR_Desktop/ShowAuthorize/SaveForm?keyValue=' + '', postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Index.cshtml new file mode 100644 index 000000000..76da011d4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Index.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "授权查看"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_Desktop/Views/ShowAuthorize/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Index.js new file mode 100644 index 000000000..bf4624a1f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ShowAuthorize/Index.js @@ -0,0 +1,110 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-04-07 11:18 + * 描 述:授权查看 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/LR_Desktop/ShowAuthorize/Form', + width: 600, + height: 400, + 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 + '/LR_Desktop/ShowAuthorize/Form?keyValue=' + keyValue, + width: 600, + 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 + '/LR_Desktop/ShowAuthorize/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/LR_Desktop/ShowAuthorize/GetPageList', + headData: [ + { label: "到期前提醒", name: "IsRemind", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'YesOrNoBit', + callback: function (_data) { + callback(_data.text); + } + }); + }}, + { label: "到期时间", name: "ExpirationTime", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'ExpirationTime', + callback: function (_data) { + callback(_data.text); + } + }); + }}, + { label: "邮件地址", name: "EmailAddr", width: 100, align: "left"}, + { label: "邮件标题", name: "EmailTitle", width: 100, align: "left"}, + { label: "邮件内容", name: "EmailContent", width: 100, 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/ResourceFileController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/ResourceFileController.cs index 8137f8560..f3dcca402 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/ResourceFileController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/ResourceFileController.cs @@ -117,13 +117,11 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 所有文件(夹)列表 /// - /// 文件夹Id /// 返回列表Json [HttpGet] - public ActionResult GetListJson(string folderId) + public ActionResult GetListJson(string folderId, string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetList(folderId, userId); + var data = fileInfoBLL.GetAllList(folderId, keyword); return JsonResult(data); } /// @@ -131,10 +129,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 返回列表Json [HttpGet] - public ActionResult GetDocumentListJson() + public ActionResult GetDocumentListJson(string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetDocumentList(userId); + var data = fileInfoBLL.GetDocumentList(keyword); return JsonResult(data); } /// @@ -142,10 +139,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 返回列表Json [HttpGet] - public ActionResult GetImageListJson() + public ActionResult GetImageListJson(string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetImageList(userId); + var data = fileInfoBLL.GetImageList(keyword); return JsonResult(data); } /// @@ -153,10 +149,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 返回列表Json [HttpGet] - public ActionResult GetRecycledListJson() + public ActionResult GetRecycledListJson(string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetRecycledList(userId); + var data = fileInfoBLL.GetRecycledList(keyword); return JsonResult(data); } /// @@ -164,10 +159,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 返回列表Json [HttpGet] - public ActionResult GetMyShareListJson() + public ActionResult GetMyShareListJson(string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetMyShareList(userId); + var data = fileInfoBLL.GetMyShareList(keyword); return JsonResult(data); } /// @@ -175,10 +169,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 返回列表Json [HttpGet] - public ActionResult GetOthersShareListJson() + public ActionResult GetOthersShareListJson(string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetOthersShareList(userId); + var data = fileInfoBLL.GetOthersShareList(keyword); return JsonResult(data); } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/Index.js index 0653a3830..05b55f08d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/Index.js @@ -7,6 +7,8 @@ */ var refreshGirdData; +var keyword; +var folderId; var bootstrap = function ($, learun) { "use strict"; @@ -22,8 +24,12 @@ var bootstrap = function ($, learun) { bind: function () { // 查询 $('#btn_Search').on('click', function () { - var keyword = $('#txt_Keyword').val(); - page.search({ keyword: keyword }); + keyword = $('#txt_Keyword').val(); + + $.lrSetForm(top.$.rootUrl + _url + '?keyword=' + keyword, function (data) {// + $('#gridTable').jfGridSet('refreshdata', data); + }); + //page.search(); }); // 刷新 $('#lr_refresh').on('click', function () { @@ -33,17 +39,18 @@ var bootstrap = function ($, learun) { $(".crumb-path span").click(function () { var value = $(this).attr('data-folderId'); var folderId = $(".crumb-path span:last").attr('data-folderId'); - console.log(value); + var where = '&keyword=' + keyword; + //console.log(value); if (value == "back") { if (folderId == 0) { $(".crumb-path .back").hide(); } - $.lrSetForm(top.$.rootUrl + _url + '?folderId=' + folderId, function (data) {// + $.lrSetForm(top.$.rootUrl + _url + '?folderId=' + folderId + where, function (data) {// $('#gridTable').jfGridSet('refreshdata', data); }); $(".crumb-path span:last").remove(); } else { - $.lrSetForm(top.$.rootUrl + _url + '?folderId=0', function (data) {// + $.lrSetForm(top.$.rootUrl + _url + '?folderId=0' + where, function (data) {// $('#gridTable').jfGridSet('refreshdata', data); }); $(".crumb-path .back").hide(); @@ -268,7 +275,7 @@ var bootstrap = function ($, learun) { $this.addClass('active'); var data_value = $this.context.dataset.value; - + switch (data_value) { case "allFile": _url = "/LR_OAModule/ResourceFile/GetListJson"; @@ -336,7 +343,7 @@ var bootstrap = function ($, learun) { if (options.length != 0) { return "
" + options.F_FileName + "
"; } - } + } }, { label: '大小', name: 'F_FileSize', index: 'F_FileSize', width: 100, align: 'center', @@ -392,6 +399,8 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.keyword = keyword; + param.folderId = folderId; $('#gridTable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); }, //初始化页面 @@ -447,6 +456,7 @@ var bootstrap = function ($, learun) { }; refreshGirdData = function () { + $('#lr_left_list li').eq(0).trigger('click'); page.search(); }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/PostController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/PostController.cs index 840e39df2..59101844a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/PostController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/PostController.cs @@ -133,10 +133,15 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers public ActionResult SaveForm(string keyValue, PostEntity entity) { var list = postIBLL.GetList(entity.F_CompanyId); - if (list.Any(a => a.F_EnCode == entity.F_EnCode)) + if (string.IsNullOrEmpty(keyValue) && list.Any(a => a.F_EnCode == entity.F_EnCode)) { - return Fail("岗位编号重复"); + return Fail("岗位编号重复!"); } + else if (!string.IsNullOrEmpty(keyValue) && list.Any(a => a.F_EnCode == entity.F_EnCode && a.F_PostId != keyValue)) + { + return Fail("岗位编号重复!"); + } + postIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js index 6ea627085..a91e41eff 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js @@ -29,7 +29,7 @@ var bootstrap = function ($, learun) { // 新增 $('#lr_add').on('click', function () { if (!companyId) { - learun.alert.warning('请选择公司!'); + learun.alert.warning('请选择学校!'); return false; } selectedRow = null; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Post/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Post/Index.js index f5b5aca8e..18b70306c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Post/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Post/Index.js @@ -50,7 +50,7 @@ var bootstrap = function ($, learun) { // 新增 $('#lr_add').on('click', function () { if (!companyId) { - learun.alert.warning('请选择公司!'); + learun.alert.warning('请选择学校!'); return false; } selectedRow = null; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.cshtml index e87ac46bf..7a12c3250 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.cshtml @@ -23,10 +23,22 @@
- -
-
-  查询 +
+
+
+
操作用户
+ +
+
+
系统功能
+ +
+
+
操作类型
+ +
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.js index f0b8e0869..f89f0c26f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.js @@ -51,10 +51,9 @@ var bootstrap = function ($, learun) { }); }); // 查询 - $('#btn_Search').on('click', function () { - var keyword = $('#txt_Keyword').val(); - page.search({ keyword: keyword }); - }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Corridor.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Corridor.cshtml index a6de56ca7..1b54c106e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Corridor.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Corridor.cshtml @@ -45,6 +45,11 @@ left: 0px; width: 228px } + .indSec1T > a { + width: fit-content; + padding-left: 6px; + padding-right: 6px; + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml index b85a292ec..45a61029c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml @@ -45,6 +45,11 @@ left: 0px; width: 206px } + .indSec1T > a { + width: fit-content; + padding-left: 6px; + padding-right: 6px; + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Floor.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Floor.cshtml index 06d008f5d..99ada60d1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Floor.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Floor.cshtml @@ -168,7 +168,12 @@ key: value, keyId: 'f_companyid', callback: function (_data) { - result = _data.f_fullname; + if (!_data.f_fullname || _data.f_fullname == '' || _data.f_fullname == 'undefined') { + result = ''; + } + else { + result = _data.f_fullname; + } } }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.js index 38b25fdd2..fdda26390 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.js @@ -97,16 +97,19 @@ var bootstrap = function ($, learun) { initData: function () { if (!!keyValue) { - $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetFormData?keyValue=' + keyValue, function (data) { - for (var id in data) { - if (!!data[id].length && data[id].length > 0) { - $('#' + id).jfGridSet('refreshdata', data[id]); + $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/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]); + } } - else { - $('[data-table="' + id + '"]').lrSetFormData(data[id]); - } - } - }); + }); + } else { + $('#BuildType').lrselectSet('4'); + $('#BuildType').attr('readonly', 'readonly'); } }, initSelect: function () { @@ -122,6 +125,7 @@ var bootstrap = function ($, learun) { param: { parentId: '0' }, } $('#Campus').lrselect(dfop); + $('#Campus').lrselectSet(learun.clientdata.get(['userinfo']).companyId); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js index 878fe4fc5..c530fc983 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js @@ -25,7 +25,7 @@ var bootstrap = function ($, learun) { allowSearch: true, maxHeight: 225, select: function (item) { - if (item&&item.id!='-1') { + if (item && item.id != '-1') { $('#BuildType').lrselectSet(item.title); $('#BuildType').attr('readonly', 'readonly'); } else { @@ -43,7 +43,7 @@ var bootstrap = function ($, learun) { type: 'radio', code: 'HasToilet', }) - + //$('#StudentID').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); //$('#StudentID').lrDataSourceSelect({ code: 'StuInfoTwo', value: 'stuid', text: 'stuname' }); $('#StudentID').lrselect({ @@ -51,7 +51,7 @@ var bootstrap = function ($, learun) { text: "stuname", url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic' }); - + $('#Class').lrselect({ value: "classno", text: "classname" @@ -115,7 +115,7 @@ var bootstrap = function ($, learun) { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetFormData?keyValue=' + keyValue, - function(data) { + function (data) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { $('#' + id).jfGridSet('refreshdata', data[id]); @@ -126,6 +126,7 @@ var bootstrap = function ($, learun) { }); } else { $('#ParentID').lrselectSet(ParentID); + $('#ParentID').attr('readonly', 'readonly'); } }, initSelect: function () { @@ -141,7 +142,7 @@ var bootstrap = function ($, learun) { param: { parentId: '0' }, } $('#Campus').lrselect(dfop); - + $('#Campus').lrselectSet(learun.clientdata.get(['userinfo']).companyId); } }; // 保存数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Room.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Room.cshtml index 1683921af..f120a829f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Room.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Room.cshtml @@ -45,6 +45,11 @@ left: -60px; width: 273px; } + .indSec1T > a { + width: fit-content; + padding-left: 6px; + padding-right: 6px; + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Unit.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Unit.cshtml index 3e3925d18..78802bccc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Unit.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Unit.cshtml @@ -45,6 +45,11 @@ left: 0px; width: 225px } + .indSec1T > a { + width: fit-content; + padding-left: 6px; + padding-right: 6px; + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Sanitation/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Sanitation/Form.cshtml index 418c68752..fb7a21463 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Sanitation/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Sanitation/Form.cshtml @@ -3,21 +3,21 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-