diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 830528d3e..a0c0e036f 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/Controller/VerifyBillController.class.php b/Application/Admin/Controller/VerifyBillController.class.php index 1c2344f53..7473253d7 100644 --- a/Application/Admin/Controller/VerifyBillController.class.php +++ b/Application/Admin/Controller/VerifyBillController.class.php @@ -38,6 +38,13 @@ class VerifyBillController extends Controller { ->select(); foreach ($list_data as $key => $value) { $list_data[$key]['statement_type_str'] = $value['statement_type'] ? '工会对账单' : 'cp对账单'; + if ($value['verify_status'] == 1) { + $list_data[$key]['verify_status_str'] = '审核通过'; + } elseif ($value['verify_status'] == 1) { + $list_data[$key]['verify_status_str'] = '审核拒绝'; + } else { + $list_data[$key]['verify_status_str'] = '未审核'; + } } $this->assign('list_data', $list_data); $this->assign('meta_title', $m_title); @@ -61,7 +68,11 @@ class VerifyBillController extends Controller { $this->assign('all_sum_money', $all_sum_money); $this->assign('all_pay_amount', $all_pay_amount); $this->assign('data', $data); - $this->assign('from', I('from')); + $from = I('from'); + if (empty($from) && $data['verify_status'] != 1) {//未审核通过不可确认 + $from = 'not_verify'; + } + $this->assign('from', $from); if ($data['statement_type'] == 1) {//下游 $template = 'company_show'; } else { 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/Application/Admin/View/VerifyBill/index.html b/Application/Admin/View/VerifyBill/index.html index 7d5224802..24a50b496 100644 --- a/Application/Admin/View/VerifyBill/index.html +++ b/Application/Admin/View/VerifyBill/index.html @@ -48,6 +48,7 @@ 生成时间 对账单日期 对账金额 + 审核状态 确认状态 操作 @@ -67,6 +68,7 @@ {:set_show_time($data['create_time'])} {:set_show_time($data['statement_begin_time'])}-{:set_show_time($data['statement_end_time'])} {$data.statement_money} + {$data.verify_status_str} diff --git a/Data/update.sql b/Data/update.sql index 7b3859fe9..ffc3de4ef 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1350,4 +1350,7 @@ CREATE TABLE `tab_financial_summary` ( -- 推广员部门/小组 liaojinling ALTER TABLE tab_promote -ADD COLUMN `group_remark` varchar(50) NOT NULL DEFAULT '' COMMENT '部门/小组'; \ No newline at end of file +ADD COLUMN `group_remark` varchar(50) NOT NULL DEFAULT '' 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