|
|
|
<!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;">
|
|
|
|
<select name="promote_company" id="promote_company" class="select_gallery">
|
|
|
|
<option>请选择下游公司</option>
|
|
|
|
<foreach name="company_data" item="company_data">
|
|
|
|
<option value="{$company_data['id']}" data-company_name="{$company_data['company_name']}">{$company_data['company_name']}</option>
|
|
|
|
</foreach>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div><span style="line-height: 20px; margin-left: 15px">结算单</span>
|
|
|
|
<div style="margin-top: 20px;width: 100%;line-height: 20px;font-weight: 600;text-align: center;" class="time"
|
|
|
|
data-begin="{$amount_data['statement_begin_time']}" data-end="{$amount_data['statement_end_time']}">({$amount_data['statement_begin_time']}-{$amount_data['statement_end_time']})</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>{$data[0]['statement_begin_time']}-{$data[0]['statement_end_time']}</td>
|
|
|
|
<td>{$data[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"><input class="fax_ratio txt" type="text" name="fax_ratio" value="0" placeholder="" style="width: 25px">%</td>
|
|
|
|
<td rowspan="{$row}" class = "parent_sum_money"><input class="sum_money txt" type="text" name="sum_money" value="{$amount_data['sum_money']}" placeholder="" style="width: 88px;text-align: right;"></td>
|
|
|
|
</tr>
|
|
|
|
<foreach name="data" 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>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div class="tab-content tabcon1711">
|
|
|
|
<div class="form-item cf">
|
|
|
|
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.parent.reload();" style="float: right">
|
|
|
|
返回
|
|
|
|
</a>
|
|
|
|
<button class="submit_btn" id="submit_btn" style="float: right">
|
|
|
|
保存
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
$(".select_gallery").select2();
|
|
|
|
|
|
|
|
$(function () {
|
|
|
|
|
|
|
|
var sum_amount = parseFloat($(".sum_money").val());
|
|
|
|
var row = 0;
|
|
|
|
var amount_datas;
|
|
|
|
var other_list;
|
|
|
|
var list = '{$js_data}';
|
|
|
|
var company_id;
|
|
|
|
var other_id;
|
|
|
|
var submit = 0;
|
|
|
|
|
|
|
|
$(".submit_btn").click(function () {
|
|
|
|
|
|
|
|
if (submit == 0) {
|
|
|
|
submit++;
|
|
|
|
} else {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$(".sum_money").blur(function() {
|
|
|
|
|
|
|
|
var pay_amount = parseFloat($(".pay_amount").text());
|
|
|
|
sum_amount = parseFloat($(this).val());
|
|
|
|
|
|
|
|
if (sum_amount > pay_amount) {
|
|
|
|
sum_amount = pay_amount;
|
|
|
|
$(this).val(sum_amount)
|
|
|
|
}
|
|
|
|
var jsonObj = JSON.parse(amount_datas);
|
|
|
|
jsonObj["sum_money"] = sum_amount;
|
|
|
|
amount_datas = JSON.stringify(jsonObj);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#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);
|
|
|
|
$(".parent_sum_money").attr("rowspan",parseInt($(".parent_sum_money").attr('rowspan'))-row);
|
|
|
|
layer.load(2);
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
type: 'post',
|
|
|
|
url: "{:U('checkCompanyData')}",
|
|
|
|
data:{begin_time:begin,end_time:end,company_id:company_id,statement_id:id,amount_data:amount_data,list:list},
|
|
|
|
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").val(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);
|
|
|
|
$(".parent_sum_money").attr("rowspan",parseInt($(".parent_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;
|
|
|
|
}
|
|
|
|
layer.closeAll("loading");
|
|
|
|
},
|
|
|
|
error:function(){
|
|
|
|
layer.alert("网络错误或超时");
|
|
|
|
layer.closeAll("loading");
|
|
|
|
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").val(sum_money.toFixed(2));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</html>
|