From 59d5afebd5a2217aea444e125c6d89f5506eca0d Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 20 Mar 2023 17:23:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E7=BB=A9=E5=BD=95=E5=85=A5=E3=80=81?= =?UTF-8?q?=E9=80=89=E4=BF=AE=E6=88=90=E7=BB=A9=E5=BD=95=E5=85=A5=E5=AD=A6?= =?UTF-8?q?=E5=B9=B4=E5=AD=A6=E6=9C=9F=E6=9D=A1=E4=BB=B6=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuScoreController.cs | 18 +++++----- .../StuScore/InputScoreIndexInTeacher.js | 35 ++++++++++++++----- .../InputScoreIndexOfElectiveInTeacher.js | 33 +++++++++++++---- 3 files changed, 62 insertions(+), 24 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs index f7f40a4d6..296c0921d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs @@ -541,11 +541,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// [HttpGet] [AjaxOnly] - public ActionResult GetClassNoDataForInput(string lessonNo) + public ActionResult GetClassNoDataForInput(string lessonNo, string AcademicYearShort, string Semester) { var loginInfo = LoginUserInfo.Get(); - var semesterAndYear = Common.GetSemesterAndYear(); - var data = stuScoreIBLL.GetClassNoDataForInput(loginInfo.account, loginInfo.Description, lessonNo, semesterAndYear.AcademicYearShort, semesterAndYear.Semester); + // var semesterAndYear = Common.GetSemesterAndYear(); + var data = stuScoreIBLL.GetClassNoDataForInput(loginInfo.account, loginInfo.Description, lessonNo, AcademicYearShort, Semester); return Success(data); } @@ -609,11 +609,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// [HttpGet] [AjaxOnly] - public ActionResult GetLessonNoDataWithNo() + public ActionResult GetLessonNoDataWithNo(string AcademicYearShort, string Semester) { var loginInfo = LoginUserInfo.Get(); - var semesterAndYear = Common.GetSemesterAndYear(); - var data = stuScoreIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description, semesterAndYear.AcademicYearShort, semesterAndYear.Semester); + //var semesterAndYear = Common.GetSemesterAndYear(); + var data = stuScoreIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description, AcademicYearShort, Semester); foreach (var item in data) { item.text = string.Format("{0}({1})", item.text, item.value); @@ -643,11 +643,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// [HttpGet] [AjaxOnly] - public ActionResult GetElectiveLessonNoDataWithNo() + public ActionResult GetElectiveLessonNoDataWithNo(string AcademicYearShort, string Semester) { var loginInfo = LoginUserInfo.Get(); - var semesterAndYear = Common.GetSemesterAndYear(); - var data = stuScoreIBLL.GetElectiveLessonNoDataOfAll(loginInfo.account, loginInfo.Description, semesterAndYear.AcademicYearShort, semesterAndYear.Semester); + //var semesterAndYear = Common.GetSemesterAndYear(); + var data = stuScoreIBLL.GetElectiveLessonNoDataOfAll(loginInfo.account, loginInfo.Description, AcademicYearShort, Semester); foreach (var item in data) { item.text = string.Format("{0}({1})", item.text, item.value); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js index add8ff5d4..ca6b5f3c3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js @@ -540,7 +540,7 @@ var bootstrap = function ($, learun) { refreshGirdData2(); } }); - + } else { learun.alert.warning("学生成绩不存在!"); return false; @@ -562,7 +562,16 @@ var bootstrap = function ($, learun) { allowSearch: false, url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', value: 'value', - text: 'text' + text: 'text', + select: function (item) { + if (!!item) { + $("#LessonNo").lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataWithNo?AcademicYearShort=' + item.value + '&Semester=' + $('#Semester').lrselectGet(), + value: 'value', + text: 'text', + }); + } + } }); //学期 $('#Semester').lrselect({ @@ -570,19 +579,28 @@ var bootstrap = function ($, learun) { allowSearch: false, url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', value: 'value', - text: 'text' + text: 'text', + select: function (item) { + if (!!item) { + $("#LessonNo").lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataWithNo?AcademicYearShort=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + item.value, + value: 'value', + text: 'text', + }); + } + } }); //课程 $('#LessonNo').lrselect({ placeholder: "请选择课程", allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataWithNo', + //url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataWithNo?AcademicYearShort=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + $('#Semester').lrselectGet(), value: 'value', text: 'text', select: function (item) { if (!!item) { $("#ClassNo").lrselectRefresh({ - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetClassNoDataForInput?lessonNo=' + item.value, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetClassNoDataForInput?lessonNo=' + item.value + '&AcademicYearShort=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + $('#Semester').lrselectGet(), value: 'value', text: 'text', }); @@ -593,7 +611,7 @@ var bootstrap = function ($, learun) { $('#ClassNo').lrselect({ placeholder: "请选择班级", allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetClassNoData', + //url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetClassNoData', value: 'value', text: 'text' }); @@ -603,8 +621,9 @@ var bootstrap = function ($, learun) { if (ref.code == "200") { $('#AcademicYearNo').lrselectSet(ref.data.Item1); $('#Semester').lrselectSet(ref.data.Item3); - $('#AcademicYearNo').attr('disabled', "disabled"); - $('#Semester').attr('disabled', "disabled"); + //2023.3.20成绩录入学年学期条件改为支持选择 + //$('#AcademicYearNo').attr('disabled', "disabled"); + //$('#Semester').attr('disabled', "disabled"); } }.bind(this), "json"); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js index fd6eeeb11..44d5d3f25 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js @@ -565,7 +565,16 @@ var bootstrap = function ($, learun) { allowSearch: false, url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', value: 'value', - text: 'text' + text: 'text', + select: function (item) { + if (!!item) { + $("#LessonNo").lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetElectiveLessonNoDataWithNo?AcademicYearShort=' + item.value + '&Semester=' + $('#Semester').lrselectGet(), + value: 'value', + text: 'text', + }); + } + } }); //学期 $('#Semester').lrselect({ @@ -573,13 +582,22 @@ var bootstrap = function ($, learun) { allowSearch: false, url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', value: 'value', - text: 'text' + text: 'text', + select: function (item) { + if (!!item) { + $("#LessonNo").lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetElectiveLessonNoDataWithNo?AcademicYearShort=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + item.value , + value: 'value', + text: 'text', + }); + } + } }); //课程 $('#LessonNo').lrselect({ placeholder: "请选择课程", allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetElectiveLessonNoDataWithNo', + //url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetElectiveLessonNoDataWithNo', value: 'value', text: 'text', select: function (item) { @@ -596,7 +614,7 @@ var bootstrap = function ($, learun) { $('#ClassRoomNo').lrselect({ placeholder: "请选择教室", allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetElectiveClassRoomNoData', + // url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetElectiveClassRoomNoData', value: 'value', text: 'text', select: function (item) { @@ -613,7 +631,7 @@ var bootstrap = function ($, learun) { $('#LessonSection').lrselect({ placeholder: "请选择节次", allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetElectiveLessonSectionData', + //url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetElectiveLessonSectionData', value: 'value', text: 'text' }); @@ -622,8 +640,9 @@ var bootstrap = function ($, learun) { if (ref.code == "200") { $('#AcademicYearNo').lrselectSet(ref.data.Item1); $('#Semester').lrselectSet(ref.data.Item3); - $('#AcademicYearNo').attr('disabled', "disabled"); - $('#Semester').attr('disabled', "disabled"); + //2023.3.20选修成绩录入条件学年学期改为支持选择 + //$('#AcademicYearNo').attr('disabled', "disabled"); + //$('#Semester').attr('disabled', "disabled"); } }.bind(this), "json");