From 123b5fd3a5d07a36d02a989aa0af7f75c386ca2b Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 31 Jan 2023 11:16:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E7=A7=BB=E5=8A=A8=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuTransferInfoController.cs | 2 +- .../Views/StuTransferInfo/CheckIndex.js | 29 +++++++++++++++---- .../StuTransferInfo/StuTransferInfoEntity.cs | 4 +-- .../StuTransferInfo/StuTransferInfoService.cs | 5 ++-- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuTransferInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuTransferInfoController.cs index d210bccf0..6ddcec7b2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuTransferInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuTransferInfoController.cs @@ -181,7 +181,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// 实体 /// [HttpPost] - //[ValidateAntiForgeryToken] + [ValidateAntiForgeryToken] [AjaxOnly] public ActionResult SaveForm(StuTransferInfoEntity entity, string strStuEntity) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/CheckIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/CheckIndex.js index 65a37905b..9da0b9451 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/CheckIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/CheckIndex.js @@ -29,6 +29,12 @@ var bootstrap = function ($, learun) { $('#CheckUserId').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); $('#CreateUserId').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); $('#F_EnabledMark').lrDataItemSelect({ code: 'YesOrNoInt' }); + + $('#F_EnabledMark').lrselect({ + data: [{ text: "作废", value: "0" }, { text: "未审核", value: "1" }, { text: "已审核", value: "2" }], + text: "text", + value: "value" + }) // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -80,9 +86,14 @@ var bootstrap = function ($, learun) { headData: [ { label: '姓名', name: 'StuName', width: 100, align: "left" }, { label: '学号', name: 'StuNo', width: 150, align: "left" }, - { label: '性别', name: 'Gender', width: 100, align: "left" }, { - label: '异动类型', name: 'AnomalousType', width: 150, align: "left", + label: '性别', name: 'Gender', width: 80, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "男" : "女"; + } + }, + { + label: '异动类型', name: 'AnomalousType', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, @@ -106,7 +117,7 @@ var bootstrap = function ($, learun) { } }, //{ label: '身份证号', name: 'IdentityCardNo', width: 160, align: "left" }, - + { label: '异动前班级', name: 'ClassNo', width: 140, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -159,7 +170,7 @@ var bootstrap = function ($, learun) { // }); // } //}, - + { label: '异动后班级', name: 'NewClassNo', width: 140, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -242,7 +253,13 @@ var bootstrap = function ($, learun) { { label: '审核状态', name: 'F_EnabledMark', width: 100, align: "left", formatter: function (cellvalue) { - return cellvalue == "1" ? "已审核" : "未审核"; + if (cellvalue == "0") { + return "未审核"; + } else if (cellvalue == "1") { + return "已审核"; + } else if (cellvalue == "2") { + return "作废"; + } } }, { @@ -329,7 +346,7 @@ var bootstrap = function ($, learun) { mainId: 'ID', isPage: true, rows: 100, - sidx: 'F_EnabledMark asc,CreateUserId asc', + sidx: 'F_EnabledMark asc,CreateUserId asc,CreateTime desc', isMultiselect: true }); page.search(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoEntity.cs index b452f9ea0..bcd646fff 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoEntity.cs @@ -159,7 +159,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("CHECKUSERID")] public string CheckUserId { get; set; } /// - /// 审核状态0否1是 + /// 审核状态//0未审核,1已审核 2 作废 /// /// [Column("F_ENABLEDMARK")] @@ -336,7 +336,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration UserInfo userInfo = LoginUserInfo.Get(); this.CreateTime = DateTime.Now; this.CreateUserId = userInfo.userId; - this.F_EnabledMark = 0;//审核状态默认为未审核 + this.F_EnabledMark = 0;//0未审核,1已审核 2 作废 this.IsReturnSchool = "1"; } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs index 0cc74429f..308243ce1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs @@ -103,7 +103,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("StuStatus", queryParam["StuStatus"].ToString(), DbType.String); strSql.Append(" AND t.StuStatus = @StuStatus "); } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -226,7 +226,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var InsertEntity = new StuTransferInfoEntity(); //历史数据 - //InsertEntity.ID = Guid.NewGuid().ToString(); InsertEntity.StuId = item.StuId; InsertEntity.StuNo = item.StuNo; InsertEntity.StuName = item.StuName; @@ -245,7 +244,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration InsertEntity.NewDeptNo = entity.NewDeptNo; InsertEntity.NewGrade = entity.NewGrade; InsertEntity.LeaveDate = entity.LeaveDate; - InsertEntity.StuStatus = entity.StuStatus; + InsertEntity.ChangeReason = entity.Remark; // InsertEntity.StuStatus = entity.StuStatus; InsertEntity.F_WriteMark = entity.F_WriteMark;