diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index feff73194..f8ff92edc 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -446,7 +446,7 @@ class ExcelPaymentController extends BaseController */ public function verify() { // dump($_SESSION['onethink_admin']['payment_user']['id']);die(); - if (!$_REQUEST['id']||!$_REQUEST['status']) { + if ((!$_REQUEST['id']||!$_REQUEST['status'])&&$_REQUEST['status']!='0') { $this->ajaxReturn(['status'=>0,'msg'=>'数据传输错误']); } diff --git a/Application/Payment/Controller/PaymentController.class.php b/Application/Payment/Controller/PaymentController.class.php index f00575e49..3e949c1d3 100644 --- a/Application/Payment/Controller/PaymentController.class.php +++ b/Application/Payment/Controller/PaymentController.class.php @@ -1003,7 +1003,7 @@ class PaymentController extends BaseController */ public function verify() { // dump($_SESSION['onethink_admin']['payment_user']['id']);die(); - if (!$_REQUEST['id']||!$_REQUEST['status']) { + if ((!$_REQUEST['id']||!$_REQUEST['status'])&&$_REQUEST['status']!='0') { $this->ajaxReturn(['status'=>0,'msg'=>'数据传输错误']); } diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html index 55dd0a1c0..4f69fc030 100644 --- a/Application/Payment/View/ExcelPayment/lists.html +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -191,6 +191,7 @@ 审核通过 审核拒绝 + 审核撤回 批量删除 @@ -391,6 +392,77 @@ }); }); + $(".return_verify").click(function () { + + var status = $(this).data('value'); + var verifytip = 0; + var paytip = 0; + + var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + + var verifystatus = $(elem).data('verifystatus'); + var pay_status = $(elem).data('paystatus'); + + if (verifystatus == 0) { + verifytip = 1; + return ; + } + + if (pay_status != 0) { + paytip = 1; + return ; + } + + return $(elem).val(); + + }).get(); + + if (verifytip == 1) { + layer.msg("" + '请选择已审核的打款单' + ""); + return; + } + + if (paytip == 1) { + layer.msg("" + '请选择未打款的打款单' + ""); + return; + } + + if(text.length < 1){ + layer.msg("" + '请先选择要操作的打款单' + ""); + return; + } + + layer.confirm('【提示】是否确认取消审核'+((status==1)?'通过':'拒绝'), { + btn: ['确认','取消'], + title:false + }, function(){ + $.ajax({ + type:'post', + dataType:'json', + data: {'id':text,'status':status}, + url:"{:U('verify')}", + success:function(data) { + + if (data.status ==1) { + //弹框 + layer.msg("审批撤回成功"); + setTimeout(function(){ + window.location.reload(); + },1500); + } else { + layer.msg("审批撤回失败"); + } + }, + error:function() { + alert('服务器开小差了,请稍后再试。'); + // checkcode(mobile); + } + }); + + }); + + }); + $(".verify").click(function () { var status = $(this).data('value'); diff --git a/Application/Payment/View/Payment/lists.html b/Application/Payment/View/Payment/lists.html index 055f4c343..3da5d4f63 100644 --- a/Application/Payment/View/Payment/lists.html +++ b/Application/Payment/View/Payment/lists.html @@ -216,6 +216,7 @@ 审核通过 审核拒绝 + 审核撤回 @@ -429,6 +430,79 @@ $(function(){ + $(".return_verify").click(function () { + + var status = $(this).data('value'); + var verifytip = 0; + var paytip = 0; + var canpay = 0; + + var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + + var verifystatus = $(elem).data('verifystatus'); + var pay_status = $(elem).data('paystatus'); + + if (verifystatus == 0) { + verifytip = 1; + return ; + } + + if (pay_status != 0) { + paytip = 1; + return ; + } + + return $(elem).data('verify_id'); + + }).get(); + + if (verifytip == 1) { + layer.msg("" + '请选择已审核的打款单' + ""); + return; + } + + if (paytip == 1) { + layer.msg("" + '请选择未打款的打款单' + ""); + return; + } + + if(text.length < 1){ + layer.msg("" + '请先选择要操作的打款单' + ""); + return; + } + + layer.confirm('【提示】是否取消审核'+((status==1)?'通过':'拒绝'), { + btn: ['确认','取消'], + title:false + }, function(){ + $.ajax({ + type:'post', + dataType:'json', + data: {'id':text,'status':status}, + url:"{:U('verify')}", + success:function(data) { + + if (data.status ==1) { + //弹框 + layer.msg("审批撤回成功"); + setTimeout(function(){ + window.location.reload(); + },1500); + } else { + layer.msg("审批撤回失败"); + } + }, + error:function() { + alert('服务器开小差了,请稍后再试。'); + // checkcode(mobile); + } + }); + + }); + + }); + + $(".verify").click(function () { var status = $(this).data('value'); @@ -570,7 +644,6 @@ } }).get(); - console.log(text) // text = "47,99,100"; $("#tbody").empty(); $.ajax({ @@ -612,12 +685,13 @@ var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { var verifystatus = $(elem).data('verifystatus'); - if($(elem).data("pay") == 1 && verifystatus == 1){ + if($(elem).data("pay") == 1 && verifystatus == 1 && $(elem).val()!=''){ return $(elem).val(); } }).get(); + console.log(text) text = text.join(","); if (!text) { @@ -662,7 +736,7 @@ layer.msg("请先选择需要打款的结算单"); return; } - + console.log(text); checkPaymentOrder(); return;