|
|
@@ -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(); |
|
|
|
}, |
|
|
|