diff --git a/Application/Admin/Controller/AggregateFinanceSetController.class.php b/Application/Admin/Controller/AggregateFinanceSetController.class.php index ce92f5dd1..2b6bb592f 100644 --- a/Application/Admin/Controller/AggregateFinanceSetController.class.php +++ b/Application/Admin/Controller/AggregateFinanceSetController.class.php @@ -109,7 +109,6 @@ class AggregateFinanceSetController extends Controller { $dataurl .= $this->apihost."&".http_build_query($arr); $html = file_get_contents($dataurl); $rsp = json_decode($html,true); - var_dump($dataurl); if($rsp['code'] != 1){ echo $rsp['error'].PHP_EOL;die; } @@ -147,6 +146,7 @@ class AggregateFinanceSetController extends Controller { echo "----补点统计ok".PHP_EOL; } } + diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 144089765..60583a02b 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -13,9 +13,15 @@ class AggregateFinanceStatementController extends ThinkController "1"=>"申请开票", "2"=>"审核同意", "3"=>"已开票", - "4"=>"上传收款凭证", + "4"=>"已上传凭证", "5"=>"已到账" ]; + public $admininfo; + public function _initialize() + { + $this->admininfo = $_SESSION['onethink_admin']['user_auth']; + parent::_initialize(); + } public function lists() { $is_export= false; if (isset($_REQUEST['export']) && $_REQUEST['export']==1){ @@ -311,6 +317,8 @@ class AggregateFinanceStatementController extends ThinkController if($info["verify_status"] == 3){ $save['verify_status'] = 4; $save['create_time'] = time(); + $save["admin_name"]=$this->admininfo["username"]; + $save["admin_id"]=$this->admininfo["uid"]; } M("aggregate_statement","tab_")->where("id = '{$id}'")->save($save); $array=array( @@ -346,7 +354,50 @@ class AggregateFinanceStatementController extends ThinkController 'info' => "操作成功" )); } - + //审批通过 + public function agreeApply(){ + if(!isset($_REQUEST['ids'])) $this->error("参数错误"); + $ids = $_REQUEST['ids']; + $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); + $this->ajaxReturn(array( + 'status' => 1, + "info"=>"审批通过成功" + )); + } + //审核拒绝 + public function refuseApply(){ + if(!isset($_REQUEST['ids'])) $this->error("参数错误"); + $ids = $_REQUEST['ids']; + $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); + $this->ajaxReturn(array( + 'status' => 1, + "info"=>"审批拒绝成功" + )); + } + //已开票 + public function Invoiced(){ + if(!isset($_REQUEST['ids'])) $this->error("参数错误"); + $ids = $_REQUEST['ids']; + $savedata = ["verify_status"=>3,"create_time"=>time(),"admin_name"=>$this->admininfo["username"],"admin_id"=>$this->admininfo["uid"]]; + M("aggregate_statement","tab_")->where("id in ({$ids})")->save($savedata); + $this->ajaxReturn(array( + 'status' => 1, + "info"=>"已开票成功" + )); + } + //已到账 + public function Received(){ + if(!isset($_REQUEST['ids'])) $this->error("参数错误"); + $ids = $_REQUEST['ids']; + $savedata = ["verify_status"=>5,"create_time"=>time(),"admin_name"=>$this->admininfo["username"],"admin_id"=>$this->admininfo["uid"]]; + M("aggregate_statement","tab_")->where("id in ({$ids})")->save($savedata); + $this->ajaxReturn(array( + 'status' => 1, + "info"=>"已到账成功" + )); + } //导出 public function export() { diff --git a/Application/Admin/View/AggregateFinanceStatement/lists.html b/Application/Admin/View/AggregateFinanceStatement/lists.html index bf2813157..e3f985e12 100644 --- a/Application/Admin/View/AggregateFinanceStatement/lists.html +++ b/Application/Admin/View/AggregateFinanceStatement/lists.html @@ -115,9 +115,9 @@