From 85f523329a33afc92bd993d9307d84ec58b5b8f1 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 10 Dec 2020 10:33:59 +0800 Subject: [PATCH] =?UTF-8?q?12=E4=BB=BD=E5=8A=9F=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExcelPaymentController.class.php | 2 +- .../Controller/PaymentController.class.php | 2 +- .../Payment/View/ExcelPayment/lists.html | 72 +++++++++++++++++ Application/Payment/View/Payment/lists.html | 80 ++++++++++++++++++- 4 files changed, 151 insertions(+), 5 deletions(-) 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;