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.

397 lines
16 KiB
HTML

<!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>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px 0px 150px;
width: 960px;
margin: auto;
}
.tabcon1711 table{
width: 480px;
}
table{
margin: auto;
}
.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;
}
</style>
<body>
<div style="height: 20px"></div>
<div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
<div class="tab-content tabcon1711" >
<div class="input-list input-list-game search_label_rehab" style="margin-left: 375px;">
《{$company_name}》结算单
</div>
</div>
</div>
<div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
<div class="tab-content tabcon1711">
<div class="input-list input-list-game search_label_rehab" style="margin-left: 375px;">
<div style="margin-top: -20px;width: 100%;line-height: 20px;font-weight: 600;text-align: center;margin-bottom: 10px;margin-left: 30px;" class="time">({$statement_begin_time}-{$statement_end_time})</div>
</div>
</div>
</div>
<div class="data_list box_mt" style="margin-top: 10px;">
<div >
<table>
<!-- 表头 -->
<thead>
<tr>
<th>结算月份</th>
<th>合作产品名称</th>
<th>月累计用户充值流水</th>
<th>月新增用户数</th>
<th>税费费率</th>
<th>结算金额(元)</th>
</tr>
</thead>
<tbody >
<tr>
<td>{$list[0]['statement_begin_time']}-{$list[0]['statement_end_time']}</td>
<td>{$list[0]['game_name']}</td>
<td rowspan="{$row}" class="pay_amount">{$amount_data['pay_amount']}</td>
<td rowspan="{$row}" class="user_newcount">{$amount_data['user_newcount']}</td>
<td rowspan="{$row}" class="parent_fax_ratio">{$amount_data['fax_ratio']}%</td>
<td rowspan="{$row}" class="sum_money">{$amount_data['sum_money']}</td>
</tr>
<foreach name="list" item="it" key="key">
<if condition="$key neq 0">
<tr>
<td>{$it['statement_begin_time']}-{$it['statement_end_time']}</td>
<td>{$it['game_name']}</td>
</tr>
</if>
</foreach>
<tr>
<td>支付金额</td>
<td colspan="5">{:convertAmountToCn($amount_data['sum_money'])}</td>
</tr>
<tr>
<td>备注</td>
<td colspan="5">结算金额按每月双方实际核定结算指标为准</td>
</tr>
<if condition="$first_party_info['invoice_item']">
<tr>
<td>甲方</td>
<td colspan="2">{$first_party_info['partner']}</td>
<td>乙方</td>
<td colspan="2">{$second_party_info['partner']}</td>
</tr>
<tr>
<td>联系人</td>
<td colspan="2">{$first_party_info['link_man']}</td>
<td>联系人</td>
<td colspan="2">{$second_party_info['link_man']}</td>
</tr>
<tr>
<td>联系电话</td>
<td colspan="2">{$first_party_info['link_phone']}</td>
<td>联系电话</td>
<td colspan="2">{$second_party_info['phone']}</td>
</tr>
<tr>
<td>开票内容</td>
<td colspan="2">{$first_party_info['invoice_item']}</td>
<td>邮寄地址</td>
<td colspan="2">{$second_party_info['address']}</td>
</tr>
<tr>
<td>发票类型</td>
<td colspan="2">{$first_party_info['invoice_type']}</td>
<td>请汇入此账号</td>
<td colspan="2"></td>
</tr>
<tr>
<td>邮寄地址</td>
<td colspan="2">{$first_party_info['address']}</td>
<td>户名</td>
<if condition="$second_party_info['is_payment'] eq 1">
<td colspan="2">{$second_party_info['ali_user']}</td>
<else/>
<td colspan="2">{$second_party_info['bank_address']}</td>
</if>
</tr>
<tr>
<td></td>
<td colspan="2"></td>
<td>账号</td>
<if condition="$second_party_info['is_payment'] eq 1">
<td colspan="2">{$second_party_info['ali_account']}</td>
<else/>
<td colspan="2">{$second_party_info['bank_card']}</td>
</if>
</tr>
<if condition="$second_party_info['is_payment'] neq 1">
<tr>
<td></td>
<td colspan="2"></td>
<td>开户行</td>
<td colspan="2">{$second_party_info['bank_name']}</td>
</tr>
</if>
<else/>
<tr>
<td>甲方</td>
<td colspan="2">{$first_party_info['partner']}</td>
<td>乙方</td>
<td colspan="2">{$second_party_info['partner']}</td>
</tr>
<tr>
<td>联系人</td>
<td colspan="2">{$first_party_info['link_man']}</td>
<td>联系人</td>
<td colspan="2">{$second_party_info['link_man']}</td>
</tr>
<tr>
<td>联系电话</td>
<td colspan="2">{$first_party_info['link_phone']}</td>
<td>联系电话</td>
<td colspan="2">{$second_party_info['phone']}</td>
</tr>
<tr>
<td>邮寄地址</td>
<td colspan="2">{$first_party_info['address']}</td>
<td>开票内容</td>
<td colspan="2">{$second_party_info['invoice_item']}</td>
</tr>
<tr>
<td>请汇入此账号</td>
<td colspan="2"></td>
<td>发票类型</td>
<td colspan="2">{$second_party_info['invoice_type']}</td>
</tr>
<tr>
<td>户名</td>
<if condition="$second_party_info['is_payment'] eq 1">
<td colspan="2">{$first_party_info['ali_user']}</td>
<else/>
<td colspan="2">{$first_party_info['bank_address']}</td>
</if>
<td>邮寄地址</td>
<td colspan="2">{$second_party_info['address']}</td>
</tr>
<tr>
<td>账号</td>
<if condition="$second_party_info['is_payment'] eq 1">
<td colspan="2">{$first_party_info['ali_account']}</td>
<else/>
<td colspan="2">{$first_party_info['bank_card']}</td>
</if>
<td></td>
<td colspan="2"></td>
</tr>
<if condition="$second_party_info['is_payment'] neq 1">
<tr>
<td>开户行</td>
<td colspan="2">{$first_party_info['bank_name']}</td>
<td></td>
<td colspan="2"></td>
</tr>
</if>
</if>
</tbody>
</table>
</div>
</div>
</body>
<script>
$(".select_gallery").select2();
$(function () {
var sum_amount = parseFloat($(".sum_money").text());
var row = 0;
var amount_datas;
var other_list;
var list = '{$js_data}';
var company_id;
var other_id;
$(".submit_btn").click(function () {
var id = "{$_GET['id']}";
if (!company_id) {
layer.msg("请选择汇总公司");
return;
}
var fax_ratio = $(".fax_ratio").val();
layer.load(2);
$.ajax({
type: 'post',
url: "{:U('saveCompanyData')}",
data:{list:list,other_list:other_list,company_id:company_id,amount_data:amount_datas,fax_ratio:fax_ratio,id:id,other_id:other_id},
success: function(data) {
layer.msg(data.msg);
if(data.status == 1) {
setTimeout(function(){
layer.close(2);
window.parent.reload();
},3000);
}
layer.closeAll("loading");
},
error:function(){
layer.closeAll("loading");
layer.alert("网络错误或超时");
return false;
}
});
});
$("#promote_company").change(function () {
var begin = $(".time").data("begin");
var end = $(".time").data("end");
company_id = $(this).val();
if (company_id == "请选择下游公司") {
company_id = '';
}
var id = "{$_GET['id']}";
var amount_data = '{$js_amount_data}';
$(".other_append").remove();
$(".pay_amount").attr("rowspan",parseInt($(".pay_amount").attr('rowspan'))-row);
$(".user_newcount").attr("rowspan",parseInt($(".user_newcount").attr('rowspan'))-row);
$(".parent_fax_ratio").attr("rowspan",parseInt($(".parent_fax_ratio").attr('rowspan'))-row);
$(".sum_money").attr("rowspan",parseInt($(".sum_money").attr('rowspan'))-row);
$.ajax({
type: 'post',
url: "{:U('checkCompanyData')}",
data:{begin_time:begin,end_time:end,company_id:company_id,statement_id:id,amount_data:amount_data},
success: function(data) {
if (data.status==1) {
for (var key in data.list) {
var tr = "<tr class='other_append'>" +
"<td>"+data.list[key]['statement_begin_time']+"-"+data.list[key]['statement_end_time']+"</td>" +
"<td>"+data.list[key]['game_name']+"</td>" +
"</tr>";
$("tbody").append(tr);
}
row = data.row;
$(".pay_amount").text(data.amount_data['pay_amount']);
$(".user_newcount").text(data.amount_data['user_newcount']);
// $(".fax_ratio").text(data.amount_data['pay_amount']);
$(".sum_money").text(data.amount_data['sum_money']);
$(".pay_amount").attr("rowspan",parseInt($(".pay_amount").attr('rowspan'))+row);
$(".user_newcount").attr("rowspan",parseInt($(".user_newcount").attr('rowspan'))+row);
$(".parent_fax_ratio").attr("rowspan",parseInt($(".parent_fax_ratio").attr('rowspan'))+row);
$(".sum_money").attr("rowspan",parseInt($(".sum_money").attr('rowspan'))+row);
sum_amount = data.amount_data['sum_money'];
amount_datas = JSON.stringify(data.amount_data);
other_list = JSON.stringify(data.list);
other_id = data.other_id;
}
},
error:function(){
layer.alert("网络错误或超时");
return false;
}
});
});
$(".fax_ratio").blur(function() {
var fax_ratio = parseFloat($(this).val());
var pay_amount = parseFloat($(".pay_amount").text());
var sum_money = 0;
var fax_amount = sum_amount * (fax_ratio/100);
sum_money = sum_amount-fax_amount;
$(".sum_money").text(sum_money.toFixed(2));
});
});
</script>
</html>