From dc5a65903b27d61a9e092780049ff136b57d7218 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 30 Sep 2020 20:13:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=87=E6=80=BBbug=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...regateFinanceStatementController.class.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 2a5e88cfa..b05f851f2 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -437,7 +437,22 @@ class AggregateFinanceStatementController extends ThinkController //审批通过 public function agreeApply(){ if(!isset($_REQUEST['ids'])) $this->error("参数错误"); + $ids = $_REQUEST['ids']; + + $aggregate_statement = M("aggregate_statement","tab_")->where("id in ({$ids})")->select(); + + foreach($aggregate_statement as $key => $value) { + + if (!$value['first_party_info']) { + $this->ajaxReturn(array( + 'status' => 1, + "info"=>"审批失败,存在没有绑定关系的对账单,请绑定关系后重算" + )); + } + + } + $savedata = ["verify_status"=>2,"create_time"=>time(),"admin_name"=>$this->admininfo["username"],"admin_id"=>$this->admininfo["uid"]]; M("aggregate_statement","tab_")->where("id in ({$ids})")->save($savedata); @@ -455,6 +470,20 @@ class AggregateFinanceStatementController extends ThinkController public function refuseApply(){ if(!isset($_REQUEST['ids'])) $this->error("参数错误"); $ids = $_REQUEST['ids']; + + $aggregate_statement = M("aggregate_statement","tab_")->where("id in ({$ids})")->select(); + + foreach($aggregate_statement as $key => $value) { + + if (!$value['first_party_info']) { + $this->ajaxReturn(array( + 'status' => 1, + "info"=>"审批失败,存在没有绑定关系的对账单,请绑定关系后重算" + )); + } + + } + $savedata = ["verify_status"=>-1,"create_time"=>time(),"admin_name"=>$this->admininfo["username"],"admin_id"=>$this->admininfo["uid"]]; M("aggregate_statement","tab_")->where("id in ({$ids})")->save($savedata);