@@ -37,6 +37,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 解除处分表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult CancelForm() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -114,9 +124,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoCancelPunish(string keyValue, bool status) | |||
public ActionResult DoCancelPunish(string keyValue, bool status, string File) | |||
{ | |||
stuPunishmentIBLL.DoCancelPunish(keyValue, status); | |||
stuPunishmentIBLL.DoCancelPunish(keyValue, status, File); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "开课计划"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment"> | |||
<div class="lr-form-item-title">解除文号<font face="宋体">*</font></div> | |||
<input id="CancelFileNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment"> | |||
<div class="lr-form-item-title">解除文件<font face="宋体">*</font></div> | |||
<div id="CancelFilePatch" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuPunishment/CancelForm.js") |
@@ -0,0 +1,35 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-11-29 11:43 | |||
* 描 述:处分解除 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#CancelFilePatch').lrUploader(); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
var EmpNo = postData.EmpNo; | |||
var File = postData.CancelFilePatch; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuPunishment/DoCancelPunish', { keyValue: keyValue, status: true, File: File }, function () { | |||
}); | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -3,31 +3,31 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment" > | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment"> | |||
<div class="lr-form-item-title">学号<font face="宋体">*</font></div> | |||
<div id="StuNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
<div id="StuNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment" > | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment"> | |||
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div> | |||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment" > | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment" > | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment"> | |||
<div class="lr-form-item-title">处分名称<font face="宋体">*</font></div> | |||
<div id="PunishNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
<div id="PunishNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment" id="otherpunishname" style="display: none;"> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment" id="otherpunishname" style="display: none;"> | |||
<div class="lr-form-item-title">处分名称</div> | |||
<input id="PunishName" type="text" class="form-control"/> | |||
<input id="PunishName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment" > | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment"> | |||
<div class="lr-form-item-title">处分原因<font face="宋体">*</font></div> | |||
<input id="PunishReason" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
@@ -35,9 +35,13 @@ | |||
<div class="lr-form-item-title">处分日期<font face="宋体">*</font></div> | |||
<input id="PunishDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd")" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment" > | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment"> | |||
<div class="lr-form-item-title">处分文号<font face="宋体">*</font></div> | |||
<input id="FileNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuPunishment"> | |||
<div class="lr-form-item-title">附件</div> | |||
<div id="FilePatch"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuPunishment/Form.js") |
@@ -105,6 +105,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}); | |||
$('#FilePatch').lrUploader(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -68,10 +68,17 @@ var bootstrap = function ($, learun) { | |||
learun.alert.warning("该项已解除处分!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认解除处分该项!', function (res) { | |||
learun.layerConfirm('是否确认解除处分该项!', function (res, index) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuPunishment/DoCancelPunish', { keyValue: keyValue, status: true }, function () { | |||
refreshGirdData(); | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '解除处分', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuPunishment/CancelForm?keyValue=' + keyValue, | |||
width: 600, | |||
height: 450, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
@@ -88,7 +95,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
learun.layerConfirm('是否确认取消解除处分该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuPunishment/DoCancelPunish', { keyValue: keyValue, status: false }, function () { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuPunishment/DoCancelPunish', { keyValue: keyValue, status: false, File: null }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
@@ -103,9 +110,7 @@ var bootstrap = function ($, learun) { | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "处分名称", name: "PunishName", width: 100, align: "left" | |||
}, | |||
{ label: "处分名称", name: "PunishName", width: 100, align: "left" }, | |||
{ label: "处分原因", name: "PunishReason", width: 100, align: "left" }, | |||
{ label: "处分日期", name: "PunishDate", width: 100, align: "left" }, | |||
{ label: "处分文号", name: "FileNo", width: 100, align: "left" }, | |||
@@ -114,6 +119,7 @@ var bootstrap = function ($, learun) { | |||
return cellvalue == true ? "是" : "否"; | |||
} | |||
}, | |||
{ label: "解除文号", name: "CancelFileNo", width: 100, align: "left" }, | |||
{ label: "解除处分日期", name: "CancelPunishDate", width: 100, align: "left" }, | |||
], | |||
mainId: 'Id', | |||
@@ -1089,6 +1089,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\IndexDC.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuPunishment\CancelForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexBKUnpassTwo.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwo.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndexInTeacher.js" /> | |||
@@ -7866,6 +7867,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\FormOfElective.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\HealthPunchStu\Statistics.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\HealthPunchStu\StatisticsTeach.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuPunishment\CancelForm.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -216,11 +216,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DoCancelPunish(string keyValue, bool status) | |||
public void DoCancelPunish(string keyValue, bool status,string File) | |||
{ | |||
try | |||
{ | |||
stuPunishmentService.DoCancelPunish(keyValue, status); | |||
stuPunishmentService.DoCancelPunish(keyValue, status, File); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -40,7 +40,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("STUNAME")] | |||
public string StuName { get; set; } | |||
/// <summary> | |||
/// 处分名称码(参见DM-CFMC《处分名称代码》) | |||
/// </summary> | |||
@@ -67,6 +67,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("FILENO")] | |||
public string FileNo { get; set; } | |||
/// <summary> | |||
/// 取消处分文号 | |||
/// </summary> | |||
[Column("CANCELFILENO")] | |||
public string CancelFileNo { get; set; } | |||
/// <summary> | |||
/// 处分撤消日期 | |||
/// </summary> | |||
[Column("WITHDRAWDATE")] | |||
@@ -106,6 +111,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("CANCELPUNISHDATE")] | |||
public DateTime? CancelPunishDate { get; set; } | |||
/// <summary> | |||
/// 附件路径 | |||
/// </summary> | |||
[Column("FilePatch")] | |||
public string FilePatch { get; set; } | |||
/// <summary> | |||
/// 取消文件路径 | |||
/// </summary> | |||
[Column("CANCELFILEPATCH")] | |||
public string CancelFilePatch { get; set; } | |||
/// <summary> | |||
/// 取消用户 | |||
/// </summary> | |||
[Column("CANCELUSER")] | |||
public string CancelUser { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
@@ -73,7 +73,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
void DoCancelPunish(string keyValue, bool status); | |||
void DoCancelPunish(string keyValue, bool status, string File); | |||
#endregion | |||
} | |||
@@ -244,20 +244,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DoCancelPunish(string keyValue, bool status) | |||
public void DoCancelPunish(string keyValue, bool status, string File) | |||
{ | |||
try | |||
{ | |||
var userList = LoginUserInfo.Get(); | |||
var keyvalue = Convert.ToInt32(keyValue); | |||
if (status) | |||
{ | |||
//解除处分 | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=1,CancelPunishDate='" + DateTime.Now + "' where Id= " + keyValue); | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=1,CancelUser='" + userList.realName + "',CancelPunishDate='" + DateTime.Now + "',CancelFilePatch='" + File + "' where Id= " + keyValue); | |||
} | |||
else | |||
{ | |||
//取消解除处分 | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=0,CancelPunishDate=null where Id= " + keyValue); | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=0,CancelPunishDate=null,CancelUser=null,CancelFilePatch=null where Id= " + keyValue); | |||
} | |||
} | |||
catch (Exception ex) | |||