diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeacherPlanCheckController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeacherPlanCheckController.cs index 47a53a256..8a684e42a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeacherPlanCheckController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeacherPlanCheckController.cs @@ -1,5 +1,6 @@ using Learun.Application.TwoDevelopment.EducationalAdministration; using Learun.Util; +using System; using System.Data; using System.Web.Mvc; @@ -15,6 +16,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class TeacherPlanCheckController : MvcControllerBase { private TeacherPlanCheckIBLL teacherPlanCheckIBLL = new TeacherPlanCheckBLL(); + private EADateArrangeIBLL eADateArrangeIBLL = new EADateArrangeBLL(); #region 视图功能 @@ -25,7 +27,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Index() { - return View(); + //获取“教学工作安排”中“教学教案检查打分”的记录 + var entity = eADateArrangeIBLL.GetEADateArrangeEntityByName("教学教案检查打分"); + if (entity != null && entity.CheckMark == "1" && DateTime.Now > entity.MakeDate && DateTime.Now < entity.EndDate) + { + ViewBag.CanInputFlag = true;//可以打分标识 + } + else + { + ViewBag.CanInputFlag = false; + } + + return View(); } /// /// 表单页 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.cshtml index 76dafb8ba..ff76a9d4b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.cshtml @@ -36,3 +36,6 @@ @Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.js index 79d8479b8..1951f0874 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.js @@ -59,8 +59,12 @@ var bootstrap = function ($, learun) { location.reload(); }); - // 编辑 + // 打分 $('#lr_edit').on('click', function () { + if (CanInputFlag != "True") { + top.learun.layerConfirm('当前时间不是打分时间!', function (res) { }); + return false; + } var keyValue = $('#gridtable').jfGridValue('EmpId'); selectedRow = $('#gridtable').jfGridGet('rowdata'); if (learun.checkrow(keyValue)) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckService.cs index 7cf659349..20ba30338 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckService.cs @@ -17,6 +17,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// public class TeacherPlanCheckService : RepositoryFactory { + private EADateArrangeService eADateArrangeService = new EADateArrangeService(); + #region 构造函数和属性 private string fieldSql; @@ -105,6 +107,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { + //“教学工作安排”表增加“教学教案检查打分”项 + eADateArrangeService.AddWork("教学教案检查打分"); + //学年、学期 var yearAndSemester = Common.GetSemesterAndYear(); var year = yearAndSemester.AcademicYearShort;