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