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; }) })