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.

224 lines
8.5 KiB
HTML

2 years ago
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
</block>
<block name="body">
<style type="text/css">
@media screen and (max-width: 1440px) {
.trunk-search .select-time .txt{width: 100px;}
.form-group .submit{width: 55px;}
.trunk-search .tab{float: none;margin-bottom: 10px;}
}
</style>
<div class="page-search normal_list query-son_list-search">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>财务管理></span><span>结算记录</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_jiesuan.png"><span class="title_main">结算记录</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('Query/son_list')}" method="post" enctype="multipart/form-data">
<div class="tab fl">
<a href="{:U('Query/son_earning')}" class="">子渠道结算</a>
<a href="#" class="current">结算记录</a>
</div>
<div class="form-group normal_space fr">
<input type="submit" class="submit" value="查询">
</div>
<div class="form-group normal_space fr">
<label class="form-title select-title">结算时间:</label>
<div class="select-time">
<input type="text" id="start" class="txt" autocomplete="off" name="start" placeholder="开始时间" value="{:I('start')}" >
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" id="end" class="txt" autocomplete="off" name="end" placeholder="结束时间" value="{:I('end')}">
</div>
</div>
<div class="form-group normal_space fr">
<label class="form-title select-title">结算周期:</label>
<div class="select-time">
<input type="text" id="sdate" class="txt" autocomplete="off" name="timestart" placeholder="开始时间" value="{:I('timestart')}" >
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" id="edate" class="txt" autocomplete="off" name="timeend" placeholder="结束时间" value="{:I('timeend')}">
</div>
</div>
<div class="form-group fr">
<select id="ch_promote_id" name="ch_promote_id" class="reselect select_gallery" style="min-width:170px;">
<option value="0">全部子渠道</option>
<volist name=":get_promote_list_by_id()" id ="vo">
<option value="{$vo.id}">{$vo.account}</option>
</volist>
</select>
</div>
</form>
</div>
<div class="page-list query-son_list-list">
<div class="trunk-list">
<table class="table4 normal_table">
<tr class="odd">
<th>子渠道账户</th>
<th>结算周期</th>
<th>结算单号</th>
<th>总充值</th>
<th>总注册</th>
<th>结算金额</th>
<th>结算范围</th>
<th>结算时间</th>
<th>详情</th>
<th>提现审核</th>
</tr>
<empty name="list_data">
<tr><td colspan="10" style="text-align: center;height: 35vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td></tr>
<else />
<volist name="list_data" id="vo">
<tr>
<td>{$vo.promote_account}</td>
<td>{$vo.settlement_start_time|date="Y-m-d",###}~{$vo.settlement_end_time|date="Y-m-d",###}</td>
<td>{$vo.settlement_number} </td>
<td><notempty name="vo.sum_money">{:number_format(round($vo['sum_money'],2),2)}<else />0</notempty></td>
<td><notempty name="vo.reg_number">{$vo.reg_number}<else />0</notempty></td>
<td>{:number_format(round($vo['jie_money'],2),2)}</td>
<td>{:get_bind_coin_status($vo['bind_coin_status'])}</td>
<td>{$vo.create_time|date='Y-m-d',###}</td>
<td><a href="javascript:" onclick="details({$vo.promote_id},'{$vo.settlement_number}')" style="color:#0099FF">查看</a></td>
<td>
<switch name='vo.ti_status'>
<case value="0">
<a href="javascript:" onclick="tixian('{$vo.settlement_number}')" style="color:#0099FF">审核</a>
</case>
<case value="1">提现成功</case>
<case value="-1"></case>
<default/>
</switch>
</td>
</tr>
</volist>
<tr class="odd">
<td style="font-weight: bold;">结算汇总(元)</td>
<td colspan="9">{:number_format(round($total,2),2)}</td>
</tr>
</empty>
</table>
<div class="pagenation clearfix"> <a class="sch-btn" href="{:U('Export/son_list',array_merge(array('xlsname'=>'财务管理_子渠道结算_结算记录'),I('request.')))}" >导出</a> {$_page} </div>
</div>
</div>
</div>
</div>
</block>
<block name="script">
<link rel="stylesheet" type="text/css" href="__CSS__/p_jquery.datetimepicker.css">
<script type="text/javascript" src="__JS__/jquery.datetimepicker.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
setValue('ch_promote_id',{$Think.request.ch_promote_id|default=0});
setValue('row','{:I("row",10)}');
highlight_subnav("{:U('Query/son_earning')}");
$().ready(function(){
$("#pagehtml a").on("click",function(event){
event.preventDefault();//使a自带的方法失效即无法调整到href中的URL(http://www.baidu.com)
var geturl = $(this).attr('href');
$('#data_form').attr('action',geturl);
$('#data_form').submit();
});
$('#sdate').datetimepicker({
lang:'ch',
format:'Y-m-d',
formatDate:'Y-m-d',
scrollMonth:false,
scrollTime:false,
scrollInput:false,
timepicker:false
});
$('#edate').datetimepicker({
lang:'ch',
format:'Y-m-d',
formatDate:'Y-m-d',
scrollMonth:false,
scrollTime:false,
scrollInput:false,
timepicker:false
});
$('#start').datetimepicker({
lang:'ch',
format:'Y-m-d',
formatDate:'Y-m-d',
scrollMonth:false,
scrollTime:false,
scrollInput:false,
timepicker:false
});
$('#end').datetimepicker({
lang:'ch',
format:'Y-m-d',
formatDate:'Y-m-d',
scrollMonth:false,
scrollTime:false,
scrollInput:false,
timepicker:false
});
$(".select_gallery").select2();
$('.submit').click(function(){
var sdate = $('#sdate').val();
var edate = $('#edate').val();
var start = $('#start').val();
var end = $('#end').val();
if(Date.parse(sdate) > Date.parse(edate)){
layer.msg('结算周期:开始时间必须小于等于结束时间');
return false;
}
if(Date.parse(start) > Date.parse(end)){
layer.msg('结算时间:开始时间必须小于等于结束时间');
return false;
}
})
});
function details(id,number){
layer.open({
type: 2,
title: '结算详情',
shadeClose: true,
shade: 0.3,
area: ['60%', '70%'],
content: '/index.php?s=/Home/Query/son_details/promote_id/'+id+'/settlement_number/'+number//iframe的url
});
}
function tixian(settlement_number=''){
$.ajax({
url:'{:U("audit_withdraw")}',
type:'POST',
dataType:'json',
data:{settlement_number:settlement_number},
success:function(result){
layer.msg(result.info,{icon:1,time:2000},function() {
window.location.reload();
});
},
error:function(){
alert("服务器异常")
}
})
}
</script>
</block>