<!DOCTYPE html>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" >
< meta charset = "UTF-8" >
< title > < / title >
< link rel = "stylesheet" type = "text/css" href = "__CSS__/base.css" media = "all" >
< link rel = "stylesheet" type = "text/css" href = "__CSS__/common.css" media = "all" >
< link rel = "stylesheet" type = "text/css" href = "__CSS__/style.css" media = "all" >
< link rel = "stylesheet" type = "text/css" href = "__CSS__/default_color.css" media = "all" >
< link href = "__STATIC__/datetimepicker/css/datetimepicker.css" rel = "stylesheet" type = "text/css" >
< link href = "__STATIC__/datetimepicker/css/dropdown.css" rel = "stylesheet" type = "text/css" >
< link rel = "stylesheet" href = "__CSS__/select2.min.css" type = "text/css" / >
< script type = "text/javascript" src = "__STATIC__/jquery-2.0.3.min.js" > < / script >
< script type = "text/javascript" src = "__JS__/select2.min.js" > < / script >
< script type = "text/javascript" src = "__STATIC__/layer3/layer.js" > < / script >
< script type = "text/javascript" src = "__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js" > < / script >
< script type = "text/javascript" src = "__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset = "UTF-8" > < / script >
< script src = "__STATIC__/juicer-min.js" type = "text/javascript" > < / script >
< script src = "__STATIC__/table2excel.js" > < / script >
< / head >
< style >
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
/* .tabcon1711 table{
width: 480px;
} */
table{
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.hidebox{
display: none;
}
.r{
width: 300px;
}
.l{
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;
height: 35px;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 35px;
line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height: 26px;
line-height: 26px;
font-size: 12px;
}
.select2-results__option[aria-selected] {
font-size: 12px;
}
.input-list, .i_list {
float: left;
margin: 0;
}
#statementShow td{
line-height: 1.5;
padding: 8px 0;
}
< / style >
< body >
<!-- <div style="width: 100%;line - height: 100px;font - size: 25px;font - weight: 600;text - align: center;">
海南万盟天下科技有限公司
< / div > -->
< div class = "data_list box_mt" style = "margin-top: 10px;" >
< div class = "" >
< table id = "exporttable" >
<!-- 表头 -->
< thead >
< tr >
< th > 公司名称< / th >
< th > 结算时间< / th >
< th > 产品< / th >
< th > 联运流水< / th >
< th > 聚合流水< / th >
< th > 流水合计< / th >
< th > 结算比例< / th >
< th > 渠道费率< / th >
< th > 税费费率< / th >
< th > 其他< / th >
< th > 结算金额< / th >
< / tr >
< / thead >
< tbody id = "statementShow" >
< if condition = "empty($data)" >
< tr >
< td colspan = "50" class = "text-center" > aOh! 暂时还没有内容!< / td >
< / tr >
< / if >
< foreach name = "data" item = "first_data" key = "index" >
< foreach name = "first_data" item = "datas" >
< tr >
< td rowspan = "{$datas['row']}" > {$datas['show_company_name']}< / td >
< td rowspan = "{$datas['row']}" > {$time}年{$datas["time"]}月< / td >
< if condition = "$datas['statement_info'][0]['statement_type'] gt 0" >
< td > {$datas['statement_info'][0]['game_name']|default="--"}< if condition = "$datas['statement_info'][0]['withdraw_type'] eq 0 and $datas['statement_info'][0]['statement_begin_time']" > ({$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']})< / if > < / td >
< td > --< / td >
< td > --< / td >
< td > --< / td >
< td > --< / td >
< td > --< / td >
< td > --< / td >
< td > --< / td >
< td > < if condition = "$datas['statement_info'][0]['statement_type'] eq 2" > -< / if > {$datas['statement_info'][0]['sum_money']|default="--"}< / td >
< else / >
< td > {$datas['statement_info'][0]['game_name']|default="--"}< if condition = "$datas['statement_info'][0]['withdraw_type'] eq 0 and $datas['statement_info'][0]['statement_begin_time']" > ({$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']})< / if > < / td >
< td > {$datas['statement_info'][0]['platform_money']|default="--"}< / td >
< td > {$datas['statement_info'][0]['aggregate_money']|default="--"}< / td >
< td > {$datas['statement_info'][0]['sum_amount']|default="--"}< / td >
< td > {$datas['statement_info'][0]['ratio']|default="--"}< / td >
< td > {$datas['statement_info'][0]['promote_ratio']|default="--"}< / td >
< td > {$datas['statement_info'][0]['fax_ratio']|default="--"}< / td >
< td > {$datas['statement_info'][0]['other_amount']|default="--"}< / td >
< td > {$datas['statement_info'][0]['sum_money']|default="--"}< / td >
< / if >
< / tr >
< foreach name = "datas['statement_info']" item = "statement_info" key = "skey" >
< if condition = "$skey gt 0" >
< if condition = "$statement_info['statement_type'] gt 0" >
< td > {$statement_info['game_name']|default="--"}< if condition = "$datas['statement_info'][0]['withdraw_type'] eq 0 and $statement_info['statement_begin_time']" > ({$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']})< / if > < / td >
< td > --< / td >
< td > --< / td >
< td > --< / td >
< td > --< / td >
< td > --< / td >
< td > --< / td >
< td > --< / td >
< td > < if condition = "$statement_info['statement_type'] eq 2" > -< / if > {$statement_info['sum_money']|default="--"}< / td >
< else / >
< tr >
< td > {$statement_info['game_name']|default="--"}< if condition = "$datas['statement_info'][0]['withdraw_type'] eq 0 and $statement_info['statement_begin_time']" > ({$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']})< / if > < / td >
< td > {$statement_info['platform_money']|default="--"}< / td >
< td > {$statement_info['aggregate_money']|default="--"}< / td >
< td > {$statement_info['sum_amount']|default="--"}< / td >
< td > {$statement_info['ratio']|default="--"}< / td >
< td > {$statement_info['promote_ratio']|default="--"}< / td >
< td > {$statement_info['fax_ratio']|default="--"}< / td >
< td > {$statement_info['other_amount']|default="--"}< / td >
< td > {$statement_info['sum_money']|default="--"}< / td >
< / tr >
< / if >
< / if >
< / foreach >
< / foreach >
< tr >
< td > 小计< / td >
< td > --< / td >
< td > --< / td >
< td > {$sum[$index]['platform_money']}< / td >
< td > {$sum[$index]['aggregate_money']}< / td >
< td > {$sum[$index]['sum_amount']}< / td >
< td > {$sum[$index]['ratio']}< / td >
< td > {$sum[$index]['promote_ratio']}< / td >
< td > {$sum[$index]['fax_ratio']}< / td >
< td > {$sum[$index]['other_amount']}< / td >
< td > {$sum[$index]['sum_money']}< / td >
< / tr >
< / foreach >
< / tbody >
< / table >
< / div >
< / div >
< / body >
< script >
< if condition = "$is_export" >
$(function(){
$("#exporttable").table2excel({
filename: "{$title}.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
< / if >
$(".no_statement").on("click",function(){
var id = $(this).data('id');
$.ajax({
type: "POST",
url: "{:U('cancelStatement')}",
dataType: 'json',
async: false,
data: {id:id},
success:function(data){
if(data.status==1){
layer.msg("< font style = 'color:white' > " + data.info + "< / font > ");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("< font style = 'color:white' > " + data.info + "< / font > ");
return false;
}
}
});
});
$(".refund").on("blur",function () {
caculate_sum_money(this);
});
$(".ratio").on("blur",function () {
caculate_sum_money(this);
});
$(".increment_ratio").on("blur",function () {
caculate_sum_money(this);
});
function caculate_sum_money(_this) {
var pay_money = $(_this).parent().parent().find(".pay_amount").text();
var ratio = $(_this).parent().parent().find(".ratio").val();
if (!ratio || ratio < 0 ) {
ratio = 0;
$(_this).parent().parent().find(".ratio").val(ratio);
} else if (ratio > 100) {
ratio = 100;
$(_this).parent().parent().find(".ratio").val(ratio);
}
var refund = $(_this).parent().parent().find(".refund").val();
if (!refund || refund < 0 ) {
refund = 0;
$(_this).parent().parent().find(".refund").val(refund);
}
var increment_ratio = $(_this).parent().parent().find(".increment_ratio").val();
if (!increment_ratio || increment_ratio < 0 ) {
increment_ratio = 0;
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
} else if(increment_ratio > 100) {
increment_ratio = 100;
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
}
pay_money = parseFloat(pay_money) - parseFloat(refund);
var value = parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100);
$(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2));
$(_this).parent().parent().find(".sum_money").val(value.toFixed(2));
}
< / script >
< / html >