From cf5572fb8050d338791828d1c7435bb2d316353f Mon Sep 17 00:00:00 2001 From: hwh2023 <598694955@qq.com> Date: Wed, 17 Jul 2024 09:22:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=94=E4=BE=8B=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/OpenLessonPlanController.cs | 11 +++- .../ArrangeLessonTermAttemper/Form.cshtml | 4 +- .../Views/ArrangeLessonTermAttemper/Form.js | 59 +++++++++--------- .../Views/ArrangeLessonTermAttemper/Index.js | 32 +++++----- .../Views/OpenLessonPlan/ImportForm.js | 22 ++++++- .../Views/OpenLessonPlan/Index.js | 10 ++- .../Controllers/TimeTableController.cs | 2 +- .../TimeTable/IndexInEducationSelect_.js | 3 +- .../Content/excel/OpenLessonPlanImport.xls | Bin 31232 -> 31232 bytes .../ArrangeLessonTermAttemperService.cs | 6 +- 10 files changed, 94 insertions(+), 55 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanController.cs index 16226850f..ee3748088 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanController.cs @@ -181,10 +181,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers FileStreamResult result = null; try { + + string F_SchoolId = Request.Form["F_SchoolId"]; + string AcademicYearNo = Request.Form["AcademicYearNo"]; + string Semester = Request.Form["Semester"]; + string Grade = Request.Form["Grade"]; + string DeptNo = Request.Form["DeptNo"]; + string GZ = Request.Form["GZ"]; + string MajorNo = Request.Form["MajorNo"]; + string LessonNo = Request.Form["LessonNo"]; var fileHead = "成绩比例设置导入模板"; var path = Server.MapPath("~/Content/excel/"); var pathoffull = path + "OpenLessonPlanImport.xls"; - string queryJson = "{}"; + string queryJson = "{\"F_SchoolId\":\""+ F_SchoolId + "\",\"AcademicYearNo\":\""+AcademicYearNo + "\",\"Semester\":\""+ Semester + "\",\"Grade\":\""+ Grade + "\",\"DeptNo\":\""+ DeptNo + "\",\"GZ\":\""+ GZ + "\",\"MajorNo\":\""+ MajorNo + "\",\"LessonNo\":\""+ LessonNo + "\"}"; var data = openLessonPlanIBLL.GetList( queryJson); IWorkbook book = null; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.cshtml index bbfe6aa03..97124d675 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.cshtml @@ -44,10 +44,10 @@
调度类型*
-
+ @*
调度时限*
-
+
*@
课程原安排
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js index 5e6a6569f..59fab4869 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js @@ -116,8 +116,8 @@ var bootstrap = function ($, learun) { } $('.AttemperType').hide(); - $("#AttemperTimeType").removeAttr("isvalid"); - $("#AttemperTimeType").removeAttr("checkexpession"); + //$("#AttemperTimeType").removeAttr("isvalid"); + //$("#AttemperTimeType").removeAttr("checkexpession"); $("#AttemperStartTime").removeAttr("isvalid"); $("#AttemperStartTime").removeAttr("checkexpession"); $("#AttemperEndTime").removeAttr("isvalid"); @@ -140,8 +140,8 @@ var bootstrap = function ($, learun) { $("#targetgridtable").hide(); if (item.id === "01") { //换课 $('.AttemperTypeTiao').show(); - $("#AttemperTimeType").attr("isvalid", "yes");//调度时限 加入验证 - $("#AttemperTimeType").attr("checkexpession", "NotNull");//验证规则 + //$("#AttemperTimeType").attr("isvalid", "yes");//调度时限 加入验证 + //$("#AttemperTimeType").attr("checkexpession", "NotNull");//验证规则 $("#AttemperStartTime").attr("isvalid", "yes"); $("#AttemperStartTime").attr("checkexpession", "NotNull"); $("#AttemperEndTime").attr("isvalid", "yes"); @@ -178,7 +178,7 @@ var bootstrap = function ($, learun) { } } }); - $('#AttemperTimeType').lrDataItemSelect({ code: 'AttemperTimeType' }); + //$('#AttemperTimeType').lrDataItemSelect({ code: 'AttemperTimeType' }); //$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); //$('#NewF_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); //学年 @@ -269,8 +269,8 @@ var bootstrap = function ($, learun) { else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); $('.AttemperType').hide(); - $("#AttemperTimeType").removeAttr("isvalid"); - $("#AttemperTimeType").removeAttr("checkexpession"); + //$("#AttemperTimeType").removeAttr("isvalid"); + //$("#AttemperTimeType").removeAttr("checkexpession"); $("#AttemperStartTime").removeAttr("isvalid"); $("#AttemperStartTime").removeAttr("checkexpession"); $("#AttemperEndTime").removeAttr("isvalid"); @@ -282,8 +282,8 @@ var bootstrap = function ($, learun) { $('#NewClassroomNo').siblings('div').html('教室'); if (data[id].AttemperType == "01") { $('.AttemperTypeTiao').show(); - $("#AttemperTimeType").attr("isvalid", "yes"); - $("#AttemperTimeType").attr("checkexpession", "NotNull"); + //$("#AttemperTimeType").attr("isvalid", "yes"); + //$("#AttemperTimeType").attr("checkexpession", "NotNull"); $("#AttemperStartTime").attr("isvalid", "yes"); $("#AttemperStartTime").attr("checkexpession", "NotNull"); $("#AttemperEndTime").attr("isvalid", "yes"); @@ -571,8 +571,8 @@ var bootstrap = function ($, learun) { } $('[data-table="' + id + '"]').lrSetFormData(data[id]); $('.AttemperType').hide(); - $("#AttemperTimeType").removeAttr("isvalid"); - $("#AttemperTimeType").removeAttr("checkexpession"); + //$("#AttemperTimeType").removeAttr("isvalid"); + //$("#AttemperTimeType").removeAttr("checkexpession"); $("#AttemperStartTime").removeAttr("isvalid"); $("#AttemperStartTime").removeAttr("checkexpession"); $("#AttemperEndTime").removeAttr("isvalid"); @@ -584,8 +584,8 @@ var bootstrap = function ($, learun) { $('#NewClassroomNo').siblings('div').html('教室'); if (data[id].AttemperType == "01") { $('.AttemperTypeTiao').show(); - $("#AttemperTimeType").attr("isvalid", "yes"); - $("#AttemperTimeType").attr("checkexpession", "NotNull"); + //$("#AttemperTimeType").attr("isvalid", "yes"); + //$("#AttemperTimeType").attr("checkexpession", "NotNull"); $("#AttemperStartTime").attr("isvalid", "yes"); $("#AttemperStartTime").attr("checkexpession", "NotNull"); $("#AttemperEndTime").attr("isvalid", "yes"); @@ -612,22 +612,23 @@ var bootstrap = function ($, learun) { // 保存数据 save = function (processId, callBack, i) { var formData = $('body').lrGetFormData(); - if (formData.AttemperType == "03") { //对调:校区、学年、学期需要一致 - ////if (formData.F_SchoolId !== formData.NewF_SchoolId || formData.AcademicYearNo !== formData.NewAcademicYearNo || formData.Semester !== formData.NewSemester) { - //if (formData.AcademicYearNo !== formData.NewAcademicYearNo || formData.Semester !== formData.NewSemester) { - // learun.alert.warning("校区、学年、学期不一致!"); - // return false; - //} - } else if (formData.AttemperType == "01") { //换课:调度时间比较;教师或教室必填一个; - //if ((formData.NewEmpNo == null || formData.NewEmpNo == "") && (formData.NewClassroomNo == null || formData.NewClassroomNo == "")) { - // learun.alert.warning("课程新安排中教师或教室不能为空!"); - // return false; - //} - //if (formData.AttemperEndTime < formData.AttemperStartTime) { - // learun.alert.warning("调度结束时间不能小于调度开始时间!"); - // return false; - //} - } else if (formData.AttemperType == "04") { //调课 + //if (formData.AttemperType == "03") { //对调:校区、学年、学期需要一致 + // ////if (formData.F_SchoolId !== formData.NewF_SchoolId || formData.AcademicYearNo !== formData.NewAcademicYearNo || formData.Semester !== formData.NewSemester) { + // //if (formData.AcademicYearNo !== formData.NewAcademicYearNo || formData.Semester !== formData.NewSemester) { + // // learun.alert.warning("校区、学年、学期不一致!"); + // // return false; + // //} + //} else if (formData.AttemperType == "01") { //换课:调度时间比较;教师或教室必填一个; + // //if ((formData.NewEmpNo == null || formData.NewEmpNo == "") && (formData.NewClassroomNo == null || formData.NewClassroomNo == "")) { + // // learun.alert.warning("课程新安排中教师或教室不能为空!"); + // // return false; + // //} + // //if (formData.AttemperEndTime < formData.AttemperStartTime) { + // // learun.alert.warning("调度结束时间不能小于调度开始时间!"); + // // return false; + // //} + //} else + if (formData.AttemperType == "04") { //调课 if (formData) { formData.predata = JSON.parse($('#gridtable').attr("data-val")); formData.tardata = JSON.parse($('#gridtable1').attr("data-val")); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js index e26aaefa2..63aceb1ba 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js @@ -370,22 +370,22 @@ var bootstrap = function ($, learun) { } }, //换课属性 - { - label: "换课时限", name: "AttemperTimeType", width: 100, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('dataItem', { - key: value, - code: 'AttemperTimeType', - callback: function (_data) { - if (row.AttemperType == '01') { - callback(_data.text); - } else { - callback(''); - } - } - }); - } - }, + //{ + // label: "换课时限", name: "AttemperTimeType", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'AttemperTimeType', + // callback: function (_data) { + // if (row.AttemperType == '01') { + // callback(_data.text); + // } else { + // callback(''); + // } + // } + // }); + // } + //}, { label: "换课教师", name: "NewEmpNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/ImportForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/ImportForm.js index a452e1301..ba5f25e83 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/ImportForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/ImportForm.js @@ -6,6 +6,14 @@ * 描 述:导入固定资产信息 */ var id = request('id'); +var F_SchoolId = request('F_SchoolId'); +var AcademicYearNo = request('AcademicYearNo'); +var Semester = request('Semester'); +var Grade = request('Grade'); +var DeptNo = request('DeptNo'); +var GZ = request('GZ'); +var MajorNo = request('MajorNo'); +var LessonNo = request('LessonNo'); var keyVaule = ''; @@ -143,7 +151,19 @@ var bootstrap = function ($, learun) { init: function () { /*模板下载*/ $('#lr_down_file_btn').on('click', function () { - learun.download({ url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/DownTemplate', param: { keyValue: id, __RequestVerificationToken: $.lrToken }, method: 'POST' }); + learun.download({ + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/DownTemplate', param: { + keyValue: id, __RequestVerificationToken: $.lrToken, + F_SchoolId: F_SchoolId, + AcademicYearNo: AcademicYearNo, + Semester: Semester, + Grade: Grade, + DeptNo: DeptNo, + GZ: GZ, + MajorNo: MajorNo, + LessonNo: LessonNo + }, method: 'POST' + }); }); if (!WebUploader.Uploader.support()) { alert('Web Uploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器'); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/Index.js index 8834530fc..d462f88a7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/Index.js @@ -71,10 +71,18 @@ var bootstrap = function ($, learun) { ///上传 $('#lr_import').on('click', function () { + var queryparam = 'F_SchoolId=' + $('#F_SchoolId').lrselectGet() + + '&AcademicYearNo=' + $('#AcademicYearNo').lrselectGet() + + '&Semester=' + $('#Semester').lrselectGet() + + '&Grade=' + $('#Grade').lrselectGet() + + '&DeptNo=' + $('#DeptNo').lrselectGet() + + '&GZ=' + $('#GZ').lrselectGet() + + '&MajorNo=' + $('#MajorNo').lrselectGet() + + '&LessonNo=' + $('#LessonNo').lrselectGet(); learun.layerForm({ id: 'form', title: '导入', - url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/ImportForm', + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/ImportForm?' + queryparam, width: 600, height: 400, btn: null, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs index e31426e2a..8a4b56c5a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs @@ -187,7 +187,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { var weekdatelist = new List(); var yearsemester = Common.GetSemesterAndYear(); - var arrangelessonlist = arrangeLessonTermIBLL.GetListForTimeTable("{\"AcademicYearNo\":\"" + yearsemester.AcademicYearShort + "\",\"Semester\":\"" + yearsemester.Semester + "\"}").OrderBy(m => m.LessonDate); + var arrangelessonlist = arrangeLessonTermIBLL.GetListForTimeTable("{\"AcademicYearNo\":\"" + yearsemester.AcademicYearShort + "\",\"Semester\":\"" + yearsemester.Semester + "\"}").OrderBy(m => m.LessonDate); if (arrangelessonlist.Any()) { var firstday = arrangelessonlist.First(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducationSelect_.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducationSelect_.js index 492d8d0ea..e06112128 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducationSelect_.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducationSelect_.js @@ -452,6 +452,7 @@ var bootstrap = function ($, learun) { // 保存数据 acceptClick = function (callBack) { var predata = $('#predata .card-box'); + var predatacontent = $('#predata .card-box .card-box-content'); var tardata = $('#tardata .card-box'); if (predata.length == 0 || tardata.length==0) { learun.alert.warning("请选择课程!"); @@ -506,7 +507,7 @@ var bootstrap = function ($, learun) { }) var postData = { - predatastr: predata.text(),predata: predata_, tardata: JSON.parse(tardata.attr('data-val')) + predatastr: predatacontent.text(),predata: predata_, tardata: JSON.parse(tardata.attr('data-val')) }; if (!!callBack) { callBack(postData); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/OpenLessonPlanImport.xls b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/OpenLessonPlanImport.xls index 553d53d71dd8ecfaf20764f5df47d5d2111c5254..b1e8665efa965f38d07196bf6228b57c9a34ee64 100644 GIT binary patch delta 328 zcmZqp!r1VIal;hW&1YD*sWE0wZq`Yi?4}#Ld7o|_a!M#|h-I!+Bgl9tWJq4dijcc|1TK$R>z=yg(ke8l1}q zm&Rc!9j@K#RUGFiiFfG2&wYJBSe|3S_ZN?hA2eVqn;OJw%gn@(0^jlfq`O hH3TR>v%0={Uf4Os$-cH6lS?XEn8boM|EgeP1OU)(KxO~{ delta 534 zcmX|-&nrYx6vw~!y?M`@pKqEeKQ-Ih8eC|E>oO@59DhgFmI@1Qb(T6gC+U}{KQw|Xk zlUTztHn5IOY86|EVGc`3BhQlH$TZ_H4C%CVCZ_PsCRCYZ zY{DZu{`S2xY%L8(g9?0qna;byQkr%lG!h ZOr^~zOzmGJAD)G^wSAx