Merge remote-tracking branch 'origin/feature/admin_optimize' into feature/admin_optimize

master
liuweiwen 5 years ago
commit 941ba5628d

@ -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('没有订单数据');
}
}
}

@ -95,6 +95,8 @@
<a class="butn" id="upstream">生成上游对账单</a>
<a class="butn" id="downstream">生成下游对账单</a>
<a class="butn" id="persondownstream" style="width: 150px">生成下游个人结算单</a>
<a class="butn" id="shenhe" >审核通过</a>
<a class="butn" id="reject" >审核拒绝</a>
</div>
</div>
@ -105,11 +107,13 @@
<!-- 表头 -->
<thead>
<tr>
<th><input class="check-all" type="checkbox"></th>
<th>对账单类型</th>
<th>生成时间</th>
<th>对账公司</th>
<th>对账日期</th>
<th>对账金额</th>
<th>审核状态</th>
<th>确认状态</th>
<th>操作</th>
</tr>
@ -125,11 +129,14 @@
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td ><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]" >
</td>
<td><if condition="$data['statement_type'] eq 0">上游对账单<elseif condition="$data['statement_type'] eq 1 and $data['order'] eq 0"/>下游对账单<elseif condition="$data['statement_type'] eq 1 and $data['order'] eq 1"/>下游补点对账单<elseif condition="$data['statement_type'] eq 2"/>下游个人结算单</if></td>
<td>{$data.create_time}</td>
<td>{$data.company_name}</td>
<td>{$data.statement_begin_time}-{$data.statement_end_time}</td>
<td>{$data.statement_money}</td>
<td><if condition="$data['verify_status'] eq 0">未审核<elseif condition="$data['verify_status'] eq 1"/>审核通过<elseif condition="$data['verify_status'] eq 2"/>审核拒绝</if></td>
<td><if condition="$data['is_confirm'] eq 0">未确认<elseif condition="$data['is_confirm'] eq 1"/>确认</if></td>
<td>
<a class="confirm statement_view" data-id="{$data.id}" data-type="{$data.statement_type}">查看</a>
@ -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();

@ -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`;
Loading…
Cancel
Save