diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index f6e986469..bbb47320f 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -836,4 +836,42 @@ class StatementMangementController extends ThinkController $this->display(); } + public function verifyStatementStatus() { + + $order = $_REQUEST['order']; + + if ($order) { + + $isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>1]); + + if ($isVerify) { + $this->success('审核通过成功'); + } else { + $this->error('审核通过失败'); + } + } else { + $this->error('没有订单数据'); + } + + } + + public function rejectStatementStatus() { + + $order = $_REQUEST['order']; + + if ($order) { + + $isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>2]); + + if ($isVerify) { + $this->success('审核拒绝成功'); + } else { + $this->error('审核拒绝失败'); + } + } else { + $this->error('没有订单数据'); + } + + } + } diff --git a/Application/Admin/View/StatementMangement/lists.html b/Application/Admin/View/StatementMangement/lists.html index 953b1ca09..7aeb0cf80 100644 --- a/Application/Admin/View/StatementMangement/lists.html +++ b/Application/Admin/View/StatementMangement/lists.html @@ -95,6 +95,8 @@ 生成上游对账单 生成下游对账单 生成下游个人结算单 + 审核通过 + 审核拒绝 @@ -105,11 +107,13 @@ + 对账单类型 生成时间 对账公司 对账日期 对账金额 + 审核状态 确认状态 操作 @@ -125,11 +129,14 @@ + + 上游对账单下游对账单下游补点对账单下游个人结算单 {$data.create_time} {$data.company_name} {$data.statement_begin_time}-{$data.statement_end_time} {$data.statement_money} + 未审核审核通过审核拒绝 未确认确认 查看 @@ -189,7 +196,53 @@ function reload() { window.location.reload(); } + $(function(){ + + $("#shenhe").click(function () { + var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + return $(elem).val(); + }).get().join(","); + + layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', { + btn: ['确认','取消'], + title:false + }, function(index) { + if (!text) { + layer.msg('请选择后再进行操作'); + return; + } + + var url = "/admin.php?s=/statementMangement/verifyStatementStatus/order/" + text; + + window.location.href = url; + }) + + + }) + + $("#reject").click(function () { + var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + return $(elem).val(); + }).get().join(","); + + + layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', { + btn: ['确认','取消'], + title:false + }, function(index) { + if (!text) { + layer.msg('请选择后再进行操作'); + return; + } + + var url = "/admin.php?s=/statementMangement/rejectStatementStatus/order/" + text; + + window.location.href = url; + }) + + }) + //搜索功能 var start = $("#time_start").val(); var end = $("#time_end").val(); diff --git a/Data/update.sql b/Data/update.sql index 2998e4fa1..47ce72f23 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1347,3 +1347,7 @@ CREATE TABLE `tab_financial_summary` ( KEY `count_year` (`count_year`) USING BTREE, KEY `key_name` (`key_name`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='财务分类汇总统计'; + +--2020-02-20 添加审核状态-- +ALTER TABLE `tab_statement` +ADD COLUMN `verify_status` tinyint(2) NULL DEFAULT 0 COMMENT '审核状态 0:未审核 1:审核通过 2:审核拒绝' AFTER `statement_info`; \ No newline at end of file