diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 98feeb66e..f5e6e06d0 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -372,7 +372,16 @@ class CompanyStatementController extends ThinkController public function delStatement(){ if(!isset($_REQUEST['ids'])) $this->error("参数错误"); $ids = $_REQUEST['ids']; - $dbres = $this->DBModel->where("id in ({$ids}) and verify_status = 0")->delete(); +// $dbres = $this->DBModel->where("id in ({$ids}) and verify_status = 0")->delete(); + $dbres = $this->DBModel->where("id in ({$ids})")->select(); + foreach ($dbres as $key=>$value) { + if($value['withdraw_type'] !=3) { + $this->DBModel->where("id = {$value['id']} and verify_status = 0")->delete(); + } else { + $this->DBModel->where("id = {$value['id']}")->delete(); + } + + } addOperationLog(['op_type'=>2,'key'=>$ids,"op_name"=>"删除结算单",'url'=>U('lists')]); $this->ajaxReturn(array( 'status' => 1, diff --git a/Application/Admin/View/CompanyStatement/lists.html b/Application/Admin/View/CompanyStatement/lists.html index bc77a6907..824f5671c 100644 --- a/Application/Admin/View/CompanyStatement/lists.html +++ b/Application/Admin/View/CompanyStatement/lists.html @@ -494,6 +494,10 @@ var flag = false; var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + if (id=="delStatement"&&$(elem).data("type")==3) { + return $(elem).val(); + } + if($.inArray( $(elem).data("status"),status) == -1||(id=="updateStatement" && $(elem).data("type")==3)){ flag = true; }else{