|
|
<extend name="Public/base"/>
|
|
|
<block name="css">
|
|
|
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
|
|
<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>
|
|
|
|
|
|
</block>
|
|
|
|
|
|
<block name="body">
|
|
|
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
|
|
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
|
|
|
|
|
|
|
|
<div class="cf main-place top_nav_list navtab_list">
|
|
|
<ul class="tabnav1711 fr jstabnav">
|
|
|
<li class="<eq name='group' value='1'>current</eq>"><a href="{:U('settlement')}">推广结算</a></li>
|
|
|
<li class="<eq name='group' value='2'>current</eq>" ><a href="{:U('settlement?group=2')}">结算记录</a></li>
|
|
|
</ul>
|
|
|
|
|
|
<h3 class="page_title">推广结算</h3>
|
|
|
|
|
|
<if condition="$group eq 1">
|
|
|
<p class="description_text">说明:此功能是针对推广员下面的用户注册充值进行结算,充值数据是指消费到游戏的所有订单记录</p>
|
|
|
<else/>
|
|
|
<p class="description_text">说明:此功能是查看所有的推广员结算记录</p>
|
|
|
</if>
|
|
|
</div>
|
|
|
<div class="cf top_nav_list">
|
|
|
<if condition="I('group',1) eq 1">
|
|
|
<div class="infomation information1711">
|
|
|
<div>
|
|
|
<span>参与结算设置:</span>
|
|
|
<label>
|
|
|
<input type="radio" class="inp_radio" value="0" name="bind_coin" <if condition="I('bind_coin',0) eq 0">checked="checked"</if>> 排除绑币
|
|
|
</label>
|
|
|
|
|
|
<label>
|
|
|
<input type="radio" class="inp_radio" value="1" name="bind_coin" <if condition="I('bind_coin',0) eq 1">checked="checked"</if>> 包含绑币
|
|
|
</label>
|
|
|
</div>
|
|
|
<div style="line-height: 30px;">
|
|
|
<p>注意①:推广结算只结算消费到游戏的所有订单记录。(系统默认全部排除绑币,可视情况自行勾选)</p>
|
|
|
<p>注意②:包含绑币勾选请慎重,由于玩家账户部分绑币的来源属于后台发放或者会长代充等,涉及到成本盈亏,是否参与推广员结算请考虑清楚!</p>
|
|
|
<p>注意③:推广结算时间请按规律时间统一结算,否则时间不统一容易导致个别游戏在统一时间内无法结算。(结算时间只可选到前一天)</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</if>
|
|
|
<!-- 高级搜索 -->
|
|
|
<if condition="I('group') eq 1 or $group eq 1">
|
|
|
<empty name="model.extend">
|
|
|
<div class="fl button_list">
|
|
|
<div class="tools">
|
|
|
<a class=" ajax-post " target-form="ids" url="{:U('generatesettlementAll?model='.$model['id'],array('ids'=>$data['id'],'bind_coin'=>I('bind_coin',0),'game_name'=>I('game_name'),'promote_account'=>I('promote_account'),'timestart'=>I('timestart'),'timeend'=>I('timeend'),'cooperation'=>I('cooperation'),'bill_number'=>I('bill_number')))}"><span class="button_icon button_icon14"></span>批量结算</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</empty>
|
|
|
</if>
|
|
|
<div class="jssearch fl cf search_list">
|
|
|
<div class="input-list search-title-box">
|
|
|
<label>搜索:</label>
|
|
|
</div>
|
|
|
<div class="input-list">
|
|
|
<input type="text" id="time-start" name="timestart" autocomplete="off" class="" <if condition="$Think.get.timestart eq '' and $Think.get.group neq 2">value="{:get_lastweek_name(7)}" <else/> value="{:I('timestart')}" </if>placeholder="结算周期起始时间" />
|
|
|
-
|
|
|
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
|
|
<input type="text" id="time-end" name="timeend" autocomplete="off" class="" <if condition="$Think.get.timeend eq '' and $Think.get.group neq 2">value="{:get_lastweek_name(1)}" <else/> value="{:I('timeend')}" </if> placeholder="结算周期结束时间" />
|
|
|
<span class="add-on"><i class="icon-th"></i></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="input-list input-list-promote search_label_rehab">
|
|
|
<select id="promote_id" name="promote_id" class="select_gallery" style="width:120px;">
|
|
|
<option value="">推广员账号</option>
|
|
|
<volist name=":get_all_toppromote()" id="vo">
|
|
|
<option promote-id="{$vo.id}" value="{$vo.account}">{$vo.account}</option>
|
|
|
</volist>
|
|
|
<input type="hidden" id="promote_account" name="promote_account" value="{:I('promote_account')}"></input>
|
|
|
</select>
|
|
|
</div>
|
|
|
|
|
|
<input type="hidden" name="" value="" class="sortBy">
|
|
|
<if condition="I('group') eq 1 or $group eq 1">
|
|
|
<div class="input-list">
|
|
|
<a class="sch-btn" href="javascript:;" id="searchlayer" url="{:U('Query/settlement?group=1','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
|
|
|
</div>
|
|
|
</if>
|
|
|
<if condition="I('group') eq 2 or $group eq 2">
|
|
|
<div class="input-list">
|
|
|
<input type="text" id="stime-start" name="stimestart" class="" value="{:I('stimestart')}" placeholder="结算开始时间" />
|
|
|
-
|
|
|
<div class="input-append date" id="sdatetimepicker" style="display:inline-block">
|
|
|
<input type="text" id="stime-end" name="stimeend" class="" value="{:I('stimeend')}" placeholder="结算结束时间" />
|
|
|
<span class="add-on"><i class="icon-th"></i></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<input type="hidden" name="" value="" class="sortBy">
|
|
|
<div class="input-list">
|
|
|
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Query/settlement?group=2','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
|
|
|
</div>
|
|
|
</if>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 数据列表 -->
|
|
|
<div class="data_list">
|
|
|
<div class="">
|
|
|
<if condition="$group eq 1">
|
|
|
<table>
|
|
|
<!-- 表头 -->
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>
|
|
|
<input class="check-all" type="checkbox">
|
|
|
</th>
|
|
|
<th >结算周期</th>
|
|
|
<th >推广员账号</th>
|
|
|
<th >游戏名称</th>
|
|
|
<th ><a class="paixu" data-order='spay_amount'>总充值</a></th>
|
|
|
|
|
|
<th ><a class="paixu" data-order='unum'>总注册</a></th>
|
|
|
<th >结算模式</th>
|
|
|
<th >分成比例</th>
|
|
|
<th >注册单价</th>
|
|
|
<th >结算金额</th>
|
|
|
<th >状态</th>
|
|
|
<!-- <th >操作</th> -->
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<!-- 列表 -->
|
|
|
<tbody>
|
|
|
<style>
|
|
|
.data-table thead th, .data-table tbody td{text-align:center}
|
|
|
.data-table tbody td{border-right:1px solid #DDDDDD;}
|
|
|
.d_list .drop-down ul {z-index:999;}
|
|
|
</style>
|
|
|
<empty name ="list_data">
|
|
|
<td colspan="12" class="text-center">aOh! 暂时还没有内容!</td>
|
|
|
<else />
|
|
|
<volist name="list_data" id="data">
|
|
|
<tr>
|
|
|
<td class="allch">
|
|
|
<input class="ids" type="checkbox" data-val="{$data['id']}," value="CPS,{$data['ratio']},{$data['money']},{$data['unum']},{$data['spay_amount']},{$data['game_id']}" name="ids[]">
|
|
|
</td>
|
|
|
<td >{:I('timestart')} 至 {:I('timeend')}</td>
|
|
|
<td >{:get_promote_name($data['pid'])}</td>
|
|
|
<td class="game_id" val="{$data['game_id']}">{:get_game_name($data['game_id'])}</td>
|
|
|
<td class="recharge cps">{$data['spay_amount']|default=0}</td>
|
|
|
<td class="number cpa">{$data['unum']|default=0}</td>
|
|
|
<td class="cooperation">
|
|
|
<div style="width: 110px;margin: 0 auto;">
|
|
|
<div class="d_list" >
|
|
|
<div class="drop-down limitwidth3 cooperwrap" >
|
|
|
<span class="sort-txt" data="CPS" >
|
|
|
<span class="cooperation_mode">CPS</span>
|
|
|
</span>
|
|
|
<i class="arrow arrow-down"></i>
|
|
|
<ul class="nav-list hidden">
|
|
|
<li><a href="javascript:;" value="CPS" ><span class="cooperation_mode">CPS</span></a></li>
|
|
|
<li><a href="javascript:;" value="CPA" ><span class="cooperation_mode no">CPA</span></a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
<td class="ratio cp">
|
|
|
<span><notempty name="data.ratio">{$data.ratio}<else />0</notempty></span>%
|
|
|
<a href="javascript:;" id="ratiobtn" data-coom="CPS" data-notice="请输入1-100的数字,如:30即为30%" class="cpbtn">修改</a>
|
|
|
</td>
|
|
|
<td class="price cp">
|
|
|
<span><notempty name="data.money">{$data.money}<else />0</notempty></span>
|
|
|
<a href="javascript:;" id="ratiobtn" data-coom="CPA" data-notice="请输入数字" class="cpbtn">修改</a>
|
|
|
</td>
|
|
|
<td class="money">
|
|
|
{:round($data['spay_amount'] * $data['ratio']/100,2)}
|
|
|
</td>
|
|
|
<if condition="get_settlement(I('timestart'),I('timeend'),$data['pid'],$data['game_id']) eq true">
|
|
|
<td>已结算</td>
|
|
|
<else/>
|
|
|
<td>可结算</td>
|
|
|
</if>
|
|
|
</tr>
|
|
|
</volist>
|
|
|
</empty>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
<script>
|
|
|
function pop(text,classname) {
|
|
|
classname = classname?classname:'';
|
|
|
updateAlert(text,classname);
|
|
|
setTimeout(function(){
|
|
|
//$('#top-alert').find('button').click();
|
|
|
$('#tip').find('.tipclose').click();
|
|
|
},1500);
|
|
|
}
|
|
|
|
|
|
$('.cooperwrap').hover(function(){
|
|
|
$(this).find('.nav-list').removeClass('hidden');
|
|
|
},function(){
|
|
|
$(this).find('.nav-list').addClass('hidden');
|
|
|
});
|
|
|
|
|
|
$('.cooperwrap .nav-list li').find('a').each(function(){
|
|
|
var that = $(this).closest('.cooperwrap'),top = $(this).closest('.cooperation');
|
|
|
$(this).click(function(){
|
|
|
|
|
|
var text = $(this).text(),val=$(this).attr('value');
|
|
|
that.find('.sort-txt').text(text).attr('data',val);
|
|
|
that.find('.nav-list').addClass('hidden');
|
|
|
|
|
|
var ratio = top.siblings('.ratio').find('span').text(),
|
|
|
price = top.siblings('.price').find('span').text(),
|
|
|
unum = top.siblings('.cpa').text(),
|
|
|
spay_amount = top.siblings('.cps').text(),
|
|
|
game_id = top.siblings('.game_id').attr('val'),
|
|
|
ids = top.siblings('.allch').find('.ids'),money=0;
|
|
|
val = text+','+ratio+','+price+','+unum+','+spay_amount+','+game_id+',';
|
|
|
ids.attr('value',val);
|
|
|
|
|
|
if (text == 'CPS') {
|
|
|
money = Math.round(ratio * top.siblings('.recharge').text())/100;
|
|
|
} else {
|
|
|
money = price * top.siblings('.number').text();
|
|
|
}
|
|
|
;
|
|
|
if (isNaN(money)) {money=0;}
|
|
|
top.siblings('.money').text(money);
|
|
|
})
|
|
|
});
|
|
|
|
|
|
$('.cpbtn').on('click',function() {
|
|
|
var that = this,placeholder = $(that).data('notice'),cp = $.trim($(that).data('coom'));
|
|
|
html = '<div class="noticemsg " >';
|
|
|
html += '<div class="noticemain"><div class="noticeinput"><input placeholder="'+placeholder+'" type="text" class="txt" ></div>'
|
|
|
html += '<div class="noticebtn cpn"><a href="javascript:;">确定</a></div></div></div>';
|
|
|
$('body').append(html);
|
|
|
$('.noticebtn a').on('click',function() {
|
|
|
var val = $.trim($('.noticeinput input').val()),closeste = $(that).closest('.cp');
|
|
|
if (val) {
|
|
|
if (!/^\d+(\.\d{2})?$/.test(val)) {pop('请输入正确的数字');return false;}
|
|
|
$(that).siblings('span').text(val);
|
|
|
var money = closeste.siblings('.money').text(),
|
|
|
cooperation = $.trim(closeste.siblings('.cooperation').find('.sort-txt').text());
|
|
|
|
|
|
if (cooperation === cp) {
|
|
|
money = val * closeste.siblings('.'+(cp.toLowerCase())).text();
|
|
|
}
|
|
|
switch(cp){
|
|
|
case 'CPS':
|
|
|
if (cooperation === cp) {
|
|
|
money = Math.round(money)/100;
|
|
|
}
|
|
|
ratio = val;
|
|
|
price = closeste.siblings('.price').find('span').text();
|
|
|
break;
|
|
|
case 'CPA':
|
|
|
price = val;
|
|
|
ratio = closeste.siblings('.ratio').find('span').text();
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
if (isNaN(money)) {money=0;}
|
|
|
closeste.siblings('.money').text(money);
|
|
|
|
|
|
ids = closeste.siblings('.allch').find('.ids');
|
|
|
unum = closeste.siblings('.cpa').text();
|
|
|
spay_amount = closeste.siblings('.cps').text();
|
|
|
game_id = closeste.siblings('.game_id').attr('val');
|
|
|
val = cooperation+','+ratio+','+price+','+unum+','+spay_amount+','+game_id+',';
|
|
|
ids.attr('value',val);
|
|
|
}
|
|
|
$(this).closest('.noticemsg').remove();
|
|
|
});
|
|
|
$('.noticeinput input').keyup(function(event) {
|
|
|
if (event.keyCode == 13) {
|
|
|
$('.noticebtn a').click();
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('.confirmbtn').on('click',function() {
|
|
|
var that = $(this),closeste = that.closest('.op'),
|
|
|
cooperation = $.trim(closeste.siblings('.cooperation').find('.sort-txt').text()),
|
|
|
ratio = closeste.siblings('.ratio').find('span').text(),
|
|
|
price = closeste.siblings('.price').find('span').text(),
|
|
|
url = $(this).data('val'),index = url.lastIndexOf('.html');
|
|
|
if (index > 0)
|
|
|
url = url.substring(0,index)+'/cooperation/'+cooperation+'/cps_ratio/'+ratio+'/cpa_price/'+price+'.html';
|
|
|
else
|
|
|
url = url+'/cooperation/'+cooperation+'/cps_ratio/'+ratio+'/cpa_price/'+price+'.html';
|
|
|
$(this).siblings('.settlementbtn').attr('url',url).click();
|
|
|
});
|
|
|
</script>
|
|
|
</if>
|
|
|
<if condition="$group eq 2">
|
|
|
<table>
|
|
|
<!-- 表头 -->
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>推广员账号</th>
|
|
|
<th>结算周期</th>
|
|
|
<th>结算单号</th>
|
|
|
<th>总充值</th>
|
|
|
<th>总注册</th>
|
|
|
<th>结算金额</th>
|
|
|
<th>结算范畴</th>
|
|
|
<th>结算时间</th>
|
|
|
<th>详情</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<!-- 列表 -->
|
|
|
<tbody>
|
|
|
<volist name="list_data" id="data">
|
|
|
<tr>
|
|
|
<td>{:get_promote_name($data['promote_id'])}</td>
|
|
|
<td>{$data.starttime|date='Y-m-d',###}至{$data.endtime|date='Y-m-d',###}</td>
|
|
|
<td>{$data.settlement_number}</td>
|
|
|
<td>{$data.total_money}</td>
|
|
|
<td>{$data.total_number}</td>
|
|
|
<td>
|
|
|
<span class="money_color">{$data.sum_money}</span>
|
|
|
</td>
|
|
|
<td>{:get_bind_coin_status($data['bind_coin_status'])}</td>
|
|
|
<td>
|
|
|
{$data.create_time|date='Y-m-d',###}
|
|
|
</td>
|
|
|
<td>
|
|
|
<a href="javascript:" onclick="detailsInfo({$data['promote_id']},{$data['create_time']})">查看</a>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</volist>
|
|
|
<tr class="data_summary">
|
|
|
<td>汇总</td>
|
|
|
<td colspan="10">当页结算:{$total}元 ; 今日结算:{$ttotal}元 ; 昨日结算:{$ytotal}元 ; 累计结算:{$ztotal}元</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</if>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="page">
|
|
|
<if condition="I('group') eq 2 or $group eq 2">
|
|
|
<a class="sch-btn" href="{:U('Export/expUser',array(
|
|
|
'id'=>15,
|
|
|
'promote_account'=>I('promote_account'),
|
|
|
'timestart'=>I('timestart'),
|
|
|
'timeend'=>I('timeend'),
|
|
|
'start'=>I('start'),
|
|
|
'end'=>I('end'),
|
|
|
'settlement_number'=>I('settlement_number'),
|
|
|
'xlsname'=>'结算管理_推广结算_结算记录',
|
|
|
))}">导出</a>
|
|
|
</if>
|
|
|
{$_page|default=''}
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<div class="common_settings">
|
|
|
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
|
|
<form class="addShortcutIcon">
|
|
|
<input type="hidden" name="title" value="{$m_title}">
|
|
|
<input type="hidden" name="url" value="Query/settlement">
|
|
|
</form>
|
|
|
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
|
|
|
</div>
|
|
|
|
|
|
</block>
|
|
|
|
|
|
<block name="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>
|
|
|
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
|
|
<script type="text/javascript">
|
|
|
$(".select_gallery").select2();
|
|
|
$(".input-list-promote").click(function(){
|
|
|
$('#select2-promote_id-container').text('推广员账号');
|
|
|
$("#promote_account").val('');
|
|
|
$("#promote_accountt").val('');
|
|
|
});
|
|
|
$("#promote_id").change(function() {
|
|
|
$("#promote_account").val($("#promote_id option:selected").val());
|
|
|
$("#promote_accountt").val($("#promote_id option:selected").attr('promote-id'));
|
|
|
});
|
|
|
$(".input-list-game").click(function(){
|
|
|
$('#select2-game_id-container').text('请选择游戏');
|
|
|
$("#game_name").val('');
|
|
|
$("#game_namee").val('');
|
|
|
});
|
|
|
$("#game_id").change(function() {
|
|
|
$("#game_name").val($("#game_id option:selected").val());
|
|
|
$("#game_namee").val($("#game_id option:selected").attr('game-id'));
|
|
|
});
|
|
|
</script>
|
|
|
<script type="text/javascript">
|
|
|
//导航高亮
|
|
|
highlight_subnav("{:U('Query/settlement')}");
|
|
|
if('{$Think.get.game_name}'!=''){
|
|
|
$('#select2-game_id-container').text('{$Think.get.game_name}');
|
|
|
}
|
|
|
if('{$Think.get.promote_account}'!=''){
|
|
|
$('#select2-promote_id-container').text('{$Think.get.promote_account}');
|
|
|
}
|
|
|
Think.setValue('row','{:I("row",10)}');
|
|
|
$(function(){
|
|
|
$("#searchlayer").click(function(){
|
|
|
var url = $(this).attr('url');
|
|
|
that=$('.top_nav_list');//jssearch
|
|
|
var query = that.find('input').serialize();
|
|
|
if(that.find('#promote_account').val()==''){
|
|
|
layer.msg('请选择推广员',
|
|
|
{time: 1000,
|
|
|
});exit;
|
|
|
};
|
|
|
starttime=that.find('#time-start').val();
|
|
|
endtime=that.find('#time-end').val();
|
|
|
checkEndTime(starttime,endtime);
|
|
|
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
|
|
query = query.replace(/^&/g,'');
|
|
|
if( url.indexOf('?')>0 ){
|
|
|
url += '&' + query;
|
|
|
}else{
|
|
|
url += '?' + query;
|
|
|
}
|
|
|
window.location.href = url;
|
|
|
});
|
|
|
//搜索功能
|
|
|
$("#search").click(function(){
|
|
|
|
|
|
var starttime = $.trim($('#time-start').val());
|
|
|
var endtime = $.trim($('#time-end').val());
|
|
|
|
|
|
if((starttime && !endtime) || (!starttime && endtime)) {layer.msg('请完整选择结算周期时间');return false;}
|
|
|
if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}
|
|
|
|
|
|
|
|
|
var url = $(this).attr('url');
|
|
|
var query = $('.top_nav_list').find('input').serialize();
|
|
|
query += "&"+$('.top_nav_list').find('select').serialize();
|
|
|
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
|
|
query = query.replace(/^&/g,'');
|
|
|
if( url.indexOf('?')>0 ){
|
|
|
url += '&' + query;
|
|
|
}else{
|
|
|
url += '?' + query;
|
|
|
}
|
|
|
var start = $("#stime-start").val();
|
|
|
var end = $("#stime-end").val();
|
|
|
if (start !='' && end != ''){
|
|
|
if (Date.parse(start) > Date.parse(end)){
|
|
|
layer.msg('开始时间必须小于等于结束时间');
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
window.location.href = url;
|
|
|
});
|
|
|
function checkEndTime(startTime,endTime){
|
|
|
if(startTime==''){
|
|
|
layer.msg('请选择起始时间',
|
|
|
{time: 1000,
|
|
|
});;exit;
|
|
|
}
|
|
|
if(endTime==''){
|
|
|
layer.msg('请选择结束时间',
|
|
|
{time: 1000,
|
|
|
});;exit;
|
|
|
}
|
|
|
var start=new Date(startTime.replace("-", "/").replace("-", "/"));
|
|
|
var end=new Date(endTime.replace("-", "/").replace("-", "/"));
|
|
|
if(end<start){
|
|
|
layer.msg('结束时间要小于起始时间',
|
|
|
{time: 1000,
|
|
|
});;exit;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$(".paixu").click(function(){
|
|
|
var that=$(this);
|
|
|
$data_order=that.attr('data-order');
|
|
|
$order_type='{$userarpu_order}';
|
|
|
if($order_type==''||$order_type=='4'){
|
|
|
$(".sortBy").attr('name','data_order');
|
|
|
val='3,'+$data_order;
|
|
|
$(".sortBy").attr('value',val);
|
|
|
$("#searchlayer").click();
|
|
|
}else if($order_type=='3'){
|
|
|
$(".sortBy").attr('name','data_order');
|
|
|
val='4,'+$data_order;
|
|
|
$(".sortBy").attr('value',val);
|
|
|
$("#searchlayer").click();
|
|
|
}
|
|
|
});
|
|
|
//回车自动提交
|
|
|
$('.jssearch').find('input').keyup(function(event){
|
|
|
if(event.keyCode===13){
|
|
|
$("#searchlayer").click();
|
|
|
}
|
|
|
});
|
|
|
//点击排序
|
|
|
$('.list_sort').click(function(){
|
|
|
var url = $(this).attr('url');
|
|
|
var ids = $('.ids:checked');
|
|
|
var param = '';
|
|
|
if(ids.length > 0){
|
|
|
var str = new Array();
|
|
|
ids.each(function(){
|
|
|
str.push($(this).val());
|
|
|
});
|
|
|
param = str.join(',');
|
|
|
}
|
|
|
|
|
|
if(url != undefined && url != ''){
|
|
|
|
|
|
window.location.href = url.replace(".html","") + '/ids/' + param;
|
|
|
}
|
|
|
});
|
|
|
var date="{$setdate}";
|
|
|
$('#time-start').datetimepicker({
|
|
|
format: 'yyyy-mm-dd',
|
|
|
language:"zh-CN",
|
|
|
minView:2,
|
|
|
autoclose:true,
|
|
|
scrollMonth:false,
|
|
|
scrollTime:false,
|
|
|
scrollInput:false,
|
|
|
endDate:date
|
|
|
});
|
|
|
|
|
|
$('#datetimepicker').datetimepicker({
|
|
|
format: 'yyyy-mm-dd',
|
|
|
language:"zh-CN",
|
|
|
minView:2,
|
|
|
autoclose:true,
|
|
|
pickerPosition:'bottom-left',
|
|
|
scrollMonth:false,
|
|
|
scrollTime:false,
|
|
|
scrollInput:false,
|
|
|
endDate:date
|
|
|
})
|
|
|
$('#stime-start').datetimepicker({
|
|
|
format: 'yyyy-mm-dd',
|
|
|
language:"zh-CN",
|
|
|
minView:2,
|
|
|
autoclose:true,
|
|
|
scrollMonth:false,
|
|
|
scrollTime:false,
|
|
|
scrollInput:false,
|
|
|
endDate:date
|
|
|
});
|
|
|
|
|
|
$('#sdatetimepicker').datetimepicker({
|
|
|
format: 'yyyy-mm-dd',
|
|
|
language:"zh-CN",
|
|
|
minView:2,
|
|
|
autoclose:true,
|
|
|
scrollMonth:false,
|
|
|
scrollTime:false,
|
|
|
scrollInput:false,
|
|
|
pickerPosition:'bottom-left',
|
|
|
endDate:date
|
|
|
})
|
|
|
|
|
|
$('#game').on('click',function(event) {
|
|
|
var navlist = $(this).find('.nav-list');
|
|
|
if (navlist.hasClass('hidden')) {
|
|
|
navlist.removeClass('hidden');
|
|
|
$(this).find('.sort-txt').focus().val('');
|
|
|
} else {
|
|
|
navlist.addClass('hidden');
|
|
|
}
|
|
|
$(document).one('click', function(){
|
|
|
navlist.addClass('hidden');
|
|
|
});
|
|
|
event.stopPropagation();
|
|
|
});
|
|
|
|
|
|
$('#game .sort-txt').on('keyup',function(event) {
|
|
|
var val = $.trim($(this).val()).toLowerCase();
|
|
|
$('#game').siblings('input').val(val);
|
|
|
});
|
|
|
|
|
|
$('#game .nav-list').find("a").each(function(){
|
|
|
var that = $('#game');
|
|
|
$(this).click(function(){
|
|
|
var text = $.trim($(this).text()).toLowerCase();
|
|
|
that.find('.sort-txt').val(text);
|
|
|
that.siblings('input').val(text);
|
|
|
})
|
|
|
});
|
|
|
|
|
|
|
|
|
$('#promote').on('click',function(event) {
|
|
|
var navlist = $(this).find('.nav-list');
|
|
|
if (navlist.hasClass('hidden')) {
|
|
|
navlist.removeClass('hidden');
|
|
|
$(this).find('.sort-txt').focus().val('');
|
|
|
} else {
|
|
|
navlist.addClass('hidden');
|
|
|
}
|
|
|
$(document).one('click', function(){
|
|
|
navlist.addClass('hidden');
|
|
|
});
|
|
|
event.stopPropagation();
|
|
|
});
|
|
|
|
|
|
$('#promote .sort-txt').on('keyup',function(event) {
|
|
|
var val = $.trim($(this).val()).toLowerCase();
|
|
|
$('#promote').siblings('input').val(val);
|
|
|
});
|
|
|
|
|
|
$('#promote .nav-list').find("a").each(function(){
|
|
|
var that = $('#promote');
|
|
|
$(this).click(function(){
|
|
|
var text = $.trim($(this).text()).toLowerCase();
|
|
|
that.find('.sort-txt').val(text);
|
|
|
that.siblings('input').val(text);
|
|
|
})
|
|
|
});
|
|
|
})
|
|
|
|
|
|
|
|
|
function detailsInfo(promote_id,create_time){
|
|
|
layer.open({
|
|
|
type: 2,
|
|
|
title: '结算详情',
|
|
|
shadeClose: true,
|
|
|
shade: 0.8,
|
|
|
area: ['80%', '70%'],
|
|
|
content: '/admin.php?s=/Query/details/promote_id/'+promote_id+'/create_time/'+ create_time //iframe的url
|
|
|
});
|
|
|
}
|
|
|
</script>
|
|
|
</block>
|