@@ -27,7 +27,7 @@ | |||||
<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_check" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | <a id="lr_check" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | ||||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a> | |||||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-unlock"></i> 异动恢复</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -90,16 +90,16 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//去审核 | |||||
//去审核/异动恢复 | |||||
$('#lr_uncheck').on('click', function () { | $('#lr_uncheck').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | ||||
if (CheckStatus != 1) { | if (CheckStatus != 1) { | ||||
learun.alert.warning("当前项目未审核无法去审!"); | |||||
learun.alert.warning("当前项目未审核无法恢复!"); | |||||
return; | return; | ||||
} | } | ||||
learun.layerConfirm('是否确认去审核该项!', function (res) { | |||||
learun.layerConfirm('是否确认恢复该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/UnCheckForm', { keyValue: keyValue }, function () { | learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/UnCheckForm', { keyValue: keyValue }, function () { | ||||
refreshGirdData(); | refreshGirdData(); | ||||
@@ -225,7 +225,7 @@ var bootstrap = function ($, learun) { | |||||
{ | { | ||||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | label: "审核状态", name: "CheckStatus", width: 100, align: "left", | ||||
formatter: function (cellvalue) { | formatter: function (cellvalue) { | ||||
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||||
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : cellvalue == "2" ? "<span class=\"label label-warning\">已恢复</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||||
} | } | ||||
}, | }, | ||||
], | ], | ||||
@@ -95,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("CHECKUSERID")] | [Column("CHECKUSERID")] | ||||
public string CheckUserId { get; set; } | public string CheckUserId { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 审核状态:0未审核,1已审核 | |||||
/// 审核状态:0未审核,1已审核,2已恢复 | |||||
/// </summary> | /// </summary> | ||||
[Column("CHECKSTATUS")] | [Column("CHECKSTATUS")] | ||||
public int? CheckStatus { get; set; } | public int? CheckStatus { get; set; } | ||||
@@ -220,7 +220,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
//修改状态 | //修改状态 | ||||
db.ExecuteBySql("update StuInfoBasicChange set CheckTime=null,CheckUserId=null,CheckStatus=0 where Id='" + keyValue + "' "); | |||||
//db.ExecuteBySql("update StuInfoBasicChange set CheckTime=null,CheckUserId=null,CheckStatus=0 where Id='" + keyValue + "' "); | |||||
entity.CheckTime = DateTime.Now; | |||||
entity.CheckUserId = LoginUserInfo.Get().account; | |||||
entity.CheckStatus = 2; | |||||
db.Update(entity); | |||||
} | } | ||||
db.Commit(); | db.Commit(); | ||||
} | } | ||||