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.
550 lines
23 KiB
HTML
550 lines
23 KiB
HTML
<extend name="Public/base"/>
|
|
|
|
<block name="body">
|
|
|
|
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
|
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
|
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
|
<style>
|
|
.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;}
|
|
.data_list table td{
|
|
text-indent:0;
|
|
}
|
|
.data_game_list table td{
|
|
line-height:1;
|
|
padding: 3px;
|
|
}
|
|
</style>
|
|
|
|
<style>
|
|
#form .txt_area.download_url {width:400px;}
|
|
.tabcon1711 .table_radio2 .table_btn {width:215px;}
|
|
.bnt_add,.bnt_remove,.bnt_save{
|
|
height: 30px;
|
|
width: 20px;
|
|
font-size: 20px;
|
|
line-height: 10px;
|
|
color: #3399ff;
|
|
background: none;
|
|
border: none;
|
|
margin-left: 20px;
|
|
cursor: pointer;
|
|
}
|
|
.bnt_remove{
|
|
color: #F70909;
|
|
}
|
|
.bnt_save{
|
|
color: #4DB361;
|
|
}
|
|
</style>
|
|
<style>
|
|
.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;}
|
|
</style>
|
|
|
|
<div class="cf main-place top_nav_list navtab_list">
|
|
<h3 class="page_title">{$meta_title}</h3>
|
|
<p class="description_text">说明:该功能是用于录入工会所属的推广公司名称</p>
|
|
</div>
|
|
<div class="jssearch search_list fl cf">
|
|
|
|
<div class="cf top_nav_list">
|
|
<!-- 高级搜索 -->
|
|
<div class="cf top_nav_list">
|
|
|
|
<!-- 高级搜索 -->
|
|
<div class="jssearch fl cf search_list">
|
|
<div class="input-list input-list-game search_label_rehab">
|
|
<select id="settlement_type" name="settlement_type" class="select_gallery" <?php echo $generate ? 'disabled="disabled"' : ""?></select>>
|
|
<option value="">请选择结算单类型</option>
|
|
<option value="1" <?php echo $settlement_type === 1 ? "selected" : ''?>>上游-汇总结算单</option>
|
|
<option value="2" <?php echo $settlement_type === 2 ? "selected" : ''?>>下游-内团汇总结算单</option>
|
|
<option value="3" <?php echo $settlement_type === 3 ? "selected" : ''?>>下游-外团汇总结算单</option>
|
|
<option value="4" <?php echo $settlement_type === 4 ? "selected" : ''?>>下游-个人汇总结算单</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="input-list input-list-game search_label_rehab">
|
|
<select id="settlement_time_type" name="settlement_time_type" class="select_gallery" <?php echo $generate ? 'disabled="disabled"' : ""?>>
|
|
<option value="">结算方式</option>
|
|
<option value="1" <?php $settlement_time_type === 1 ? "selected" : ''?>>周结</option>
|
|
<option value="2" <?php $settlement_time_type == 2 ? "selected" : ''?>>月结</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="input-list" id="pay_time">
|
|
<input type="text" class="txt range-date" id="time" name="settlement_time" placeholder="结算时间" value="{$settlement_time}" <?php echo $generate ? 'disabled="disabled"' : ""?> style="width: 180px;" readonly="readonly">
|
|
</div>
|
|
|
|
<?php if (!$generate) :?>
|
|
<div class="input-list">
|
|
<a class="sch-btn" href="javascript:;" id="search" url="/admin.php?s=/settlement/generateSettlementSheet">生成</a>
|
|
</div>
|
|
<?php endif;?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if ($msg):?>
|
|
{$msg}
|
|
<?php elseif ($settlement_type == 1):?>
|
|
<span style="color: red;">上游-汇总结算单</span>
|
|
<div class="data_list data_game_list">
|
|
<div class="">
|
|
<table border="1">
|
|
<!-- 表头 -->
|
|
<thead>
|
|
<tr>
|
|
<th style="width:10%;min-width:150px;">平台</th>
|
|
<th>时间</th>
|
|
<th>游戏名称</th>
|
|
<th>平台流水</th>
|
|
<th>分成比例</th>
|
|
<th>我方比例</th>
|
|
<th>渠道费率</th>
|
|
<th>税费费率</th>
|
|
<th>合作方结算分成</th>
|
|
<th>违规罚款</th>
|
|
<th>奖励</th>
|
|
<th style="width:20%;min-width:150px;">备注</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<!-- 列表 -->
|
|
<tbody>
|
|
<empty name ="listData">
|
|
<td colspan="99" class="text-center">aOh! 暂时还没有可结算内容!</td>
|
|
<else />
|
|
<?php foreach ($listData as $index => $item): ?>
|
|
<?php foreach ($item['channels'] as $k => $channel): ?>
|
|
<?php if ($k == 0) :?>
|
|
<tr>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item.company_name}</td>
|
|
<td>123</td>
|
|
<td>{$channel['relation_game_name']}</td>
|
|
<td>{$channel['amount']}</td>
|
|
<td>{$channel['game_ratio']}%</td>
|
|
<td>{$channel['self_game_ratio']}%</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['channel_rate']*100}%</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['invoice_rate']*100}%</td>
|
|
<td>{$channel['parter_settlement']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['fine']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['bonuses']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}"><textarea class="remark-txt" style="height: 100%;width: 100%;" oninput="updateDataRemark({$index}, this)"></textarea></td>
|
|
</tr>
|
|
<?php else :?>
|
|
<tr>
|
|
<td>123</td>
|
|
<td>{$channel['relation_game_name']}</td>
|
|
<td>{$channel['amount']}</td>
|
|
<td>{$channel['game_ratio']}%</td>
|
|
<td>{$channel['self_game_ratio']}%</td>
|
|
<td>{$channel['parter_settlement']}</td>
|
|
</tr>
|
|
<?php endif;?>
|
|
<?php endforeach;?>
|
|
<?php endforeach;?>
|
|
</empty>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php elseif (in_array($settlement_type, [2, 3])):?>
|
|
<!-- 下游-内团/外团汇总结算单 -->
|
|
<span style="color: red;">下游-<?php echo $settlement_type == 2 ? "内团" : "外团"?>汇总结算单</span>
|
|
<div class="data_list data_game_list">
|
|
<div class="">
|
|
<table border="1">
|
|
<!-- 表头 -->
|
|
<thead>
|
|
<tr>
|
|
<th>排序</th>
|
|
<th style="width:10%;">平台</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 style="width:20%;min-width:150px;">备注</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<!-- 列表 -->
|
|
<tbody>
|
|
<empty name ="listData">
|
|
<td colspan="99" class="text-center">aOh! 暂时还没有可结算内容!</td>
|
|
<else />
|
|
<?php foreach ($listData as $index => $item): ?>
|
|
<?php foreach ($item['channels'] as $k => $channel): ?>
|
|
<?php if ($k == 0) :?>
|
|
<tr>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$index+1}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item.company_name}</td>
|
|
<td>{$channel['account']}</td>
|
|
<td>{$channel['relation_game_name']}</td>
|
|
<td>{$channel['amount']}</td>
|
|
<td>{$channel['game_ratio']}%</td>
|
|
<td>{$channel['game_ratio_max']}%</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['fax_ratio']*100}%</td>
|
|
<td>{$channel['price']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['fine']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['bonuses']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['total_amount']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['settlement_contact']}</td>
|
|
<td>时间</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">备注</td>
|
|
</tr>
|
|
<?php else :?>
|
|
<tr>
|
|
<td>{$channel['account']}</td>
|
|
<td>{$channel['relation_game_name']}</td>
|
|
<td>{$channel['amount']}</td>
|
|
<td>{$channel['game_ratio']}%</td>
|
|
<td>{$channel['game_ratio_max']}%</td>
|
|
<td>{$channel['price']}</td>
|
|
<td>时间</td>
|
|
</tr>
|
|
<?php endif;?>
|
|
<?php endforeach;?>
|
|
<?php endforeach;?>
|
|
</empty>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php elseif ($settlement_type == 4):?>
|
|
<span style="color: red;">下游-个人汇总结算单</span>
|
|
<div class="data_list data_game_list">
|
|
<div class="">
|
|
<table border="1">
|
|
<!-- 表头 -->
|
|
<thead>
|
|
<tr>
|
|
<th>排序</th>
|
|
<th style="width:10%;min-width:150px;">公司名称</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>
|
|
</tr>
|
|
</thead>
|
|
|
|
<!-- 列表 -->
|
|
<tbody>
|
|
<empty name ="listData">
|
|
<td colspan="99" class="text-center">aOh! 暂时还没有可结算内容!</td>
|
|
<else />
|
|
<?php foreach ($listData as $index => $item): ?>
|
|
<?php foreach ($item['channels'] as $k => $channel): ?>
|
|
<?php if ($k == 0) :?>
|
|
<tr>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$index+1}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item.company_name}</td>
|
|
<td>{$channel['account']}</td>
|
|
<td>{$channel['admin_name']}</td>
|
|
<td>{$channel['company_relation_name']}</td>
|
|
<td>{$channel['type_name']}</td>
|
|
<td>{$channel['relation_game_name']}</td>
|
|
<td >结算时间</td>
|
|
<td>{$channel['amount']}</td>
|
|
<td>{$channel['game_ratio']}%</td>
|
|
<td>{$channel['game_ratio_max']}%</td>
|
|
<td>{$channel['price']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['bonuses']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['fine']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['total_amount']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['settlement_contact']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['bank_card']}</td>
|
|
<td rowspan="{:sizeof($item['channels'])}">{$item['bank_address']}</td>
|
|
</tr>
|
|
<?php else :?>
|
|
<tr>
|
|
<td>{$channel['account']}</td>
|
|
<td>{$channel['admin_name']}</td>
|
|
<td>{$channel['company_relation_name']}</td>
|
|
<td>{$channel['type_name']}</td>
|
|
<td>{$channel['relation_game_name']}</td>
|
|
<td >结算时间</td>
|
|
<td>{$channel['amount']}</td>
|
|
<td>{$channel['game_ratio']}%</td>
|
|
<td>{$channel['game_ratio_max']}%</td>
|
|
<td>{$channel['price']}</td>
|
|
</tr>
|
|
<?php endif;?>
|
|
<?php endforeach;?>
|
|
<?php endforeach;?>
|
|
</empty>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php endif;?>
|
|
<br>
|
|
<?php if ($generate):?>
|
|
<span>请选择审核人:</span>
|
|
<div>
|
|
<span class="audit_user">
|
|
<select class="first_audit">
|
|
<?php foreach ($admin_users as $admin):?>
|
|
<option value="{$admin['uid']}" >{$admin['nickname']}</option>
|
|
<?php endforeach;?>
|
|
</select>
|
|
<button type="button" class="bnt_save">→</button>
|
|
</span>
|
|
<button type="button" class="bnt_add">✚</button>
|
|
<button type="button" class="bnt_remove">✖</button>
|
|
</div>
|
|
<div>
|
|
<button class="submit_btn" id="submit" type="submit" target-form="form-horizontal">
|
|
确认保存
|
|
</button>
|
|
<button class="submit_btn" onclick="javascript:history.back(-1)">
|
|
返回
|
|
</button>
|
|
</div>
|
|
<?php endif;?>
|
|
|
|
</block>
|
|
|
|
<block name="script">
|
|
<script src="__STATIC__/layer/layer.js"></script>
|
|
<script src="__STATIC__/layer/extend/layer.ext.js"></script>
|
|
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
|
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
|
|
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
|
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
|
|
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
|
|
<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>
|
|
<link rel="stylesheet" href="__STATIC__/flatpickr/flatpickr.min.css">
|
|
<script src="__STATIC__/flatpickr/flatpickr.min.js"></script>
|
|
<script src="__STATIC__/flatpickr/l10n/zh.js"></script>
|
|
<style>
|
|
.layui-layer-demo .layui-layer-title {background:#F0F5F7;font-weight:bold;}
|
|
.layui-layer-demo .layui-layer-content {}
|
|
.layui-layer-demo .layui-layer-content table{width:100%;border:0;border-spacing:0;padding:0;}
|
|
.layui-layer-demo .layui-layer-content td {height:42px;padding-left:20px;}
|
|
.layui-layer-demo .layui-layer-content tr:hover {background:#F0F5F7;}
|
|
.layui-layer-demo .layui-layer-content tr~tr {border-top:1px solid #ccc;}
|
|
.layui-layer-demo .layui-layer-content td~td {border-left:1px solid #ccc;}
|
|
.layui-layer-demo .layui-layer-content tr:last-child td {}
|
|
</style>
|
|
|
|
<script>
|
|
<volist name=":I('get.')" id="vo">
|
|
Think.setValue('{$key}',"{$vo}");
|
|
</volist>
|
|
$(".select_gallery").select2();
|
|
</script>
|
|
<script type="text/javascript">
|
|
//导航高亮
|
|
highlight_subnav("{:U('lists')}");
|
|
var data = {:json_encode($listData)};
|
|
$(function(){
|
|
//搜索功能
|
|
$("#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;
|
|
});
|
|
|
|
// 提交
|
|
$('#submit').on('click', function(){
|
|
var first_audit_arr = [];
|
|
var first_audits = $('.first_audit');
|
|
if (first_audits.size() <= 0) {
|
|
layer.msg("请选择至少一名一级审核人")
|
|
return false;
|
|
} else {
|
|
$.each(first_audits, function(index, item){
|
|
first_audit_arr.push($(item).val());
|
|
});
|
|
}
|
|
$.ajax({
|
|
url:"{:U('settlement/generateSettlementSheet')}",
|
|
method:'POST',
|
|
dataType:'JSON',
|
|
data:{
|
|
settlement_sheet:data,
|
|
audit_users:first_audit_arr,
|
|
settlement_type : $('#settlement_type').val(),
|
|
settlement_time_type : $('#settlement_time_type').val(),
|
|
settlement_time : $('#time').val()
|
|
},
|
|
success:function(response){
|
|
layer.msg(response.info);
|
|
if (response.status != 0) {
|
|
window.location.href = "{:U('settlement/sheetList')}";
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
$(".bnt_add").bind("click",function(){
|
|
console.log(1)
|
|
var a = $(this).parent('div').children('.audit_user:last').clone();
|
|
//$(".user-account:last").after(a);
|
|
$(this).before(a);
|
|
});
|
|
|
|
$(document).on('click', '.bnt_remove', function(){
|
|
if ($(this).parent('div').find('.audit_user').size() == 1) {
|
|
return false;
|
|
}
|
|
$(this).parent('div').find('.audit_user:last').remove();
|
|
});
|
|
|
|
function setTimeByWeek() {
|
|
var defaultDate = $('#time').val()
|
|
defaultDate = defaultDate == '' ? [] : defaultDate.split(' 至 ')
|
|
$('#time').flatpickr({
|
|
mode: 'range',
|
|
locale: 'zh',
|
|
dateFormat: "Y-m-d",
|
|
defaultDate: defaultDate,
|
|
onChange: function (selectedDates, dateStr, instance) {
|
|
if (dateStr.indexOf('至') === -1) {
|
|
var thisDate = new Date(Date.parse(dateStr));
|
|
if (thisDate.getDay() !== 1) {
|
|
layer.msg('请选择周一到周日');
|
|
return false;
|
|
}
|
|
} else {
|
|
var thisDate = dateStr.split(' 至 ');
|
|
var startDate = new Date(Date.parse(thisDate[0]));
|
|
if (startDate.getDay() !== 1 || Date.parse(thisDate[1]) / 1000 - Date.parse(thisDate[0]) / 1000 !== 518400) {
|
|
layer.msg('请选择周一到周日');
|
|
$('#time').val('');
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function setTimeByMonth() {
|
|
$('#time').datetimepicker({
|
|
format: 'yyyy-mm',
|
|
language: "zh-CN",
|
|
autoclose: true,
|
|
scrollMonth: false,
|
|
scrollTime: false,
|
|
scrollInput: false,
|
|
startView: 'year',
|
|
minView:'year',
|
|
maxView:'year',
|
|
});
|
|
}
|
|
|
|
function resetTime() {
|
|
$('#time').remove();
|
|
var html = '<input type="text" class="txt range-date" id="time" name="settlement_time" placeholder="结算时间" value="" style="width: 180px;" readonly="readonly">';
|
|
$('#pay_time').html(html);
|
|
}
|
|
|
|
switch (parseInt("{:(I('settlement_time_type', 0))}")) {
|
|
case 1:
|
|
setTimeByWeek();
|
|
break;
|
|
case 2:
|
|
setTimeByMonth();
|
|
break;
|
|
}
|
|
|
|
$('#settlement_time_type').change(function () {
|
|
var settlementType = parseInt($(this).val());
|
|
switch (settlementType) {
|
|
case 1:
|
|
resetTime();
|
|
setTimeByWeek();
|
|
break;
|
|
case 2:
|
|
case 3:
|
|
resetTime();
|
|
setTimeByMonth();
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
});
|
|
|
|
//回车自动提交
|
|
$('.jssearch').find('input').keyup(function(event){
|
|
if(event.keyCode===13){
|
|
$("#search").click();
|
|
}
|
|
});
|
|
});
|
|
function updateDataRemark(index, obj)
|
|
{
|
|
data[index].remark = $(obj).val();
|
|
}
|
|
</script>
|
|
</block>
|