From bd6932d8d44b8877a127bc9048742e6bd861278a Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Thu, 21 Nov 2019 23:38:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->=E8=B4=A2?= =?UTF-8?q?=E5=8A=A1=E7=AE=A1=E7=90=86->=E6=8F=90=E7=8E=B0=E8=AE=B0?= =?UTF-8?q?=E5=BD=95--=E5=A2=9E=E5=8A=A0=E9=87=8D=E6=96=B0=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/FinanceController.class.php | 27 ++++++++++++++++-- .../View/default/Finance/withdrawRecord.html | 28 +++++++++++++++++-- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index b783521f0..605c26ad4 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -567,7 +567,7 @@ class FinanceController extends BaseController } //审核拒绝 重新审核 - public function renewReview($id) + public function renewReview() { //是否是会长 $this->purview(); @@ -581,6 +581,29 @@ class FinanceController extends BaseController $this->ajaxReturn($data); } - $id = intval($id); + $id = intval(I('id', 0)); + $data = M('withdraw', 'tab_')->find($id); + if (empty($data) || $data['status'] != -1) { + $data['status'] = 0; + $data['msg'] = '数据异常'; + $this->ajaxReturn($data); + } + if ($data['promote_id'] != $this->loginPromote['id']) { + $data['status'] = 0; + $data['msg'] = '权限异常'; + $this->ajaxReturn($data); + } + + $save['status'] = 0; + $save['id'] = $id; + $res = M('withdraw', 'tab_')->save($save); + if ($res === false) { + $data['status'] = 0; + $data['msg'] = '提交失败'; + } else { + $data['status'] = 1; + $data['msg'] = '提交成功'; + } + $this->ajaxReturn($data); } } \ No newline at end of file diff --git a/Application/Home/View/default/Finance/withdrawRecord.html b/Application/Home/View/default/Finance/withdrawRecord.html index 59b56dfb0..03c52bf83 100644 --- a/Application/Home/View/default/Finance/withdrawRecord.html +++ b/Application/Home/View/default/Finance/withdrawRecord.html @@ -174,9 +174,9 @@ 汇款证明 - 重新审核 + 重新审核 - 结算单 + 结算单 @@ -269,6 +269,30 @@ }); $(".select_gallery").select2(); + + $('.renew-review').click(function () { + var id = parseInt($(this).attr('data-id')); + + $.ajax({ + type: 'post', + url: '{:U("renewReview")}', + dataType: 'json', + data: {id:id}, + success: function (data) { + if (data.status == 1) { + layer.msg(data.msg, {icon: 1}); + setTimeout(function(){ + window.location.reload(); + },2000); + } else { + layer.msg(data.msg, {icon: 5}); + } + }, + error: function (result) { + layer.msg('网络异常', {icon: 5}); + } + }); + }); });