Merge branch 'release' into feature/0128
commit
5c22a252a3
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,690 @@
|
||||
<!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="__STATIC__/jquery.form.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;
|
||||
}
|
||||
|
||||
</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="">
|
||||
<form id="form" method="post" class="form-horizontal" action="{:U('editCompanyStatementPoolPc')}" enctype="multipart/form-data" target="rfFrame">
|
||||
<table id="exporttable">
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">合作公司</th>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">平台</th>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">结算日期</th>
|
||||
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">产品</th>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">平台流水</th>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">未结算平台流水</th>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">退款</th>
|
||||
|
||||
<th colspan=2 style="border-right: solid 1px #b6cad2;">分成比例</th>
|
||||
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">渠道费率</th>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">税费费率</th>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">合作方待结算分成</th>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">违规罚款</th>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">奖励</th>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">其他扣款</th>
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">周期结算金额</th>
|
||||
<!-- <th rowspan="2" style="border-right: solid 1px #b6cad2;">周结算金额</th>-->
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">合作待结算金额</th>
|
||||
|
||||
<th rowspan=2 style="border-right: solid 1px #b6cad2;">是否结算</th>
|
||||
<th rowspan=2 style="border-right: solid 1px #b6cad2;">是否支付宝打款</th>
|
||||
|
||||
<th colspan=3 style="border-right: solid 1px #b6cad2;">账户信息</th>
|
||||
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">备注</th>
|
||||
|
||||
<if condition="!$is_export">
|
||||
<th rowspan="2" style="border-right: solid 1px #b6cad2;">操作</th>
|
||||
</if>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border-right: solid 1px #b6cad2;min-width: 50px;">合作方</th>
|
||||
<th style="min-width: 50px;">我方</th>
|
||||
|
||||
<th style="border-right: solid 1px #b6cad2;min-width: 50px;">户名</th>
|
||||
<th style="border-right: solid 1px #b6cad2;min-width: 50px;">账号</th>
|
||||
<th style="min-width: 50px;">开户行</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="statementShow">
|
||||
<foreach name="data" item="com">
|
||||
<tr>
|
||||
<td rowspan="{$com.statement_count}">{$com.company_name}</td>
|
||||
<td rowspan="{$com.statement_count}">{$com.matche_platform}</td>
|
||||
<!-- <td rowspan="{$com.statement_count}">{$com.statement_begin_time} ~ {$com.statement_end_time}</td> -->
|
||||
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['time']}</td>
|
||||
<!-- <td>{$com['statement_info'][0]['statement_begin_time']}-{$com['statement_info'][0]['statement_end_time']}</td>-->
|
||||
|
||||
<td>{$com['statement_info'][0]['game_name']}</td>
|
||||
<td class="pay_amount">{$com['statement_info'][0]['pay_amount']}</td>
|
||||
<td>{$com['statement_info'][0]['pay_amount']}</td>
|
||||
<td >
|
||||
<!-- {$com['statement_info'][0]['refund']|default=0}-->
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]">
|
||||
<else/>
|
||||
0
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{$com['statement_info'][0]['ratio']|showNumPercent}
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['ratio']}" style="width: 25px;display: none">
|
||||
</if>
|
||||
</td>
|
||||
<td>{$com['statement_info'][0]['company_ratio']|showNumPercent}</td>
|
||||
<td>{$com['statement_info'][0]['promote_ratio']|showNumPercent}</td>
|
||||
<td>
|
||||
{$com['statement_info'][0]['fax_ratio']|showNumPercent}
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="fax_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="fax_ratio[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['fax_ratio']}" style="width: 25px;display: none">
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
<span class="sum_money_span">{$com['statement_info'][0]['d_statement_money']}</span>
|
||||
<input class="sum_money" name="sum_money[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['d_statement_money']}" style="width: 20px;display: none">
|
||||
<input class="st" name="st[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['st']}" style="width: 20px;display: none">
|
||||
</td>
|
||||
|
||||
<td rowspan="{$com['statement_info'][0]['row']}">{$com['fine']-0}</td>
|
||||
<td rowspan="{$com['statement_info'][0]['row']}">{$com['reward']-0}</td>
|
||||
<td rowspan="{$com['statement_info'][0]['row']}">
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]">
|
||||
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold']|default=0}" style="width: 40px;display: none">
|
||||
<else/>
|
||||
0
|
||||
</if>
|
||||
</td>
|
||||
<td rowspan="{$com['statement_info'][0]['row']}">
|
||||
<span class="week_amount">{$com['statement_info'][0]['week_amount']}</span>
|
||||
</td>
|
||||
<!-- <td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['week_amount']}</td>-->
|
||||
<td rowspan="{$com.statement_count}" class="statement_money">{$com['statement_money']}</td>
|
||||
|
||||
<td rowspan="{$com.statement_count}"><if condition="$com['st'] eq 0">否 <else /> 是 </if></td>
|
||||
<td rowspan="{$com.statement_count}"><if condition="$com['is_payment'] eq 1">是 <else /> 否 </if></td>
|
||||
|
||||
<if condition="$com['is_payment'] eq 2">
|
||||
<td rowspan="{$com.statement_count}">{$com.company_info.payee_name}</td>
|
||||
<td rowspan="{$com.statement_count}"> {$com.company_info.bank_account}</td>
|
||||
<td rowspan="{$com.statement_count}">{$com.company_info.opening_bank}</td>
|
||||
</if>
|
||||
|
||||
<if condition="$com['is_payment'] eq 1">
|
||||
<td rowspan="{$com.statement_count}">{$com.company_info.ali_user}</td>
|
||||
<td rowspan="{$com.statement_count}">{$com.company_info.ali_account}</td>
|
||||
<td rowspan="{$com.statement_count}"></td>
|
||||
</if>
|
||||
|
||||
|
||||
<td rowspan="{$com.statement_count}"><textarea name="remark[{$com['id']}][{$com['st']}]">{$com.remark}</textarea></td>
|
||||
|
||||
<if condition="!$is_export">
|
||||
<td rowspan="{$com.statement_count}">
|
||||
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
|
||||
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
|
||||
</if>
|
||||
<if condition="($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
|
||||
<a data-id="{$com['id']}" data-st="{$com['st']}" class='butn split_RewardOrFail' style="cursor:pointer">奖惩分离</a>
|
||||
</if>
|
||||
</td>
|
||||
</if>
|
||||
|
||||
</tr>
|
||||
<foreach name="com.statement_info" item="it" key="k">
|
||||
<if condition="$k neq 0">
|
||||
<tr>
|
||||
<!-- <td>{$it['statement_begin_time']}-{$it['statement_end_time']}</td>-->
|
||||
<notempty name="it['time']">
|
||||
<td rowspan="{$it['row']}">{$it['time']}</td>
|
||||
</notempty>
|
||||
<td>{$it['game_name']}</td>
|
||||
<td><span class="pay_amount">{$it['pay_amount']}</span></td>
|
||||
<td>{$it['pay_amount']}</td>
|
||||
<td>
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]">
|
||||
<else/>
|
||||
0
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{$it['ratio']|showNumPercent}
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['ratio']}" style="width: 25px;display: none">
|
||||
</if>
|
||||
</td>
|
||||
<td>{$it['company_ratio']|showNumPercent}</td>
|
||||
<td>{$it['promote_ratio']|showNumPercent}</td>
|
||||
<td>
|
||||
{$it['fax_ratio']|showNumPercent}
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="fax_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="fax_ratio[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['fax_ratio']}" style="width: 25px;display: none">
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
<span class="sum_money_span">{$it['d_statement_money']}</span>
|
||||
<input class="sum_money" name="sum_money[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['d_statement_money']}" style="width: 20px;display: none">
|
||||
<input class="st" name="st[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$com['st']}" style="width: 20px;display: none">
|
||||
</td>
|
||||
<notempty name="it['time']">
|
||||
<td rowspan="{$it['row']}">{$it['fine']-0}</td>
|
||||
<td rowspan="{$it['row']}">{$it['reward']-0}</td>
|
||||
<td>
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]">
|
||||
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['withhold']|default=0}" style="width: 40px;display: none">
|
||||
<else/>
|
||||
0
|
||||
</if>
|
||||
</td>
|
||||
<td rowspan="{$it['row']}"><span class="week_amount">{$it['week_amount']}</span></td>
|
||||
</notempty>
|
||||
</tr>
|
||||
</if>
|
||||
|
||||
</foreach>
|
||||
</foreach>
|
||||
<tr>
|
||||
<td colspan=4 >合计:</td>
|
||||
<td>{$count.platform_amount}</td>
|
||||
<td>{$count.platform_amount2}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{$count.d_statement_money}</td>
|
||||
<td>{$count.fine}</td>
|
||||
<td>{$count.reward}</td>
|
||||
<td></td>
|
||||
<td class="count_sum_money">{$count.statement_money}</td>
|
||||
<td class="count_sum_money">{$count.statement_money}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<if condition="!$is_export">
|
||||
<td></td>
|
||||
</if>
|
||||
</tr>
|
||||
<if condition="$is_export">
|
||||
<tr>
|
||||
<td ></td>
|
||||
<td>
|
||||
<if condition="$pool_data.verify_status eq -3 ">
|
||||
<div style="line-height: 2;color: red;">
|
||||
{$pool_data.firstverify}
|
||||
</div>
|
||||
<else />
|
||||
<div style="line-height: 2;">
|
||||
{$pool_data.firstverify}
|
||||
</div>
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
<if condition="$pool_data.verify_status eq -1 ">
|
||||
<div style="line-height: 2;color: red;">
|
||||
{$pool_data.verify}
|
||||
</div>
|
||||
<else />
|
||||
<div style="line-height: 2;">
|
||||
{$pool_data.verify}
|
||||
</div>
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
<if condition="$pool_data.verify_status eq -2 ">
|
||||
<div style="line-height: 2;color: red;">
|
||||
{$pool_data.payment}
|
||||
</div>
|
||||
<else />
|
||||
<div style="line-height: 2;">
|
||||
{$pool_data.payment}
|
||||
</div>
|
||||
</if>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</if>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="id" value="{$_GET['id']}">
|
||||
</form>
|
||||
<div class="form-item cf" style="float: right;margin-top: 30px;margin-right: 30px;">
|
||||
|
||||
<button class="submit_btn" id="submit" style="margin-left:210px;">
|
||||
保存
|
||||
</button>
|
||||
</div>
|
||||
<iframe id="rfFrame" name="rfFrame" src="about:blank" style="display:none;"></iframe>
|
||||
</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;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// })
|
||||
|
||||
var pool_ids = "{$_GET['id']}";
|
||||
$(".split_RewardOrFail").on("click",function() {
|
||||
|
||||
var id = $(this).data('id');
|
||||
var st = $(this).data('st');
|
||||
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{:U('splitRewardOrFailData')}",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: {id: id, st: st, pool_id: pool_ids},
|
||||
success: function (data) {
|
||||
if (data.status == 1) {
|
||||
layer.msg("<font style='color:white'>" + data.msg + "</font>");
|
||||
setTimeout(function () {
|
||||
window.location.reload();
|
||||
}, 1500);
|
||||
} else {
|
||||
layer.msg("<font style='color:white'>" + data.msg + "</font>");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(".no_statement").on("click",function(){
|
||||
|
||||
var id = $(this).data('id');
|
||||
saveForm(id);
|
||||
|
||||
});
|
||||
var return_data = "";
|
||||
|
||||
function saveForm(id) {
|
||||
var options = {
|
||||
url:"{:U('editCompanyStatementPoolPc')}", //同action
|
||||
type:'post',
|
||||
beforeSend:function(xhr){
|
||||
},
|
||||
success:function(data)
|
||||
{
|
||||
return_data = data;
|
||||
},
|
||||
|
||||
complete:function(data){
|
||||
if(return_data.status==1){
|
||||
|
||||
$.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;
|
||||
}
|
||||
}
|
||||
});
|
||||
return;
|
||||
}else{
|
||||
layer.msg("<font style='color:white'>" + 保存数据失败 + "</font>");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function(xhr,status,msg){
|
||||
//alert("状态码"+status+"; "+msg)
|
||||
layer.msg('玩命加载中..');
|
||||
|
||||
}
|
||||
};
|
||||
$("#form").ajaxSubmit(options);
|
||||
}
|
||||
|
||||
$("#submit").click(function(){
|
||||
var options = {
|
||||
url:"{:U('editCompanyStatementPoolPc')}", //同action
|
||||
type:'post',
|
||||
beforeSend:function(xhr){
|
||||
},
|
||||
success:function(data)
|
||||
{
|
||||
return_data = data;
|
||||
},
|
||||
|
||||
complete:function(data){
|
||||
|
||||
if(return_data.status==1){
|
||||
layer.msg("<font style='color:white'>" + return_data.info + "</font>");
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
},1500);
|
||||
}else{
|
||||
layer.msg("<font style='color:white'>" + return_data.info + "</font>");
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
error: function(xhr,status,msg){
|
||||
//alert("状态码"+status+"; "+msg)
|
||||
layer.msg('玩命加载中..');
|
||||
|
||||
}
|
||||
};
|
||||
$("#form").ajaxSubmit(options);
|
||||
});
|
||||
|
||||
$(".refund").on("blur",function () {
|
||||
caculate_sum_money(this);
|
||||
changeStatementAmount(this);
|
||||
changeSumAmount();
|
||||
});
|
||||
|
||||
$(".withhold").on("blur",function () {
|
||||
caculate_sum_money(this);
|
||||
changeStatementAmount(this);
|
||||
changeSumAmount();
|
||||
});
|
||||
|
||||
$(".ratio").on("blur",function () {
|
||||
caculate_sum_money(this);
|
||||
changeStatementAmount(this);
|
||||
changeSumAmount();
|
||||
});
|
||||
|
||||
$(".increment_ratio").on("blur",function () {
|
||||
caculate_sum_money(this);
|
||||
changeStatementAmount(this);
|
||||
changeSumAmount();
|
||||
});
|
||||
|
||||
var withdraw_type = "{$withdraw_type}";
|
||||
|
||||
// 分成结算金额重算
|
||||
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);
|
||||
} else if(parseFloat(refund) > parseFloat(pay_money)) {
|
||||
refund = pay_money;
|
||||
$(_this).parent().parent().find(".refund").val(refund);
|
||||
}
|
||||
|
||||
//退款
|
||||
var withhold = $(_this).parent().parent().find(".withhold").val();
|
||||
var oldwithhold = $(_this).parent().parent().find(".oldwithhold").val();
|
||||
// console.log(withhold-oldwithhold);
|
||||
if (!withhold ) {
|
||||
withhold = 0;
|
||||
$(_this).parent().parent().find(".withhold").val(withhold);
|
||||
}
|
||||
|
||||
if (!oldwithhold ) {
|
||||
oldwithhold = 0;
|
||||
$(_this).parent().parent().find(".oldwithhold").val(oldwithhold);
|
||||
}
|
||||
// else if(parseFloat(withhold) > parseFloat(pay_money)) {
|
||||
// withhold = pay_money;
|
||||
// $(_this).parent().parent().find(".withhold").val(withhold);
|
||||
// }
|
||||
|
||||
//补点
|
||||
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);
|
||||
}
|
||||
|
||||
var week_amount_find = $(_this).parent().parent();
|
||||
var old_amount = week_amount_find.find(".sum_money_span").text();
|
||||
//扣款
|
||||
pay_money = parseFloat(pay_money) - parseFloat(refund);
|
||||
|
||||
|
||||
if (withdraw_type == 3) {
|
||||
var value = parseFloat(pay_money)*(parseFloat(increment_ratio)/100);
|
||||
} else {
|
||||
var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100));
|
||||
}
|
||||
|
||||
// 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));
|
||||
|
||||
var this_amount = week_amount_find.find(".sum_money_span").text();
|
||||
|
||||
var week_amount = 0;
|
||||
var i = 0;
|
||||
for (;;) {
|
||||
week_amount = week_amount_find.find(".week_amount").text();
|
||||
i++;
|
||||
// console.log(week_amount);
|
||||
if (week_amount) {
|
||||
break;
|
||||
} else {
|
||||
week_amount_find = week_amount_find.prev();
|
||||
}
|
||||
if (i>10) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var D_value = parseFloat(old_amount) - parseFloat(this_amount) + parseFloat(withhold-oldwithhold);
|
||||
// console.log(D_value);
|
||||
week_amount_find.find(".week_amount").text((parseFloat(week_amount) - D_value).toFixed(2));
|
||||
|
||||
$(_this).parent().parent().find(".oldwithhold").val(withhold)
|
||||
|
||||
}
|
||||
//结算金额重算
|
||||
function changeStatementAmount(_this) {
|
||||
|
||||
var _parent = $(_this).parent().parent();
|
||||
|
||||
var statement_amount = '';
|
||||
|
||||
var num = 0;
|
||||
for (;;) {
|
||||
statement_amount = _parent.find(".statement_money").text();
|
||||
if (!statement_amount ) {
|
||||
_parent = _parent.prev();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
|
||||
// if (num>10) {
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
var row = _parent.find(".statement_money").attr("rowspan");
|
||||
var get_item = _parent;
|
||||
var sum_amount = 0;
|
||||
|
||||
for (var i =0;i<parseInt(row);i++) {
|
||||
|
||||
var amount = get_item.find(".week_amount").text();
|
||||
|
||||
if (amount) {
|
||||
sum_amount = parseFloat(sum_amount) + parseFloat(amount);
|
||||
get_item = get_item.next();
|
||||
} else {
|
||||
get_item = get_item.next();
|
||||
}
|
||||
|
||||
}
|
||||
// console.log(sum_amount);
|
||||
_parent.find(".statement_money").text(sum_amount.toFixed(2));
|
||||
|
||||
}
|
||||
//结算金额合计重算
|
||||
function changeSumAmount() {
|
||||
|
||||
var sum_amount = 0;
|
||||
var st = 0;
|
||||
|
||||
$("#statementShow").find(".statement_money").each(function (key,val) {
|
||||
st = $(val).data('st')
|
||||
|
||||
sum_amount = parseFloat(sum_amount) + parseFloat($(val).text());
|
||||
|
||||
});
|
||||
|
||||
$(".count_sum_money").text(sum_amount.toFixed(2));
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,687 @@
|
||||
<!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="__STATIC__/jquery.form.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;
|
||||
}
|
||||
|
||||
</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="">
|
||||
<form id="form" method="post" class="form-horizontal" action="{:U('editCompanyStatementPoolPc')}" enctype="multipart/form-data" target="rfFrame">
|
||||
<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>
|
||||
<th>奖励</th>
|
||||
|
||||
<th>其他扣款</th>
|
||||
<th>周期结算金额</th>
|
||||
<th>合计/元</th>
|
||||
<th>对账人</th>
|
||||
<!-- <th>结算日期</th>-->
|
||||
<th>户名</th>
|
||||
<th>帐号</th>
|
||||
<th>开户行</th>
|
||||
<th>是否支付宝打款</th>
|
||||
<th>是否结算</th>
|
||||
|
||||
<th>备注</th>
|
||||
<if condition="!$is_export">
|
||||
<th>操作</th>
|
||||
</if>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="statementShow">
|
||||
<foreach name="data" item="com">
|
||||
<tr>
|
||||
<td rowspan="{$com.statement_count}">{$key-0+1}</td>
|
||||
<td rowspan="{$com.statement_count}">{$com.company_name}</td>
|
||||
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['time']}</td>
|
||||
<td>{$com['statement_info'][0]['game_name']}</td>
|
||||
<td><span class="pay_amount">{$com['statement_info'][0]['pay_amount']}</span></td>
|
||||
<td>
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]">
|
||||
<else/>
|
||||
0
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{$com['statement_info'][0]['ratio']|showNumPercent}
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['ratio']}" style="width: 25px;display: none">
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{$com['statement_info'][0]['increment_ratio']|showNumPercent}
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['increment_ratio']}" style="width: 25px;display: none">
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{$com['statement_info'][0]['fax_ratio']|showNumPercent}
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="fax_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="fax_ratio[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['fax_ratio']}" style="width: 25px;display: none">
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
<span class="sum_money_span">{$com['statement_info'][0]['d_statement_money']}</span>
|
||||
<input class="sum_money" name="sum_money[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['d_statement_money']}" style="width: 20px;display: none">
|
||||
<input class="st" name="st[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['st']}" style="width: 20px;display: none">
|
||||
</td>
|
||||
<!-- <td rowspan="{$com.statement_count}">{$com['fine']-0}</td>-->
|
||||
<!-- <td rowspan="{$com.statement_count}">{$com['reward']-0}</td>-->
|
||||
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['fine']-0}</td>
|
||||
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['reward']-0}</td>
|
||||
<td rowspan="{$com['statement_info'][0]['row']}">
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]">
|
||||
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold']|default=0}" style="width: 40px;display: none">
|
||||
<else/>
|
||||
0
|
||||
</if>
|
||||
</td>
|
||||
<td rowspan="{$com['statement_info'][0]['row']}">
|
||||
<span class="week_amount">{$com['statement_info'][0]['week_amount']}</span>
|
||||
</td>
|
||||
<td rowspan="{$com.statement_count}" class="statement_money">
|
||||
{$com['statement_money']}
|
||||
</td>
|
||||
<td rowspan="{$com.statement_count}">{$com.settlement_contact}</td>
|
||||
<!-- <td>{$com['statement_info'][0]['statement_begin_time']}-{$com['statement_info'][0]['statement_end_time']}</td>-->
|
||||
<!-- <td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['time']}</td>-->
|
||||
|
||||
<if condition="$com['is_payment'] eq 2">
|
||||
<td rowspan="{$com.statement_count}">{$com.company_info.payee_name}</td>
|
||||
<td rowspan="{$com.statement_count}"> {$com.company_info.bank_account}</td>
|
||||
<td rowspan="{$com.statement_count}">{$com.company_info.opening_bank}</td>
|
||||
</if>
|
||||
|
||||
<if condition="$com['is_payment'] eq 1">
|
||||
<td rowspan="{$com.statement_count}">{$com.company_info.ali_user}</td>
|
||||
<td rowspan="{$com.statement_count}">{$com.company_info.ali_account}</td>
|
||||
<td rowspan="{$com.statement_count}"></td>
|
||||
</if>
|
||||
<td rowspan="{$com.statement_count}"><if condition="$com['is_payment'] eq 1">是 <else /> 否 </if></td>
|
||||
<td rowspan="{$com.statement_count}"><if condition="$com['st'] eq 0">否 <else /> 是 </if></td>
|
||||
|
||||
<td rowspan="{$com.statement_count}"><textarea name="remark[{$com['id']}][{$com['st']}]">{$com.remark}</textarea></td>
|
||||
|
||||
<if condition="!$is_export">
|
||||
<td rowspan="{$com.statement_count}">
|
||||
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
|
||||
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
|
||||
</if>
|
||||
<if condition="($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
|
||||
<a data-id="{$com['id']}" data-st="{$com['st']}" class='butn split_RewardOrFail' style="cursor:pointer">奖惩分离</a>
|
||||
</if>
|
||||
</td>
|
||||
</if>
|
||||
</tr>
|
||||
|
||||
<foreach name="com.statement_info" item="it" key="k">
|
||||
<if condition="$k neq 0">
|
||||
<tr>
|
||||
<notempty name="it['time']">
|
||||
<td rowspan="{$it['row']}">{$it['time']}</td>
|
||||
</notempty>
|
||||
<td>{$it['game_name']}</td>
|
||||
<td><span class="pay_amount">{$it['pay_amount']}</span></td>
|
||||
<td>
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]">
|
||||
<else/>
|
||||
0
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{$it['ratio']|showNumPercent}
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['ratio']}" style="width: 25px;display: none">
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{$it['increment_ratio']|showNumPercent}
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['increment_ratio']}" style="width: 25px;display: none">
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{$it['fax_ratio']|showNumPercent}
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="fax_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="fax_ratio[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['fax_ratio']}" style="width: 25px;display: none">
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
<span class="sum_money_span">{$it['d_statement_money']}</span>
|
||||
<input class="sum_money" name="sum_money[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['d_statement_money']}" style="width: 20px;display: none">
|
||||
<input class="st" name="st[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$com['st']}" style="width: 20px;display: none">
|
||||
</td>
|
||||
|
||||
<!-- <td>{$it['statement_begin_time']}-{$it['statement_end_time']}</td>-->
|
||||
<notempty name="it['time']">
|
||||
<td rowspan="{$it['row']}">{$it['fine']-0}</td>
|
||||
<td rowspan="{$it['row']}">{$it['reward']-0}</td>
|
||||
<td>
|
||||
<if condition="($com.is_reward_fine_split eq 0)">
|
||||
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]">
|
||||
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['withhold']|default=0}" style="width: 40px;display: none">
|
||||
<else/>
|
||||
0
|
||||
</if>
|
||||
</td>
|
||||
<td rowspan="{$it['row']}"><span class="week_amount">{$it['week_amount']}</span></td>
|
||||
</notempty>
|
||||
|
||||
</tr>
|
||||
</if>
|
||||
</foreach>
|
||||
</foreach>
|
||||
<tr>
|
||||
<td colspan=3 >合计:</td>
|
||||
<td></td>
|
||||
<td>{$count.platform_amount}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{$count.d_statement_money}</td>
|
||||
<td></td>
|
||||
<td>{$count.fine}</td>
|
||||
<td>{$count.reward}</td>
|
||||
<td></td>
|
||||
<td class="count_sum_money">{$count.statement_money}</td>
|
||||
<td class="count_sum_money">{$count.statement_money}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<if condition="!$is_export">
|
||||
<td></td>
|
||||
</if>
|
||||
</tr>
|
||||
<if condition="$is_export">
|
||||
<tr>
|
||||
<td ></td>
|
||||
<td>
|
||||
<if condition="$pool_data.verify_status eq -3 ">
|
||||
<div style="line-height: 2;color: red;">
|
||||
{$pool_data.firstverify}
|
||||
</div>
|
||||
<else />
|
||||
<div style="line-height: 2;">
|
||||
{$pool_data.firstverify}
|
||||
</div>
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
<if condition="$pool_data.verify_status eq -1 ">
|
||||
<div style="line-height: 2;color: red;">
|
||||
{$pool_data.verify}
|
||||
</div>
|
||||
<else />
|
||||
<div style="line-height: 2;">
|
||||
{$pool_data.verify}
|
||||
</div>
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
<if condition="$pool_data.verify_status eq -2 ">
|
||||
<div style="line-height: 2;color: red;">
|
||||
{$pool_data.payment}
|
||||
</div>
|
||||
<else />
|
||||
<div style="line-height: 2;">
|
||||
{$pool_data.payment}
|
||||
</div>
|
||||
</if>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</if>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="id" value="{$_GET['id']}">
|
||||
</form>
|
||||
<div class="form-item cf" style="float: right;margin-top: 30px;margin-right: 30px;">
|
||||
|
||||
<button class="submit_btn" id="submit" style="margin-left:210px;">
|
||||
保存
|
||||
</button>
|
||||
</div>
|
||||
<iframe id="rfFrame" name="rfFrame" src="about:blank" style="display:none;"></iframe>
|
||||
</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;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// })
|
||||
|
||||
var pool_ids = "{$_GET['id']}";
|
||||
$(".split_RewardOrFail").on("click",function() {
|
||||
|
||||
var id = $(this).data('id');
|
||||
var st = $(this).data('st');
|
||||
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{:U('splitRewardOrFailData')}",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: {id: id, st: st, pool_id: pool_ids},
|
||||
success: function (data) {
|
||||
if (data.status == 1) {
|
||||
layer.msg("<font style='color:white'>" + data.msg + "</font>");
|
||||
setTimeout(function () {
|
||||
window.location.reload();
|
||||
}, 1500);
|
||||
} else {
|
||||
layer.msg("<font style='color:white'>" + data.msg + "</font>");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(".no_statement").on("click",function(){
|
||||
|
||||
var id = $(this).data('id');
|
||||
saveForm(id);
|
||||
|
||||
});
|
||||
var return_data = "";
|
||||
|
||||
function saveForm(id) {
|
||||
var options = {
|
||||
url:"{:U('editCompanyStatementPoolPc')}", //同action
|
||||
type:'post',
|
||||
beforeSend:function(xhr){
|
||||
},
|
||||
success:function(data)
|
||||
{
|
||||
return_data = data;
|
||||
},
|
||||
|
||||
complete:function(data){
|
||||
if(return_data.status==1){
|
||||
|
||||
$.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;
|
||||
}
|
||||
}
|
||||
});
|
||||
return;
|
||||
}else{
|
||||
layer.msg("<font style='color:white'>" + 保存数据失败 + "</font>");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function(xhr,status,msg){
|
||||
//alert("状态码"+status+"; "+msg)
|
||||
layer.msg('玩命加载中..');
|
||||
|
||||
}
|
||||
};
|
||||
$("#form").ajaxSubmit(options);
|
||||
}
|
||||
|
||||
$("#submit").click(function(){
|
||||
var options = {
|
||||
url:"{:U('editCompanyStatementPoolPc')}", //同action
|
||||
type:'post',
|
||||
beforeSend:function(xhr){
|
||||
},
|
||||
success:function(data)
|
||||
{
|
||||
return_data = data;
|
||||
},
|
||||
|
||||
complete:function(data){
|
||||
|
||||
if(return_data.status==1){
|
||||
layer.msg("<font style='color:white'>" + return_data.info + "</font>");
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
},1500);
|
||||
}else{
|
||||
layer.msg("<font style='color:white'>" + return_data.info + "</font>");
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
error: function(xhr,status,msg){
|
||||
//alert("状态码"+status+"; "+msg)
|
||||
layer.msg('玩命加载中..');
|
||||
|
||||
}
|
||||
};
|
||||
$("#form").ajaxSubmit(options);
|
||||
});
|
||||
|
||||
$(".refund").on("blur",function () {
|
||||
caculate_sum_money(this);
|
||||
changeStatementAmount(this);
|
||||
changeSumAmount();
|
||||
});
|
||||
|
||||
$(".withhold").on("blur",function () {
|
||||
caculate_sum_money(this);
|
||||
changeStatementAmount(this);
|
||||
changeSumAmount();
|
||||
});
|
||||
|
||||
$(".ratio").on("blur",function () {
|
||||
caculate_sum_money(this);
|
||||
changeStatementAmount(this);
|
||||
changeSumAmount();
|
||||
});
|
||||
|
||||
$(".increment_ratio").on("blur",function () {
|
||||
caculate_sum_money(this);
|
||||
changeStatementAmount(this);
|
||||
changeSumAmount();
|
||||
});
|
||||
|
||||
var withdraw_type = "{$withdraw_type}";
|
||||
|
||||
// 分成结算金额重算
|
||||
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);
|
||||
} else if(parseFloat(refund) > parseFloat(pay_money)) {
|
||||
refund = pay_money;
|
||||
$(_this).parent().parent().find(".refund").val(refund);
|
||||
}
|
||||
|
||||
//退款
|
||||
var withhold = $(_this).parent().parent().find(".withhold").val();
|
||||
var oldwithhold = $(_this).parent().parent().find(".oldwithhold").val();
|
||||
// console.log(withhold-oldwithhold);
|
||||
if (!withhold ) {
|
||||
withhold = 0;
|
||||
$(_this).parent().parent().find(".withhold").val(withhold);
|
||||
}
|
||||
|
||||
if (!oldwithhold ) {
|
||||
oldwithhold = 0;
|
||||
$(_this).parent().parent().find(".oldwithhold").val(oldwithhold);
|
||||
}
|
||||
// else if(parseFloat(withhold) > parseFloat(pay_money)) {
|
||||
// withhold = pay_money;
|
||||
// $(_this).parent().parent().find(".withhold").val(withhold);
|
||||
// }
|
||||
|
||||
//补点
|
||||
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);
|
||||
}
|
||||
|
||||
var week_amount_find = $(_this).parent().parent();
|
||||
var old_amount = week_amount_find.find(".sum_money_span").text();
|
||||
|
||||
//扣款
|
||||
pay_money = parseFloat(pay_money) - parseFloat(refund);
|
||||
// var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100));
|
||||
if (withdraw_type == 3) {
|
||||
var value = parseFloat(pay_money)*(parseFloat(increment_ratio)/100);
|
||||
} else {
|
||||
var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100));
|
||||
}
|
||||
|
||||
// var value = parseFloat(pay_money);
|
||||
// console.log(value);
|
||||
|
||||
$(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2));
|
||||
$(_this).parent().parent().find(".sum_money").val(value.toFixed(2));
|
||||
|
||||
var this_amount = week_amount_find.find(".sum_money_span").text();
|
||||
|
||||
var week_amount = 0;
|
||||
var i = 0;
|
||||
for (;;) {
|
||||
week_amount = week_amount_find.find(".week_amount").text();
|
||||
i++;
|
||||
// console.log(week_amount);
|
||||
if (week_amount) {
|
||||
break;
|
||||
} else {
|
||||
week_amount_find = week_amount_find.prev();
|
||||
}
|
||||
// if (i>10) {
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
// console.log(old_amount);
|
||||
// console.log(this_amount);
|
||||
// console.log(week_amount);
|
||||
|
||||
var D_value = parseFloat(old_amount) - parseFloat(this_amount) + parseFloat(withhold-oldwithhold);
|
||||
// console.log(D_value);
|
||||
week_amount_find.find(".week_amount").text((parseFloat(week_amount) - D_value).toFixed(2));
|
||||
|
||||
$(_this).parent().parent().find(".oldwithhold").val(withhold)
|
||||
|
||||
}
|
||||
//结算金额重算
|
||||
function changeStatementAmount(_this) {
|
||||
|
||||
var _parent = $(_this).parent().parent();
|
||||
|
||||
var statement_amount = '';
|
||||
|
||||
var num = 0;
|
||||
for (;;) {
|
||||
statement_amount = _parent.find(".statement_money").text();
|
||||
if (!statement_amount ) {
|
||||
_parent = _parent.prev();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
// if (num>10) {
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
var row = _parent.find(".statement_money").attr("rowspan");
|
||||
var get_item = _parent;
|
||||
var sum_amount = 0;
|
||||
|
||||
for (var i =0;i<parseInt(row);i++) {
|
||||
|
||||
var amount = get_item.find(".week_amount").text();
|
||||
|
||||
if (amount) {
|
||||
sum_amount = parseFloat(sum_amount) + parseFloat(amount);
|
||||
get_item = get_item.next();
|
||||
} else {
|
||||
get_item = get_item.next();
|
||||
}
|
||||
|
||||
}
|
||||
// console.log(sum_amount);
|
||||
_parent.find(".statement_money").text(sum_amount.toFixed(2));
|
||||
|
||||
}
|
||||
//结算金额合计重算
|
||||
function changeSumAmount() {
|
||||
|
||||
var sum_amount = 0;
|
||||
var st = 0;
|
||||
|
||||
$("#statementShow").find(".statement_money").each(function (key,val) {
|
||||
st = $(val).data('st')
|
||||
|
||||
sum_amount = parseFloat(sum_amount) + parseFloat($(val).text());
|
||||
|
||||
});
|
||||
|
||||
$(".count_sum_money").text(sum_amount.toFixed(2));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,302 @@
|
||||
<extend name="Public/base"/>
|
||||
<block name="css">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="__CSS__/promote.css" type="text/css"/>
|
||||
<script src="__STATIC__/laydate/laydate.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
|
||||
<style>
|
||||
.select2-container--open {
|
||||
z-index: 1001;
|
||||
}
|
||||
.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;}
|
||||
.textarea-style {
|
||||
width: 200px;
|
||||
height: 80px;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
.mustmark {
|
||||
color: #FF0000;
|
||||
font-style: normal;
|
||||
margin: 0 3px;
|
||||
}
|
||||
.clearfix:after {
|
||||
content: "\20";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
.clearfix {
|
||||
*zoom: 1;
|
||||
}
|
||||
.butnbox {
|
||||
padding: 10px 0 10px;
|
||||
}
|
||||
.butnbox .butnlist .butn {
|
||||
display: inline-block;
|
||||
width: 120px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
background: #3C95C8;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.data_list table td .status-0 {
|
||||
color: #e6a23c;
|
||||
}
|
||||
.data_list table td .status-1 {
|
||||
color: #67c23a;
|
||||
}
|
||||
.data_list table td .status-2 {
|
||||
color: #f56c6c;
|
||||
}
|
||||
</style>
|
||||
</block>
|
||||
<block name="body">
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/jquery.form.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
|
||||
|
||||
<script src="__STATIC__/md5.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.js"></script>
|
||||
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js"></script>
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">测试资源申请统计</h3>
|
||||
</div>
|
||||
<div class="cf top_nav_list" style="height: 38px;">
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch cf search_list">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
<div class="input-list input-list-promote search_label_rehab">
|
||||
<select id="game_id" name="game_id" class="select_gallery" style="width:120px;">
|
||||
<option value="0">请选游戏</option>
|
||||
<?php foreach($games as $game):?>
|
||||
<option game-id="<?=$game['id']?>" value="<?=$game['id']?>"><?=$game['game_name']?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-promote search_label_rehab">
|
||||
<select id="server_id" name="server_id" class="select_gallery" style="width:120px;">
|
||||
<option value="">请选择区服</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" name="account" placeholder="测试账号" class="" value="" style="width: 150px">
|
||||
</div>
|
||||
<div class="input-list input-list-promote search_label_rehab">
|
||||
<input type="text" readonly name="create_time_start" class="time-select" value="{:I('create_time_start')}"
|
||||
placeholder="申请开始时间"/>
|
||||
-
|
||||
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
||||
<input type="text" readonly name="create_time_end" class="time-select" value="{:I('create_time_end')}"
|
||||
placeholder="申请结束时间"/>
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-list">
|
||||
<input style="width: 200px;" type="text" name="apply_name" class="search-input" value="{:I('apply_name')}" placeholder="请输入申请人">
|
||||
</div>
|
||||
|
||||
<div class="input-list">
|
||||
<input style="width: 200px;" type="text" name="role_name" class="search-input" value="{:I('role_name')}" placeholder="请输入角色名称">
|
||||
</div>
|
||||
|
||||
<div class="input-list input-list-promote search_label_rehab">
|
||||
<input type="text" name="apply_amount_start" value="{:I('apply_amount_start')}"
|
||||
placeholder="请输入申请金额"/>
|
||||
-
|
||||
<div class="input-append date" style="display:inline-block">
|
||||
<input type="text" name="apply_amount_end" value="{:I('apply_amount_end')}"
|
||||
placeholder="请输入申请金额"/>
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search" url="{:U('TestingResource/dailyCount')}">搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="butnbox"></div>
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="125px">申请日期</th>
|
||||
<th>角色名称</th>
|
||||
<th>游戏名称</th>
|
||||
<th>区服名称</th>
|
||||
<th>测试账号</th>
|
||||
<th>申请人</th>
|
||||
<th>所属推广员</th>
|
||||
<th>总申请金额</th>
|
||||
<th>实发金额</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<empty name ="records">
|
||||
<td colspan="99" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
<else />
|
||||
<volist name="records" id="record" mod="2">
|
||||
<tr data-id="{$record.id}" class="<eq name='mod' value='1'>odd</eq>">
|
||||
<td style="word-wrap:break-word;">{$record.create_day_time}</td>
|
||||
<td>{$record.role_name}</td>
|
||||
<td>{$record.game_name}</td>
|
||||
<td>{$record.server_name}</td>
|
||||
<td>{$record.user_account}</td>
|
||||
<td>{$record.apply_username}</td>
|
||||
<td>{$record.promote_account}</td>
|
||||
<td>{$record.apply_amount}</td>
|
||||
<td>{$record.provide_amount}</td>
|
||||
<td>
|
||||
<a href="{$record.jump_url}">查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</volist>
|
||||
</empty>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
|
||||
<!-- <a class="sch-btn export-btn"
|
||||
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a> -->
|
||||
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
<div id="add-box" class="layer-box" style="display: none;">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label>用户账号</label>
|
||||
<div class="form-item" style="width:200px">
|
||||
<select name="base_game_id" class="select_gallery" style="width:220px;">
|
||||
<option value="0">游戏名称</option>
|
||||
<?php foreach($baseGames as $baseGame):?>
|
||||
<option value="<?=$baseGame['id']?>"><?=$baseGame['name']?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>初始额度</label>
|
||||
<div class="form-item" style="width:200px">
|
||||
<input type="text" class="form-input" name="base_quota" style="width:200px" value="" placeholder="请输入初始额度">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>奖金池比例</label>
|
||||
<div class="form-item" style="width:200px">
|
||||
<input type="text" class="form-input" name="rate" style="width:155px" value="" placeholder="请输入奖金池比例"> %
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label></label>
|
||||
<a id="add-submit" href="javascript:;" class="add-submit btn">确定</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
|
||||
<script src="__STATIC__/jquery.cookie.js" charset="utf-8"></script>
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
$(".select_gallery").select2();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav("{:U('TestingResource/dailyCount')}");
|
||||
$(function(){
|
||||
$('.time-select').each(function(){
|
||||
laydate.render({
|
||||
elem: this,
|
||||
type: 'date'
|
||||
});
|
||||
});
|
||||
//搜索功能
|
||||
$("#search").click(function(){
|
||||
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.jssearch').find('input').serialize();
|
||||
query += "&"+$('.jssearch').find('select').serialize();
|
||||
//query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
||||
query = query.replace(/^&/g,'');
|
||||
if( url.indexOf('?')>0 ){
|
||||
url += '&' + query;
|
||||
}else{
|
||||
url += '?' + query;
|
||||
}
|
||||
window.location.href = url;
|
||||
});
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
|
||||
var game_server = "{:I('server_id')}";
|
||||
$("#game_id").change(function () {
|
||||
var game_id = $("#game_id option:selected").attr('game-id');
|
||||
var str = "<option value=''>请选择区服</option>";
|
||||
if(game_id){
|
||||
$.ajax({
|
||||
url: "{:U('Ajax/getServer')}",
|
||||
type: "post",
|
||||
data: { game_id: $("#game_id option:selected").attr('game-id') },
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
for (var i in data){
|
||||
str += "<option value='"+data[i].id+"' "+(game_server && data[i].id == game_server?'selected':'')+">"+data[i].server_name+"</option>"
|
||||
}
|
||||
$("#server_id").empty();
|
||||
$("#server_id").append(str);
|
||||
$("#server_id").select2();
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$("#server_id").empty();
|
||||
$("#server_id").append(str);
|
||||
$("#server_id").select2();
|
||||
}
|
||||
})
|
||||
$("#game_id").change();
|
||||
});
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
namespace Base\Factory;
|
||||
|
||||
use Base\Factory\LeavePercentageFactory;
|
||||
|
||||
class BaseFactory {
|
||||
|
||||
private static $instance ;
|
||||
private $suffix = "Factory";
|
||||
|
||||
public $classes = [
|
||||
'LeavePercentageFactory' => LeavePercentageFactory::class,
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
//获取实例化接口
|
||||
static function getInstance() {
|
||||
|
||||
if (!(self::$instance instanceof self)) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
|
||||
}
|
||||
//工厂类返回实例化类
|
||||
public function factoryClass($name = '') {
|
||||
|
||||
if (!$name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$className = "{$name}{$this->suffix}";
|
||||
|
||||
if ($this->classes[$className]) {
|
||||
return (new $this->classes[$className]);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue