@@ -55,6 +55,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 审核 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormAudit() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -142,6 +151,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
scoreCheckInfoIBLL.SaveEntity(keyValue, entity); | scoreCheckInfoIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 一键生成 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult SaveGeneForm(string AcademicYearNo, string Semester) | public ActionResult SaveGeneForm(string AcademicYearNo, string Semester) | ||||
@@ -149,7 +164,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
int res = scoreCheckInfoIBLL.SaveGeneEntity(AcademicYearNo, Semester); | int res = scoreCheckInfoIBLL.SaveGeneEntity(AcademicYearNo, Semester); | ||||
return Success("本次生成" + res + "条数据!"); | return Success("本次生成" + res + "条数据!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 提交 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult SubmitFrom(string keyValue) | public ActionResult SubmitFrom(string keyValue) | ||||
@@ -157,7 +176,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
scoreCheckInfoIBLL.SubmitEntity(keyValue); | scoreCheckInfoIBLL.SubmitEntity(keyValue); | ||||
return Success("提交成功!"); | return Success("提交成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 审核 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult AuditFrom(string keyValue, string strEntity) | |||||
{ | |||||
ScoreCheckInfoEntity entity = strEntity.ToObject<ScoreCheckInfoEntity>(); | |||||
scoreCheckInfoIBLL.AuditEntity(keyValue, entity); | |||||
return Success("审核成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -0,0 +1,15 @@ | |||||
@{ | |||||
ViewBag.Title = "学业考核成绩记载审核表单"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap"> | |||||
<div class="col-xs-12 lr-form-item" data-table="ScoreCheckInfo"> | |||||
<div class="lr-form-item-title">审核通过</div> | |||||
<div id="CheckStatus"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ScoreCheckInfo"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="CheckOpinion" type="text" class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/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(); | |||||
} |
@@ -150,9 +150,28 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
// 审核 | // 审核 | ||||
$('#lr_lock').on('click', function () { | $('#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 () { | $('#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) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | ||||
@@ -1132,6 +1132,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Scholarship\IndexZxj.js" /> | <Content Include="Areas\EducationalAdministration\Views\Scholarship\IndexZxj.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\SchoolNews\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\SchoolNews\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\SchoolNews\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\SchoolNews\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormAudit.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormTeach.js" /> | <Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormTeach.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormGene.js" /> | <Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormGene.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ScoreStatistics\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\ScoreStatistics\Form.js" /> | ||||
@@ -1245,6 +1246,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\IndexStatistic.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\IndexStatistic.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormGene.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormGene.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormTeach.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormTeach.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormAudit.cshtml" /> | |||||
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | <None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | ||||
@@ -184,6 +184,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 审核 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="entity"></param> | |||||
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 | #endregion | ||||
} | } | ||||
@@ -27,7 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
ScoreCheckInfoEntity GetScoreCheckInfoEntity(string keyValue); | ScoreCheckInfoEntity GetScoreCheckInfoEntity(string keyValue); | ||||
ScoreCheckInfoEntity GetStuNoEntity(string keyValue,string AcademicYearNo,string Semester); | |||||
ScoreCheckInfoEntity GetStuNoEntity(string keyValue, string AcademicYearNo, string Semester); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -55,7 +55,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue"></param> | /// <param name="keyValue"></param> | ||||
void SubmitEntity(string keyValue); | void SubmitEntity(string keyValue); | ||||
/// <summary> | |||||
/// 审核 | |||||
/// </summary> | |||||
void AuditEntity(string keyValue, ScoreCheckInfoEntity entity); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -226,6 +226,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void SubmitEntity(string keyValue) | public void SubmitEntity(string keyValue) | ||||
{ | { | ||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | var db = this.BaseRepository("CollegeMIS").BeginTrans(); | ||||
@@ -254,6 +255,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 审核 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="entity"></param> | |||||
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<ScoreCheckInfoEntity>(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 | #endregion | ||||