From dcf5a80a061cfd3c5adcc9be8fb62f6340d74383 Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 1 Aug 2022 16:49:31 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=AD=A6=E7=B1=8D?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E4=BC=98=E5=8C=96=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E9=99=84=E5=8A=A0=E5=AF=BC=E5=85=A5=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasic/MyClass.cshtml | 27 +++++++++++++++++++ .../Views/StuInfoBasic/MyClass.js | 12 +++++++++ .../StuInfoBasic/StuInfoBasicService.cs | 4 +-- 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.cshtml index 342874a16..1ffd38a1c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.cshtml @@ -16,10 +16,37 @@
+
+
+
+
+
学号
+ +
+
+
姓名
+ +
+
+
性别
+
+
+
+
民族
+
+
+
+
身份证号
+ +
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.js index c2757cb65..b512795e8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.js @@ -1,6 +1,7 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; + var Class; var page = { init: function () { page.initGird(); @@ -11,13 +12,23 @@ var bootstrap = function ($, learun) { $('#dataTree').lrtree({ url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetTree', nodeClick: function (item) { + Class = item.value; page.search({ ClassNo: item.value }); } }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); + $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); }, // 初始化列表 initGird: function () { @@ -146,6 +157,7 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.ClassNo = Class; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index 8fa00c304..0686ad30e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -43,8 +43,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var dp = new DynamicParameters(new { }); if (!queryParam["StuNo"].IsEmpty()) { - dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); - strSql.Append(" AND t.StuNo = @StuNo "); + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); } if (!queryParam["StuName"].IsEmpty()) { From ea83d5472a9f35a8d4c47e4e7360757cda6f2a91 Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 1 Aug 2022 16:54:33 +0800 Subject: [PATCH 2/7] --- .../Areas/LR_OrganizationModule/Views/User/Index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js index 611fda114..6053b5349 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js @@ -323,7 +323,7 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/LR_OrganizationModule/User/GetPageList', headData: [ - { label: '账户', name: 'F_IdentityCardNo', width: 100, align: 'left' }, + { label: '账户', name: 'F_IdentityCardNo', width: 200, align: 'left' }, //{ label: '账户', name: 'F_Account', width: 100, align: 'left' }, { label: '姓名', name: 'F_RealName', width: 160, align: 'left' }, { label: '手机', name: 'F_Mobile', width: 100, align: 'center' }, From 1a4c8d2147f95a05ac31d2f0d5d00fce8537d9a1 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 2 Aug 2022 10:42:57 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=A5=96=E5=8A=B1?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E7=8F=AD=E7=BA=A7=E7=AD=89=E5=B1=9E?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuEncourgement/Form.cshtml | 4 ++++ .../Views/StuEncourgement/Form.js | 4 ++++ .../StuEncourgement/StuEncourgementEntity.cs | 20 +++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Form.cshtml index 8439d9669..e5a1fb6d6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Form.cshtml @@ -10,6 +10,10 @@
姓名*
+ + + +
学年*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Form.js index 3bada9dba..4c6dc8849 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Form.js @@ -90,6 +90,10 @@ var bootstrap = function ($, learun) { ], select: function (item) { $("#StuName").val(item.stuname); + $("#ClassNo").val(item.classno); + $("#MajorNo").val(item.majorno); + $("#DeptNo").val(item.deptno); + $("#Grade").val(item.grade); } }); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementEntity.cs index 2a0bbabc7..cfd9964b4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementEntity.cs @@ -106,6 +106,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("CHECKMARK")] public string CheckMark { get; set; } + /// + /// 年级 + /// + [Column("GRADE")] + public string Grade { get; set; } + /// + /// 系所代码 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 专业代码 + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// 行政班号 + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } #endregion #region 扩展操作 From 4b35a525ae6cb94e09244811b791ee7cc2e15092 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 3 Aug 2022 09:48:08 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=A5=96=E5=8A=B1?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=20-=E4=B8=93=E4=B8=9A/=E5=B9=B4=E7=BA=A7/?= =?UTF-8?q?=E7=8F=AD=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuEncourgementController.cs | 110 +++++++++- .../Views/StuEncourgement/ClassIndex.cshtml | 51 +++++ .../Views/StuEncourgement/ClassIndex.js | 199 ++++++++++++++++++ .../Views/StuEncourgement/DeptIndex.cshtml | 39 ++++ .../Views/StuEncourgement/DeptIndex.js | 122 +++++++++++ .../Views/StuEncourgement/MajorIndex.cshtml | 43 ++++ .../Views/StuEncourgement/MajorIndex.js | 128 +++++++++++ .../Learun.Application.Web.csproj | 6 + .../StuEncourgement/StuEncourgementBLL.cs | 23 ++ .../StuEncourgement/StuEncourgementEntity.cs | 4 +- .../StuEncourgement/StuEncourgementIBLL.cs | 1 + .../StuEncourgement/StuEncourgementService.cs | 127 ++++++++++- 12 files changed, 838 insertions(+), 15 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementController.cs index 4b175b3fa..8221411a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementController.cs @@ -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 { @@ -26,7 +27,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -35,8 +36,36 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult DeptIndex() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult MajorIndex() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult ClassIndex() + { + return View(); + } + #endregion #region 获取数据 @@ -62,6 +91,76 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success(jsonData); } /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListOne(string queryJson) + { + var data = stuEncourgementIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + Num = x.Count(), + }); + return Success(data1); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListTwo(string queryJson) + { + var data = stuEncourgementIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Grade, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + Grade = x.Key.Grade, + Num = x.Count(), + }); + return Success(data1); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListThree(string queryJson) + { + var data = stuEncourgementIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new + { + x.AcademicYearNo, + x.Semester, + x.DeptNo, + x.MajorNo, + x.ClassNo, + x.Grade, + x.Num + }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + MajorNo = x.Key.MajorNo, + ClassNo = x.Key.ClassNo, + Grade = x.Key.Grade, + Num = x.Count(), + }); + return Success(data1); + } + /// /// 获取表单数据 /// /// @@ -69,8 +168,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var StuEncourgementData = stuEncourgementIBLL.GetStuEncourgementEntity( keyValue ); - var jsonData = new { + var StuEncourgementData = stuEncourgementIBLL.GetStuEncourgementEntity(keyValue); + var jsonData = new + { StuEncourgement = StuEncourgementData, }; return Success(jsonData); @@ -102,7 +202,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { StuEncourgementEntity entity = strEntity.ToObject(); - stuEncourgementIBLL.SaveEntity(keyValue,entity); + stuEncourgementIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.cshtml new file mode 100644 index 000000000..f488421c2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.cshtml @@ -0,0 +1,51 @@ +@{ + ViewBag.Title = "学生奖励管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
年级
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.js new file mode 100644 index 000000000..35fe1eacf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.js @@ -0,0 +1,199 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-06-18 10:08 + * 描 述:学生奖励管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + $('#DeptNo').lrselect({ + allowSearch: true, + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + select: function (item) { + if (item) { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } + }); + } else { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + + } + }); + $('#MajorNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + value: "majorno", + text: "majorname", + param: { strWhere: "1=1 AND CheckMark=1" }, + select: function (item) { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" }, + value: "classno", + text: "classname" + }); + $('#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' + }); + $('#Grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', + value: "value", + text: "text", + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEncourgement/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/GetPageListThree', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 200, align: "left" }, + { label: "学期", name: "Semester", width: 200, align: "left" }, + { + label: "系别", name: "DeptNo", width: 200, 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: 200, 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: 200, 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: 200, align: "left" }, + { label: "次数", name: "Num", width: 200, align: "left" }, + ], + mainId: 'ID', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.cshtml new file mode 100644 index 000000000..54355123d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "学生奖励管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
系部
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.js new file mode 100644 index 000000000..29c55a4e0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.js @@ -0,0 +1,122 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-06-18 10:08 + * 描 述:学生奖励管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + $('#DeptNo').lrselect({ + allowSearch: true, + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + }); + $('#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' + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEncourgement/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/GetPageListOne', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 400, align: "left" }, + { label: "学期", name: "Semester", width: 400, align: "left" }, + { + label: "系别", name: "DeptNo", width: 400, 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: "Num", width: 400, align: "left" }, + ], + mainId: 'ID', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.cshtml new file mode 100644 index 000000000..0cc208db8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.cshtml @@ -0,0 +1,43 @@ +@{ + ViewBag.Title = "学生奖励管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
系部
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
年级
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.js new file mode 100644 index 000000000..ef8a1d610 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.js @@ -0,0 +1,128 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-06-18 10:08 + * 描 述:学生奖励管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + $('#DeptNo').lrselect({ + allowSearch: true, + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + }); + $('#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' + }); + $('#Grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', + value: "value", + text: "text", + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEncourgement/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/GetPageListTwo', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 300, align: "left" }, + { label: "学期", name: "Semester", width: 300, align: "left" }, + { + label: "系别", name: "DeptNo", width: 300, 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: "Grade", width: 300, align: "left" }, + { label: "次数", name: "Num", width: 300, align: "left" }, + ], + mainId: 'ID', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 964daad61..70c6b07e8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1092,6 +1092,9 @@ + + + @@ -1121,6 +1124,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementBLL.cs index e45e38a2c..d56ad3012 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementBLL.cs @@ -41,6 +41,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(string queryJson) + { + try + { + return stuEncourgementService.GetPageList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } public IEnumerable GetAllList() { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementEntity.cs index cfd9964b4..358b9feed 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementEntity.cs @@ -40,7 +40,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("STUNAME")] public string StuName { get; set; } - + /// /// 奖励名称 /// @@ -145,6 +145,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 + [NotMapped] + public int Num { get; set; } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementIBLL.cs index 10795332c..71fb08b16 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementIBLL.cs @@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetPageList(string queryJson); IEnumerable GetAllList(); /// /// 获取StuEncourgement表实体数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs index 19ea322af..3157c8526 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs @@ -31,20 +31,53 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.StuNo, - t.StuName, - t.EncourgeName, - t.Reason, - t.Fee, - t.EncourgeDate - "); + strSql.Append(@" * "); strSql.Append(" FROM StuEncourgement t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); + } + if (!queryParam["Sex"].IsEmpty()) + { + dp.Add("Sex", queryParam["Sex"].ToString(), DbType.String); + strSql.Append(" AND t.Sex = @Sex "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.ClassNo = @ClassNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) @@ -59,6 +92,82 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" * "); + strSql.Append(" FROM StuEncourgement t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); + } + if (!queryParam["Sex"].IsEmpty()) + { + dp.Add("Sex", queryParam["Sex"].ToString(), DbType.String); + strSql.Append(" AND t.Sex = @Sex "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.ClassNo = @ClassNo "); + } + if (!queryParam["Grade"].IsEmpty()) + { + dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); + strSql.Append(" AND t.Grade = @Grade "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } public IEnumerable GetAllList() { try From c60364ac59f09f6b91197d95eaf6892d81059048 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 3 Aug 2022 10:22:06 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=A5=96=E5=8A=B1?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=20-=20=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=A5=96=E5=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuEncourgementController.cs | 31 ++++++++- .../Views/StuEncourgement/ClassIndex.js | 42 ------------- .../Views/StuEncourgement/DeptIndex.js | 42 ------------- .../Views/StuEncourgement/MajorIndex.js | 42 ------------- .../Views/StuEncourgement/StuIndex.cshtml | 43 +++++++++++++ .../Views/StuEncourgement/StuIndex.js | 63 +++++++++++++++++++ .../Learun.Application.Web.csproj | 2 + 7 files changed, 138 insertions(+), 127 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/StuIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/StuIndex.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementController.cs index 8221411a1..d79aeda66 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementController.cs @@ -65,7 +65,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } - + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult StuIndex() + { + return View(); + } #endregion #region 获取数据 @@ -160,6 +168,27 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }); return Success(data1); } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListStu(string queryJson) + { + var data = stuEncourgementIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.StuNo, x.StuName, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + StuNo = x.Key.StuNo, + StuName = x.Key.StuName, + Num = x.Count(), + }); + return Success(data1); + } + /// /// 获取表单数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.js index 35fe1eacf..3ea1e7c05 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/ClassIndex.js @@ -91,48 +91,6 @@ var bootstrap = function ($, learun) { value: "value", text: "text", }); - // 新增 - $('#lr_add').on('click', function () { - learun.layerForm({ - id: 'form', - title: '新增', - url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form', - width: 600, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); - }); - // 编辑 - $('#lr_edit').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('ID'); - if (learun.checkrow(keyValue)) { - learun.layerForm({ - id: 'form', - title: '编辑', - url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form?keyValue=' + keyValue, - width: 600, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); - } - }); - // 删除 - $('#lr_delete').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('ID'); - if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { - if (res) { - learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEncourgement/DeleteForm', { keyValue: keyValue }, function () { - refreshGirdData(); - }); - } - }); - } - }); }, // 初始化列表 initGird: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.js index 29c55a4e0..ac1c34fb2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/DeptIndex.js @@ -41,48 +41,6 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); - // 新增 - $('#lr_add').on('click', function () { - learun.layerForm({ - id: 'form', - title: '新增', - url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form', - width: 600, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); - }); - // 编辑 - $('#lr_edit').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('ID'); - if (learun.checkrow(keyValue)) { - learun.layerForm({ - id: 'form', - title: '编辑', - url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form?keyValue=' + keyValue, - width: 600, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); - } - }); - // 删除 - $('#lr_delete').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('ID'); - if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { - if (res) { - learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEncourgement/DeleteForm', { keyValue: keyValue }, function () { - refreshGirdData(); - }); - } - }); - } - }); }, // 初始化列表 initGird: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.js index ef8a1d610..9d854fbe3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/MajorIndex.js @@ -46,48 +46,6 @@ var bootstrap = function ($, learun) { value: "value", text: "text", }); - // 新增 - $('#lr_add').on('click', function () { - learun.layerForm({ - id: 'form', - title: '新增', - url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form', - width: 600, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); - }); - // 编辑 - $('#lr_edit').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('ID'); - if (learun.checkrow(keyValue)) { - learun.layerForm({ - id: 'form', - title: '编辑', - url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/Form?keyValue=' + keyValue, - width: 600, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); - } - }); - // 删除 - $('#lr_delete').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('ID'); - if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { - if (res) { - learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEncourgement/DeleteForm', { keyValue: keyValue }, function () { - refreshGirdData(); - }); - } - }); - } - }); }, // 初始化列表 initGird: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/StuIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/StuIndex.cshtml new file mode 100644 index 000000000..116c60469 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/StuIndex.cshtml @@ -0,0 +1,43 @@ +@{ + ViewBag.Title = "学生奖励管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
学号
+ +
+
+
姓名
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEncourgement/StuIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/StuIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/StuIndex.js new file mode 100644 index 000000000..4a097dfb3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/StuIndex.js @@ -0,0 +1,63 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-06-18 10:08 + * 描 述:学生奖励管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + $('#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' + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/GetPageListStu', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 300, align: "left" }, + { label: "学期", name: "Semester", width: 300, align: "left" }, + { label: "学号", name: "StuNo", width: 300, align: "left" }, + { label: "姓名", name: "StuName", width: 300, align: "left" }, + { label: "次数", name: "Num", width: 300, align: "left" }, + ], + mainId: 'ID', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 70c6b07e8..476c56c19 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1093,6 +1093,7 @@ + @@ -1127,6 +1128,7 @@ + From 76ce6290e0e056bb1ac85e158f4e2fad9c2510b5 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 3 Aug 2022 11:42:08 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=A4=84=E5=88=86?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=20/=E4=B8=93=E4=B8=9A=E9=83=A8/=E5=B9=B4?= =?UTF-8?q?=E7=BA=A7/=E7=8F=AD=E7=BA=A7/=E5=AD=A6=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuPunishmentController.cs | 127 ++++++++++++++ .../Views/StuPunishment/ClassIndex.cshtml | 51 ++++++ .../Views/StuPunishment/ClassIndex.js | 157 ++++++++++++++++++ .../Views/StuPunishment/DeptIndex.cshtml | 39 +++++ .../Views/StuPunishment/DeptIndex.js | 80 +++++++++ .../Views/StuPunishment/Form.cshtml | 24 +-- .../Views/StuPunishment/Form.js | 5 +- .../Views/StuPunishment/Index.js | 14 +- .../Views/StuPunishment/MajorIndex.cshtml | 43 +++++ .../Views/StuPunishment/MajorIndex.js | 86 ++++++++++ .../Views/StuPunishment/StuIndex.cshtml | 43 +++++ .../Views/StuPunishment/StuIndex.js | 63 +++++++ .../Learun.Application.Web.csproj | 8 + .../StuPunishment/StuPunishmentBLL.cs | 23 +++ .../StuPunishment/StuPunishmentEntity.cs | 25 ++- .../StuPunishment/StuPunishmentIBLL.cs | 1 + .../StuPunishment/StuPunishmentService.cs | 100 +++++++++++ 17 files changed, 870 insertions(+), 19 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/ClassIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/ClassIndex.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/DeptIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/DeptIndex.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/MajorIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/MajorIndex.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/StuIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/StuIndex.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentController.cs index 569c7f202..48a826b61 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentController.cs @@ -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 { @@ -37,6 +38,42 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 表页面 + /// + /// + [HttpGet] + public ActionResult DeptIndex() + { + return View(); + } + /// + /// 表页面 + /// + /// + [HttpGet] + public ActionResult MajorIndex() + { + return View(); + } + /// + /// 表页面 + /// + /// + [HttpGet] + public ActionResult ClassIndex() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult StuIndex() + { + return View(); + } #endregion #region 获取数据 @@ -76,6 +113,96 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListOne(string queryJson) + { + var data = stuPunishmentIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + Num = x.Count(), + }); + return Success(data1); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListTwo(string queryJson) + { + var data = stuPunishmentIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Grade, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + Grade = x.Key.Grade, + Num = x.Count(), + }); + return Success(data1); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListThree(string queryJson) + { + var data = stuPunishmentIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new + { + x.AcademicYearNo, + x.Semester, + x.DeptNo, + x.MajorNo, + x.ClassNo, + x.Grade, + x.Num + }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + MajorNo = x.Key.MajorNo, + ClassNo = x.Key.ClassNo, + Grade = x.Key.Grade, + Num = x.Count(), + }); + return Success(data1); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListStu(string queryJson) + { + var data = stuPunishmentIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.StuNo, x.StuName, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + StuNo = x.Key.StuNo, + StuName = x.Key.StuName, + Num = x.Count(), + }); + return Success(data1); + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/ClassIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/ClassIndex.cshtml new file mode 100644 index 000000000..561fc6c30 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/ClassIndex.cshtml @@ -0,0 +1,51 @@ +@{ + ViewBag.Title = "学生奖励管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
年级
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuPunishment/ClassIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/ClassIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/ClassIndex.js new file mode 100644 index 000000000..e9821429d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/ClassIndex.js @@ -0,0 +1,157 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-06-18 10:08 + * 描 述:学生奖励管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + $('#DeptNo').lrselect({ + allowSearch: true, + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + select: function (item) { + if (item) { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } + }); + } else { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + + } + }); + $('#MajorNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + value: "majorno", + text: "majorname", + param: { strWhere: "1=1 AND CheckMark=1" }, + select: function (item) { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" }, + value: "classno", + text: "classname" + }); + $('#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' + }); + $('#Grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', + value: "value", + text: "text", + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuPunishment/GetPageListThree', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 200, align: "left" }, + { label: "学期", name: "Semester", width: 200, align: "left" }, + { + label: "系别", name: "DeptNo", width: 200, 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: 200, 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: 200, 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: 200, align: "left" }, + { label: "次数", name: "Num", width: 200, align: "left" }, + ], + mainId: 'ID', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/DeptIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/DeptIndex.cshtml new file mode 100644 index 000000000..3fb959b03 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/DeptIndex.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "学生奖励管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
系部
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuPunishment/DeptIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/DeptIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/DeptIndex.js new file mode 100644 index 000000000..d35b9fdd9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/DeptIndex.js @@ -0,0 +1,80 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-06-18 10:08 + * 描 述:学生奖励管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + $('#DeptNo').lrselect({ + allowSearch: true, + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + }); + $('#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' + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuPunishment/GetPageListOne', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 400, align: "left" }, + { label: "学期", name: "Semester", width: 400, align: "left" }, + { + label: "系别", name: "DeptNo", width: 400, 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: "Num", width: 400, align: "left" }, + ], + mainId: 'ID', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Form.cshtml index 9560e249e..731abb042 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Form.cshtml @@ -3,31 +3,35 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
学号*
-
+
-
+
姓名*
+ + + +
-
+
学年*
-
+
学期*
处分名称*
-
+
-