@@ -101,6 +101,24 @@ namespace Learun.Application.Organization | |||
} | |||
} | |||
} | |||
public RoleEntity GetEntityByRoleCode(string code) | |||
{ | |||
try | |||
{ | |||
return roleService.GetEntityByRoleCode(code); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取分页数据 | |||
/// </summary> | |||
@@ -36,7 +36,8 @@ namespace Learun.Application.Organization | |||
/// <param name="roleName"></param> | |||
/// <returns></returns> | |||
RoleEntity GetRoleByRoleName(string roleName); | |||
/// <summary> | |||
RoleEntity GetEntityByRoleCode(string code); | |||
/// <summary> | |||
/// 获取角色数据列表 | |||
/// </summary> | |||
/// <param name="roleIds">主键串</param> | |||
@@ -231,5 +231,24 @@ namespace Learun.Application.Organization | |||
} | |||
#endregion | |||
public RoleEntity GetEntityByRoleCode(string code) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<RoleEntity>(a => a.F_EnCode == code); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -5,6 +5,7 @@ using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -19,6 +20,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL(); | |||
private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -47,11 +50,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult IndexForClass() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult IndexItem() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -71,6 +92,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult IndexClassRoom() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
#endregion | |||
@@ -95,7 +125,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult GetClassTree() | |||
{ | |||
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree()); | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree(empinfo.DeptNo)); | |||
} | |||
else | |||
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree("")); | |||
} | |||
else | |||
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree("")); | |||
} | |||
/// <summary> | |||
@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -16,6 +17,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class Exam_ExamLessonController : MvcControllerBase | |||
{ | |||
private Exam_ExamLessonIBLL exam_ExamLessonIBLL = new Exam_ExamLessonBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -26,6 +30,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -44,6 +57,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -119,9 +141,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester,string ExamTime) | |||
public ActionResult Import(string AcademicYearNo, string Semester,string ExamTime,string ImportDeptNo) | |||
{ | |||
int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester, ExamTime); | |||
int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester, ExamTime, ImportDeptNo); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
@@ -130,9 +152,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester,string ImportDeptNo) | |||
{ | |||
int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester, ImportDeptNo); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
@@ -5,6 +5,7 @@ using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System; | |||
using System.Linq; | |||
using Learun.Application.Organization; | |||
using Newtonsoft.Json; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
@@ -22,6 +23,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
private Exam_ExamPlanLessonIBLL exam_ExamPlanLessonIBLL = new Exam_ExamPlanLessonBLL(); | |||
private Exam_ExamPlanClassIBLL exam_ExamPlanClassIBLL = new Exam_ExamPlanClassBLL(); | |||
private Exam_ExamPlanRoomIBLL exam_ExamPlanRoomIBLL = new Exam_ExamPlanRoomBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -32,6 +35,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -41,6 +53,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -16,6 +17,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class Exam_ExamRoomController : MvcControllerBase | |||
{ | |||
private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -26,6 +29,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -44,6 +56,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
@@ -111,9 +132,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns) | |||
public ActionResult Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns, string ImportDeptNo) | |||
{ | |||
int res = exam_ExamRoomIBLL.Import(AcademicYearNo, Semester,SeatRows,SeatColumns); | |||
int res = exam_ExamRoomIBLL.Import(AcademicYearNo, Semester,SeatRows,SeatColumns, ImportDeptNo); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
@@ -122,9 +143,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
int res = exam_ExamRoomIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
int res = exam_ExamRoomIBLL.DeleteWhere(AcademicYearNo, Semester, ImportDeptNo); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -16,6 +17,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class Exam_ExamStudentController : MvcControllerBase | |||
{ | |||
private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -26,6 +29,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -44,6 +56,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult FormImport() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -53,6 +74,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult FormClear() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
@@ -169,15 +199,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpPost] | |||
[AjaxOnly] | |||
[ValidateAntiForgeryToken] | |||
public ActionResult ClearTable(string AcademicYearNo, string Semester, string ESType) | |||
public ActionResult ClearTable(string AcademicYearNo, string Semester, string ESType, string ImportDeptNo) | |||
{ | |||
int res = exam_ExamStudentIBLL.ClaerForm(AcademicYearNo, Semester, ESType); | |||
int res = exam_ExamStudentIBLL.ClaerForm(AcademicYearNo, Semester, ESType, ImportDeptNo); | |||
return Success("清空(" + res + ")条数据成功!"); | |||
} | |||
public ActionResult ImportTable(string AcademicYearNo, int Semester, string ESType) | |||
public ActionResult ImportTable(string AcademicYearNo, int Semester, string ESType, string ImportDeptNo) | |||
{ | |||
int res = exam_ExamStudentIBLL.ImportForm(AcademicYearNo, Semester, ESType); | |||
int res = exam_ExamStudentIBLL.ImportForm(AcademicYearNo, Semester, ESType, ImportDeptNo); | |||
return Success("同步(" + res + ")条数据成功!"); | |||
} | |||
@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -16,7 +17,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class Exam_InvigilateTeacherController : MvcControllerBase | |||
{ | |||
private Exam_InvigilateTeacherIBLL exam_InvigilateTeacherIBLL = new Exam_InvigilateTeacherBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
@@ -26,7 +28,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -35,7 +46,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -44,6 +55,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
@@ -164,9 +184,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester) | |||
public ActionResult Import(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
int res = exam_InvigilateTeacherIBLL.Import(AcademicYearNo, Semester); | |||
int res = exam_InvigilateTeacherIBLL.Import(AcademicYearNo, Semester, ImportDeptNo); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
@@ -175,9 +195,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
int res = exam_InvigilateTeacherIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
int res = exam_InvigilateTeacherIBLL.DeleteWhere(AcademicYearNo, Semester, ImportDeptNo); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
@@ -19,6 +19,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
private LessonInfoOfElectiveOnlineIBLL lessonInfoOfElectiveOnlineIBLL = new LessonInfoOfElectiveOnlineBLL(); | |||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | |||
CdMajorIBLL CdMajorIBLL = new CdMajorBLL(); | |||
private StuSelectLessonListOfElectiveOnlineIBLL stuSelectLessonListOfElectiveOnlineIBLL = new StuSelectLessonListOfElectiveOnlineBLL(); | |||
#region 视图功能 | |||
@@ -241,6 +243,138 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("线上选课还未开始!"); | |||
} | |||
/// <summary> | |||
/// 判断队列结果 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult GetApplyResult(string keyvalue) | |||
{ | |||
var loginUserInfo = LoginUserInfo.Get(); | |||
//学员信息 | |||
var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(loginUserInfo.enCode); | |||
if (stuInfoBasicEntity == null) | |||
{ | |||
return Success("当前学员不存在!"); | |||
} | |||
//课程信息 | |||
var olpeEntity = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(keyvalue); | |||
if (olpeEntity == null) | |||
{ | |||
return Success("当前课程不存在!"); | |||
} | |||
//当前学员本学期是否有报名课程:每学期一门 | |||
//var sslleEntity = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(loginUserInfo.enCode, ""); | |||
//if (sslleEntity != null) | |||
//{ | |||
// if (sslleEntity.OLPEId != keyvalue && sslleEntity.Status != 3) | |||
// { | |||
// return Success("已存在报名课程,每学期只能选择一门选修课!如需报名其他课程请先取消。"); | |||
// } | |||
// if (sslleEntity.Status == 1) | |||
// { | |||
// return Success("报名审核中,请耐心等待!"); | |||
// } | |||
// else if (sslleEntity.Status == 2) | |||
// { | |||
// return Success("已存在报名成功的课程,只能选择一门选修课!"); | |||
// } | |||
//} | |||
//else | |||
//{ | |||
// //所选课程的报名人数是否已满 | |||
// var aa = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineListByOLPEId(keyvalue); | |||
// var aaa = aa.Count(x => x.Status == 1 || x.Status == 2); | |||
// if (aaa >= olpeEntity.StuNumMax) | |||
// { | |||
// return Success("当前课程报名人数已满,请选择其他课程!"); | |||
// } | |||
//} | |||
//每学期两门(几门根据系统配置文件值确定) | |||
var sslleEntity = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(loginUserInfo.enCode, keyvalue); | |||
if (sslleEntity != null) | |||
{ | |||
if (sslleEntity.Status == 1) | |||
{ | |||
return Success("当前课程报名审核中,请耐心等待!"); | |||
} | |||
else if (sslleEntity.Status == 2) | |||
{ | |||
return Success("当前课程已报名成功!"); | |||
} | |||
} | |||
else | |||
{ | |||
//所选课程的报名人数是否已满 | |||
var aa = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineListByOLPEId(keyvalue); | |||
var aaa = aa.Count(x => x.Status == 1 || x.Status == 2); | |||
if (aaa >= olpeEntity.StuNumMax) | |||
{ | |||
return Success("当前课程报名人数已满,请选择其他课程!"); | |||
} | |||
//每学期最多两门 | |||
var sslleList = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineListByStuNo(loginUserInfo.enCode); | |||
var sslleListOfNow = sslleList.Where(x => x.AcademicYearNo == olpeEntity.AcademicYearNo && x.Semester == olpeEntity.Semester); | |||
var sslleListOfNow1 = sslleListOfNow.Where(x => x.Status == 1 || x.Status == 2); | |||
//if (sslleListOfNow1.Count() >= 2) | |||
if (sslleListOfNow1.Count() >= Config.GetValue("OnlineElectiveLessonApplyMax").ToInt()) | |||
{ | |||
return Success("每学期最多选择" + Config.GetValue("OnlineElectiveLessonApplyMax").ToInt() + "门线上选修课!"); | |||
} | |||
//相同时间不能报名 | |||
if (!string.IsNullOrEmpty(olpeEntity.LessonSection) && sslleListOfNow1.Where(x => x.LessonSection == olpeEntity.LessonSection).Any()) | |||
{ | |||
//相同时间不能报名 | |||
return Success("本学期此时间段已有报名的选修课!"); | |||
} | |||
} | |||
return Fail("正在提交,请等待!"); | |||
} | |||
/// <summary> | |||
/// 取消报名 | |||
/// </summary> | |||
/// <param name="keyvalue"></param> | |||
/// <returns></returns> | |||
public ActionResult CancelApply(string keyvalue) | |||
{ | |||
var loginUserInfo = LoginUserInfo.Get(); | |||
//学员信息 | |||
var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(loginUserInfo.enCode); | |||
if (stuInfoBasicEntity == null) | |||
{ | |||
return Fail("当前学员不存在!"); | |||
} | |||
//课程信息 | |||
var olpeEntity = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(keyvalue); | |||
if (olpeEntity == null) | |||
{ | |||
return Fail("当前课程不存在!"); | |||
} | |||
//当前学员是否已经报名该课程 | |||
var sslleEntity = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(loginUserInfo.enCode, keyvalue); | |||
if (sslleEntity != null) | |||
{ | |||
if (sslleEntity.Status != 2) | |||
{ | |||
stuSelectLessonListOfElectiveOnlineIBLL.DeleteEntity(sslleEntity.Id); | |||
return Success("取消成功"); | |||
} | |||
else | |||
{ | |||
return Fail("取消失败,当前课程已报名成功!"); | |||
} | |||
} | |||
else | |||
{ | |||
return Fail("当前课程未报名,无需取消!"); | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -44,6 +44,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult StuScoreQueryIndexRow() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult Monitor() | |||
{ | |||
@@ -266,6 +272,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 全院成绩缓考 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult SlowIndex() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -835,7 +852,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
data = data.OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonSortNo).ThenBy(x => x.LessonNo); | |||
} | |||
return Success(data); | |||
} | |||
@@ -1193,6 +1209,20 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("操作成功"); | |||
} | |||
/// <summary> | |||
/// 缓考 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="status">缓考:1;取消缓考:0;</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoSlow(string keyValue, int status) | |||
{ | |||
stuScoreIBLL.DoSlow(keyValue, status); | |||
return Success("操作成功"); | |||
} | |||
#endregion | |||
@@ -163,6 +163,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 全院补考成绩缓考 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult SlowIndex() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -714,6 +724,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public string label { get; set; } | |||
public string name { get; set; } | |||
} | |||
/// <summary> | |||
/// 缓考 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="status">缓考:1;取消缓考:0;</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoSlow(string keyValue, int status) | |||
{ | |||
stuScoreNotPassIBLL.DoSlow(keyValue, status); | |||
return Success("操作成功"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -68,6 +69,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 初始化线上课程成绩 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult InitScoreForm() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -123,6 +133,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取选课情况里的课程信息 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetSelectLessonInfo(string academicYearNo, string semester) | |||
{ | |||
var Data = stuSelectLessonListOfElectiveOnlineIBLL.GetSelectLessonInfo(academicYearNo, semester).OrderBy(x => x.LessonNo); | |||
return Success(Data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -233,12 +256,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
if (aa == 1)//是 | |||
{ | |||
//判断选课的课程的报名人数是否已满 | |||
if (olpeEntity.StuNum >= olpeEntity.StuNumMax) | |||
if (olpeEntity.StuNum.HasValue && olpeEntity.StuNum.Value >= olpeEntity.StuNumMax) | |||
{ | |||
return Fail("当前选课的课程人数已满!"); | |||
} | |||
//选课的课程报名人数加1 | |||
olpeEntity.StuNum = olpeEntity.StuNum + 1; | |||
olpeEntity.StuNum = olpeEntity.StuNum.HasValue ? olpeEntity.StuNum.Value + 1 : 1; | |||
lessonInfoOfElectiveOnlineIBLL.SaveEntity(olpeEntity.Id, olpeEntity); | |||
//报名成功 | |||
sslleEntity.Status = 2; | |||
@@ -253,6 +276,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
stuSelectLessonListOfElectiveOnlineIBLL.SaveEntity(keyValue, sslleEntity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 初始化线上课程成绩 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoInitScore(StuSelectLessonListOfElectiveOnlineEntity entity) | |||
{ | |||
stuSelectLessonListOfElectiveOnlineIBLL.DoInitScore(entity); | |||
return Success("初始化成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -14,7 +14,6 @@ var bootstrap = function ($, learun) { | |||
var ClassNo = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
@@ -69,6 +68,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
page.initGird(); | |||
} | |||
}.bind(this), "json"); | |||
$('#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: '请选择教师' }); | |||
@@ -105,6 +111,8 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StartTime = datebegin; | |||
param.EndTime = dateend; | |||
var loginInfo = learun.clientdata.get(['userinfo']); | |||
@@ -13,7 +13,6 @@ var bootstrap = function ($, learun) { | |||
var dateend = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
@@ -68,6 +67,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
page.initGird(); | |||
} | |||
}.bind(this), "json"); | |||
//课程 | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder:'请选择课程' }); | |||
}, | |||
@@ -98,6 +104,8 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StartTime = datebegin; | |||
param.EndTime = dateend; | |||
var loginInfo = learun.clientdata.get(['userinfo']); | |||
@@ -48,4 +48,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js") |
@@ -11,7 +11,6 @@ var bootstrap = function ($, learun) { | |||
var logend = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
@@ -40,7 +39,6 @@ var bootstrap = function ($, learun) { | |||
selectfn: function (begin, end) { | |||
logbegin = begin; | |||
logend = end; | |||
page.search(); | |||
} | |||
}); | |||
@@ -67,6 +65,14 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
page.initGird(); | |||
} | |||
}.bind(this), "json"); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -138,8 +144,14 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StartTime = logbegin; | |||
param.EndTime = logend; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -48,4 +48,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js") |
@@ -14,7 +14,6 @@ var bootstrap = function ($, learun) { | |||
var ClassNo = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
@@ -78,6 +77,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
page.initGird(); | |||
} | |||
}.bind(this), "json"); | |||
//课程 | |||
//$('#LessonNo').lrselect({ | |||
// placeholder: "请选择课程", | |||
@@ -119,9 +125,14 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StartTime = datebegin; | |||
param.EndTime = dateend; | |||
//console.log(param); | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -48,4 +48,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js") |
@@ -14,7 +14,6 @@ var bootstrap = function ($, learun) { | |||
var ClassNo = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
@@ -78,6 +77,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
page.initGird(); | |||
} | |||
}.bind(this), "json"); | |||
//课程 | |||
//$('#LessonNo').lrselect({ | |||
// placeholder: "请选择课程", | |||
@@ -121,9 +127,14 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StartTime = datebegin; | |||
param.EndTime = dateend; | |||
console.log(param); | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -11,9 +11,17 @@ | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="ImportDeptNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" id="ExamTimeDiv" > | |||
<div class="lr-form-item-title">考试时长(分钟)</div> | |||
<input id="ExamTime" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js") |
@@ -31,7 +31,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
}, | |||
initData: function () { | |||
if (type == 1) { | |||
@@ -49,7 +55,8 @@ var bootstrap = function ($, learun) { | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet(), | |||
ExamTime: $('#ExamTime').val() | |||
ExamTime: $('#ExamTime').val(), | |||
ImportDeptNo: $("#ImportDeptNo").lrselectGet() | |||
}; | |||
//从开课计划导入 | |||
if (type == 1) { | |||
@@ -26,6 +26,10 @@ | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">是否启用</div> | |||
<div id="ELEnabled"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -54,4 +58,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js") |
@@ -30,6 +30,15 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
} | |||
}.bind(this), "json"); | |||
$('#ELEnabled').lrDataItemSelect({ | |||
code: "YesOrNoBit" | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -258,7 +267,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "是否启用", name: "ELEnabled", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
return cellvalue == 1 ? "<span class=\"label label-success\">是</span>" : "<span class=\"label label-default\" >否</span>"; | |||
} | |||
}, | |||
], | |||
@@ -271,6 +280,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -11,6 +11,10 @@ | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="ImportDeptNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">排考名称<font face="宋体">*</font></div> | |||
<input id="PlanName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -36,4 +40,8 @@ | |||
<input id="EPOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js") |
@@ -30,6 +30,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
$('#PlanType').lrDataItemSelect({ code: 'StudentType' }); | |||
$('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
@@ -82,4 +82,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js") |
@@ -160,18 +160,19 @@ var bootstrap = function ($, learun) { | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
var PlanName = $('#gridtable').jfGridValue('PlanName'); | |||
if (learun.checkrow(keyValue)) | |||
if (learun.checkrow(keyValue)) { | |||
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate'); | |||
if (EPGenarate == true) { | |||
return learun.alert.warning("选中记录已生成排考名单!"); | |||
if (EPGenarate == true) { | |||
return learun.alert.warning("选中记录已生成排考名单!"); | |||
} | |||
learun.frameTab.open({ | |||
F_ModuleId: keyValue, | |||
F_Icon: 'fa magic', | |||
F_FullName: PlanName + '--安排考试', | |||
F_UrlAddress: '/EducationalAdministration/Exam_ExamPlanLesson/Index?EPId=' + keyValue | |||
}); | |||
} | |||
learun.frameTab.open({ | |||
F_ModuleId: keyValue, | |||
F_Icon: 'fa magic', | |||
F_FullName: PlanName + '--安排考试', | |||
F_UrlAddress: '/EducationalAdministration/Exam_ExamPlanLesson/Index?EPId=' + keyValue | |||
}); | |||
}); | |||
}); | |||
//一键安排课程 | |||
$('#lr_examlesson').on('click', | |||
function () { | |||
@@ -345,6 +346,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -95,11 +95,14 @@ var bootstrap = function ($, learun) { | |||
if (data[id].EmpNo && (data[id].EmpNo).indexOf(',') != -1) { | |||
var empnoArr = data[id].EmpNo.split(','); | |||
var empnameArr = data[id].EmpName.split(','); | |||
$.each(empnoArr, function (i, val) { | |||
if (!!val) { | |||
tempdatra.push({ EmpNo: val, EmpName: empnameArr[i] }); | |||
} | |||
}); | |||
$.each(empnoArr, | |||
function(i, val) { | |||
if (!!val) { | |||
tempdatra.push({ EmpNo: val, EmpName: empnameArr[i] }); | |||
} | |||
}); | |||
} else { | |||
tempdatra.push({ EmpNo: data[id].EmpNo, EmpName: data[id].EmpName }); | |||
} | |||
$('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra); | |||
} | |||
@@ -11,6 +11,10 @@ | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="ImportDeptNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item SeatClass" data-table="Exam_ExamRoom"> | |||
<div class="lr-form-item-title">座位行数<font face="宋体">*</font></div> | |||
<input id="SeatRows" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" /> | |||
@@ -20,4 +24,8 @@ | |||
<input id="SeatColumns" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" /> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.js") |
@@ -31,6 +31,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
}, | |||
initData: function () { | |||
@@ -26,6 +26,10 @@ | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">是否启用</div> | |||
<div id="EREnabled"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -52,4 +56,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js") |
@@ -30,6 +30,15 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
} | |||
}.bind(this), "json"); | |||
$('#EREnabled').lrDataItemSelect({ | |||
code: "YesOrNoBit" | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -173,7 +182,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "是否启用", name: "EREnabled", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
return cellvalue == 1 ? "<span class=\"label label-success\">是</span>" : "<span class=\"label label-default\" >否</span>"; | |||
} | |||
}, | |||
], | |||
@@ -186,6 +195,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -11,9 +11,17 @@ | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="ImportDeptNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">考试类型</div> | |||
<div id="ESType"></div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.js") |
@@ -30,6 +30,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||
} | |||
}; | |||
@@ -41,7 +48,8 @@ var bootstrap = function ($, learun) { | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet(), | |||
ESType: $('#ESType').lrselectGet() | |||
ESType: $('#ESType').lrselectGet(), | |||
ImportDeptNo: $("#ImportDeptNo").lrselectGet() | |||
}; | |||
learun.layerConfirm('是否确认清空!', function (res) { | |||
if (res) { | |||
@@ -11,9 +11,17 @@ | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="ImportDeptNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||
<div class="lr-form-item-title">考试类型<font face="宋体">*</font></div> | |||
<div id="ESType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.js") |
@@ -31,6 +31,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||
}, | |||
initData: function () { | |||
@@ -56,7 +63,8 @@ var bootstrap = function ($, learun) { | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet(), | |||
ESType: $('#ESType').lrselectGet() | |||
ESType: $('#ESType').lrselectGet(), | |||
ImportDeptNo: $("#ImportDeptNo").lrselectGet() | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/ImportTable?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
@@ -18,22 +18,30 @@ | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">年级</div> | |||
<input id="Grade" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学生学号</div> | |||
<input id="StuNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学生名称</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考试类型</div> | |||
<div id="ESType"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">是否启用</div> | |||
<div id="ESEnabled"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -60,4 +68,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js") |
@@ -30,6 +30,15 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
} | |||
}.bind(this), "json"); | |||
$('#ESEnabled').lrDataItemSelect({ | |||
code: "YesOrNoBit" | |||
}); | |||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
@@ -194,7 +203,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "是否启用", name: "ESEnabled", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
return cellvalue == 1 ? "<span class=\"label label-success\">是</span>" : "<span class=\"label label-default\" >否</span>"; | |||
} | |||
}, | |||
], | |||
@@ -208,6 +217,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -11,5 +11,13 @@ | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="ImportDeptNo"></div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.js") |
@@ -31,6 +31,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
}, | |||
initData: function () { | |||
@@ -55,7 +62,8 @@ var bootstrap = function ($, learun) { | |||
} | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet() | |||
Semester: $('#Semester').lrselectGet(), | |||
ImportDeptNo: $("#ImportDeptNo").lrselectGet() | |||
}; | |||
//导入 | |||
if (type == 1) { | |||
@@ -10,22 +10,26 @@ | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">教师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">教师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">是否启用</div> | |||
<div id="ITEnabled"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -51,4 +55,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.js") |
@@ -32,6 +32,15 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
} | |||
}.bind(this), "json"); | |||
$('#ITEnabled').lrDataItemSelect({ | |||
code: "YesOrNoBit" | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', | |||
function () { | |||
@@ -196,7 +205,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "是否启用", name: "ITEnabled", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
return cellvalue == 1 ? "<span class=\"label label-success\">是</span>" : "<span class=\"label label-default\" >否</span>"; | |||
} | |||
}, | |||
], | |||
@@ -209,6 +218,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -175,8 +175,7 @@ var bootstrap = function ($, learun) { | |||
$('#Semester').lrselectSet(Semester); | |||
var param = { "AcademicYearNo": data.AcademicYearShort, "Semester": data.Semester }; | |||
//todo:等待最后解除注释 | |||
//page.search(param); | |||
page.search(param); | |||
} | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
@@ -264,7 +263,7 @@ var bootstrap = function ($, learun) { | |||
isMultiselect: true, | |||
sidx: 'AcademicYearNo DESC, Semester DESC, LessonNo ASC,EmpNo ASC' | |||
}); | |||
page.search(); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
@@ -273,7 +272,8 @@ var bootstrap = function ($, learun) { | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
var param = { "AcademicYearNo": $('#AcademicYearNo').lrselectGet(), "Semester": $('#Semester').lrselectGet() }; | |||
page.search(param); | |||
}; | |||
page.init(); | |||
} |
@@ -74,8 +74,6 @@ var bootstrap = function ($, learun) { | |||
location.reload(); | |||
}); | |||
//todo:待一个个查看 | |||
// 报名 | |||
$('#lr_apply').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
@@ -92,7 +90,7 @@ var bootstrap = function ($, learun) { | |||
_postData.keyValue = keyValue; | |||
_postData.StuNo = learun.clientdata.get(['userinfo']).enCode; | |||
$.ajax({ | |||
url: WebApiUrl + '/Learun/LessonInfoOfElectiveOnlineStudent/SignIn', | |||
url: WebApiUrl + '/Learun/LessonInfoOfElectiveOnline/SignIn', | |||
data: _postData, | |||
type: "POST", | |||
dataType: "json", | |||
@@ -142,6 +140,15 @@ var bootstrap = function ($, learun) { | |||
$('#lr_cancel').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var Status = $('#gridtable').jfGridValue('Status'); | |||
if (Status == "2") {//报名成功 | |||
learun.alert.warning("当前课程已报名成功,无法取消!"); | |||
return false; | |||
} | |||
if (Status != "1") {//审核中 | |||
learun.alert.warning("当前课程未报名或者报名失败,无法取消!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认取消报名该课程!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/CancelApply', { keyValue: keyValue }, function () { | |||
@@ -183,7 +190,7 @@ var bootstrap = function ($, learun) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-primary\">审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\">已报名</span>'; | |||
return '<span class=\"label label-success\">报名成功</span>'; | |||
} else if (cellvalue == 3) { | |||
return '<span class=\"label label-warning\">报名失败</span>'; | |||
} else { | |||
@@ -21,6 +21,18 @@ | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<label>应修学分总计:</label> | |||
<span id="spanstudyscoreall">0</span> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<label>已取得学分:</label> | |||
<span id="spanstudyscore">0</span> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
@@ -79,7 +79,8 @@ var bootstrap = function ($, learun) { | |||
{ label: '班级', name: 'ClassName', width: 100, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 50, align: "left" }, | |||
{ label: '科目类型', name: 'LessonSortName', width: 60, align: "left" }, | |||
{ label: '课程分类', name: 'LessonSortName', width: 60, align: "left" }, | |||
{ label: '课程类型', name: 'LessonTypeName', width: 100, align: "left" }, | |||
{ label: '科目', name: 'LessonName', width: 300, align: "left" }, | |||
{ label: '学分', name: 'StudyScore', width: 50, align: "left" }, | |||
{ label: '成绩', name: 'Score', width: 100, align: "left" }, | |||
@@ -92,6 +93,22 @@ var bootstrap = function ($, learun) { | |||
isPage: false, | |||
sidx: '', | |||
sord: '', | |||
onRenderComplete: function (data) { | |||
var studyscoreall = 0; | |||
var studyscore = 0; | |||
for (var i = 0; i < data.length; i++) { | |||
if (!!data[i].LessonSortNo && data[i].LessonSortNo == "1") { | |||
if (!!data[i].StudyScore) { | |||
studyscoreall += data[i].StudyScore; | |||
} | |||
} | |||
if (!!data[i].Score && data[i].Score >= 60) { | |||
studyscore += data[i].StudyScore; | |||
} | |||
} | |||
$("#spanstudyscoreall").html(studyscoreall + 10); | |||
$("#spanstudyscore").html(studyscore); | |||
} | |||
}); | |||
//page.search(); | |||
@@ -112,7 +112,7 @@ var bootstrap = function ($, learun) { | |||
{ label: "年级", name: "Grade", width: 40, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 40, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" } | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" }, | |||
//{ | |||
// label: '课程名称', name: 'LessonNo', width: 150, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -126,6 +126,11 @@ var bootstrap = function ($, learun) { | |||
// }); | |||
// } | |||
//}, | |||
{ | |||
label: '是否缓考', name: 'IsSlow', width: 60, align: "left", formatter: function (cellvalue) { | |||
return cellvalue == true ? "是" : "否"; | |||
} | |||
}, | |||
]; | |||
headDataEdit = [ | |||
{ | |||
@@ -118,7 +118,7 @@ var bootstrap = function ($, learun) { | |||
{ label: "年级", name: "Grade", width: 40, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 40, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" } | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" }, | |||
//{ | |||
// label: '课程名称', name: 'LessonNo', width: 150, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -132,6 +132,11 @@ var bootstrap = function ($, learun) { | |||
// }); | |||
// } | |||
//}, | |||
{ | |||
label: '是否缓考', name: 'IsSlow', width: 60, align: "left", formatter: function (cellvalue) { | |||
return cellvalue == true ? "是" : "否"; | |||
} | |||
}, | |||
]; | |||
headDataEdit = [ | |||
{ | |||
@@ -37,22 +37,23 @@ var bootstrap = function ($, learun) { | |||
learun.alert.warning("请选择班级!"); | |||
return; | |||
} | |||
$.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoData', p, | |||
function (data) { | |||
var temparr = []; | |||
for (var i = 0; i < data.length; i++) { | |||
var item = {}; | |||
item.label = data[i].text; | |||
item.name = data[i].value; | |||
item.width = 150; | |||
item.align = "left"; | |||
temparr.push(item); | |||
} | |||
LessonTemp = temparr; | |||
page.initGird(); | |||
page.search(p); | |||
}); | |||
//$.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoData', { }, | |||
// function (data) { | |||
// var temparr = []; | |||
// for (var i = 0; i < data.length; i++) { | |||
// var item = {}; | |||
// item.label = data[i].text; | |||
// item.name = data[i].value; | |||
// item.width = 150; | |||
// item.align = "left"; | |||
// temparr.push(item); | |||
// } | |||
// LessonTemp = temparr; | |||
// page.initGird(); | |||
// page.search(p); | |||
// }); | |||
page.initGird(); | |||
page.search(p); | |||
}); | |||
// 刷新 | |||
@@ -0,0 +1,66 @@ | |||
@{ ViewBag.Title = "全院学生成绩缓考"; Layout = "~/Views/Shared/_Index.cshtml"; } | |||
<style> | |||
.lr-select { | |||
width: 150px; | |||
} | |||
#LessonNo { | |||
width: 180px; | |||
} | |||
.lr-selectLittle { | |||
width: 80px; | |||
} | |||
/*.lr-layout-tool { | |||
height: 80px; | |||
} | |||
.lr-layout-center .lr-layout-wrap.lr-layout-wrap-notitle { | |||
padding-top: 80px; | |||
}*/ | |||
</style> | |||
<div class="lr-layout"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="selectRow"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="F_SchoolId" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="LessonNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="ClassNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class="btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes" id="btnBox"> | |||
<a id="lr_slow" class="btn btn-default"><i class="fa fa-edit"> 缓考</i></a> | |||
<a id="lr_cancelSlow" class="btn btn-default"><i class="fa fa-edit"> 取消缓考</i></a> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScore/SlowIndex.js") | |||
@@ -0,0 +1,308 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-06-14 11:02 | |||
* 描 述:全院学生成绩缓考 | |||
*/ | |||
var selectedRow; | |||
var refreshGirdData; | |||
var refreshGirdData2; | |||
var judgeSelect; //判断下拉框是否选择 | |||
var headData; //常规列头 | |||
var headDataNoEdit; //不可编辑列头 | |||
var headDataFinally; //最终列头 | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
headData = [ | |||
{ | |||
label: "审核状态", name: "CheckMark", width: 80, align: "center", | |||
formatter: function (cellvalue) { | |||
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||
} | |||
}, | |||
{ label: '学号', name: 'StuNo', width: 100, align: "left" }, | |||
{ label: '姓名', name: 'StuName', width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "GenderNo", width: 40, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "男" : "女"; | |||
} | |||
}, | |||
{ | |||
label: "学习形式", name: "StudyModality", width: 55, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'StudyModality', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "异动类型", name: "MoveType", width: 55, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'StuChangeType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "校区", name: "F_SchoolId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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: "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: "Grade", width: 40, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 40, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" }, | |||
//{ | |||
// label: '课程名称', name: 'LessonNo', width: 150, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', | |||
// key: value, | |||
// keyId: 'lessonno', | |||
// callback: function (_data) { | |||
// callback(_data['lessonname']); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ | |||
label: '是否缓考', name: 'IsSlow', width: 60, align: "left",formatter:function (cellvalue) { | |||
return cellvalue == true ? "是" : "否"; | |||
} | |||
}, | |||
]; | |||
headDataNoEdit = [ | |||
{ | |||
label: '平时成绩', name: 'OrdinaryScore', width: 80, align: "left" | |||
}, | |||
{ | |||
label: '期中成绩', name: 'TermInScore', width: 80, align: "left" | |||
}, | |||
{ | |||
label: '期末成绩', name: 'TermEndScore', width: 80, align: "left" | |||
}, | |||
{ | |||
label: '其他成绩', name: 'OtherScore', width: 80, align: "left" | |||
}, | |||
{ 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_slow').on('click', function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
var keyValue = $('#gridtable').jfGridValue('ScoreId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认缓考该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScore/DoSlow', { keyValue: keyValue, status: 1 }, function () { | |||
refreshGirdData2(); | |||
}); | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
//取消缓考 | |||
$('#lr_cancelSlow').on('click', function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
var keyValue = $('#gridtable').jfGridValue('ScoreId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认取消缓考该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScore/DoSlow', { keyValue: keyValue, status: 0 }, function () { | |||
refreshGirdData2(); | |||
}); | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
}, | |||
bindSelect: function () { | |||
//校区 | |||
$('#F_SchoolId').lrDataSourceSelect({ | |||
code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { } | |||
}); | |||
$('#F_SchoolId').lrselectSet(learun.clientdata.get(['userinfo']).companyId); | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', | |||
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', | |||
select: function (item) { | |||
if (!!item) { | |||
$("#ClassNo").lrselectRefresh({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetClassNoDataOfAll?lessonNo=' + item.value, | |||
value: 'value', | |||
text: 'text', | |||
}); | |||
} | |||
} | |||
}); | |||
//班级 | |||
$('#ClassNo').lrselect({ | |||
placeholder: "请选择班级", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetClassNoDataOfAll', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//绑定学年、学期 | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
} | |||
}.bind(this), "json"); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetList', | |||
headData: headDataFinally, | |||
mainId: 'ScoreId', | |||
isPage: false, | |||
isMultiselect: true, | |||
sidx: 'StuNo', | |||
sord: 'asc' | |||
}); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
}, | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
refreshGirdData2 = function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
page.search(query); | |||
} | |||
}; | |||
judgeSelect = function () { | |||
var $content = $('body').find('.lr-layout-tool-left'); | |||
var query = $content.lrGetFormData(); | |||
if (query.F_SchoolId == null || query.F_SchoolId == "") { | |||
learun.alert.warning("请选择校区!"); | |||
return false; | |||
} | |||
if (query.AcademicYearNo == null || query.AcademicYearNo == "") { | |||
learun.alert.warning("请选择学年!"); | |||
return false; | |||
} | |||
if (query.Semester == null || query.Semester == "") { | |||
learun.alert.warning("请选择学期!"); | |||
return false; | |||
} | |||
if (query.LessonNo == null || query.LessonNo == "") { | |||
learun.alert.warning("请选择课程!"); | |||
return false; | |||
} | |||
if (query.ClassNo == null || query.ClassNo == "") { | |||
learun.alert.warning("请选择班级!"); | |||
return false; | |||
} | |||
return query; | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,35 @@ | |||
@{ ViewBag.Title = "全院学生成绩查看"; Layout = "~/Views/Shared/_Index.cshtml"; } | |||
<style> | |||
.lr-select { | |||
width: 150px; | |||
} | |||
</style> | |||
<div class="lr-layout"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="AcademicYearNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Semester" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
@*<div class=" btn-group btn-group-sm"> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-check-circle"></i> 打印</a> | |||
</div>*@ | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.js") |
@@ -0,0 +1,114 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-06-14 11:02 | |||
* 描 述:全院学生成绩查看 | |||
*/ | |||
var selectedRow; | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
var stuinfo = learun.clientdata.get(['userinfo']).account; | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 查询 | |||
$('#btn_Search').on('click', function () { | |||
var p = {}; | |||
p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
p.Semester = $('#Semester').lrselectGet(); | |||
p.StuNo = stuinfo; | |||
page.search(p); | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//打印 | |||
$('#lr_print').on('click', function () { | |||
var AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
var Semester = $('#Semester').lrselectGet(); | |||
var StuNo = $.trim($('#StuNo').val()); | |||
if (StuNo == null || StuNo == "") { | |||
learun.alert.warning("请输入学号!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'AllStuScoreQueryPrint', | |||
title: '学生成绩单', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/AllStuScoreQueryPrint?StuNo=' + StuNo + '&AcademicYearNo=' + AcademicYearNo + '&Semester=' + Semester, | |||
width: 1200, | |||
height: 800, | |||
btn: null | |||
}); | |||
}); | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "请选择学期", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get({ | |||
url: '/Home/GetYearAndSemesteResult', | |||
dataType:'json', | |||
success: function (ref) { | |||
if (ref.code == 200) { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
setTimeout(page.initGird,1000); | |||
} | |||
} | |||
}); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScoreListByStuInfo', | |||
headData: [ | |||
{ label: '学号', name: 'StuNo', width: 100, align: "left" }, | |||
{ label: '姓名', name: 'StuName', width: 200, align: "left" }, | |||
{ label: '专业', name: 'MajorName', width: 100, align: "left" }, | |||
{ label: '班级', name: 'ClassName', width: 100, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 50, align: "left" }, | |||
{ label: '课程分类', name: 'LessonSortName', width: 60, align: "left" }, | |||
{ label: '课程类型', name: 'LessonTypeName', width: 100, align: "left" }, | |||
{ label: '科目', name: 'LessonName', width: 300, align: "left" }, | |||
{ label: '学分', name: 'StudyScore', width: 50, align: "left" }, | |||
{ label: '成绩', name: 'Score', width: 100, align: "left" }, | |||
{ label: '第一次补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, | |||
{ label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, | |||
{ label: '专业排名', name: 'RankInMajor', width: 100, align: "left" }, | |||
{ label: '班级排名', name: 'RankInClass', width: 100, align: "left" }, | |||
], | |||
mainId: 'StuNo', | |||
isPage: false, | |||
sidx: '', | |||
sord: '', | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StuNo = stuinfo; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -112,7 +112,7 @@ var bootstrap = function ($, learun) { | |||
{ label: "年级", name: "Grade", width: 40, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 40, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" } | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" }, | |||
//{ | |||
// label: '课程名称', name: 'LessonNo', width: 150, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -126,6 +126,11 @@ var bootstrap = function ($, learun) { | |||
// }); | |||
// } | |||
//}, | |||
{ | |||
label: '是否缓考', name: 'IsSlow', width: 60, align: "left", formatter: function (cellvalue) { | |||
return cellvalue == true ? "是" : "否"; | |||
} | |||
}, | |||
]; | |||
headDataEdit = [ | |||
{ | |||
@@ -117,7 +117,7 @@ var bootstrap = function ($, learun) { | |||
{ label: "年级", name: "Grade", width: 40, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 40, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" } | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" }, | |||
//{ | |||
// label: '课程名称', name: 'LessonNo', width: 150, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -131,6 +131,11 @@ var bootstrap = function ($, learun) { | |||
// }); | |||
// } | |||
//}, | |||
{ | |||
label: '是否缓考', name: 'IsSlow', width: 60, align: "left", formatter: function (cellvalue) { | |||
return cellvalue == true ? "是" : "否"; | |||
} | |||
}, | |||
]; | |||
headDataEdit = [ | |||
{ | |||
@@ -0,0 +1,66 @@ | |||
@{ ViewBag.Title = "全院学生补考成绩缓考"; Layout = "~/Views/Shared/_Index.cshtml"; } | |||
<style> | |||
.lr-select { | |||
width: 150px; | |||
} | |||
#LessonNo { | |||
width: 180px; | |||
} | |||
.lr-selectLittle { | |||
width: 80px; | |||
} | |||
/*.lr-layout-tool { | |||
height: 80px; | |||
} | |||
.lr-layout-center .lr-layout-wrap.lr-layout-wrap-notitle { | |||
padding-top: 80px; | |||
}*/ | |||
</style> | |||
<div class="lr-layout"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="selectRow"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="F_SchoolId" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="LessonNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="ClassNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class="btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes" id="btnBox"> | |||
<a id="lr_slow" class="btn btn-default"><i class="fa fa-edit"> 缓考</i></a> | |||
<a id="lr_cancelSlow" class="btn btn-default"><i class="fa fa-edit"> 取消缓考</i></a> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreNotPass/SlowIndex.js") | |||
@@ -0,0 +1,300 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-11-05 15:25 | |||
* 描 述:全院学生补考成绩缓考 | |||
*/ | |||
var selectedRow; | |||
var refreshGirdData; | |||
var refreshGirdData2; | |||
var judgeSelect; //判断下拉框是否选择 | |||
var headData; //常规列头 | |||
var headDataNoEdit; //不可编辑列头 | |||
var headDataFinally; //最终列头 | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
headData = [ | |||
{ | |||
label: "审核状态", name: "CheckMark", width: 80, align: "center", | |||
formatter: function (cellvalue) { | |||
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||
} | |||
}, | |||
{ label: '学号', name: 'StuNo', width: 100, align: "left" }, | |||
{ label: '姓名', name: 'StuName', width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "GenderNo", width: 40, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "男" : "女"; | |||
} | |||
}, | |||
{ | |||
label: "学习形式", name: "StudyModality", width: 55, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'StudyModality', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "异动类型", name: "MoveType", width: 55, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'StuChangeType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "校区", name: "F_SchoolId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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: "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: "Grade", width: 40, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 40, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" }, | |||
//{ | |||
// label: '课程名称', name: 'LessonNo', width: 150, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', | |||
// key: value, | |||
// keyId: 'lessonno', | |||
// callback: function (_data) { | |||
// callback(_data['lessonname']); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ | |||
label: '是否缓考', name: 'IsSlow', width: 60, align: "left", formatter: function (cellvalue) { | |||
return cellvalue == true ? "是" : "否"; | |||
} | |||
}, | |||
]; | |||
headDataNoEdit = [ | |||
{ | |||
label: '期末成绩', name: 'TermEndScore', width: 80, align: "left" | |||
}, | |||
{ 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_slow').on('click', function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
var keyValue = $('#gridtable').jfGridValue('ScoreId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认缓考该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/DoSlow', { keyValue: keyValue, status: 1 }, function () { | |||
refreshGirdData2(); | |||
}); | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
//取消缓考 | |||
$('#lr_cancelSlow').on('click', function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
var keyValue = $('#gridtable').jfGridValue('ScoreId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认取消缓考该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/DoSlow', { keyValue: keyValue, status: 0 }, function () { | |||
refreshGirdData2(); | |||
}); | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
}, | |||
bindSelect: function () { | |||
//校区 | |||
$('#F_SchoolId').lrDataSourceSelect({ | |||
code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { } | |||
}); | |||
$('#F_SchoolId').lrselectSet(learun.clientdata.get(['userinfo']).companyId); | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetAcademicYearNoData', | |||
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/StuScoreNotPass/GetLessonNoDataOfAllWithNo', | |||
value: 'value', | |||
text: 'text', | |||
select: function (item) { | |||
if (!!item) { | |||
$("#ClassNo").lrselectRefresh({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetClassNoDataOfAll?lessonNo=' + item.value, | |||
value: 'value', | |||
text: 'text', | |||
}); | |||
} | |||
} | |||
}); | |||
//班级 | |||
$('#ClassNo').lrselect({ | |||
placeholder: "请选择班级", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetClassNoDataOfAll', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//绑定学年、学期 | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
} | |||
}.bind(this), "json"); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetList', | |||
headData: headDataFinally, | |||
mainId: 'ScoreId', | |||
isPage: false, | |||
isMultiselect: true, | |||
sidx: 'StuNo', | |||
sord: 'asc' | |||
}); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
}, | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
refreshGirdData2 = function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
page.search(query); | |||
} | |||
}; | |||
judgeSelect = function () { | |||
var $content = $('body').find('.lr-layout-tool-left'); | |||
var query = $content.lrGetFormData(); | |||
if (query.F_SchoolId == null || query.F_SchoolId == "") { | |||
learun.alert.warning("请选择校区!"); | |||
return false; | |||
} | |||
if (query.AcademicYearNo == null || query.AcademicYearNo == "") { | |||
learun.alert.warning("请选择学年!"); | |||
return false; | |||
} | |||
if (query.Semester == null || query.Semester == "") { | |||
learun.alert.warning("请选择学期!"); | |||
return false; | |||
} | |||
if (query.LessonNo == null || query.LessonNo == "") { | |||
learun.alert.warning("请选择课程!"); | |||
return false; | |||
} | |||
if (query.ClassNo == null || query.ClassNo == "") { | |||
learun.alert.warning("请选择班级!"); | |||
return false; | |||
} | |||
return query; | |||
}; | |||
page.init(); | |||
} |
@@ -457,13 +457,13 @@ var bootstrap = function ($, learun) { | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetLessonNoDataOfAllWithNo', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetLessonNoDataWithNo', | |||
value: 'value', | |||
text: 'text', | |||
select: function (item) { | |||
if (!!item) { | |||
$("#ClassNo").lrselectRefresh({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetClassNoDataOfAll?lessonNo=' + item.value, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetClassNoData?lessonNo=' + item.value, | |||
value: 'value', | |||
text: 'text', | |||
}); | |||
@@ -474,7 +474,7 @@ var bootstrap = function ($, learun) { | |||
$('#ClassNo').lrselect({ | |||
placeholder: "请选择班级", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetClassNoDataOfAll', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetClassNoData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
@@ -0,0 +1,122 @@ | |||
@{ ViewBag.Title = "全院学生线上成绩录入"; Layout = "~/Views/Shared/_Index.cshtml"; } | |||
<style> | |||
.lr-select { | |||
width: 150px; | |||
} | |||
#LessonNo { | |||
width: 180px; | |||
} | |||
.lr-selectLittle { | |||
width: 80px; | |||
} | |||
.lr-layout-tool { | |||
height: 80px; | |||
} | |||
.lr-layout-center .lr-layout-wrap.lr-layout-wrap-notitle { | |||
padding-top: 80px; | |||
} | |||
.divRow { | |||
position: absolute; | |||
width: 100%; | |||
height: 55px; | |||
top: 0; | |||
left: 0; | |||
} | |||
.scaleRow { | |||
top: 55px; | |||
padding: 2px 10px; | |||
height: 25px; | |||
} | |||
.scaleRow .timeBox { | |||
float: right; | |||
padding-right: 30px; | |||
} | |||
.scaleRow .tipBox { | |||
display: inline-block; | |||
color: #ff0000; | |||
margin-left: 10px; | |||
} | |||
#addMinutesBtn { | |||
display: inline-block; | |||
cursor: pointer; | |||
background-color: blue; | |||
color: #fff; | |||
padding: 1px 5px; | |||
border-radius: 4px; | |||
} | |||
</style> | |||
<div class="lr-layout"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="selectRow divRow"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="F_SchoolId" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="LessonNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="EmpNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class="btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes" id="btnBox"> | |||
<a id="lr_input" class="btn btn-default"><i class="fa fa-edit"> 开始录入</i></a> | |||
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit"> 提交成绩</i></a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 审核</i></a> | |||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 取消审核</i></a> | |||
@*<a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit"> 设置成绩比例</i></a>*@ | |||
<a id="lr_importScore" class="btn btn-default"><i class="fa fa-edit"> 导入更新</i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="scaleRow divRow"> | |||
@*<span>比例设置:</span> | |||
<span>平时成绩占比 <span id="OrdinaryScoreScale">0</span> %,</span> | |||
<span>期中成绩占比 <span id="TermInScoreScale">0</span> %,</span> | |||
<span>期末成绩占比 <span id="TermEndScoreScale">0</span> %,</span> | |||
<span>其他成绩占比 <span id="OtherScoreScale">0</span> %</span>*@ | |||
<div class="tipBox">提示:录入完成后,请务必点击“提交成绩”按钮,避免成绩丢失!</div> | |||
<div class="timeBox" style="display:none;"> | |||
倒计时: | |||
<span id="minutes" data-minutes="30"></span>分钟(<span id="seconds" data-seconds="60"></span>秒) | |||
<div id="addMinutesBtn" data-minutes="30">续时</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreOnline/InputScoreIndex.js") | |||
<script> | |||
var CanInputFlag = "@ViewBag.CanInputFlag"; | |||
if (CanInputFlag != "True") { | |||
top.learun.layerConfirm('当前时间不是线上成绩录入时间!', function (res) {}); | |||
} | |||
</script> |
@@ -0,0 +1,624 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-12 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 rowJson; | |||
var columnJson; | |||
var queryJson; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
headData = [ | |||
{ | |||
label: "审核状态", name: "CheckMark", width: 80, align: "center", | |||
formatter: function (cellvalue) { | |||
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||
} | |||
}, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 40, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" }, | |||
{ | |||
label: "学校名称", name: "F_SchoolId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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: "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: 'StuName', width: 150, align: "left" }, | |||
{ label: '学生学号', name: 'StuNo', width: 100, align: "left" }, | |||
]; | |||
headDataEdit = [ | |||
{ | |||
label: '成绩', name: 'TermEndScore', width: 80, align: "left", | |||
edit: { | |||
type: 'input', | |||
inputType: 'number', | |||
change: function (row, rownum) { | |||
row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(2); | |||
$('#gridtable').jfGridSet('updateRow', rownum); | |||
}, | |||
} | |||
}, | |||
{ label: '最终核定成绩', name: 'Score', width: 80, align: "left" }, | |||
{ | |||
label: '备注', name: 'Remark', width: 100, align: "left", | |||
edit: { | |||
type: 'input', | |||
} | |||
}, | |||
]; | |||
headDataNoEdit = [ | |||
{ | |||
label: '成绩', name: 'TermEndScore', width: 80, align: "left" | |||
}, | |||
{ 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_setScale').on('click', function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetOpenLessonPlanEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data["OpenLessonPlan"] != null) { | |||
if (data["OpenLessonPlan"].IsAllowEdit) { //教务允许成绩录入时编辑比例 | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data["StuSelectLessonList"] != null) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark == 1) { //学生成绩已审核 | |||
learun.alert.warning("学生成绩已审核!"); | |||
return false; | |||
} else { | |||
learun.layerForm({ | |||
id: 'FormOfClass', | |||
title: '班级成绩比例设置', | |||
url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/FormOfClass?F_SchoolId=' + query.F_SchoolId + '&AcademicYearNo=' + query.AcademicYearNo + '&Semester=' + query.Semester + '&LessonNo=' + query.LessonNo + '&ClassNo=' + query.ClassNo, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData2); | |||
} | |||
}); | |||
} | |||
} else { | |||
learun.alert.warning("学生成绩不存在!"); | |||
return false; | |||
} | |||
}); | |||
} else { | |||
learun.alert.warning("学生选课数据不存在!"); | |||
return false; | |||
} | |||
}); | |||
} else { | |||
learun.alert.warning("教务不允许设置成绩比例!"); | |||
return false; | |||
} | |||
} else { | |||
learun.alert.warning("开课计划不存在!"); | |||
return false; | |||
} | |||
}); | |||
} | |||
}); | |||
// 开始录入 | |||
$('#lr_input').on('click', function () { | |||
//提示弹框 | |||
learun.layerConfirm('录入完成后,请务必点击“提交成绩”按钮,避免成绩丢失!', function (res) { | |||
if (res) { | |||
var query = judgeSelect(); | |||
if (query) { | |||
//判断成绩比例是否合理 | |||
//var OrdinaryScoreScale = $('#OrdinaryScoreScale').html(); | |||
//var TermInScoreScale = $('#TermInScoreScale').html(); | |||
//var TermEndScoreScale = $('#TermEndScoreScale').html(); | |||
//var OtherScoreScale = $('#OtherScoreScale').html(); | |||
//var totalScale = Number(OrdinaryScoreScale) + Number(TermInScoreScale) + Number(TermEndScoreScale) + Number(OtherScoreScale); | |||
//if (totalScale !== 100) { | |||
// learun.alert.warning("成绩比例设置不合理!"); | |||
// return false; | |||
//} else { | |||
//判断是否已审核;判断是否被其他教师占用 | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark == 1) { | |||
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/StuScoreOnline/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(); | |||
//显示“倒计时” | |||
$('.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/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark == 1) { | |||
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/StuScoreOnline/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) { | |||
if (res.code == 200) { | |||
//提交成绩:取消占用 | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/SaveInputScoreStatus', { queryJson: JSON.stringify(query) }, function (res) { | |||
if (res.code == 200) { | |||
refreshGirdData2(); | |||
modifyDate = null; | |||
//隐藏“提交成绩”按钮 | |||
$('#lr_save').hide(); | |||
//显示“开始录入”按钮 | |||
$('#lr_input').show(); | |||
//隐藏“倒计时” | |||
$('.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/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark == 1) { | |||
learun.alert.warning("学生成绩已审核!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认审核当前班级的学生成绩!', function (res) { | |||
if (res) { | |||
//审核成绩 | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/DoCheckScore', { queryJson: JSON.stringify(query), checkMark: 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/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark != 1) { | |||
learun.alert.warning("学生成绩未审核!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认去审核当前班级的学生成绩!', function (res) { | |||
if (res) { | |||
//去审核成绩 | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/DoCheckScore', { queryJson: JSON.stringify(query), checkMark: 0 }, function (res) { | |||
if (res.code == 200) { | |||
refreshGirdData2(); | |||
} else { | |||
learun.alert.warning("去审核成绩失败!"); | |||
return false; | |||
} | |||
}); | |||
} | |||
}); | |||
} else { | |||
learun.alert.warning("学生成绩不存在!"); | |||
return false; | |||
} | |||
}); | |||
} | |||
}); | |||
//续时 | |||
$('#addMinutesBtn').on('click', function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
clearInterval(timer); | |||
var addMinutes = $('#addMinutesBtn').attr('data-minutes'); | |||
var newMinutes = addMinutes; | |||
var minutes = $('#minutes').html(); | |||
if (minutes > 0) { | |||
newMinutes = Number(newMinutes) + Number(minutes); | |||
} | |||
$('#minutes').html(newMinutes); | |||
page.countDown(); | |||
//修改服务时间 | |||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { }); | |||
} | |||
}); | |||
//导入更新 | |||
$('#lr_importScore').on('click', function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
//判断成绩比例是否合理 | |||
//var OrdinaryScoreScale = $('#OrdinaryScoreScale').html(); | |||
//var TermInScoreScale = $('#TermInScoreScale').html(); | |||
//var TermEndScoreScale = $('#TermEndScoreScale').html(); | |||
//var OtherScoreScale = $('#OtherScoreScale').html(); | |||
//var totalScale = Number(OrdinaryScoreScale) + Number(TermInScoreScale) + Number(TermEndScoreScale) + Number(OtherScoreScale); | |||
//if (totalScale !== 100) { | |||
// learun.alert.warning("成绩比例设置不合理!"); | |||
// return false; | |||
//} else { | |||
//判断是否已审核;判断是否被其他教师占用 | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark == 1) { | |||
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; | |||
} | |||
} | |||
rowJson = $('#gridtable').jfGridGet('showData'); | |||
if (rowJson.length <= 0) { | |||
learun.alert.warning("查询结果不存在!"); | |||
return false; | |||
} | |||
columnJson = $('#gridtable').jfGridGet('settingInfo').headData; | |||
//条件 | |||
queryJson = query; | |||
learun.layerForm({ | |||
id: 'IndexImport', | |||
title: "导入学生成绩", | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/InputScoreIndexImport?type=0', | |||
width: 600, | |||
height: 400, | |||
maxmin: true, | |||
btn: null, | |||
end: function () { | |||
refreshGirdData2(); | |||
} | |||
}); | |||
} else { | |||
learun.alert.warning("学生成绩不存在!"); | |||
return false; | |||
} | |||
}); | |||
//} | |||
} | |||
}); | |||
}, | |||
bindSelect: function () { | |||
//校区 | |||
$('#F_SchoolId').lrDataSourceSelect({ | |||
code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { } | |||
}); | |||
$('#F_SchoolId').lrselectSet(learun.clientdata.get(['userinfo']).companyId); | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetAcademicYearNoData', | |||
value: 'value', | |||
text: 'text', | |||
select: function (item) { | |||
if (!!item) { | |||
$("#LessonNo").lrselectRefresh({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetLessonNoDataOfAllWithNo?AcademicYearShort=' + item.value + '&Semester=' + $('#Semester').lrselectGet(), | |||
}); | |||
} | |||
} | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetSemesterData', | |||
value: 'value', | |||
text: 'text', | |||
select: function (item) { | |||
if (!!item) { | |||
$("#LessonNo").lrselectRefresh({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetLessonNoDataOfAllWithNo?AcademicYearShort=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + item.value, | |||
}); | |||
} | |||
} | |||
}); | |||
//课程 | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetLessonNoDataOfAllWithNo', | |||
value: 'value', | |||
text: 'text', | |||
select: function (item) { | |||
if (!!item) { | |||
$("#EmpNo").lrselectRefresh({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetEmpNoDataOfAll?lessonNo=' + item.value + '&AcademicYearShort=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + $('#Semester').lrselectGet(), | |||
}); | |||
} | |||
} | |||
}); | |||
//教师 | |||
$('#EmpNo').lrselect({ | |||
placeholder: "请选择教师", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetEmpNoDataOfAll', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//绑定学年、学期 | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
} | |||
}.bind(this), "json"); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetList', | |||
headData: headDataFinally, | |||
mainId: 'ScoreId', | |||
isPage: false, | |||
sidx: 'StuNo', | |||
sord: 'asc' | |||
}); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
}, | |||
searchScale: function (param) { | |||
param = param || {}; | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(param), function (data) { | |||
if (data["StuSelectLessonList"] != null) { | |||
var ssll = data["StuSelectLessonList"]; | |||
$('#OrdinaryScoreScale').html(ssll.OrdinaryScoreScale > 0 ? ssll.OrdinaryScoreScale : 0); | |||
$('#TermInScoreScale').html(ssll.TermInScoreScale > 0 ? ssll.TermInScoreScale : 0); | |||
$('#TermEndScoreScale').html(ssll.TermEndScoreScale > 0 ? ssll.TermEndScoreScale : 0); | |||
$('#OtherScoreScale').html(ssll.OtherScoreScale > 0 ? ssll.OtherScoreScale : 0); | |||
} else { | |||
$('#OrdinaryScoreScale').html(0); | |||
$('#TermInScoreScale').html(0); | |||
$('#TermEndScoreScale').html(0); | |||
$('#OtherScoreScale').html(0); | |||
} | |||
}); | |||
}, | |||
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/StuScoreOnline/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) { | |||
}); | |||
}, 300000); | |||
}, | |||
}; | |||
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 () { | |||
if (CanInputFlag != "True") { | |||
top.learun.layerConfirm('当前时间不是线上成绩录入时间!', function (res) { }); | |||
return false; | |||
} | |||
var $content = $('body').find('.lr-layout-tool-left'); | |||
var query = $content.lrGetFormData(); | |||
if (query.F_SchoolId == null || query.F_SchoolId == "") { | |||
learun.alert.warning("请选择校区!"); | |||
return false; | |||
} | |||
if (query.AcademicYearNo == null || query.AcademicYearNo == "") { | |||
learun.alert.warning("请选择学年!"); | |||
return false; | |||
} | |||
if (query.Semester == null || query.Semester == "") { | |||
learun.alert.warning("请选择学期!"); | |||
return false; | |||
} | |||
if (query.LessonNo == null || query.LessonNo == "") { | |||
learun.alert.warning("请选择课程!"); | |||
return false; | |||
} | |||
if (query.EmpNo == null || query.EmpNo == "") { | |||
learun.alert.warning("请选择教师!"); | |||
return false; | |||
} | |||
return query; | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,27 @@ | |||
@{ | |||
ViewBag.Title = "Form"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<link href="~/Content/webuploader/webuploader.css" rel="stylesheet" /> | |||
<script src="~/Content/webuploader/webuploader.nolog.min.js"></script> | |||
@Html.AppendCssFile("/Areas/LR_SystemModule/Views/ExcelImport/ImportForm.css") | |||
@*线上成绩录入导入*@ | |||
<div class="lr-form-layout lr-form-layout-top-bottom"> | |||
<div class="lr-form-layout-header"> | |||
<div id="lr_add_file_btn"><i class="fa fa-cloud-upload"></i><span class="lrlt">上传文件</span></div> | |||
<div class="webuploader-pick" id="lr_down_file_btn"><i class="fa fa-download"></i><span class="lrlt">下载模板</span></div> | |||
</div> | |||
<div class="lr-form-layout-body"> | |||
<div class="lr-form-file-queue-wrap" id="lr_form_file_queue"> | |||
<div class="lr-form-file-queue" id="lr_form_file_queue_list"> | |||
</div> | |||
<div class="lr-form-file-queue-bg"> | |||
<h1><span class="lrlt">试试将电脑里的文件拖拽到此上传</span></h1> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreOnline/InputScoreIndexImport.js") |
@@ -0,0 +1,195 @@ | |||
/* | |||
* 描 述:附件上传管理 | |||
*/ | |||
var gridId = request('gridtable'); | |||
var type = request('type');//1:成绩录入;2:选修成绩录入 | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var fileInfo = {}; | |||
// 触发合并文件碎片 | |||
var mergeFileChunks = function (file) { | |||
var param = {}; | |||
param['type'] = type; | |||
param['__RequestVerificationToken'] = $.lrToken; | |||
param['fileGuid'] = fileInfo[file.id].fileGuid; | |||
param['fileName'] = fileInfo[file.id].name; | |||
param['chunks'] = fileInfo[file.id].chunks; | |||
var queryJson = JSON.stringify(learun.frameTab.currentIframe().queryJson); | |||
param['queryJson'] = queryJson; | |||
learun.httpAsyncPost(top.$.rootUrl + "/EducationalAdministration/StuScoreOnline/ExecuteImportExcel", param, function (res) { | |||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||
$fileItem.find('.lr-uploader-progress').remove(); | |||
if (res.code == learun.httpCode.success) { | |||
if (res.data.Success != '0') { | |||
learun.alert.success('导入成功' + res.data.Success + '条'); | |||
} | |||
// 文件保存成功后 | |||
$fileItem.append('<div class="lr-msg2"><span>' + res.data.Success + '</span><span>/</span><span style="color:#b94a48;" >' + res.data.Fail + '</span></div>'); | |||
// 如果有失败 | |||
if (res.data.Fail != '0') { | |||
learun.download({ url: top.$.rootUrl + '/LR_SystemModule/ExcelImport/DownImportErrorFile', param: { fileId: fileInfo[file.id].fileGuid, fileName: fileInfo[file.id].name, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||
} | |||
} | |||
else { | |||
learun.alert.error(res.info); | |||
$fileItem.append('<div class="lr-msg"><i class="fa fa-exclamation-circle"></i></div>'); | |||
} | |||
}); | |||
} | |||
// 触发清楚文件碎片 | |||
var reomveFileChunks = function (file) { | |||
var param = {}; | |||
param['__RequestVerificationToken'] = $.lrToken; | |||
param['fileGuid'] = fileInfo[file.id].fileGuid; | |||
param['chunks'] = fileInfo[file.id].chunks; | |||
learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/Annexes/MergeAnnexesFile", param, function (res) { }); | |||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||
$fileItem.find('.lr-uploader-progress').remove(); | |||
$fileItem.append('<div class="lr-msg"><i class="fa fa-exclamation-circle"></i></div>'); | |||
} | |||
// 删除文件 | |||
var DeleteFile = function (fileId) { | |||
var param = {}; | |||
param['__RequestVerificationToken'] = $.lrToken; | |||
param['fileId'] = fileInfo[fileId].fileGuid; | |||
learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/Annexes/DeleteAnnexesFile", param, function (res) { }); | |||
var file = page.uploader.getFile(fileId); | |||
if (!!file) { | |||
page.uploader.removeFile(file); | |||
} | |||
delete fileInfo[fileId]; | |||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + fileId); | |||
$fileItem.remove(); | |||
if ($('#lr_form_file_queue_list>div').length == 0) { | |||
$('#lr_form_file_queue .lr-form-file-queue-bg').show(); | |||
} | |||
} | |||
var page = { | |||
uploader: null, | |||
init: function () { | |||
if (!WebUploader.Uploader.support()) { | |||
alert('Web Uploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器'); | |||
throw new Error('WebUploader does not support the browser you are using.'); | |||
} | |||
/*导入模板下载*/ | |||
$('#lr_down_file_btn').on('click', function () { | |||
var columnJson = learun.frameTab.currentIframe().columnJson; | |||
columnJson = JSON.stringify(columnJson.filter(item => item.name !== 'TermEndScore')); | |||
var rowJson = JSON.stringify(learun.frameTab.currentIframe().rowJson); | |||
var fileName = "线上成绩录入数据"; | |||
//if (type == '2') { | |||
// fileName = "选修成绩录入数据"; | |||
//} | |||
//else if (type == '3') { | |||
// fileName = "补考成绩录入"; | |||
//} | |||
//else if (type == '4') { | |||
// fileName = "二次补考成绩录入"; | |||
//} | |||
learun.download({ | |||
method: "POST", | |||
url: '/EducationalAdministration/StuScoreOnline/ExportExcel', | |||
param: { | |||
fileName: fileName, | |||
columnJson: columnJson, | |||
dataJson: rowJson, | |||
//exportField: String(exportField) | |||
} | |||
}); | |||
}); | |||
page.uploader = WebUploader.create({ | |||
auto: true, | |||
swf: top.$.rootUrl + '/Content/webuploader/Uploader.swf', | |||
// 文件接收服务端。 | |||
server: top.$.rootUrl + "/LR_SystemModule/Annexes/UploadAnnexesFileChunk", | |||
// 选择文件的按钮。可选。 | |||
// 内部根据当前运行是创建,可能是input元素,也可能是flash. | |||
pick: '#lr_add_file_btn', | |||
dnd: '#lr_form_file_queue', | |||
paste: 'document.body', | |||
disableGlobalDnd: true, | |||
accept: { | |||
extensions: "xls,xlsx" | |||
}, | |||
multiple: false, | |||
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传! | |||
resize: false, | |||
// 文件分片上传 | |||
chunked: true, | |||
chunkRetry: 3, | |||
prepareNextFile: true, | |||
chunkSize: '1048576', | |||
// 上传参数 | |||
formData: { | |||
__RequestVerificationToken: $.lrToken | |||
} | |||
}); | |||
page.uploader.on('fileQueued', page.fileQueued); | |||
page.uploader.on('uploadStart', page.uploadStart); | |||
page.uploader.on('uploadBeforeSend', page.uploadBeforeSend); | |||
page.uploader.on('uploadProgress', page.uploadProgress); | |||
page.uploader.on('uploadSuccess', page.uploadSuccess); | |||
page.uploader.on('uploadError', page.uploadError); | |||
page.uploader.on('uploadComplete', page.uploadComplete); | |||
page.uploader.on('error', page.error); | |||
//$('#lr_form_file_queue').mCustomScrollbar({ // 优化滚动条 | |||
// theme: "minimal-dark" | |||
//}); | |||
}, | |||
fileQueued: function (file) {// 文件加载到队列 | |||
fileInfo[file.id] = { name: file.name }; | |||
$('#lr_form_file_queue .lr-form-file-queue-bg').hide(); | |||
// 添加一条文件记录 | |||
var $item = $('<div class="lr-form-file-queue-item" id="lr_filequeue_' + file.id + '" ></div>'); | |||
$item.append('<div class="lr-file-image"><img src="' + top.$.rootUrl + '/Content/images/filetype/' + file.ext + '.png"></div>'); | |||
$item.append('<span class="lr-file-name">' + file.name + '(' + learun.countFileSize(file.size) + ')</span>'); | |||
$('#lr_form_file_queue_list').append($item); | |||
}, | |||
uploadStart: function (file) { | |||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||
$fileItem.append('<div class="lr-uploader-progress"><div class="lr-uploader-progress-bar" style="width:0%;"></div></div>'); | |||
}, | |||
uploadBeforeSend: function (object, data, headers) { | |||
data.chunk = data.chunk || 0; | |||
data.chunks = data.chunks || 1; | |||
fileInfo[data.id].fileGuid = fileInfo[data.id].fileGuid || WebUploader.Base.guid(); | |||
data.fileGuid = fileInfo[data.id].fileGuid; | |||
fileInfo[data.id].chunks = data.chunks; | |||
}, | |||
uploadProgress: function (file, percentage) { | |||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||
$fileItem.find('.lr-uploader-progress-bar').css('width', (percentage * 100 + '%')); | |||
}, | |||
uploadSuccess: function (file, res) { | |||
if (res.code == 200) {// 上传成功 | |||
mergeFileChunks(file); | |||
} | |||
else {// 上传失败 | |||
reomveFileChunks(file); | |||
} | |||
}, | |||
uploadError: function (file, code) { | |||
reomveFileChunks(file); | |||
}, | |||
uploadComplete: function (file) { | |||
}, | |||
error: function (type) { | |||
switch (type) { | |||
case 'Q_TYPE_DENIED': | |||
learun.alert.error('当前文件类型不允许上传'); | |||
break; | |||
}; | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,122 @@ | |||
@{ ViewBag.Title = "全院学生线上成绩录入"; Layout = "~/Views/Shared/_Index.cshtml"; } | |||
<style> | |||
.lr-select { | |||
width: 150px; | |||
} | |||
#LessonNo { | |||
width: 180px; | |||
} | |||
.lr-selectLittle { | |||
width: 80px; | |||
} | |||
.lr-layout-tool { | |||
height: 80px; | |||
} | |||
.lr-layout-center .lr-layout-wrap.lr-layout-wrap-notitle { | |||
padding-top: 80px; | |||
} | |||
.divRow { | |||
position: absolute; | |||
width: 100%; | |||
height: 55px; | |||
top: 0; | |||
left: 0; | |||
} | |||
.scaleRow { | |||
top: 55px; | |||
padding: 2px 10px; | |||
height: 25px; | |||
} | |||
.scaleRow .timeBox { | |||
float: right; | |||
padding-right: 30px; | |||
} | |||
.scaleRow .tipBox { | |||
display: inline-block; | |||
color: #ff0000; | |||
margin-left: 10px; | |||
} | |||
#addMinutesBtn { | |||
display: inline-block; | |||
cursor: pointer; | |||
background-color: blue; | |||
color: #fff; | |||
padding: 1px 5px; | |||
border-radius: 4px; | |||
} | |||
</style> | |||
<div class="lr-layout"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="selectRow divRow"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="F_SchoolId" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="LessonNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="EmpNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class="btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes" id="btnBox"> | |||
<a id="lr_input" class="btn btn-default"><i class="fa fa-edit"> 开始录入</i></a> | |||
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit"> 提交成绩</i></a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 审核</i></a> | |||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 取消审核</i></a> | |||
@*<a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit"> 设置成绩比例</i></a>*@ | |||
<a id="lr_importScore" class="btn btn-default"><i class="fa fa-edit"> 导入更新</i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="scaleRow divRow"> | |||
@*<span>比例设置:</span> | |||
<span>平时成绩占比 <span id="OrdinaryScoreScale">0</span> %,</span> | |||
<span>期中成绩占比 <span id="TermInScoreScale">0</span> %,</span> | |||
<span>期末成绩占比 <span id="TermEndScoreScale">0</span> %,</span> | |||
<span>其他成绩占比 <span id="OtherScoreScale">0</span> %</span>*@ | |||
<div class="tipBox">提示:录入完成后,请务必点击“提交成绩”按钮,避免成绩丢失!</div> | |||
<div class="timeBox" style="display:none;"> | |||
倒计时: | |||
<span id="minutes" data-minutes="30"></span>分钟(<span id="seconds" data-seconds="60"></span>秒) | |||
<div id="addMinutesBtn" data-minutes="30">续时</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreOnline/InputScoreIndexInTeacher.js") | |||
<script> | |||
var CanInputFlag = "@ViewBag.CanInputFlag"; | |||
if (CanInputFlag != "True") { | |||
top.learun.layerConfirm('当前时间不是线上成绩录入时间!', function (res) {}); | |||
} | |||
</script> |
@@ -0,0 +1,624 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-12 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 rowJson; | |||
var columnJson; | |||
var queryJson; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
headData = [ | |||
{ | |||
label: "审核状态", name: "CheckMark", width: 80, align: "center", | |||
formatter: function (cellvalue) { | |||
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||
} | |||
}, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 40, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" }, | |||
{ | |||
label: "学校名称", name: "F_SchoolId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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: "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: 'StuName', width: 150, align: "left" }, | |||
{ label: '学生学号', name: 'StuNo', width: 100, align: "left" }, | |||
]; | |||
headDataEdit = [ | |||
{ | |||
label: '成绩', name: 'TermEndScore', width: 80, align: "left", | |||
edit: { | |||
type: 'input', | |||
inputType: 'number', | |||
change: function (row, rownum) { | |||
row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(2); | |||
$('#gridtable').jfGridSet('updateRow', rownum); | |||
}, | |||
} | |||
}, | |||
{ label: '最终核定成绩', name: 'Score', width: 80, align: "left" }, | |||
{ | |||
label: '备注', name: 'Remark', width: 100, align: "left", | |||
edit: { | |||
type: 'input', | |||
} | |||
}, | |||
]; | |||
headDataNoEdit = [ | |||
{ | |||
label: '成绩', name: 'TermEndScore', width: 80, align: "left" | |||
}, | |||
{ 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_setScale').on('click', function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetOpenLessonPlanEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data["OpenLessonPlan"] != null) { | |||
if (data["OpenLessonPlan"].IsAllowEdit) { //教务允许成绩录入时编辑比例 | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data["StuSelectLessonList"] != null) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark == 1) { //学生成绩已审核 | |||
learun.alert.warning("学生成绩已审核!"); | |||
return false; | |||
} else { | |||
learun.layerForm({ | |||
id: 'FormOfClass', | |||
title: '班级成绩比例设置', | |||
url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/FormOfClass?F_SchoolId=' + query.F_SchoolId + '&AcademicYearNo=' + query.AcademicYearNo + '&Semester=' + query.Semester + '&LessonNo=' + query.LessonNo + '&ClassNo=' + query.ClassNo, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData2); | |||
} | |||
}); | |||
} | |||
} else { | |||
learun.alert.warning("学生成绩不存在!"); | |||
return false; | |||
} | |||
}); | |||
} else { | |||
learun.alert.warning("学生选课数据不存在!"); | |||
return false; | |||
} | |||
}); | |||
} else { | |||
learun.alert.warning("教务不允许设置成绩比例!"); | |||
return false; | |||
} | |||
} else { | |||
learun.alert.warning("开课计划不存在!"); | |||
return false; | |||
} | |||
}); | |||
} | |||
}); | |||
// 开始录入 | |||
$('#lr_input').on('click', function () { | |||
//提示弹框 | |||
learun.layerConfirm('录入完成后,请务必点击“提交成绩”按钮,避免成绩丢失!', function (res) { | |||
if (res) { | |||
var query = judgeSelect(); | |||
if (query) { | |||
//判断成绩比例是否合理 | |||
//var OrdinaryScoreScale = $('#OrdinaryScoreScale').html(); | |||
//var TermInScoreScale = $('#TermInScoreScale').html(); | |||
//var TermEndScoreScale = $('#TermEndScoreScale').html(); | |||
//var OtherScoreScale = $('#OtherScoreScale').html(); | |||
//var totalScale = Number(OrdinaryScoreScale) + Number(TermInScoreScale) + Number(TermEndScoreScale) + Number(OtherScoreScale); | |||
//if (totalScale !== 100) { | |||
// learun.alert.warning("成绩比例设置不合理!"); | |||
// return false; | |||
//} else { | |||
//判断是否已审核;判断是否被其他教师占用 | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark == 1) { | |||
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/StuScoreOnline/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(); | |||
//显示“倒计时” | |||
$('.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/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark == 1) { | |||
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/StuScoreOnline/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) { | |||
if (res.code == 200) { | |||
//提交成绩:取消占用 | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/SaveInputScoreStatus', { queryJson: JSON.stringify(query) }, function (res) { | |||
if (res.code == 200) { | |||
refreshGirdData2(); | |||
modifyDate = null; | |||
//隐藏“提交成绩”按钮 | |||
$('#lr_save').hide(); | |||
//显示“开始录入”按钮 | |||
$('#lr_input').show(); | |||
//隐藏“倒计时” | |||
$('.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/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark == 1) { | |||
learun.alert.warning("学生成绩已审核!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认审核当前班级的学生成绩!', function (res) { | |||
if (res) { | |||
//审核成绩 | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/DoCheckScore', { queryJson: JSON.stringify(query), checkMark: 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/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark != 1) { | |||
learun.alert.warning("学生成绩未审核!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认去审核当前班级的学生成绩!', function (res) { | |||
if (res) { | |||
//去审核成绩 | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/DoCheckScore', { queryJson: JSON.stringify(query), checkMark: 0 }, function (res) { | |||
if (res.code == 200) { | |||
refreshGirdData2(); | |||
} else { | |||
learun.alert.warning("去审核成绩失败!"); | |||
return false; | |||
} | |||
}); | |||
} | |||
}); | |||
} else { | |||
learun.alert.warning("学生成绩不存在!"); | |||
return false; | |||
} | |||
}); | |||
} | |||
}); | |||
//续时 | |||
$('#addMinutesBtn').on('click', function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
clearInterval(timer); | |||
var addMinutes = $('#addMinutesBtn').attr('data-minutes'); | |||
var newMinutes = addMinutes; | |||
var minutes = $('#minutes').html(); | |||
if (minutes > 0) { | |||
newMinutes = Number(newMinutes) + Number(minutes); | |||
} | |||
$('#minutes').html(newMinutes); | |||
page.countDown(); | |||
//修改服务时间 | |||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { }); | |||
} | |||
}); | |||
//导入更新 | |||
$('#lr_importScore').on('click', function () { | |||
var query = judgeSelect(); | |||
if (query) { | |||
//判断成绩比例是否合理 | |||
//var OrdinaryScoreScale = $('#OrdinaryScoreScale').html(); | |||
//var TermInScoreScale = $('#TermInScoreScale').html(); | |||
//var TermEndScoreScale = $('#TermEndScoreScale').html(); | |||
//var OtherScoreScale = $('#OtherScoreScale').html(); | |||
//var totalScale = Number(OrdinaryScoreScale) + Number(TermInScoreScale) + Number(TermEndScoreScale) + Number(OtherScoreScale); | |||
//if (totalScale !== 100) { | |||
// learun.alert.warning("成绩比例设置不合理!"); | |||
// return false; | |||
//} else { | |||
//判断是否已审核;判断是否被其他教师占用 | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||
if (data != null) { | |||
if (data.CheckMark == 1) { | |||
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; | |||
} | |||
} | |||
rowJson = $('#gridtable').jfGridGet('showData'); | |||
if (rowJson.length <= 0) { | |||
learun.alert.warning("查询结果不存在!"); | |||
return false; | |||
} | |||
columnJson = $('#gridtable').jfGridGet('settingInfo').headData; | |||
//条件 | |||
queryJson = query; | |||
learun.layerForm({ | |||
id: 'IndexImport', | |||
title: "导入学生成绩", | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/InputScoreIndexImport?type=0', | |||
width: 600, | |||
height: 400, | |||
maxmin: true, | |||
btn: null, | |||
end: function () { | |||
refreshGirdData2(); | |||
} | |||
}); | |||
} else { | |||
learun.alert.warning("学生成绩不存在!"); | |||
return false; | |||
} | |||
}); | |||
//} | |||
} | |||
}); | |||
}, | |||
bindSelect: function () { | |||
//校区 | |||
$('#F_SchoolId').lrDataSourceSelect({ | |||
code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { } | |||
}); | |||
$('#F_SchoolId').lrselectSet(learun.clientdata.get(['userinfo']).companyId); | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetAcademicYearNoData', | |||
value: 'value', | |||
text: 'text', | |||
select: function (item) { | |||
if (!!item) { | |||
$("#LessonNo").lrselectRefresh({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetLessonNoDataWithNo?AcademicYearShort=' + item.value + '&Semester=' + $('#Semester').lrselectGet(), | |||
}); | |||
} | |||
} | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetSemesterData', | |||
value: 'value', | |||
text: 'text', | |||
select: function (item) { | |||
if (!!item) { | |||
$("#LessonNo").lrselectRefresh({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetLessonNoDataWithNo?AcademicYearShort=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + item.value, | |||
}); | |||
} | |||
} | |||
}); | |||
//课程 | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetLessonNoDataWithNo', | |||
value: 'value', | |||
text: 'text', | |||
select: function (item) { | |||
if (!!item) { | |||
$("#EmpNo").lrselectRefresh({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetEmpNoData?lessonNo=' + item.value + '&AcademicYearShort=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + $('#Semester').lrselectGet(), | |||
}); | |||
} | |||
} | |||
}); | |||
//教师 | |||
$('#EmpNo').lrselect({ | |||
placeholder: "请选择教师", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetEmpNoData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//绑定学年、学期 | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
} | |||
}.bind(this), "json"); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetList', | |||
headData: headDataFinally, | |||
mainId: 'ScoreId', | |||
isPage: false, | |||
sidx: 'StuNo', | |||
sord: 'asc' | |||
}); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
}, | |||
searchScale: function (param) { | |||
param = param || {}; | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(param), function (data) { | |||
if (data["StuSelectLessonList"] != null) { | |||
var ssll = data["StuSelectLessonList"]; | |||
$('#OrdinaryScoreScale').html(ssll.OrdinaryScoreScale > 0 ? ssll.OrdinaryScoreScale : 0); | |||
$('#TermInScoreScale').html(ssll.TermInScoreScale > 0 ? ssll.TermInScoreScale : 0); | |||
$('#TermEndScoreScale').html(ssll.TermEndScoreScale > 0 ? ssll.TermEndScoreScale : 0); | |||
$('#OtherScoreScale').html(ssll.OtherScoreScale > 0 ? ssll.OtherScoreScale : 0); | |||
} else { | |||
$('#OrdinaryScoreScale').html(0); | |||
$('#TermInScoreScale').html(0); | |||
$('#TermEndScoreScale').html(0); | |||
$('#OtherScoreScale').html(0); | |||
} | |||
}); | |||
}, | |||
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/StuScoreOnline/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) { | |||
}); | |||
}, 300000); | |||
}, | |||
}; | |||
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 () { | |||
if (CanInputFlag != "True") { | |||
top.learun.layerConfirm('当前时间不是线上成绩录入时间!', function (res) { }); | |||
return false; | |||
} | |||
var $content = $('body').find('.lr-layout-tool-left'); | |||
var query = $content.lrGetFormData(); | |||
if (query.F_SchoolId == null || query.F_SchoolId == "") { | |||
learun.alert.warning("请选择校区!"); | |||
return false; | |||
} | |||
if (query.AcademicYearNo == null || query.AcademicYearNo == "") { | |||
learun.alert.warning("请选择学年!"); | |||
return false; | |||
} | |||
if (query.Semester == null || query.Semester == "") { | |||
learun.alert.warning("请选择学期!"); | |||
return false; | |||
} | |||
if (query.LessonNo == null || query.LessonNo == "") { | |||
learun.alert.warning("请选择课程!"); | |||
return false; | |||
} | |||
if (query.EmpNo == null || query.EmpNo == "") { | |||
learun.alert.warning("请选择教师!"); | |||
return false; | |||
} | |||
return query; | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,38 @@ | |||
@{ | |||
ViewBag.Title = "线上成绩录入监控管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<style> | |||
.lr-select { | |||
width: 150px; | |||
} | |||
</style> | |||
<div class="lr-layout"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="AcademicYearNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Semester" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-lock"></i> 强制提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreOnline/Monitor.js") |
@@ -0,0 +1,132 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-06-14 11:02 | |||
* 描 述:考试成绩同步 | |||
*/ | |||
var selectedRow; | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initGird(); | |||
}, | |||
bind: function () { | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
width: '150px', | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetAcademicYearNoData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
width: '150px', | |||
placeholder: "请选择学期", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetSemesterData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
// 查询 | |||
$('#btn_Search').on('click', function () { | |||
page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet() }); | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//强制提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EmpNo'); | |||
if (learun.checkrow(keyValue)) { | |||
var IsEditable = $('#gridtable').jfGridValue('IsEditable'); | |||
if (IsEditable == "1") { | |||
learun.alert.warning("当前项目无需提交!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认提交该项?未保存的成绩将会丢失!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/Submit', | |||
{ | |||
AcademicYearNo: $('#gridtable').jfGridValue('AcademicYearNo'), | |||
Semester: $('#gridtable').jfGridValue('Semester'), | |||
LessonNo: $('#gridtable').jfGridValue('LessonNo'), | |||
EmpNo: $('#gridtable').jfGridValue('EmpNo'), | |||
EditUserId: $('#gridtable').jfGridValue('EditUserId'), | |||
}, | |||
function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOnline/GetMonitorList', | |||
headData: [ | |||
{ | |||
label: "录入状态", name: "IsEditable", width: 80, align: "center", | |||
formatter: function (cellvalue) { | |||
return cellvalue == "1" ? "<span class=\"label label-success\">未占用</span>" : "<span class=\"label label-danger\">正在录入</span>"; | |||
} | |||
}, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 40, align: "left" }, | |||
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" }, | |||
{ 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=' + 'TeacherInfo', | |||
key: value, | |||
keyId: 'f_account', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: '占用教师编号', name: 'EditUserId', width: 100, align: "left" }, | |||
{ | |||
label: '占用教师姓名', name: 'EditUserId', width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', | |||
key: value, | |||
keyId: 'f_account', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: '开始录入日期', name: 'BeginModifyDate', width: 150, align: "left" }, | |||
{ label: '最后保存日期', name: 'ModifyDate', width: 150, align: "left" }, | |||
], | |||
//mainId: 'ScoreId', | |||
isPage: false | |||
}); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "初始化线上课程成绩"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/InitScoreForm.js") |
@@ -0,0 +1,53 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-02-27 11:05 | |||
* 描 述:按条件同步排课数据 | |||
*/ | |||
var acceptClick; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "请选择学期", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
initData: function () { | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/DoInitScore', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -2,7 +2,7 @@ | |||
ViewBag.Title = "选修课课程"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
@@ -16,36 +16,40 @@ | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester" class="form-control"></div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学号</div> | |||
<input id="StuNo" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input id="StuName" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程名称</div> | |||
<div id="LessonNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">建课教师</div> | |||
<input id="EmpName" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">校区</div> | |||
<div id="F_SchoolId"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div class="lr-form-item-title">院系</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">教师</div> | |||
<div id="EmpNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">选修课程</div> | |||
<div id="LessonNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">选课状态</div> | |||
<div id="ElectiveSelectStatus"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">报名状态</div> | |||
<div id="ElectiveSignUpStatus"></div> | |||
@@ -53,15 +57,21 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div style="height:28px;line-height:28px;">提示:请输入学年和学期进行查询</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_initScore" class="btn btn-default"><i class="fa fa-plus"></i> 初始化线上课程成绩</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResult.js") | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResult.js") |
@@ -24,7 +24,7 @@ var bootstrap = function ($, learun) { | |||
return; | |||
} | |||
page.search(queryJson); | |||
}, 330, 400); | |||
}, 330, 500); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
@@ -40,34 +40,95 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ElectiveSelectStatus').lrDataItemSelect({ code: 'ElectiveSelectStatus' }); | |||
$('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' }); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||
//数据集不选择线上课程信息,选择选课情况里的课程信息 | |||
$('#LessonNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||
param: { strWhere: "1=1 AND LessonSortNo='2' " }, | |||
value: "lessonno", | |||
text: "lessonname" | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetSelectLessonInfo', | |||
value: "LessonNo", | |||
text: "LessonName" | |||
}); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#DeptNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { | |||
if (!!item) { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "deptno='" + item.deptno + "' order by majorno " }, | |||
}); | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "1=1 order by majorno " }, | |||
}); | |||
} | |||
} | |||
}); | |||
$('#MajorNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "1=1 order by majorno " }, | |||
value: "majorno", | |||
text: "majorname", | |||
select: function (item) { | |||
if (!!item) { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "majorno='" + item.majorno + "' order by classno " }, | |||
}); | |||
} else { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "1=1 order by classno " }, | |||
}); | |||
} | |||
} | |||
}); | |||
$('#ClassNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "1=1 order by classno " }, | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
$('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//初始化线上课程成绩 | |||
$('#lr_initScore').on('click', function () { | |||
learun.layerForm({ | |||
id: 'InitScoreForm', | |||
title: '初始化线上课程成绩', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/InitScoreForm', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(); | |||
} | |||
}); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetQueryStuSelectResultList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 60, align: "left" }, | |||
{ label: "学年", name: "AcademicYearNo", width: 50, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 50, align: "left" }, | |||
{ label: "学号", name: "StuNo", width: 120, align: "left" }, | |||
{ label: "姓名", name: "StuName", width: 180, align: "left" }, | |||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" }, | |||
{ | |||
label: "课程名称", name: "LessonName", width: 150, align: "left" | |||
}, | |||
//{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ | |||
label: "校区", name: "F_SchoolId", width: 200, align: "left", | |||
label: "建课教师", name: "EmpName", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "建课学校", name: "F_SchoolId", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
@@ -80,7 +141,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "系所", name: "DeptNo", 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', | |||
@@ -118,24 +179,6 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "GenderNo", width: 80, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "男" : "女"; | |||
} | |||
}, | |||
{ | |||
label: "选课状态", name: "Id", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == null || cellvalue == undefined || cellvalue == "") { | |||
return '<span class=\"label label-default\">未报名</span>'; | |||
} else { | |||
return '<span class=\"label label-success\">已报名</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "报名状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -150,62 +193,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ label: "所选课程号", name: "LessonNo", width: 100, align: "left" }, | |||
{ | |||
label: "所选课程名称", name: "LessonName", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', | |||
key: row.LessonNo, | |||
keyId: 'lessonno', | |||
callback: function (_data) { | |||
callback(_data['lessonname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "课程学分", name: "StudyScore", width: 100, align: "left" }, | |||
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ | |||
label: "教师姓名", name: "EmpName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: row.EmpNo, | |||
keyId: 'empno', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "上课节次", name: "LessonSection", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue != "" && cellvalue != undefined && cellvalue != null) { | |||
if (cellvalue.indexOf(',') == -1) { | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; | |||
} else { | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; | |||
} | |||
} | |||
} | |||
}, | |||
{ label: "上课时间", name: "LessonTime", width: 180, align: "left" }, | |||
{ | |||
label: "教室名称", name: "ClassRoomName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo', | |||
key: row.ClassRoomNo, | |||
keyId: 'classroomno', | |||
callback: function (_data) { | |||
callback(_data['classroomname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId: 'StuId', | |||
isPage: true, | |||
@@ -215,7 +203,6 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
//param.SqlParameter = " and a.ChangeStatus<>1 "; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -2,7 +2,7 @@ | |||
ViewBag.Title = "选修课课程"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
@@ -16,28 +16,40 @@ | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester" class="form-control"></div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学号</div> | |||
<input id="StuNo" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input id="StuName" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程名称</div> | |||
<div id="LessonNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">建课教师</div> | |||
<input id="EmpName" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">校区</div> | |||
<div id="F_SchoolId"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div class="lr-form-item-title">院系</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">选课状态</div> | |||
<div id="ElectiveSelectStatus"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">报名状态</div> | |||
<div id="ElectiveSignUpStatus"></div> | |||
@@ -45,6 +57,9 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div style="height:28px;line-height:28px;">提示:请输入学年和学期进行查询</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
@@ -56,4 +71,4 @@ | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.js") | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.js") |
@@ -24,7 +24,7 @@ var bootstrap = function ($, learun) { | |||
return; | |||
} | |||
page.search(queryJson); | |||
}, 300, 400); | |||
}, 330, 500); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
@@ -40,12 +40,58 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ElectiveSelectStatus').lrDataItemSelect({ code: 'ElectiveSelectStatus' }); | |||
$('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' }); | |||
//数据集不选择线上课程信息,选择选课情况里的课程信息 | |||
$('#LessonNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetSelectLessonInfo', | |||
value: "LessonNo", | |||
text: "LessonName" | |||
}); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#DeptNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { | |||
if (!!item) { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "deptno='" + item.deptno + "' order by majorno " }, | |||
}); | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "1=1 order by majorno " }, | |||
}); | |||
} | |||
} | |||
}); | |||
$('#MajorNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "1=1 order by majorno " }, | |||
value: "majorno", | |||
text: "majorname", | |||
select: function (item) { | |||
if (!!item) { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "majorno='" + item.majorno + "' order by classno " }, | |||
}); | |||
} else { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "1=1 order by classno " }, | |||
}); | |||
} | |||
} | |||
}); | |||
$('#ClassNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "1=1 order by classno " }, | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
$('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -54,12 +100,22 @@ var bootstrap = function ($, learun) { | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetQueryStuSelectResultList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 60, align: "left" }, | |||
{ label: "学年", name: "AcademicYearNo", width: 50, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 50, align: "left" }, | |||
{ label: "学号", name: "StuNo", width: 120, align: "left" }, | |||
{ label: "姓名", name: "StuName", width: 180, align: "left" }, | |||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" }, | |||
{ | |||
label: "课程名称", name: "LessonName", width: 150, align: "left" | |||
}, | |||
//{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ | |||
label: "建课教师", name: "EmpName", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "校区", name: "F_SchoolId", width: 200, align: "left", | |||
label: "建课学校", name: "F_SchoolId", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
@@ -72,7 +128,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "系所", name: "DeptNo", 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', | |||
@@ -110,24 +166,6 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "GenderNo", width: 80, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "男" : "女"; | |||
} | |||
}, | |||
{ | |||
label: "选课状态", name: "Id", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == null || cellvalue == undefined || cellvalue == "") { | |||
return '<span class=\"label label-default\">未报名</span>'; | |||
} else { | |||
return '<span class=\"label label-success\">已报名</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "报名状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -142,62 +180,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ label: "所选课程号", name: "LessonNo", width: 100, align: "left" }, | |||
{ | |||
label: "所选课程名称", name: "LessonName", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', | |||
key: row.LessonNo, | |||
keyId: 'lessonno', | |||
callback: function (_data) { | |||
callback(_data['lessonname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "课程学分", name: "StudyScore", width: 100, align: "left" }, | |||
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ | |||
label: "教师姓名", name: "EmpName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: row.EmpNo, | |||
keyId: 'empno', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "上课节次", name: "LessonSection", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue != "" && cellvalue != undefined && cellvalue != null) { | |||
if (cellvalue.indexOf(',') == -1) { | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; | |||
} else { | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; | |||
} | |||
} | |||
} | |||
}, | |||
{ label: "上课时间", name: "LessonTime", width: 180, align: "left" }, | |||
{ | |||
label: "教室名称", name: "ClassRoomName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo', | |||
key: row.ClassRoomNo, | |||
keyId: 'classroomno', | |||
callback: function (_data) { | |||
callback(_data['classroomname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId: 'StuId', | |||
isPage: true, | |||
@@ -13,10 +13,10 @@ | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 录入</a> | |||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 录入</a>*@ | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | |||
</div> | |||
</div> | |||
</div> | |||
@@ -82,8 +82,9 @@ var bootstrap = function ($, learun) { | |||
return '微信快捷登录PC端'; | |||
} else if (val == 'modifypwdtip') { | |||
return '30天未修改密码登录后提示修改'; | |||
}else if (val == 'modifypwdfirstday') { | |||
return '每月1日强制修改密码'; | |||
} | |||
} | |||
}, | |||
{ | |||
@@ -89,7 +89,9 @@ var bootstrap = function ($, learun) { | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LR_SystemModule/Interface/GetEntity?keyValue=' + keyValue, function (data) { | |||
$('#form1').lrSetFormData(data); | |||
// $('#form1').lrSetFormData(data); | |||
$('#F_Name').val(data.F_Name); | |||
$('#F_Address').val(data.F_Address); | |||
var formatdata = JSON.parse(data.F_FieldsJson); | |||
$('#gridtable').jfGridSet('refreshdata', formatdata); | |||
}); | |||
@@ -148,6 +148,67 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
{ | |||
return View(); | |||
} | |||
public class WeekDate | |||
{ | |||
public int week { get; set; } | |||
public string startdate { get; set; } | |||
public string enddate { get; set; } | |||
public string textweek { get; set; } | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetWeeksData() | |||
{ | |||
var weekdatelist = new List<WeekDate>(); | |||
var yearsemester = Common.GetSemesterAndYear(); | |||
var arrangelessonlist = arrangeLessonTermIBLL.GetListForTimeTable("{\"AcademicYearNo\":\"" + yearsemester.AcademicYearShort + "\",\"Semester\":\"" + yearsemester.Semester + "\"}").OrderBy(m => m.LessonDate); | |||
if (arrangelessonlist.Any()) | |||
{ | |||
var firstday = arrangelessonlist.First(); | |||
var lastday = arrangelessonlist.Last(); | |||
var monday = firstday.LessonDate.Value.AddDays(-Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek) + 1); | |||
var sunday = lastday.LessonDate.Value.AddDays(7 - Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek)); | |||
//总周数 | |||
var weekCount = Math.Ceiling(Convert.ToDouble((sunday - monday).Days+1) / 7); | |||
for (var i = 0; i < weekCount; i++) | |||
{ | |||
var wentity = new WeekDate(); | |||
wentity.week = i + 1; | |||
wentity.startdate = monday.AddDays(i * 7).ToString("yyyy-MM-dd"); | |||
wentity.enddate = monday.AddDays(i * 7+6).ToString("yyyy-MM-dd"); | |||
wentity.textweek = "第" + wentity.week + "周 (" + wentity.startdate + "~" + wentity.enddate + ")"; | |||
weekdatelist.Add(wentity); | |||
} | |||
return Success(weekdatelist); | |||
} | |||
else | |||
return Success(new { }); | |||
} | |||
/// <summary> | |||
/// 获取当前日期是第几周 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetCurrentWeek() | |||
{ | |||
var yearsemester = Common.GetSemesterAndYear(); | |||
var arrangelessonlist = arrangeLessonTermIBLL.GetListForTimeTable("{\"AcademicYearNo\":\"" + yearsemester.AcademicYearShort + "\",\"Semester\":\"" + yearsemester.Semester + "\"}").OrderBy(m => m.LessonDate); | |||
if (arrangelessonlist.Any()) | |||
{ | |||
var firstday = arrangelessonlist.First(); | |||
var lastday = arrangelessonlist.Last(); | |||
var monday = firstday.LessonDate.Value.AddDays(-(Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek) == 0 ? 7 : Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek)) + 1); | |||
var sunday = lastday.LessonDate.Value.AddDays(7 - (Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek) == 0 ? 7 : Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek))); | |||
var currentweek = Util.Time.GetWeekOfDay(monday, sunday); | |||
return Success(currentweek); | |||
} | |||
return Success(1); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
@@ -110,7 +110,7 @@ | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch" class="lr-search-date"></div> | |||
<div id="datesearch" type="lrselect" class="lr-select" style="width: 250px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
@@ -105,48 +105,48 @@ var bootstrap = function ($, learun) { | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ | |||
name: '上周', | |||
begin: function () { return learun.getTime(7); }, | |||
end: function () { | |||
return learun.getTime(1); | |||
} | |||
}, | |||
{ | |||
name: '本周', | |||
begin: function () { return learun.getTime(0); }, | |||
end: function () { | |||
return learun.getTime(-6); | |||
} | |||
}, | |||
{ | |||
name: '下周', | |||
begin: function () { return learun.getTime(-7); }, | |||
end: function () { | |||
return learun.getTime(-13); | |||
} | |||
}], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: 'currentWeek', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
//$('#datesearch').lrdate({ | |||
// dfdata: [ | |||
// { | |||
// name: '上周', | |||
// begin: function () { return learun.getTime(7); }, | |||
// end: function () { | |||
// return learun.getTime(1); | |||
// } | |||
// }, | |||
// { | |||
// name: '本周', | |||
// begin: function () { return learun.getTime(0); }, | |||
// end: function () { | |||
// return learun.getTime(-6); | |||
// } | |||
// }, | |||
// { | |||
// name: '下周', | |||
// begin: function () { return learun.getTime(-7); }, | |||
// end: function () { | |||
// return learun.getTime(-13); | |||
// } | |||
// }], | |||
// // 月 | |||
// mShow: false, | |||
// premShow: false, | |||
// // 季度 | |||
// jShow: false, | |||
// prejShow: false, | |||
// // 年 | |||
// ysShow: false, | |||
// yxShow: false, | |||
// preyShow: false, | |||
// yShow: false, | |||
// // 默认 | |||
// dfvalue: 'currentWeek', | |||
// selectfn: function (begin, end) { | |||
// startTime = begin; | |||
// endTime = end; | |||
// page.search(); | |||
// } | |||
//}); | |||
//查询 | |||
$('#lr_search').on('click', function () { | |||
var p = {}; | |||
@@ -190,6 +190,26 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$("#datesearch").lrselect({ | |||
placeholder: "请选择周次", | |||
width: "250px", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetWeeksData', | |||
value: 'week', | |||
text: 'textweek', | |||
select: function (item) { | |||
if (!!item) { | |||
startTime = item.startdate; | |||
endTime = item.enddate; | |||
} | |||
} | |||
}); | |||
$.get('/PersonnelManagement/TimeTable/GetCurrentWeek', function (ref) { | |||
if (ref.code == "200") { | |||
console.log(ref.data); | |||
$('#datesearch').lrselectSet(ref.data); | |||
} | |||
}.bind(this), "json"); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
@@ -111,7 +111,7 @@ | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch" class="lr-search-date"></div> | |||
<div id="datesearch" type="lrselect" class="lr-select" style="width: 250px;"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
@@ -143,48 +143,69 @@ var bootstrap = function ($, learun) { | |||
}); | |||
}, | |||
bind: function () { | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ | |||
name: '上周', | |||
begin: function () { return learun.getTime(7); }, | |||
end: function () { | |||
return learun.getTime(1); | |||
} | |||
}, | |||
{ | |||
name: '本周', | |||
begin: function () { return learun.getTime(0); }, | |||
end: function () { | |||
return learun.getTime(-6); | |||
} | |||
}, | |||
{ | |||
name: '下周', | |||
begin: function () { return learun.getTime(-7); }, | |||
end: function () { | |||
return learun.getTime(-13); | |||
} | |||
}], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: 'currentWeek', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
$("#datesearch").lrselect({ | |||
placeholder: "请选择周次", | |||
width: "250px", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetWeeksData', | |||
value: 'week', | |||
text: 'textweek', | |||
select: function (item) { | |||
if (!!item) { | |||
startTime = item.startdate; | |||
endTime = item.enddate; | |||
page.search(); | |||
} | |||
} | |||
}); | |||
$.get('/PersonnelManagement/TimeTable/GetCurrentWeek', function (ref) { | |||
if (ref.code == "200") { | |||
console.log(ref.data); | |||
$('#datesearch').lrselectSet(ref.data); | |||
} | |||
}.bind(this), "json"); | |||
//$('#datesearch').lrdate({ | |||
// dfdata: [ | |||
// { | |||
// name: '上周', | |||
// begin: function () { return learun.getTime(7); }, | |||
// end: function () { | |||
// return learun.getTime(1); | |||
// } | |||
// }, | |||
// { | |||
// name: '本周', | |||
// begin: function () { return learun.getTime(0); }, | |||
// end: function () { | |||
// return learun.getTime(-6); | |||
// } | |||
// }, | |||
// { | |||
// name: '下周', | |||
// begin: function () { return learun.getTime(-7); }, | |||
// end: function () { | |||
// return learun.getTime(-13); | |||
// } | |||
// }], | |||
// // 月 | |||
// mShow: false, | |||
// premShow: false, | |||
// // 季度 | |||
// jShow: false, | |||
// prejShow: false, | |||
// // 年 | |||
// ysShow: false, | |||
// yxShow: false, | |||
// preyShow: false, | |||
// yShow: false, | |||
// // 默认 | |||
// dfvalue: 'currentWeek', | |||
// selectfn: function (begin, end) { | |||
// startTime = begin; | |||
// endTime = end; | |||
// page.search(); | |||
// } | |||
//}); | |||
$('#perBtn').on('click', | |||
function () { | |||
AddPrintContent(); | |||
@@ -110,9 +110,8 @@ | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch" class="lr-search-date"></div> | |||
<div id="datesearch" type="lrselect" class="lr-select" style="width: 250px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="F_SchoolId" type="lrselect" class="lr-select"></div> | |||
</div> | |||
@@ -30,7 +30,7 @@ var bootstrap = function ($, learun) { | |||
$('.personT').text(data.schoolName); | |||
$('.perSemester').text(data.semester); | |||
$('.perFestivalsBox table').html(html); | |||
function flogs(num, data, obj) { | |||
var flog = false; | |||
$.each(data, | |||
@@ -105,48 +105,49 @@ var bootstrap = function ($, learun) { | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ | |||
name: '上周', | |||
begin: function () { return learun.getTime(7); }, | |||
end: function () { | |||
return learun.getTime(1); | |||
} | |||
}, | |||
{ | |||
name: '本周', | |||
begin: function () { return learun.getTime(0); }, | |||
end: function () { | |||
return learun.getTime(-6); | |||
} | |||
}, | |||
{ | |||
name: '下周', | |||
begin: function () { return learun.getTime(-7); }, | |||
end: function () { | |||
return learun.getTime(-13); | |||
} | |||
}], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: 'currentWeek', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
//page.search(); | |||
} | |||
}); | |||
//$('#datesearch').lrdate({ | |||
// dfdata: [ | |||
// { | |||
// name: '上周', | |||
// begin: function () { return learun.getTime(7); }, | |||
// end: function () { | |||
// return learun.getTime(1); | |||
// } | |||
// }, | |||
// { | |||
// name: '本周', | |||
// begin: function () { return learun.getTime(0); }, | |||
// end: function () { | |||
// return learun.getTime(-6); | |||
// } | |||
// }, | |||
// { | |||
// name: '下周', | |||
// begin: function () { return learun.getTime(-7); }, | |||
// end: function () { | |||
// return learun.getTime(-13); | |||
// } | |||
// }], | |||
// // 月 | |||
// mShow: false, | |||
// premShow: false, | |||
// // 季度 | |||
// jShow: false, | |||
// prejShow: false, | |||
// // 年 | |||
// ysShow: false, | |||
// yxShow: false, | |||
// preyShow: false, | |||
// yShow: false, | |||
// // 默认 | |||
// dfvalue: 'currentWeek', | |||
// selectfn: function (begin, end) { | |||
// startTime = begin; | |||
// endTime = end; | |||
// //page.search(); | |||
// } | |||
//}); | |||
//查询 | |||
$('#lr_search').on('click', function () { | |||
var p = {}; | |||
@@ -295,6 +296,26 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$("#datesearch").lrselect({ | |||
placeholder: "请选择周次", | |||
width:"250px", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetWeeksData', | |||
value: 'week', | |||
text: 'textweek', | |||
select: function (item) { | |||
if (!!item) { | |||
startTime = item.startdate; | |||
endTime = item.enddate; | |||
} | |||
} | |||
}); | |||
$.get('/PersonnelManagement/TimeTable/GetCurrentWeek', function (ref) { | |||
if (ref.code == "200") { | |||
console.log(ref.data); | |||
$('#datesearch').lrselectSet(ref.data); | |||
} | |||
}.bind(this), "json"); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
@@ -126,7 +126,7 @@ | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch" class="lr-search-date"></div> | |||
<div id="datesearch" type="lrselect" class="lr-select" style="width: 250px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
@@ -105,48 +105,48 @@ var bootstrap = function ($, learun) { | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ | |||
name: '上周', | |||
begin: function () { return learun.getTime(7); }, | |||
end: function () { | |||
return learun.getTime(1); | |||
} | |||
}, | |||
{ | |||
name: '本周', | |||
begin: function () { return learun.getTime(0); }, | |||
end: function () { | |||
return learun.getTime(-6); | |||
} | |||
}, | |||
{ | |||
name: '下周', | |||
begin: function () { return learun.getTime(-7); }, | |||
end: function () { | |||
return learun.getTime(-13); | |||
} | |||
}], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: 'currentWeek', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
//$('#datesearch').lrdate({ | |||
// dfdata: [ | |||
// { | |||
// name: '上周', | |||
// begin: function () { return learun.getTime(7); }, | |||
// end: function () { | |||
// return learun.getTime(1); | |||
// } | |||
// }, | |||
// { | |||
// name: '本周', | |||
// begin: function () { return learun.getTime(0); }, | |||
// end: function () { | |||
// return learun.getTime(-6); | |||
// } | |||
// }, | |||
// { | |||
// name: '下周', | |||
// begin: function () { return learun.getTime(-7); }, | |||
// end: function () { | |||
// return learun.getTime(-13); | |||
// } | |||
// }], | |||
// // 月 | |||
// mShow: false, | |||
// premShow: false, | |||
// // 季度 | |||
// jShow: false, | |||
// prejShow: false, | |||
// // 年 | |||
// ysShow: false, | |||
// yxShow: false, | |||
// preyShow: false, | |||
// yShow: false, | |||
// // 默认 | |||
// dfvalue: 'currentWeek', | |||
// selectfn: function (begin, end) { | |||
// startTime = begin; | |||
// endTime = end; | |||
// page.search(); | |||
// } | |||
//}); | |||
//查询 | |||
$('#lr_search').on('click', function () { | |||
var p = {}; | |||
@@ -200,6 +200,26 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$("#datesearch").lrselect({ | |||
placeholder: "请选择周次", | |||
width: "250px", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetWeeksData', | |||
value: 'week', | |||
text: 'textweek', | |||
select: function (item) { | |||
if (!!item) { | |||
startTime = item.startdate; | |||
endTime = item.enddate; | |||
} | |||
} | |||
}); | |||
$.get('/PersonnelManagement/TimeTable/GetCurrentWeek', function (ref) { | |||
if (ref.code == "200") { | |||
console.log(ref.data); | |||
$('#datesearch').lrselectSet(ref.data); | |||
} | |||
}.bind(this), "json"); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
@@ -126,7 +126,7 @@ | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch" class="lr-search-date"></div> | |||
<div id="datesearch" type="lrselect" class="lr-select" style="width: 250px;"></div> | |||
</div> | |||
@*<div class="lr-layout-tool-item"> | |||
@@ -107,48 +107,48 @@ var bootstrap = function ($, learun) { | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ | |||
name: '上周', | |||
begin: function () { return learun.getTime(7); }, | |||
end: function () { | |||
return learun.getTime(1); | |||
} | |||
}, | |||
{ | |||
name: '本周', | |||
begin: function () { return learun.getTime(0); }, | |||
end: function () { | |||
return learun.getTime(-6); | |||
} | |||
}, | |||
{ | |||
name: '下周', | |||
begin: function () { return learun.getTime(-7); }, | |||
end: function () { | |||
return learun.getTime(-13); | |||
} | |||
}], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: 'currentWeek', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
//$('#datesearch').lrdate({ | |||
// dfdata: [ | |||
// { | |||
// name: '上周', | |||
// begin: function () { return learun.getTime(7); }, | |||
// end: function () { | |||
// return learun.getTime(1); | |||
// } | |||
// }, | |||
// { | |||
// name: '本周', | |||
// begin: function () { return learun.getTime(0); }, | |||
// end: function () { | |||
// return learun.getTime(-6); | |||
// } | |||
// }, | |||
// { | |||
// name: '下周', | |||
// begin: function () { return learun.getTime(-7); }, | |||
// end: function () { | |||
// return learun.getTime(-13); | |||
// } | |||
// }], | |||
// // 月 | |||
// mShow: false, | |||
// premShow: false, | |||
// // 季度 | |||
// jShow: false, | |||
// prejShow: false, | |||
// // 年 | |||
// ysShow: false, | |||
// yxShow: false, | |||
// preyShow: false, | |||
// yShow: false, | |||
// // 默认 | |||
// dfvalue: 'currentWeek', | |||
// selectfn: function (begin, end) { | |||
// startTime = begin; | |||
// endTime = end; | |||
// page.search(); | |||
// } | |||
//}); | |||
//查询 | |||
$('#lr_search').on('click', function () { | |||
var p = {}; | |||
@@ -225,6 +225,26 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$("#datesearch").lrselect({ | |||
placeholder: "请选择周次", | |||
width: "250px", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetWeeksData', | |||
value: 'week', | |||
text: 'textweek', | |||
select: function (item) { | |||
if (!!item) { | |||
startTime = item.startdate; | |||
endTime = item.enddate; | |||
} | |||
} | |||
}); | |||
$.get('/PersonnelManagement/TimeTable/GetCurrentWeek', function (ref) { | |||
if (ref.code == "200") { | |||
console.log(ref.data); | |||
$('#datesearch').lrselectSet(ref.data); | |||
} | |||
}.bind(this), "json"); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
@@ -53,7 +53,7 @@ | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch" class="lr-search-date"></div> | |||
<div id="datesearch" type="lrselect" class="lr-select" style="width: 250px;"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="F_SchoolId" type="lrselect" class="lr-select"></div> | |||
@@ -107,48 +107,48 @@ var bootstrap = function ($, learun) { | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ | |||
name: '上周', | |||
begin: function () { return learun.getTime(7); }, | |||
end: function () { | |||
return learun.getTime(1); | |||
} | |||
}, | |||
{ | |||
name: '本周', | |||
begin: function () { return learun.getTime(0); }, | |||
end: function () { | |||
return learun.getTime(-6); | |||
} | |||
}, | |||
{ | |||
name: '下周', | |||
begin: function () { return learun.getTime(-7); }, | |||
end: function () { | |||
return learun.getTime(-13); | |||
} | |||
}], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: 'currentWeek', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
//$('#datesearch').lrdate({ | |||
// dfdata: [ | |||
// { | |||
// name: '上周', | |||
// begin: function () { return learun.getTime(7); }, | |||
// end: function () { | |||
// return learun.getTime(1); | |||
// } | |||
// }, | |||
// { | |||
// name: '本周', | |||
// begin: function () { return learun.getTime(0); }, | |||
// end: function () { | |||
// return learun.getTime(-6); | |||
// } | |||
// }, | |||
// { | |||
// name: '下周', | |||
// begin: function () { return learun.getTime(-7); }, | |||
// end: function () { | |||
// return learun.getTime(-13); | |||
// } | |||
// }], | |||
// // 月 | |||
// mShow: false, | |||
// premShow: false, | |||
// // 季度 | |||
// jShow: false, | |||
// prejShow: false, | |||
// // 年 | |||
// ysShow: false, | |||
// yxShow: false, | |||
// preyShow: false, | |||
// yShow: false, | |||
// // 默认 | |||
// dfvalue: 'currentWeek', | |||
// selectfn: function (begin, end) { | |||
// startTime = begin; | |||
// endTime = end; | |||
// page.search(); | |||
// } | |||
//}); | |||
//查询 | |||
$('#lr_search').on('click', function () { | |||
var p = {}; | |||
@@ -264,6 +264,26 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$("#datesearch").lrselect({ | |||
placeholder: "请选择周次", | |||
width: "250px", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetWeeksData', | |||
value: 'week', | |||
text: 'textweek', | |||
select: function (item) { | |||
if (!!item) { | |||
startTime = item.startdate; | |||
endTime = item.enddate; | |||
} | |||
} | |||
}); | |||
$.get('/PersonnelManagement/TimeTable/GetCurrentWeek', function (ref) { | |||
if (ref.code == "200") { | |||
console.log(ref.data); | |||
$('#datesearch').lrselectSet(ref.data); | |||
} | |||
}.bind(this), "json"); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
@@ -340,6 +340,7 @@ | |||
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_UserChangeInfoController.cs" /> | |||
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_WarningController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ElectiveMajorOnlineController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuScoreOnlineController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuSelectLessonListOfElectiveOnlineController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\YKTStateMentController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonSyncController.cs" /> | |||
@@ -1031,12 +1032,20 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\IndexUnpassOfElective.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\InputScoreIndexOfElectiveInTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\InputScoreIndexOfElective.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\SlowIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndexInTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndexImport.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\Monitor.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\SlowIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\StuScoreQueryIndexRow.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\AuditForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\AuditIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\FinishIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResult.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResultForTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\InitScoreForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\AnalysisByMonthForStudent.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\ManageIndexTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\IndexForTeacher.js" /> | |||
@@ -8218,6 +8227,14 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResult.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResultForTeacher.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\StudentIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\InitScoreForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\Monitor.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndexImport.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndexInTeacher.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\StuScoreQueryIndexRow.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\SlowIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\SlowIndex.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\TimeTable\IndexInEducationSelect_.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
@@ -146,6 +146,8 @@ | |||
<add key="WebApi" value="http://localhost:31173/" /> | |||
<!-- 报名选修课的最大课程数 --> | |||
<add key="ElectiveLessonApplyMax" value="2" /> | |||
<!-- 报名线上选修课的最大课程数 --> | |||
<add key="OnlineElectiveLessonApplyMax" value="2" /> | |||
<!-- 河南对接登录 --> | |||
<add key="appid" value="TZ6RW1DUNIN6C5M88I" /> | |||
<add key="secret" value="55848ef07e0f4e0c991bc8b4426100b2" /> | |||
@@ -220,6 +220,7 @@ | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Compile Include="Bootstraper.cs" /> | |||
<Compile Include="Modules\LessonInfoOfElectiveOnlineApi.cs" /> | |||
<Compile Include="Modules\SSOApi.cs" /> | |||
<Compile Include="Modules\StuEnrollOfficialApi.cs" /> | |||
<Compile Include="Modules\AnnexesNoLoginApi.cs" /> | |||
@@ -0,0 +1,286 @@ | |||
using System; | |||
using Nancy; | |||
using Learun.Util; | |||
using System.Collections.Generic; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Linq; | |||
namespace Learun.Application.WebApi | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-05 17:06 | |||
/// 描 述:线上选修选课 | |||
/// </summary> | |||
public class LessonInfoOfElectiveOnlineApi : BaseNoAuthentication | |||
{ | |||
private LessonInfoOfElectiveOnlineIBLL lessonInfoOfElectiveOnlineIbll = new LessonInfoOfElectiveOnlineBLL(); | |||
private StuSelectLessonListOfElectiveOnlineIBLL stuSelectLessonListOfElectiveOnlineIBLL = new StuSelectLessonListOfElectiveOnlineBLL(); | |||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | |||
LessonInfoIBLL lessonInfoIbll = new LessonInfoBLL(); | |||
EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL(); | |||
/// <summary> | |||
/// 注册接口 | |||
/// <summary> | |||
public LessonInfoOfElectiveOnlineApi() | |||
: base("/Learun/LessonInfoOfElectiveOnline") | |||
{ | |||
Get["/pagelist"] = GetPageList; | |||
Get["/studentpagelist"] = StudentGetPageList; | |||
Get["/form"] = GetForm; | |||
Post["/Cancel"] = Cancel; | |||
Post["/SignIn"] = SignIn; | |||
Post["/SignInByMobile"] = SignInByMobile; | |||
Post["/GetApplyResult"] = GetApplyResult; | |||
} | |||
/// <summary> | |||
/// 判断队列结果 | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
private Response GetApplyResult(dynamic _) | |||
{ | |||
dynamic parameter = this.GetReqData<dynamic>(); | |||
string keyValue = parameter.keyValue; | |||
string account = parameter.StuNo; | |||
//学员信息 | |||
var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(account); | |||
if (stuInfoBasicEntity == null) | |||
{ | |||
return Success(new { msg = "当前学员不存在!" }); | |||
} | |||
//课程信息 | |||
var olpeEntity = lessonInfoOfElectiveOnlineIbll.GetLessonInfoOfElectiveOnlineEntity(keyValue); | |||
if (olpeEntity == null) | |||
{ | |||
return Success(new { msg = "当前课程不存在!" }); | |||
} | |||
//当前学员本学期是否有报名课程:每学期一门 | |||
//var sslleEntity = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(account, ""); | |||
//if (sslleEntity != null) | |||
//{ | |||
// if (sslleEntity.OLPEId != keyValue && sslleEntity.Status != 3) | |||
// { | |||
// return Success("已存在报名课程,每学期只能选择一门选修课!如需报名其他课程请先取消。"); | |||
// } | |||
// if (sslleEntity.Status == 1) | |||
// { | |||
// return Success("报名审核中,请耐心等待!"); | |||
// } | |||
// else if (sslleEntity.Status == 2) | |||
// { | |||
// return Success("已存在报名成功的课程,只能选择一门选修课!"); | |||
// } | |||
//} | |||
//else | |||
//{ | |||
// //所选课程的报名人数是否已满 | |||
// var aa = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineListByOLPEId(keyValue); | |||
// var aaa = aa.Count(x => x.Status == 1 || x.Status == 2); | |||
// if (aaa >= olpeEntity.StuNumMax) | |||
// { | |||
// return Success("当前课程报名人数已满,请选择其他课程!"); | |||
// } | |||
//} | |||
//每学期两门(几门根据系统配置文件值确定) | |||
var sslleEntity = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(account, keyValue); | |||
if (sslleEntity != null) | |||
{ | |||
if (sslleEntity.Status == 1) | |||
{ | |||
return Success(new { msg = "当前课程报名审核中,请耐心等待!" }); | |||
} | |||
else if (sslleEntity.Status == 2) | |||
{ | |||
return Success(new { msg = "当前课程已报名成功!" }); | |||
} | |||
} | |||
else | |||
{ | |||
//所选课程的报名人数是否已满 | |||
var aa = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineListByOLPEId(keyValue); | |||
var aaa = aa.Count(x => x.Status == 1 || x.Status == 2); | |||
if (aaa >= olpeEntity.StuNumMax) | |||
{ | |||
return Success(new { msg = "当前课程报名人数已满,请选择其他课程!" }); | |||
} | |||
//每学期最多两门 | |||
var sslleList = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineListByStuNo(account); | |||
var sslleListOfNow = sslleList.Where(x => x.AcademicYearNo == olpeEntity.AcademicYearNo && x.Semester == olpeEntity.Semester); | |||
var sslleListOfNow1 = sslleListOfNow.Where(x => x.Status == 1 || x.Status == 2); | |||
if (sslleListOfNow1.Count() >= Config.GetValue("OnlineElectiveLessonApplyMax").ToInt()) | |||
{ | |||
return Success(new { msg = "每学期最多选择" + Config.GetValue("OnlineElectiveLessonApplyMax").ToInt() + "门线上选修课!" }); | |||
} | |||
//相同时间不能报名 | |||
if (!string.IsNullOrEmpty(olpeEntity.LessonSection) && sslleListOfNow1.Where(x => x.LessonSection == olpeEntity.LessonSection).Any()) | |||
{ | |||
//相同时间不能报名 | |||
return Success(new { msg = "本学期此时间段已有报名的选修课!" }); | |||
} | |||
} | |||
return Fail("正在提交,请等待!"); | |||
} | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表分页数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetPageList(dynamic _) | |||
{ | |||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | |||
var data = lessonInfoOfElectiveOnlineIbll.GetPageListOfStudent(parameter.pagination, parameter.queryJson).OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonNo).ThenBy(x => x.EmpNo); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = parameter.pagination.total, | |||
page = parameter.pagination.page, | |||
records = parameter.pagination.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
public Response StudentGetPageList(dynamic _) | |||
{ | |||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | |||
var data = stuSelectLessonListOfElectiveOnlineIBLL.GetPageList(parameter.pagination, parameter.queryJson).OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonNo).ThenBy(x => x.EmpNo); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = parameter.pagination.total, | |||
page = parameter.pagination.page, | |||
records = parameter.pagination.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetForm(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
var Data = lessonInfoOfElectiveOnlineIbll.GetLessonInfoOfElectiveOnlineEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
data = Data, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response Cancel(dynamic _) | |||
{ | |||
dynamic parameter = this.GetReqData<dynamic>(); | |||
string keyValue = parameter.keyValue; | |||
string account = parameter.StuNo; | |||
//学员信息 | |||
var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(account); | |||
if (stuInfoBasicEntity == null) | |||
{ | |||
return Fail("当前学员不存在!"); | |||
} | |||
//课程信息 | |||
var olpeEntity = lessonInfoOfElectiveOnlineIbll.GetLessonInfoOfElectiveOnlineEntity(keyValue); | |||
if (olpeEntity == null) | |||
{ | |||
return Fail("当前课程不存在!"); | |||
} | |||
//当前学员是否已经报名该课程 | |||
var sslleEntity = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(account, keyValue); | |||
if (sslleEntity != null) | |||
{ | |||
if (sslleEntity.Status != 2) | |||
{ | |||
stuSelectLessonListOfElectiveOnlineIBLL.DeleteEntity(sslleEntity.Id); | |||
return Success("取消成功"); | |||
} | |||
else | |||
{ | |||
return Fail("取消失败,当前课程已报名成功!"); | |||
} | |||
} | |||
else | |||
{ | |||
return Fail("当前课程未报名,无需取消!"); | |||
} | |||
} | |||
/// <summary> | |||
/// 报名 | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response SignIn(dynamic _) | |||
{ | |||
//dynamic parameter = this.GetReqData<dynamic>(); | |||
//string keyValue = parameter.keyValue; | |||
//string account = parameter.StuNo; | |||
var parameter = this.GetReq<SignModel>(); | |||
string keyValue = parameter.keyValue; | |||
string account = parameter.StuNo; | |||
SignUpOnlineHelper.Instance.Start(); | |||
//进队列 | |||
SignUpOnlineHelper.AddQueue(account, keyValue); | |||
return Success("操作成功"); | |||
} | |||
public Response SignInByMobile(dynamic _) | |||
{ | |||
dynamic parameter = this.GetReqData<dynamic>(); | |||
string keyValue = parameter.keyValue; | |||
string account = parameter.StuNo; | |||
SignUpOnlineHelper.Instance.Start(); | |||
//进队列 | |||
SignUpOnlineHelper.AddQueue(account, keyValue); | |||
return Success("操作成功"); | |||
} | |||
#endregion | |||
#region 私有类 | |||
/// <summary> | |||
/// 表单实体类 | |||
/// <summary> | |||
private class ReqFormEntity | |||
{ | |||
public string keyValue { get; set; } | |||
public string strEntity { get; set; } | |||
} | |||
/// <summary> | |||
/// 报名模型 | |||
/// </summary> | |||
private class SignModel | |||
{ | |||
public string keyValue { get; set; } | |||
public string StuNo { get; set; } | |||
} | |||
#endregion | |||
} | |||
} |
@@ -22,12 +22,71 @@ namespace Learun.Application.WebApi.Modules | |||
Get["/StuList"] = GetStuInfo; | |||
Get["/StuLessonInfo"] = GetStuLessonInfo; | |||
Get["/timeTableData"] = GetTimeTableData; | |||
Get["/weeklist"] = GetWeeksData; | |||
Get["/currentweek"] = GetCurrentWeek; | |||
} | |||
private ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL(); | |||
private ArrangeLessonTermOfElectiveIBLL arrangeLessonTermOfElectiveIBLL = new ArrangeLessonTermOfElectiveBLL(); | |||
private StuAttendanceLeaveIBLL stuAttendanceLeaveIBLL = new StuAttendanceLeaveBLL(); | |||
private StuAttendanceIBLL stuAttendanceIBLL = new StuAttendanceBLL(); | |||
public class WeekDate | |||
{ | |||
public int week { get; set; } | |||
public string startdate { get; set; } | |||
public string enddate { get; set; } | |||
public string textweek { get; set; } | |||
} | |||
public Response GetWeeksData(dynamic _) | |||
{ | |||
var weekdatelist = new List<WeekDate>(); | |||
var yearsemester = Common.GetSemesterAndYear(); | |||
var arrangelessonlist = arrangeLessonTermIBLL.GetListForTimeTable("{\"AcademicYearNo\":\"" + yearsemester.AcademicYearShort + "\",\"Semester\":\"" + yearsemester.Semester + "\"}").OrderBy(m => m.LessonDate); | |||
if (arrangelessonlist.Any()) | |||
{ | |||
var firstday = arrangelessonlist.First(); | |||
var lastday = arrangelessonlist.Last(); | |||
var monday = firstday.LessonDate.Value.AddDays(-Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek) + 1); | |||
var sunday = lastday.LessonDate.Value.AddDays(7 - Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek)); | |||
//总周数 | |||
var weekCount = Math.Ceiling(Convert.ToDouble((sunday - monday).Days + 1) / 7); | |||
for (var i = 0; i < weekCount; i++) | |||
{ | |||
var wentity = new WeekDate(); | |||
wentity.week = i + 1; | |||
wentity.startdate = monday.AddDays(i * 7).ToString("yyyy-MM-dd"); | |||
wentity.enddate = monday.AddDays(i * 7 + 6).ToString("yyyy-MM-dd"); | |||
wentity.textweek = "第" + wentity.week + "周 (" + wentity.startdate + "~" + wentity.enddate + ")"; | |||
weekdatelist.Add(wentity); | |||
} | |||
return Success(weekdatelist); | |||
} | |||
else | |||
return Success(new { }); | |||
} | |||
/// <summary> | |||
/// 获取当前日期是第几周 | |||
/// </summary> | |||
/// <returns></returns> | |||
public Response GetCurrentWeek(dynamic _) | |||
{ | |||
var yearsemester = Common.GetSemesterAndYear(); | |||
var arrangelessonlist = arrangeLessonTermIBLL.GetListForTimeTable("{\"AcademicYearNo\":\"" + yearsemester.AcademicYearShort + "\",\"Semester\":\"" + yearsemester.Semester + "\"}").OrderBy(m => m.LessonDate); | |||
if (arrangelessonlist.Any()) | |||
{ | |||
var firstday = arrangelessonlist.First(); | |||
var lastday = arrangelessonlist.Last(); | |||
var monday = firstday.LessonDate.Value.AddDays(-(Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek) == 0 ? 7 : Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek)) + 1); | |||
var sunday = lastday.LessonDate.Value.AddDays(7 - (Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek) == 0 ? 7 : Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek))); | |||
var currentweek = Util.Time.GetWeekOfDay(monday, sunday); | |||
return Success(new {currentweek}); | |||
} | |||
return Success(new {currentweek=1}); | |||
} | |||
/// <summary> | |||
/// 课程表【教师功能、学生功能】 | |||
/// </summary> | |||
@@ -107,6 +107,8 @@ | |||
<add key="QJUrl" value="www.qj.com"/> | |||
<!-- 报名选修课的最大课程数 --> | |||
<add key="ElectiveLessonApplyMax" value="2" /> | |||
<!-- 报名线上选修课的最大课程数 --> | |||
<add key="OnlineElectiveLessonApplyMax" value="2" /> | |||
<!--系主任角色Id--> | |||
<add key="DeptDirectorRoleId" value="9310c5f3-1a0a-4f23-9452-3e5a15b3b722" /> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-06-14 11:02 | |||
/// 描 述:考试成绩同步 | |||
/// </summary> | |||
public class StuScoreOnlineMap : EntityTypeConfiguration<StuScoreOnlineEntity> | |||
{ | |||
public StuScoreOnlineMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("STUSCOREONLINE"); | |||
//主键 | |||
this.HasKey(t => t.ScoreId); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -112,6 +112,7 @@ | |||
<Compile Include="EducationalAdministration\StuInfoBasicChangeMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuInfoFreshMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuInfoFreshOnlineServiceMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuScoreOnlineMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuScoreNotPassMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectiveOnlineMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePreMap.cs" /> | |||
@@ -43,7 +43,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public IEnumerable<ArrangeLessonTermEntity> GetListForTimeTable(string queryJson) | |||
{ | |||
try | |||
{ | |||
return arrangeLessonTermService.GetListForTimeTable(queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取列表分页数据 | |||
/// <param name="pagination">分页参数</param> | |||