Quellcode durchsuchen

请假增加批量审核

北屯中职分支
liangkun vor 1 Jahr
Ursprung
Commit
b7ac738ec3
2 geänderte Dateien mit 54 neuen und 15 gelöschten Zeilen
  1. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuLeaveManagementController.cs
  2. +35
    -15
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckIndex.js

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuLeaveManagementController.cs Datei anzeigen

@@ -170,6 +170,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
stuLeaveManagementIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult SaveCheckFormMultiple(string keyValue)
{
var loginInfo = LoginUserInfo.Get();
foreach (var k in keyValue.Split(','))
{
if (!string.IsNullOrEmpty(k))
{
StuLeaveManagementEntity entity = stuLeaveManagementIBLL.GetStuLeaveManagementEntity(k);
entity.CheckUserId = loginInfo.userId;
entity.CheckUserNo = loginInfo.account;
entity.CheckTime = DateTime.Now;
stuLeaveManagementIBLL.SaveEntity(keyValue, entity);
}
}
return Success("操作成功!");
}
#endregion

}


+ 35
- 15
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckIndex.js Datei anzeigen

@@ -25,23 +25,42 @@ var bootstrap = function ($, learun) {
// 审核
$('#lr_check').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
var day = $('#gridtable').jfGridValue('LeaveDay');
if (learun.checkrow(keyValue)) {
//判断是否可以审核:请假天数大于2天且登录用户不是系主任,提示无法审核;
var day = $('#gridtable').jfGridValue('LeaveDay');
if (day > 2 && IsDeptDirector.toLowerCase() == "false") {
learun.alert.warning("该请假申请大于2天,需要由系主任审核!");
return false;
}
learun.layerForm({
id: 'checkform',
title: '审核',
url: top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/CheckForm?keyValue=' + keyValue,
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
var hastwo = false;
$(day.split(',')).each(function (e, i) {
//判断是否可以审核:请假天数大于2天且登录用户不是系主任,提示无法审核;
if (i > 2 && IsDeptDirector.toLowerCase() == "false") {
hastwo = true;
}
});
if (!hastwo) {
learun.layerConfirm('是否确认审核!',
function(res) {
if (res) {
learun.postForm(
top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/SaveCheckFormMultiple',
{ keyValue: keyValue },
function() {
refreshGirdData();
});
}
});
} else {
learun.alert.warning("请假申请包含大于2天的记录,需要由系主任审核!");
return false;
}
//learun.layerForm({
// id: 'checkform',
// title: '审核',
// url: top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/CheckForm?keyValue=' + keyValue,
// width: 800,
// height: 600,
// callBack: function (id) {
// return top[id].acceptClick(refreshGirdData);
// }
//});
}
});
},
@@ -166,7 +185,8 @@ var bootstrap = function ($, learun) {
],
mainId: 'Id',
isPage: true,
sord: 'CreateTime desc'
sord: 'CreateTime desc',
isMultiselect: true,
});
page.search();
},


Laden…
Abbrechen
Speichern