From fe662ce160b1fa2056602cf355c2590d72e85e55 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Sun, 26 Apr 2020 11:49:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E5=AD=90=E6=93=8D=E4=BD=9Cok?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...regateFinanceStatementController.class.php | 22 ++++++++ .../View/AggregateFinanceStatement/lists.html | 50 ++++++++++++++++++- 2 files changed, 70 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 09be5a7f3..f8f519ece 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -419,6 +419,28 @@ class AggregateFinanceStatementController extends ThinkController )); } + //撤销审核 + public function cancelVerify(){ + if(!isset($_REQUEST['id'])) $this->error("参数错误"); + $id = $_REQUEST['id']; + $savedata = ["verify_status"=>1,"create_time"=>time(),"admin_name"=>$this->admininfo["username"],"admin_id"=>$this->admininfo["uid"]]; + M("aggregate_statement","tab_")->where("id ='{$id}'")->save($savedata); + $this->ajaxReturn(array( + 'status' => 1, + "info"=>"撤销审核成功" + )); + } + //撤销申请 + public function cancelApply(){ + if(!isset($_REQUEST['id'])) $this->error("参数错误"); + $id = $_REQUEST['id']; + $savedata = ["verify_status"=>0,"create_time"=>time(),"admin_name"=>$this->admininfo["username"],"admin_id"=>$this->admininfo["uid"]]; + M("aggregate_statement","tab_")->where("id ='{$id}'")->save($savedata); + $this->ajaxReturn(array( + 'status' => 1, + "info"=>"撤销申请成功" + )); + } //导出 public function export() { diff --git a/Application/Admin/View/AggregateFinanceStatement/lists.html b/Application/Admin/View/AggregateFinanceStatement/lists.html index a2a11c5b0..518c86a67 100644 --- a/Application/Admin/View/AggregateFinanceStatement/lists.html +++ b/Application/Admin/View/AggregateFinanceStatement/lists.html @@ -173,6 +173,9 @@ 修改备注 查看备注 + 撤销审核 + 撤销申请 + @@ -678,8 +681,51 @@ content:"
"+remark+"
" }); }); - - + //撤销审核 + $(".cancelVerify").click(function(){ + var id = $(this).data("id"); + layer.confirm("撤销审核将回退到[已申请开票]状态,点击取消停止操作",{title:false}, function(index){ + $.ajax({ + type: "POST", + url: "{:U('cancelVerify')}", + dataType: 'json', + async: false, + data: {id:id}, + success:function(data){ + if(data.status==1){ + layer.msg("" + data.info + ""); + setTimeout(function(){ + window.location.reload(); + },1500); + } + } + }); + // layer.close(index); + }); + }) + //撤销申请 + $(".cancelApply").click(function(){ + var id = $(this).data("id"); + layer.confirm("撤销申请将回退到[未申请开票]状态,点击取消停止操作",{title:false}, function(index){ + $.ajax({ + type: "POST", + url: "{:U('cancelApply')}", + dataType: 'json', + async: false, + data: {id:id}, + success:function(data){ + if(data.status==1){ + layer.msg("" + data.info + ""); + setTimeout(function(){ + window.location.reload(); + },1500); + } + } + }); + // layer.close(index); + }); + }) + $(".statement_del").click(function () { var del = $(this).data();