You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

208 lines
7.4 KiB
HTML

5 years ago
<extend name="Public/manage" />
<block name="head">
<link href="__CSS__/pagination.css" rel="stylesheet">
<link href="__CSS__/datetimepicker.css" rel="stylesheet">
<link href="__CSS__/dropdown.css" rel="stylesheet">
<link href="__CSS__/user_zxy.css" rel="stylesheet">
<script src="__JS__/bootstrap-datetimepicker.min.js"></script>
<script src="__JS__/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="__JS__/bootstrap-select.min.js"></script>
</block>
<block name="location">
<a class="z_nav" href="{:U('Query/incomesettlement')}">订单结算</a>
<a class="z_nav curt_nav" href="{:U('Query/incomesettlement')}">收入结算</a>
</block>
<block name="body">
<div class="matter_right_content border_right">
<div class="tabcontent">
<form action="" method="get">
<div class=" matter_right_search server_search clearfix jssearch">
<div class="mrc_colum0_8_3 mrc form-group" style="margin-right: 0;">
<a class="sch-btn btn btn_primary user_btn" href="javascript:;" id="search" url="{:U('Query/incomesettlement','model='.$model['name'],false)}">搜索</a>
</div>
<div class="mrc_colum1_3_3 mrc form-group">
<input type="text" name="number" value="{:I('number')}" class="form-control egretFormFont13" placeholder="结算单号">
</div>
<div class="mrc mrc_colum3_5 form-group registerdetail form-inline">
<div class="input-group" style="margin-right: 10px;">
<input id="startDate" class="form-control fwsub hasDatepicker" type="text" name="start_time" value="{:I('start_time')}" placeholder="结算周期开始时间">
<span class="arrow_icon"></span>
</div>
<div class="input-group">
<input id="endDate" class="form-control fwsub hasDatepicker" type="text" name="end_time" value="{:I('end_time')}" placeholder="结算周期结束时间">
<span class="arrow_icon"></span>
</div>
</div>
<div class="mrc_colum1_6_6 mrc form-group">
<select id="stutasId" name="ti_status" class="form-control selectpicker">
<option value="">提现状态</option>
<option value="-1">未申请</option>
<option value="0">申请中</option>
<option value="1">已通过</option>
</select>
</div>
</div>
</form>
<div id="tab1" class="matter_right_manager settlement">
<div class="table_container server_table ">
<div class="table_responsive">
<table class="table table_striped table_hover table_control control">
<thead>
<tr>
<th>结算周期</th>
<th>结算单号</th>
<th>总流水(元)</th>
<th>结算范围</th>
<th>结算金额(元)</th>
<th>提现状态</th>
<th>结算单详情</th>
<th>提现</th>
</tr>
</thead>
<tbody>
<volist name="data" id="vo">
<tr>
<td>{:date('Y-m-d',$vo['starttime'])}至{:date('Y-m-d',$vo['endtime'])}</td>
<td>{$vo.settlement_number}</td>
<td>{$vo.total_money}</td>
<td>
<eq name='vo.bind_coin_status' value='1'>包含绑币
<else />排除绑币
</eq>
</td>
<td>{$vo.sum_money}</td>
<td>
<switch name="vo.ti_status">
<case value="-1">
<lable style="color:#D0D0D0">未申请</lable>
</case>
<case value="0">
<lable style="color:#46A3FF">申请中</lable>
</case>
<case value="1">
<lable style="color:#00DB00">已通过</lable>
</case>
<case value="2">
<lable style="color:#FF0000">已驳回</lable>
</case>
</switch>
</td>
<td>
<a href="javascript:" onclick="detailsInfo('{$vo.create_time}')">查看</a>
</td>
<td>
<if condition="$vo.ti_status neq 1 and $vo.ti_status neq 0">
<a href="javascript:;" onclick="tixian({$vo.create_time})">申请提现</a>
</if>
</td>
</tr>
</volist>
</tbody>
<tfoot>
<tr>
<td colspan="8">
<span class="tit">结算金额:</span><span class="blue_txt">¥{:null_to_0(array_sum(array_column(array_status2valueq('ti_status','',$data),'sum_money')))}</span><span class="tit">提现金额:</span><span class="blue_txt">¥{:null_to_0(array_sum(array_column(array_status2value('ti_status','',$data),'sum_money')))}</span><span class="tit">未提现金额:</span><span class="blue_txt">¥{:null_to_0(array_sum(array_column(array_status2valuen('ti_status','',$data),'sum_money')))}</span>
</td>
</tr>
</tfoot>
</table>
<div class="pagination_wrap">
{$_page}
</div>
<p class="text_format hidden">暂无数据</p>
</div>
</div>
</div>
</div>
</div>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js" type="text/javascript"></script>
<script> Think.setValue('game_id',"{:I('game_id')}"); Think.setValue('ti_status',"{:I('ti_status')}");
var ss = "{:U('incomesettlement')}";
function tixian(create_time) {
$.ajax({
url: '{:U("apply_withdraw")}',
type: 'POST',
dataType: 'json',
data: {
'create_time': create_time
},
success: function(data) {
if(data.status == 0) {
layer.msg('请勿重复操作', {
icon: 5
});
} else {
layer.msg('申请成功', {
icon: 6
});
setTimeout(function() {
location.href = ss;
}, 2000);
}
},
error: function() {
layer.msg('服务器故障', {
icon: 4
});
}
});
}
$("#search").click(function() { var starttime = $.trim($('#startDate').val()); var endtime = $.trim($('#endDate').val()); if(starttime && endtime && starttime>endtime) {layer.msg("开始时间必须小于等于结束时间");return false;}
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
query = query.replace(/^&/g, '');
if(url.indexOf('?') > 0) {
url += '&' + query;
} else {
url += '?' + query;
}
window.location.href = url;
}); $(function() { $('input[name=start_time]').datetimepicker({ format: 'yyyy-mm-dd', language: "zh-CN", minView: 2, autoclose: true }); $('input[name=end_time]').datetimepicker({ format: 'yyyy-mm-dd', language: "zh-CN", minView: 2, autoclose: true }); });
$('.tabtitle .jbtn').on('click', function() {
var that = $(this),
href = that.attr('href');
that.addClass('active').siblings().removeClass('active');
$(href).removeClass('hidden').siblings().addClass('hidden');
});
$.VMenu.show('#menu');
$.VMenu.open('m4.1');
$('#gameId').selectpicker({
size: 15
});
$('#stutasId').selectpicker({
size: 15
});
$('#monthId').selectpicker({
size: 15
});
$('#channelId').selectpicker({
size: 15
});
function detailsInfo(create_time = 0) {
layer.open({
type: 2,
title: '结算详情',
shadeClose: true,
shade: 0.8,
area: ['80%', '70%'],
content: '/open.php?s=/Query/details/create_time/' + create_time //iframe的url
});
}
</script>
</block>