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