From 260ca6fe9ebfac7fd3015df9e42cc70a7f6501ae Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 20 Feb 2020 16:10:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=8D=95=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E7=8A=B6=E6=80=81bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StatementMangementController.class.php | 16 ++++--- .../Admin/View/StatementMangement/lists.html | 46 +++++++++++++++++-- 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index bbb47320f..46f5d5e6e 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -22,6 +22,10 @@ class StatementMangementController extends ThinkController $map['create_time'] = ['LT', strtotime(I('time_end')) + 86399]; } + if ($_REQUEST['verify_status']||$_REQUEST['verify_status']=='0') { + $map['verify_status'] = $_REQUEST['verify_status']; + } + if ($_REQUEST['statement_type']||$_REQUEST['statement_type']=='0') { if($_REQUEST['statement_type']=='2') { $map['second_party_info'] = ['like','%"order_type":1%']; @@ -845,12 +849,12 @@ class StatementMangementController extends ThinkController $isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>1]); if ($isVerify) { - $this->success('审核通过成功'); + $this->ajaxReturn(['status'=>1]); } else { - $this->error('审核通过失败'); + $this->ajaxReturn(['status'=>0]); } } else { - $this->error('没有订单数据'); + $this->ajaxReturn(['status'=>0]); } } @@ -864,12 +868,12 @@ class StatementMangementController extends ThinkController $isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>2]); if ($isVerify) { - $this->success('审核拒绝成功'); + $this->ajaxReturn(['status'=>1]); } else { - $this->error('审核拒绝失败'); + $this->ajaxReturn(['status'=>0]); } } else { - $this->error('没有订单数据'); + $this->ajaxReturn(['status'=>0]); } } diff --git a/Application/Admin/View/StatementMangement/lists.html b/Application/Admin/View/StatementMangement/lists.html index 7aeb0cf80..a02ffcf91 100644 --- a/Application/Admin/View/StatementMangement/lists.html +++ b/Application/Admin/View/StatementMangement/lists.html @@ -81,6 +81,14 @@ +
+ +
@@ -213,9 +221,22 @@ return; } - var url = "/admin.php?s=/statementMangement/verifyStatementStatus/order/" + text; - - window.location.href = url; + $.ajax({ + url: "{:U('statementMangement/verifyStatementStatus')}", + type: "get", + data: {order: text}, + dataType: 'json', + success: function (data) { + if (data.status == 0) { + layer.msg('审核通过失败'); + } else { + layer.msg('审核通过成功') + setTimeout(function(){ + window.parent.reload(); + },1500); + } + } + }); }) @@ -236,9 +257,24 @@ return; } - var url = "/admin.php?s=/statementMangement/rejectStatementStatus/order/" + text; + $.ajax({ + url: "{:U('statementMangement/rejectStatementStatus')}", + type: "get", + data: {order: text}, + dataType: 'json', + success: function (data) { + if (data.status == 0) { + layer.msg('审核拒绝失败'); + } else { + layer.msg('审核拒绝成功') + + setTimeout(function(){ + window.parent.reload(); + },1500); + } + } + }); - window.location.href = url; }) })