From 984619e3109542de743614770db767cdedbeed3e Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 25 Sep 2020 14:19:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=87=E6=80=BB=E5=AE=A1=E6=89=B9=E6=92=A4?= =?UTF-8?q?=E5=9B=9Ebug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/CompanyStatementPool/lists.html | 71 +++++++++++-------- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/Application/Admin/View/CompanyStatementPool/lists.html b/Application/Admin/View/CompanyStatementPool/lists.html index 749bad545..36ad7be64 100644 --- a/Application/Admin/View/CompanyStatementPool/lists.html +++ b/Application/Admin/View/CompanyStatementPool/lists.html @@ -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("" + '为保证效率暂不支持超过40条的批量操作' + ""); return; } if(text.length < 1){ - layer.msg("" + '无需要汇总的操作'+""); + layer.msg("" + '无需要审批撤回的操作'+""); 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("" + data.info + ""); - setTimeout(function(){ - window.location.reload(); - },1500); - }else{ - layer.msg("" + data.info + ""); - 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("" + data.info + ""); + setTimeout(function(){ + window.location.reload(); + },1500); + }else{ + layer.msg("" + data.info + ""); + return false; + } } - } - }); + }); + } } + + }); $("#export").click(function () {