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.

394 lines
17 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!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;
}
th {
border-right: solid 1px #b6cad2;
text-align: center;
}
.margintips{
color: #0FA6D8;
}
</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 rowspan="2">年份</th>
<th rowspan="2">月份</th>
<th rowspan="2">游戏名</th>
<th rowspan="2" class="margintips" data-id="pay_amount">流水</th>
<th colspan="3">成本——上游CP</th>
<th colspan="2">上游返点</th>
<th rowspan="2">其他费用</th>
<th colspan="5">成本——下游内团</th>
<th colspan="5">成本——下游外团(含分发)</th>
<th rowspan="2">联运产品毛利率</th>
<th colspan="5">成本——下游聚合</th>
<th colspan="2">毛利</th>
<if condition="$id">
<th rowspan="2" style="min-width:55px;">操作</th>
</if>
</tr>
<tr>
<th class="margintips" data-id="cp_promote_ratio">渠道费率</th>
<th>分成比例</th>
<th>结算金额</th>
<th>返点比例</th>
<th>返点金额</th>
<th class="margintips" data-id="pc_pay_amount">推广流水</th>
<th>分成比例</th>
<th>结算金额</th>
<th>内团毛利额</th>
<th>内团毛利率</th>
<th class="margintips" data-id="pu_pay_amount">推广流水</th>
<th class="margintips" data-id="pu_ratio">分成比例</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.list" item="date">
<foreach name="date.marginInfo" item="margin">
<tr>
<td>{$margin["year"]}</td>
<td>{$margin["month"]}</td>
<td>{$margin["relation_game_name"]}</td>
<td>{$margin["pay_amount"]}</td>
<td>{$margin["cp_promote_ratio"]}%</td>
<td>{$margin["cp_ratio"]}</td>
<td>{$margin["cp_statement_amount"]}</td>
<td>{$margin["cp_rebate_ratio"]}</td>
<td>{$margin["cp_rebate_amount"]}</td>
<td>{$margin["cp_other_amount"]}</td>
<td>{$margin["pc_pay_amount"]}</td>
<td>{$margin["pc_ratio"]}</td>
<td>{$margin["pc_statement_amount"]}</td>
<td>{$margin["pc_margin_amount"]}</td>
<td>{$margin["pc_margin_ratio"]}</td>
<td>{$margin["pu_pay_amount"]}</td>
<td>{$margin["pu_ratio"]}</td>
<td>{$margin["pu_statement_amount"]}</td>
<td>{$margin["pu_margin_amount"]}</td>
<td>{$margin["pu_margin_ratio"]}</td>
<td>{$margin["platform_margin_ratio"]}</td>
<td>{$margin["jh_pay_amount"]}</td>
<td>{$margin["jh_ratio"]}</td>
<td>{$margin["jh_statement_amount"]}</td>
<td>{$margin["jh_margin_amount"]}</td>
<td>{$margin["jh_margin_ratio"]}</td>
<td>{$margin["margin_ratio"]}</td>
<td>{$margin["margin_amount"]}</td>
<if condition="$id">
<td>
<a class="confirm margin_edit" data-info='{$margin|json_encode="512"}' data-id="{$id}" data-key="{$key}">编辑</a>
</td>
</if>
</tr>
</foreach>
<tr style="font-weight: 800;font-size: 14px;">
<td>{$date['count']["year"]}</td>
<td>{$date['count']["month"]}</td>
<td>小计</td>
<td>{$date['count']["pay_amount"]}</td>
<td></td>
<td></td>
<td>{$date['count']["cp_statement_amount"]}</td>
<td></td>
<td>{$date['count']["cp_rebate_amount"]}</td>
<td>{$date['count']["cp_other_amount"]}</td>
<td>{$date['count']["pc_pay_amount"]}</td>
<td>{$date['count']["pc_ratio"]}</td>
<td>{$date['count']["pc_statement_amount"]}</td>
<td>{$date['count']["pc_margin_amount"]}</td>
<td>{$date['count']["pc_margin_ratio"]}</td>
<td>{$date['count']["pu_pay_amount"]}</td>
<td>{$date['count']["pu_ratio"]}</td>
<td>{$date['count']["pu_statement_amount"]}</td>
<td>{$date['count']["pu_margin_amount"]}</td>
<td>{$date['count']["pu_margin_ratio"]}</td>
<td>{$date['count']["platform_margin_ratio"]}</td>
<td>{$date['count']["jh_pay_amount"]}</td>
<td>{$date['count']["jh_ratio"]}</td>
<td>{$date['count']["jh_statement_amount"]}</td>
<td>{$date['count']["jh_margin_amount"]}</td>
<td>{$date['count']["jh_margin_ratio"]}</td>
<td>{$date['count']["margin_ratio"]}</td>
<td>{$date['count']["margin_amount"]}</td>
<if condition="$id">
<td></td>
</if>
</tr>
</foreach>
<if condition="!$id">
<tr style="font-weight: 800;font-size: 14px;">
<th colspan="3">{$data['count']["date"]}</td>
<td>{$data['count']["pay_amount"]}</td>
<td></td>
<td></td>
<td>{$data['count']["cp_statement_amount"]}</td>
<td></td>
<td>{$data['count']["cp_rebate_amount"]}</td>
<td>{$data['count']["cp_other_amount"]}</td>
<td>{$data['count']["pc_pay_amount"]}</td>
<td>{$data['count']["pc_ratio"]}</td>
<td>{$data['count']["pc_statement_amount"]}</td>
<td>{$data['count']["pc_margin_amount"]}</td>
<td>{$data['count']["pc_margin_ratio"]}</td>
<td>{$data['count']["pu_pay_amount"]}</td>
<td>{$data['count']["pu_ratio"]}</td>
<td>{$data['count']["pu_statement_amount"]}</td>
<td>{$data['count']["pu_margin_amount"]}</td>
<td>{$data['count']["pu_margin_ratio"]}</td>
<td>{$data['count']["platform_margin_ratio"]}</td>
<td>{$data['count']["jh_pay_amount"]}</td>
<td>{$data['count']["jh_ratio"]}</td>
<td>{$data['count']["jh_statement_amount"]}</td>
<td>{$data['count']["jh_margin_amount"]}</td>
<td>{$data['count']["jh_margin_ratio"]}</td>
<td>{$data['count']["margin_ratio"]}</td>
<td>{$data['count']["margin_amount"]}</td>
</tr>
</if>
</tbody>
</table>
</div>
</div>
</body>
<script type="text/html" id="changeTpl">
<div style="padding:10px 40px 30px;">
<spend style="font-size:14px;color:#666;">
</spend>
<table border="0" cellspacing="0" cellpadding="0" style="margin:0px;">
<tr style="line-height: 4;">
<td class="l noticeinfo" style="width:80px;">返点比例:</td>
<td class="r table_radio">
<input type="text" id="cp_rebate_ratio" placeholder="返点比例" /> %
</td>
</tr>
<tr style="line-height: 4;">
<td class="l noticeinfo" style="width:80px;">返点金额:</td>
<td class="r table_radio">
<input type="text" id="cp_rebate_amount" placeholder="返点金额" />
</td>
</tr>
<tr style="line-height: 4;">
<td class="l noticeinfo" style="width:80px;">其他扣款:</td>
<td class="r table_radio">
<input type="text" id="cp_other_amount" placeholder="其他扣款" />
</td>
</tr>
</table>
<button class="submit_btn mlspacing" id="changeMargin" type="submit" style="margin-top:30px;">
保存
</button>
</div>
</script>
<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>
var tipsmsg ={
"pay_amount":"上游结算流水,已剔除退款、奖罚数据",
"cp_promote_ratio":"上游结算时的渠道费",
"pc_pay_amount":"内团结算流水,已剔除退款、奖罚数据、不结算数据",
"pu_pay_amount":"外团结算流水,已剔除退款、奖罚数据、不结算数据",
"pu_ratio":"外团结算比例,周结按当月最后一次结算的比例计算"
}
$(".margintips").on('mouseover', function(){
var that = this;
var id = $(this).data("id");
layer.tips(tipsmsg[id], that,{tips: [1, '#0FA6D8']}); //在元素的事件回调体中follow直接赋予this即可
});
$(".margin_edit").on("click",function(){
var data = $(this).data();
layer.open({
type: 1,
title: data.info.relation_game_name + '编辑',
maxWidth:720,
closeBtn: 1,
shadeClose: false,
content: $("#changeTpl").html(),
success:function(){
env(data);
}
});
});
function env(data) {
$("#cp_rebate_ratio").val(data.info.cp_rebate_ratio.replace("%",''));
$("#cp_rebate_amount").val(data.info.cp_rebate_amount);
$("#cp_other_amount").val(data.info.cp_other_amount);
$("#changeMargin").off("click");
$("#changeMargin").on("click",function(){
let cp_rebate_ratio = $("#cp_rebate_ratio").val();
let cp_rebate_amount = $("#cp_rebate_amount").val();
let cp_other_amount = $("#cp_other_amount").val();
var reg = /^(\-|\+)?\d+(\.\d*)?$/;
if( !reg.test(cp_rebate_ratio) || cp_rebate_ratio > 100){
layer.msg("返点比例格式错误");
return ;
}
if( !reg.test(cp_rebate_amount)){
layer.msg("返点金额格式错误");
return ;
}
if( !reg.test(cp_other_amount)){
layer.msg("其他金额格式错误");
return ;
}
if(cp_rebate_ratio == data.info.cp_rebate_ratio && cp_rebate_amount == data.info.cp_rebate_amount && cp_other_amount == data.info.cp_other_amount){
layer.msg("无修改请直接关闭窗口");
return ;
}
//成功
let send = {
id:data.id,
key:data.key,
cp_rebate_ratio:cp_rebate_ratio,
cp_rebate_amount:cp_rebate_amount,
cp_other_amount:cp_other_amount
}
$.ajax({
type: "POST",
url: "{:U('marginEdit')}",
dataType: 'json',
data: send,
success: function (data) {
if (data.status == 1) {
layer.msg(data.msg);
setTimeout(function () {
window.location.reload();
}, 1500);
} else {
layer.msg(data.msg);
return false;
}
}
});
});
}
</script>
</html>