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.

266 lines
9.9 KiB
HTML

5 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">
<style>
.appy_earn {color:#26C7DB;background:#FFF;margin:0;}
</style>
</block>
<block name="body">
<style type="text/css">
@media screen and (max-width: 1370px) {
.trunk-search .select-time .txt{width: 100px;}
.form-group .submit{width: 55px;}
}
</style>
<div class="page-search normal_list query-earning-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/my_earning',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data">
<div class="form-group normal_space fr">
<input type="submit" class="submit" value="查询" id="submit">
</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;</label>
<div class="select-time normal_space fr">
<input type="text" id="edate" class="txt" autocomplete="off" name="timeend" placeholder="结束时间" value="{:I('timeend')}">
</div>
</div>
<div class="form-group fr">
<label class="form-title select-title">结算单号:</label>
<input type="text" name="settlement_number" class="txt normal_txt" id="uid" placeholder="请输入结算单号" value="{:I('settlement_number')}">
</div>
</form>
</div>
</div>
<div class="page-list query-earning-list">
<div class="trunk-content article">
<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>
</tr>
<empty name="list_data">
<tr><td colspan="9" 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" mod="2">
<tr class="<eq name='mod' value='1'>odd</eq>">
<td>{$vo.settlement_start_time|date="Y-m-d",###}~{$vo.settlement_end_time|date="Y-m-d",###}</td>
<td>{$vo.settlement_number} </td>
<td>{:null_to_0($vo['sum_money']*1)}</td>
<td><notempty name="vo.reg_number">{$vo.reg_number}<else />0</notempty></td>
<td>{:null_to_0(floor($vo['jie_money']*100)/100)}</td>
<td>{:get_bind_coin_status($vo['bind_coin_status'])}</td>
<td>{$vo.create_time|date='Y-m-d',###}</td>
<td><a href="javascript:" style="color:#0099FF" onclick="details({$vo.promote_id},'{$vo.settlement_number}')">查看</a></td>
<td>
<switch name='vo.ti_status'>
<case value="-1">
<a href="javascript:" onclick="tixian('{$vo.settlement_number}')" class="appy_earn">申请提现</a>
</case>
<case value="0">申请中</case>
<case value="1">提现成功</case>
</switch>
</td>
</tr>
</volist>
<tr class="odd">
<td style="font-weight: bold;">结算汇总(元)</td>
<td colspan="8">{:floor($sum_money*100)/100}</td>
</tr>
<tr>
<td style="text-align: center;font-weight: bold;">未提现汇总(元)</td>
<td colspan="8" style="text-align: center;">{$w_money}</td>
</tr>
<tr class="odd">
<td style="text-align: center;font-weight: bold;">成功提现汇总(元)</td>
<td colspan="8" style="text-align: center;">{$y_money}</td>
</tr>
</empty>
</table>
<div class="pagenation clearfix">{$_page}</div>
</div>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript">
setValue('game_id',{$Think.request.game_id|default=0});
setValue('pattern',{$Think.request.pattern|default="''"});
setValue('row',{$Think.request.row|default=10})
</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">
$().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,
maxDate:'{:date("Y-m-d",strtotime("-1 day"))}'
});
$('#edate').datetimepicker({
lang:'ch',
format:'Y-m-d',
formatDate:'Y-m-d'+1,
timepicker:false,
scrollMonth:false,
scrollTime:false,
scrollInput:false,
maxDate:'{:date("Y-m-d",strtotime("-1 day"))}'
});
$('.submit').click(function(){
var sdate = $('#sdate').val();
var edate = $('#edate').val();
// if(sdate =='' || edate ==''){
// layer.msg('请完整时间搜索');
// return false;
// }
if(Date.parse(sdate) > Date.parse(edate)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
var pID = $('#ch_promote_id option:selected').val();
if(pID == '0' && $(this).attr('data-type') == 'sett'){
layer.msg('请选择子渠道');
return false;
}
});
$(".select_gallery").select2();
});
function submitFrom(){
var validation = true;
$.each($('input[name="ids[]"][type="checkbox"]:checked'),function(){
var coop = $(this).parent().siblings('.coop').find('.cooperation :selected').val();
switch(coop){
case 'CPS':
var cps = $(this).parent().siblings('.cps').find('input').val();
if (cps == '') {validation=false; layer.msg('请输入分成比例',{icon:2});return false;}
if (!/^(((\d|[1-9]\d)(\.\d{1,2})?)|100|100.0|100.00)$/.test(cps)) {validation=false;layer.msg('请输入正确的分成比例数字',{icon:2});return false;}
break;
case 'CPA':
var cpa = $(this).parent().siblings('.cpa').find('input').val();
if (cpa == '') {validation=false;layer.msg('请输入注册单价',{icon:2});return false;}
if (!/^\d+(\.\d{1,2})*$/.test(cpa)) {validation=false;layer.msg('请输入正确的注册单价数字',{icon:2});return false;}
break;
default:
validation=false;layer.msg('未知错误',{icon:2});return false;
break;
}
var json_text = Trim($(this).val(),"g");
var json_obj = eval("("+json_text+")");
json_obj["bind_coin_status"] = $('input[name="bind_coin"][type="radio"]:checked').val();
var json_text = JSON.stringify(json_obj);
$(this).val(json_text);
});
if(validation){
var text = $('.ids').serialize();
var url = "{:U('generatesub')}";
$.post(url,text).success(function(result){
if(result.status == 1){
layer.msg(result.info,{icon:1,time:2000},function() {
//that.removeClass('disabled').prop('disabled',false);
window.location.reload();
});
}else{
layer.msg(result.info,{icon:2});
}
})
}
}
function Trim(str,is_global)
{
var result;
result = str.replace(/(^\s+)|(\s+$)/g,"");
if(is_global.toLowerCase()=="g")
{
result = result.replace(/\s/g,"");
}
return result;
}
function details(id,number){
layer.open({
type: 2,
title: '结算详情',
shadeClose: true,
shade: 0.3,
area: ['60%', '50%'],
content: '/index.php?s=/Home/Query/son_details/promote_id/'+id+'/settlement_number/'+number//iframe的url
});
}
function tixian(settlement_number) {
$.ajax({
url: '{:U("son_apply_withdraw")}',
type: 'POST',
dataType: 'json',
data: {'settlement_number': settlement_number},
success:function(data){
if(data.status==0){
layer.msg('请勿重复操作', {icon: 5});
}else{
layer.msg('提交成功,请等待审核', {icon: 6});
setTimeout(function(){location.reload();},2000);
}
},
error:function(){
layer.msg('服务器故障', {icon: 4});
}
});
}
</script>
</block>