|
|
|
@ -389,53 +389,64 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#verifyReturn").on("click",function(){
|
|
|
|
|
var status = [-1,1];
|
|
|
|
|
var status = false;
|
|
|
|
|
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
|
|
|
|
|
|
|
|
|
if($.inArray( $(elem).data("status"),status) == 1 || $.inArray( $(elem).data("status"),status) == 1){
|
|
|
|
|
console.log($(elem).data("status"))
|
|
|
|
|
if($(elem).data("status") == 1 || $(elem).data("status") == -1){
|
|
|
|
|
return $(elem).val();
|
|
|
|
|
} else {
|
|
|
|
|
status = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).get();
|
|
|
|
|
console.log(text);
|
|
|
|
|
|
|
|
|
|
if(text.length > 40){
|
|
|
|
|
layer.msg("<font style='color:white'>" + '为保证效率暂不支持超过40条的批量操作' + "</font>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(text.length < 1){
|
|
|
|
|
layer.msg("<font style='color:white'>" + '无需要汇总的操作'+"</font>");
|
|
|
|
|
layer.msg("<font style='color:white'>" + '无需要审批撤回的操作'+"</font>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
text = text.join(",");
|
|
|
|
|
|
|
|
|
|
layer.confirm('【提示】点击确认后,审批即撤回', {
|
|
|
|
|
btn: ['确认','取消'],
|
|
|
|
|
title:false
|
|
|
|
|
}, function(){
|
|
|
|
|
_doAgreeApply();
|
|
|
|
|
});
|
|
|
|
|
if (status) {
|
|
|
|
|
layer.confirm("审批撤回仅会对【'审批通过','审批拒绝'】的申请进行处理,选择中包含其他的状态的申请将被忽略,点击取消停止操作",{title:false}, function(index){
|
|
|
|
|
_doAgreeApply();
|
|
|
|
|
layer.close(index);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
layer.confirm('【提示】点击确认后,审批即撤回', {
|
|
|
|
|
btn: ['确认','取消'],
|
|
|
|
|
title:false
|
|
|
|
|
}, function(){
|
|
|
|
|
_doAgreeApply();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function _doAgreeApply(){
|
|
|
|
|
//执行
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: "{:U('verifyReturn')}",
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
async: false,
|
|
|
|
|
data: {ids:text},
|
|
|
|
|
success:function(data){
|
|
|
|
|
if(data.status==1){
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
window.location.reload();
|
|
|
|
|
},1500);
|
|
|
|
|
}else{
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
|
|
|
return false;
|
|
|
|
|
function _doAgreeApply(){
|
|
|
|
|
//执行
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: "{:U('verifyReturn')}",
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
async: false,
|
|
|
|
|
data: {ids:text},
|
|
|
|
|
success:function(data){
|
|
|
|
|
if(data.status==1){
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
window.location.reload();
|
|
|
|
|
},1500);
|
|
|
|
|
}else{
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#export").click(function () {
|
|
|
|
|