diff --git a/Application/Admin/Controller/StatementController.class.php b/Application/Admin/Controller/StatementController.class.php index 29f667c03..ad2750d8f 100644 --- a/Application/Admin/Controller/StatementController.class.php +++ b/Application/Admin/Controller/StatementController.class.php @@ -55,11 +55,12 @@ class StatementController extends ThinkController { if(!isset($_REQUEST['id'])) $this->error("参数错误"); $id = $_REQUEST['id']; + + $statementData = M('statement','tab_')->where(['id'=>$id])->find(); + $res = M("statement","tab_")->where("id = '{$id}'")->delete(); if($res !== false){ - $statementData = M('statement','tab_')->where(['id'=>$id])->find(); - addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].'/'.date('YmdHis',$statementData['statement_begin_time']).'/'.date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除上游对账单']); $this->ajaxReturn(array("success"=>"ok","code"=>0)); diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 8158edefd..1e66e5276 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -230,13 +230,12 @@ class StatementMangementController extends ThinkController if (!$id) { $this->ajaxReturn(['code'=>2000,'error'=>'no']); } + $statementData = M('statement','tab_')->where(['id'=>$id])->find(); $is_del = M('statement','tab_')->where(['id'=>$id])->delete(); if ($is_del) { - $statementData = M('statement','tab_')->where(['id'=>$id])->find(); - addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].'/'.date('YmdHis',$statementData['statement_begin_time']).'/'.date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除下游对账单']); $this->ajaxReturn(['code'=>0,'success'=>'ok']);