From d5561209fdcc929e092237252c02978d05f1b31a Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 11 Mar 2020 16:45:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=94=AF=E4=B8=80=E9=94=AE=E5=80=BCbug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/StatementController.class.php | 5 +++-- .../Admin/Controller/StatementMangementController.class.php | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) 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']);