diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 0bac1a77d..2fb7f7874 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -190,6 +190,15 @@ class AggregateFinanceStatementController extends ThinkController $this->error("参数错误"); } + if (!$_REQUEST['first_partner_id']) { + $this->error("编辑失败,聚合公司绑定关系未添加,请添加公司绑定关系后重算"); + } + + if ($_REQUEST['is_edit']) { + $verify_status = 0; + } else { + $verify_status = 1; + } //拼凑数据 $adddata = array( "pay_money"=>$data_count['pay_money'], @@ -200,7 +209,7 @@ class AggregateFinanceStatementController extends ThinkController "statement_info"=>json_encode($statement_info,JSON_UNESCAPED_UNICODE), "admin_name"=>$admininfo['username'], "admin_id"=>$admininfo['uid'], - "verify_status"=>1, + "verify_status"=>$verify_status, "create_time"=>time() ); $id = $_REQUEST['statement_id']; @@ -290,7 +299,8 @@ class AggregateFinanceStatementController extends ThinkController "first_party_info"=>$first_party_info, "second_party_info"=>$second_party_info, "statement_info"=>$statement_info, - "statement_count"=>array("pay_money"=>$dbres['pay_money'],"ratio_money"=>$dbres['ratio_money']) + "statement_count"=>array("pay_money"=>$dbres['pay_money'],"ratio_money"=>$dbres['ratio_money']), + "is_edit"=>1, ); $this->assign("data",$senddata); @@ -447,7 +457,7 @@ class AggregateFinanceStatementController extends ThinkController if (!$value['first_party_info']) { $this->ajaxReturn(array( 'status' => 1, - "info"=>"审批失败,存在没有绑定关系的对账单,请绑定关系后重算" + "info"=>"审批失败,聚合公司绑定关系未添加,请添加公司绑定关系后重算" )); } @@ -836,16 +846,16 @@ class AggregateFinanceStatementController extends ThinkController $optist = ["viewStatement"]; break; case '-3': - $optist = ["viewStatement","editStatement","addRemark","viewRemark","editRemark"]; + $optist = ["viewStatement","addRemark","viewRemark","editRemark"]; break; case '-1': $optist = ["viewStatement","cancelVerify","addRemark","viewRemark","editRemark"]; break; case '0': - $optist = ["viewStatement"]; + $optist = ["viewStatement","editStatement"]; break; case '1': - $optist = ["viewStatement","editStatement","cancelApply"]; + $optist = ["viewStatement","cancelApply"]; break; case '2': $optist = ["viewStatement","cancelVerify","addRemark","viewRemark","editRemark"]; diff --git a/Application/Admin/View/AggregateFinanceStatement/editStatement.html b/Application/Admin/View/AggregateFinanceStatement/editStatement.html index 0a4759a80..309cef1f3 100644 --- a/Application/Admin/View/AggregateFinanceStatement/editStatement.html +++ b/Application/Admin/View/AggregateFinanceStatement/editStatement.html @@ -684,7 +684,7 @@ window.parent.reload(); },350); }else{ - alert("添加失败,请联系管理员") + alert(data.info) } }); //发送添加请求