diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs index f3417d8eb..45cfcbdb6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs @@ -242,6 +242,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 获取当前学年学期 + /// + /// + [HttpGet] + public ActionResult GetSemesterAndYear() + { + var data = Common.GetSemesterAndYear(); + var jsonData = new + { + AcademicYearLong = data.AcademicYearLong, + AcademicYearShort = data.AcademicYearShort, + Semester = data.Semester, + }; + return Success(jsonData); + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermOfElective/EmptyByConditionForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermOfElective/EmptyByConditionForm.js index 2c8ccd59a..014f5352e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermOfElective/EmptyByConditionForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermOfElective/EmptyByConditionForm.js @@ -14,6 +14,8 @@ var bootstrap = function ($, learun) { }, bind: function () { $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#F_SchoolId').lrselectSet(learun.clientdata.get(['userinfo']).companyId); + //学年 $('#AcademicYearNo').lrselect({ placeholder: "请选择学年", @@ -30,6 +32,29 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); + $.ajax({ + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetSemesterAndYear', + //data: param, + type: "GET", + dataType: "json", + async: false, + cache: false, + success: function (res) { + var data = res.data; + if (!!data) { + $('#AcademicYearNo').lrselectSet(data.AcademicYearShort); + var Semester = data.Semester; + $('#Semester').lrselectSet(Semester); + } + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + learun.httpErrorLog(textStatus); + }, + beforeSend: function () { + }, + complete: function () { + } + }); }, initData: function () { //if (!!selectedRow) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermOfElective/SyncByConditionForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermOfElective/SyncByConditionForm.js index 0e6ac33db..b9258fbd2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermOfElective/SyncByConditionForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermOfElective/SyncByConditionForm.js @@ -14,6 +14,7 @@ var bootstrap = function ($, learun) { }, bind: function () { $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#F_SchoolId').lrselectSet(learun.clientdata.get(['userinfo']).companyId); //学年 $('#AcademicYearNo').lrselect({ placeholder: "请选择学年", @@ -30,6 +31,29 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); + $.ajax({ + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetSemesterAndYear', + //data: param, + type: "GET", + dataType: "json", + async: false, + cache: false, + success: function (res) { + var data = res.data; + if (!!data) { + $('#AcademicYearNo').lrselectSet(data.AcademicYearShort); + var Semester = data.Semester; + $('#Semester').lrselectSet(Semester); + } + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + learun.httpErrorLog(textStatus); + }, + beforeSend: function () { + }, + complete: function () { + } + }); }, initData: function () { //if (!!selectedRow) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.js index 97cc143e0..6d7ff363b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.js @@ -20,6 +20,7 @@ var bootstrap = function ($, learun) { }); page.initGird(); page.bind(); + page.bindSemesterAndYear(); }, bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { @@ -133,7 +134,34 @@ var bootstrap = function ($, learun) { mainId: 'EMId', isPage: true }); - page.search(); + //page.search(); + }, + bindSemesterAndYear: function () { + $.ajax({ + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetSemesterAndYear', + type: "GET", + dataType: "json", + async: false, + cache: false, + success: function (res) { + var data = res.data; + if (!!data) { + $('#AcademicYearNo').lrselectSet(data.AcademicYearShort); + var Semester = data.Semester; + $('#Semester').lrselectSet(Semester); + + var param = { "AcademicYearNo": data.AcademicYearShort, "Semester": data.Semester }; + page.search(param); + } + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + learun.httpErrorLog(textStatus); + }, + beforeSend: function () { + }, + complete: function () { + } + }); }, search: function (param) { param = param || {}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/Index.cshtml index 2501ebfc8..f93f612b7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/Index.cshtml @@ -2,7 +2,7 @@ ViewBag.Title = "选修课课程信息"; Layout = "~/Views/Shared/_Index.cshtml"; } -
+
@@ -12,20 +12,20 @@
学年
- +
学期
- +
-
-
课程号
- -
-
+
课程名称
- +
+ @*
+
课程号
+ +
*@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/Index.js index 026a09fc5..86dc7a8d9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/Index.js @@ -21,6 +21,22 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); var AcademicYearNo = $('#gridtable').jfGridValue('AcademicYearNo'); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js index f8fef4d12..59f2199ee 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js @@ -21,6 +21,7 @@ var bootstrap = function ($, learun) { page.initGird(); page.bind(); + page.bindSemesterAndYear(); }, bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { @@ -45,6 +46,8 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); + + $('#LessonName').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); //设置选课专业 $('#lr_editMajor').on('click', function () { @@ -86,7 +89,6 @@ var bootstrap = function ($, learun) { }); } - }); //新增 $('#lr_add').on('click', function () { @@ -245,6 +247,35 @@ var bootstrap = function ($, learun) { }); } }); + }, + bindSemesterAndYear: function () { + $.ajax({ + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetSemesterAndYear', + type: "GET", + dataType: "json", + async: false, + cache: false, + success: function (res) { + var data = res.data; + if (!!data) { + $('#AcademicYearNo').lrselectSet(data.AcademicYearShort); + var Semester = data.Semester; + $('#Semester').lrselectSet(Semester); + + var param = { "AcademicYearNo": data.AcademicYearShort, "Semester": data.Semester }; + page.search(param); + } + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + learun.httpErrorLog(textStatus); + }, + beforeSend: function () { + }, + complete: function () { + } + }); + + }, // 初始化列表 initGird: function () { @@ -344,7 +375,7 @@ var bootstrap = function ($, learun) { sidx: 'AcademicYearNo DESC, Semester DESC, LessonName ASC', sord: 'desc' }); - page.search(); + //page.search(); }, search: function (param) { param = param || {};