diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs index 343bfac5a..d0dcc98bb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs @@ -55,6 +55,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 审核 + /// + /// + [HttpGet] + public ActionResult FormAudit() + { + return View(); + } #endregion #region 获取数据 @@ -142,6 +151,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers scoreCheckInfoIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + /// + /// 一键生成 + /// + /// + /// + /// [HttpPost] [AjaxOnly] public ActionResult SaveGeneForm(string AcademicYearNo, string Semester) @@ -149,7 +164,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers int res = scoreCheckInfoIBLL.SaveGeneEntity(AcademicYearNo, Semester); return Success("本次生成" + res + "条数据!"); } - + /// + /// 提交 + /// + /// + /// [HttpPost] [AjaxOnly] public ActionResult SubmitFrom(string keyValue) @@ -157,7 +176,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers scoreCheckInfoIBLL.SubmitEntity(keyValue); return Success("提交成功!"); } - + /// + /// 审核 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult AuditFrom(string keyValue, string strEntity) + { + ScoreCheckInfoEntity entity = strEntity.ToObject(); + scoreCheckInfoIBLL.AuditEntity(keyValue, entity); + return Success("审核成功!"); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.cshtml new file mode 100644 index 000000000..ee2059da1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "学业考核成绩记载审核表单"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
审核通过
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.js new file mode 100644 index 000000000..c791a6203 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.js @@ -0,0 +1,55 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-05-15 10:33 + * 描 述:选修课报名审核表单 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#CheckStatus').lrRadioCheckbox({ + type: 'radio', + code: 'YesOrNoInt', + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + console.log(keyValue,"keyValue") + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/AuditFrom?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js index cdbe936f9..c57fd3c74 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js @@ -150,9 +150,28 @@ var bootstrap = function ($, learun) { }); //  审核 $('#lr_lock').on('click', function () { - }); - //  去审核 - $('#lr_unlock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + //if (keyValue.indexOf(',') != -1) { + // learun.alert.warning("只能选择一条记录进行编辑!"); + // return; + //} + var CheckMark = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckMark != "1") { + learun.alert.warning("当前项不可审核!"); + return; + } + learun.layerForm({ + id: 'formTeach', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/FormAudit?keyValue=' + keyValue, + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } }); //  教师评语 $('#lr_Coordinator').on('click', function () { @@ -273,7 +292,7 @@ var bootstrap = function ($, learun) { } }, { - label: "评语填写人", name: "Signed", width: 100, align: "left" , + label: "评语填写人", name: "Signed", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', 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 b94cad249..78fd9ae4f 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 @@ -1132,6 +1132,7 @@ + @@ -1245,6 +1246,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs index 068a37369..68f4674af 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs @@ -184,6 +184,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 审核 + /// + /// + /// + public void AuditEntity(string keyValue, ScoreCheckInfoEntity entity) + { + try + { + scoreCheckInfoService.AuditEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs index 30890e2a6..8dc5a6ed0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs @@ -27,7 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// ScoreCheckInfoEntity GetScoreCheckInfoEntity(string keyValue); - ScoreCheckInfoEntity GetStuNoEntity(string keyValue,string AcademicYearNo,string Semester); + ScoreCheckInfoEntity GetStuNoEntity(string keyValue, string AcademicYearNo, string Semester); #endregion #region 提交数据 @@ -55,7 +55,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void SubmitEntity(string keyValue); - + /// + /// 审核 + /// + void AuditEntity(string keyValue, ScoreCheckInfoEntity entity); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs index ece9fb8a9..f02370456 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs @@ -226,6 +226,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public void SubmitEntity(string keyValue) { var db = this.BaseRepository("CollegeMIS").BeginTrans(); @@ -254,6 +255,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 审核 + /// + /// + /// + public void AuditEntity(string keyValue, ScoreCheckInfoEntity entity) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var userlogin = LoginUserInfo.Get(); + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + var model = db.FindEntity(x => x.ID == item); + model.CheckStatus = "2"; + model.CheckTime = DateTime.Now; + model.CheckUser = userlogin.userId; + model.UpdateTime = DateTime.Now; + model.UpdateUser = userlogin.userId; + db.Update(model); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion