@@ -119,6 +119,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
teacherCertificateIBLL.DoCheck(keyValue, status); | teacherCertificateIBLL.DoCheck(keyValue, status); | ||||
return Success("操作成功!"); | return Success("操作成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 审核实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeptForm(string keyValue, string status) | |||||
{ | |||||
teacherCertificateIBLL.DeptEntity(keyValue, status); | |||||
return Success("操作成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -37,6 +37,8 @@ | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 录入</a> | <a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 录入</a> | ||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_deptyes" class="btn btn-default"><i class="fa fa-lock"></i> 部门审核通过</a> | |||||
<a id="lr_deptno" class="btn btn-default"><i class="fa fa-unlock"></i> 部门审核不通过</a> | |||||
<a id="lr_checkYes" class="btn btn-default"><i class="fa fa-print"></i> 审核通过</a> | <a id="lr_checkYes" class="btn btn-default"><i class="fa fa-print"></i> 审核通过</a> | ||||
<a id="lr_checkNo" class="btn btn-default"><i class="fa fa-print"></i> 审核不通过</a> | <a id="lr_checkNo" class="btn btn-default"><i class="fa fa-print"></i> 审核不通过</a> | ||||
</div> | </div> | ||||
@@ -150,6 +150,42 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 审核通过 | |||||
$('#lr_deptyes').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('TCID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('DeptStatus'); | |||||
if (Status == "1" || Status == "2") { | |||||
learun.alert.warning("当前项已审核!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认审核通过该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/TeacherCertificate/DeptForm', { keyValue: keyValue, status: "1" }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 审核不通过 | |||||
$('#lr_deptno').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('TCID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('DeptStatus'); | |||||
if (Status == "1" || Status == "2") { | |||||
learun.alert.warning("当前项已审核!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认审核不通过该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/TeacherCertificate/DeptForm', { keyValue: keyValue, status: "2" }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
@@ -217,6 +253,11 @@ var bootstrap = function ($, learun) { | |||||
return cellvalue == "1" ? "<span class=\"label label-success\">已通过</span>" : cellvalue == "2" ? "<span class=\"label label-danger\">未通过</span>" : "<span class=\"label label-default\">未审核</span>"; | return cellvalue == "1" ? "<span class=\"label label-success\">已通过</span>" : cellvalue == "2" ? "<span class=\"label label-danger\">未通过</span>" : "<span class=\"label label-default\">未审核</span>"; | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
label: "审核状态", name: "DeptStatus", width: 100, align: "left", formatter: function (cellvalue) { | |||||
return cellvalue == "1" ? "<span class=\"label label-success\">已通过</span>" : cellvalue == "2" ? "<span class=\"label label-danger\">未通过</span>" : "<span class=\"label label-default\">未审核</span>"; | |||||
} | |||||
}, | |||||
], | ], | ||||
mainId: 'TCID', | mainId: 'TCID', | ||||
isPage: true, | isPage: true, | ||||
@@ -141,6 +141,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void DeptEntity(string keyValue, string status) | |||||
{ | |||||
try | |||||
{ | |||||
teacherCertificateService.DeptEntity(keyValue, status); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -74,6 +74,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// </summary> | /// </summary> | ||||
[Column("FilePath")] | [Column("FilePath")] | ||||
public string FilePath { get; set; } | public string FilePath { get; set; } | ||||
[Column("DEPTSTATUS")] public string DeptStatus { get; set; } | |||||
[Column("DEPTUSER")] public string DeptUser { get; set; } | |||||
[Column("DEPTDATE")] public string Deptdate { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -50,6 +50,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
void DoCheck(string keyValue, string status); | void DoCheck(string keyValue, string status); | ||||
/// <summary> | |||||
/// 审核实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void DeptEntity(string keyValue, string status); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -196,6 +196,32 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
public void DeptEntity(string keyValue, string status) | |||||
{ | |||||
try | |||||
{ | |||||
var userInfo = LoginUserInfo.Get(); | |||||
if (status == "1") | |||||
{ | |||||
this.BaseRepository().ExecuteBySql("update TeacherCertificate set DeptStatus='" + status + "',Deptdate='" + DateTime.Now + "',DeptUser='" + userInfo.userId + "' where TCID='" + keyValue + "' "); | |||||
} | |||||
else if (status == "2") | |||||
{ | |||||
this.BaseRepository().ExecuteBySql("update TeacherCertificate set DeptStatus='" + status + "',Deptdate=null,DeptUser=null where TCID='" + keyValue + "' "); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||