diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 2dfaa8ba1..f211a8a1b 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -110,7 +110,7 @@ class AggregateFinanceStatementController extends ThinkController $data[$key]['oplist'] = $this->OpAuth($value); } - $count = M("aggregate_statement","tab_")->field("count(id) count,SUM(ratio_money) ratio_money")->where($map)->find(); + $count = M("aggregate_statement","tab_")->field("count(id) count,SUM(ratio_money) ratio_money,SUM(pay_money) pay_money")->where($map)->find(); //分页 $parameter['p'] = $page; @@ -123,6 +123,7 @@ class AggregateFinanceStatementController extends ThinkController $this->assign('menubtn',$this->menuAuth()); $this->assign('data',$data); $this->assign('total',$count['ratio_money']); + $this->assign('pay_money',$count['pay_money']); $this->assign('channel',$this->getAggChannel()); $this->assign('verify_status',$this->verify_status); $this->display(); @@ -347,11 +348,21 @@ class AggregateFinanceStatementController extends ThinkController public function delVoucher(){ if(!isset($_REQUEST['id'])) $this->error("参数错误"); $id = $_REQUEST['id']; - $info = M("aggregate_statement","tab_")->field("id,ext_field")->where("id = '{$id}'")->find(); + $info = M("aggregate_statement","tab_")->field("id,ext_field,verify_status")->where("id = '{$id}'")->find(); if(!empty($info['ext_field'])){ unlink("./".$info['ext_field']); } - M("aggregate_statement","tab_")->where("id = '{$id}'")->save(['ext_field'=>'']); + $save = [ + "ext_field"=>'', + ]; + //如果是已上传凭证状态就回退到审核通过 + if($info["verify_status"] == 4){ + $save['verify_status'] = 3; + $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); $this->doAddOperationLog($id,"删除凭证"); $this->ajaxReturn(array( 'status' => 1, diff --git a/Application/Admin/View/AggregateFinanceStatement/lists.html b/Application/Admin/View/AggregateFinanceStatement/lists.html index 0696f3b12..ad186aa04 100644 --- a/Application/Admin/View/AggregateFinanceStatement/lists.html +++ b/Application/Admin/View/AggregateFinanceStatement/lists.html @@ -168,7 +168,7 @@ -