|
|
|
|
<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"/>
|
|
|
|
|
<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>
|
|
|
|
|
<script type="text/javascript" src="__JS__/jquery.form.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="cf main-place top_nav_list navtab_list">
|
|
|
|
|
<h3 class="page_title">推广提现</h3>
|
|
|
|
|
<p class="description_text">说明:推广员后台申请提现的记录,后台审批操作 <span style="color: red;">注意:批量通过不支持自动打款</span></p>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="cf top_nav_list">
|
|
|
|
|
<empty name="model.extend">
|
|
|
|
|
<div class="fl button_list">
|
|
|
|
|
<div class="tools">
|
|
|
|
|
<a class=" ajax-post " target-form="ids" url="{:U('set_withdraw_status?model='.$model['id'],array('status'=>1,'msg_type'=>5,'field'=>'status'))}"><span class="button_icon button_icon12"></span>通 过</a>
|
|
|
|
|
<a class=" ajax-post " target-form="ids" url="{:U('set_withdraw_status?model='.$model['id'],array('status'=>2,'msg_type'=>6,'field'=>'status'))}"><span class="button_icon button_icon13"></span>驳 回</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</empty>
|
|
|
|
|
<!-- 高级搜索 -->
|
|
|
|
|
<div class="jssearch fl 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="promote_id" name="promote_account" class="select_gallery" style="width:120px;">
|
|
|
|
|
<option value="">推广员账号</option>
|
|
|
|
|
<volist name=":get_promote_list_by_id()" id="vo">
|
|
|
|
|
<option promote-id="{$vo.id}" value="{$vo.account}">{$vo.account}</option>
|
|
|
|
|
</volist>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="input-list">
|
|
|
|
|
<input type="text" name="settlement_number" class="" value="{:I('settlement_number')}" placeholder="提现单号">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="input-list">
|
|
|
|
|
<select name="ti_status">
|
|
|
|
|
<option value="">提现状态</option>
|
|
|
|
|
<option value="0">待审核</option>
|
|
|
|
|
<option value="1">已通过</option>
|
|
|
|
|
<option value="2">已驳回</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<input type="hidden" name="" value="" class="sortBy">
|
|
|
|
|
<div class="input-list">
|
|
|
|
|
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Query/withdraw','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="input-list">
|
|
|
|
|
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>12,),I('get.')))}">导出</a>
|
|
|
|
|
</div> -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 数据列表 -->
|
|
|
|
|
<div class="data_list">
|
|
|
|
|
<div class="">
|
|
|
|
|
<table>
|
|
|
|
|
<!-- 表头 -->
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>
|
|
|
|
|
<input class="check-all" type="checkbox">
|
|
|
|
|
</th>
|
|
|
|
|
<th>提现单号</th>
|
|
|
|
|
<!-- <th>提现金额</th> -->
|
|
|
|
|
<th ><a class="paixu" data-order='sum_money'>提现金额</a></th>
|
|
|
|
|
<th>推广员账号</th>
|
|
|
|
|
<!-- <th>申请时间</th> -->
|
|
|
|
|
<th ><a class="paixu" data-order='create_time'>申请时间</a></th>
|
|
|
|
|
<th>提现状态</th>
|
|
|
|
|
<th>审核时间</th>
|
|
|
|
|
<th>打款方式</th>
|
|
|
|
|
<!-- <th>打款途径</th> -->
|
|
|
|
|
<!-- <th>自动打款状态</th> -->
|
|
|
|
|
<th>操作</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
|
|
<!-- 列表 -->
|
|
|
|
|
<tbody>
|
|
|
|
|
<empty name ="list_data">
|
|
|
|
|
<td colspan="11" class="text-center">aOh! 暂时还没有内容!</td>
|
|
|
|
|
<else />
|
|
|
|
|
<volist name="list_data" id="data">
|
|
|
|
|
<php>
|
|
|
|
|
$data['sum_money'] = sprintf('%.2f',$data['sum_money']);
|
|
|
|
|
</php>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<eq name="data.status" value="0">
|
|
|
|
|
<input class="ids" type="checkbox" value="{$data['id']}" name="ids[]">
|
|
|
|
|
<else />
|
|
|
|
|
<input class="ids disabled" disabled="disabled" type="checkbox" value="{$data['id']}" name="ids[]">
|
|
|
|
|
</eq>
|
|
|
|
|
</td>
|
|
|
|
|
<td>{$data.settlement_number}</td>
|
|
|
|
|
<td onclick="details('{$data['settlement_number']}')"><span class="money_color">{$data.sum_money}</span></td>
|
|
|
|
|
<td>{:get_promote_name($data['promote_id'])}</td>
|
|
|
|
|
<td><notempty name="data.create_time">{$data.create_time|date='Y-m-d H:i:s',###}<else />---</notempty></td>
|
|
|
|
|
<td>
|
|
|
|
|
<eq name="data.status" value="0"><span class="check_wait_color">待审核</span></eq>
|
|
|
|
|
<eq name="data.status" value="1"><span class="check_pass_color">已通过</span></eq>
|
|
|
|
|
<eq name="data.status" value="2"><span class="check_notpass_color">已驳回</span></eq>
|
|
|
|
|
</td>
|
|
|
|
|
<td><notempty name="data.end_time">{$data.end_time|date='Y-m-d H:i:s',###}<else />---</notempty></td>
|
|
|
|
|
<!-- <php>
|
|
|
|
|
$type_arr = [0=>'---',1=>'手动打款',2=>'自动打款'];
|
|
|
|
|
$way_arr = [0=>'---',1=>'支付宝',2=>'微信'];
|
|
|
|
|
$status_arr = [0=>'---',1=>'成功',2=>'失败'];
|
|
|
|
|
</php> -->
|
|
|
|
|
<td>{:$data['widthdraw_number']==''&&$data['status']==1?'手动':($data['widthdraw_number']!=''&&$data['status']==1?'自动':'--')}</td>
|
|
|
|
|
<!-- <td>{$way_arr[$data['withdraw_way']]}</td>
|
|
|
|
|
<td>{$status_arr[$data['withdraw_status']]}</td> -->
|
|
|
|
|
<td>
|
|
|
|
|
<div class="partakebtn">
|
|
|
|
|
<if condition="$data.status eq 0">
|
|
|
|
|
<a class="agree" data-id="{$data['id']}" data-promote_id="{$data['promote_id']}"
|
|
|
|
|
promote-name="{:get_promote_account($data['promote_id'])}" promote-money="{$data['sum_money']}" target-form="ids"
|
|
|
|
|
alipay_account="{:get_promote_alipay_account($data['promote_id'])}"
|
|
|
|
|
weixin_account="{:get_promote_weixin_account($data['promote_id'])}"
|
|
|
|
|
url="{:U('set_withdraw_status',array('ids'=>$data['id'],'status'=>1,'msg_type'=>5,'field'=>'status'))}">通过</a>
|
|
|
|
|
<a class="ajax-get" target-form="ids"
|
|
|
|
|
url="{:U('set_withdraw_status',array('ids'=>$data['id'],'status'=>2,'msg_type'=>6,'field'=>'status'))}">驳回</a>
|
|
|
|
|
<elseif condition="$data.status eq 2"/>
|
|
|
|
|
<a class="agree" data-id="{$data['id']}" data-promote_id="{$data['promote_id']}"
|
|
|
|
|
promote-name="{:get_promote_account($data['promote_id'])}" promote-money="{$data['sum_money']}" target-form="ids"
|
|
|
|
|
alipay_account="{:get_promote_alipay_account($data['promote_id'])}"
|
|
|
|
|
weixin_account="{:get_promote_weixin_account($data['promote_id'])}"
|
|
|
|
|
url="{:U('set_withdraw_status',array('ids'=>$data['id'],'status'=>1,'msg_type'=>5,'field'=>'status'))}">通过</a>
|
|
|
|
|
<!-- <a class="ajax-get disabled" disabled="disabled">驳回</a><a class="ajax-get disabled" disabled="disabled">驳回</a> -->
|
|
|
|
|
<else/>
|
|
|
|
|
<!-- <a class="ajax-get disabled" disabled="disabled">通过</a>
|
|
|
|
|
<a class="ajax-get disabled" disabled="disabled">驳回</a> -->
|
|
|
|
|
</if>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</volist>
|
|
|
|
|
</empty>
|
|
|
|
|
<tr class="data_summary">
|
|
|
|
|
<td>汇总</td>
|
|
|
|
|
<td colspan="11">当页提现:{:null_to_0(array_sum(array_column(array_status2value('status','',$list_data),'sum_money')))}元 ; 今日提现:{:null_to_0(floor($ttotal*100)/100)}元 ; 昨日提现:{:null_to_0(floor($ytotal*100)/100)}元 ; 累计提现:{:null_to_0(floor($total*100)/100)}元</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="page">
|
|
|
|
|
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>12,'xlsname'=>'结算管理_推广提现',),I('get.')))}">导出</a>
|
|
|
|
|
{$_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/withdraw">
|
|
|
|
|
</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>
|
|
|
|
|
<!--打款弹出层-->
|
|
|
|
|
<div class="promote-layer mb20">
|
|
|
|
|
<form id="ajaxForm" action="{:U('set_withdraw_agree')}" method="post">
|
|
|
|
|
<input type="hidden" name="ids" id="hd_ids" value="" />
|
|
|
|
|
<input type="hidden" name="promote_id" id="hd_promote_id" value="" />
|
|
|
|
|
<input type="hidden" name="status" value="1" />
|
|
|
|
|
<input type="hidden" name="msg_type" value="5" />
|
|
|
|
|
<input type="hidden" name="field" value="status" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="promote-name">打款方式:</span>
|
|
|
|
|
|
|
|
|
|
<input type="radio" name="withdraw_type" value="1" id="auto" checked/>
|
|
|
|
|
<label for="auto" class="promote-way pr60">手动</label>
|
|
|
|
|
|
|
|
|
|
<input type="radio" name="withdraw_type" value="2" id="manual" />
|
|
|
|
|
<label for="manual" class="promote-way">自动</label>
|
|
|
|
|
|
|
|
|
|
<ol class="promote-con">
|
|
|
|
|
<li class="promote-con-con promote-show">
|
|
|
|
|
<div class="mb20"><span class="promote-name">推广员账号:</span><b> <font class="promote-name_s"></font></b></div>
|
|
|
|
|
<div class="mb20"><span class="promote-name">结算金额:</span><b>¥<font class="promote-money_s"></font></b></div>
|
|
|
|
|
<a href="javascript:;" id="agree_btn"><div class="promote-btn">通过</div></a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="promote-con-con ">
|
|
|
|
|
<div class="mb20">
|
|
|
|
|
<span class="promote-name">打款途径:</span>
|
|
|
|
|
|
|
|
|
|
<input type="radio" name="withdraw_way" id="alipay" value="1" checked />
|
|
|
|
|
<label for="alipay" class="pr43">支付宝</label>
|
|
|
|
|
<!--
|
|
|
|
|
<input type="radio" name="withdraw_way" id="wechatpay" value="2" />
|
|
|
|
|
<label for="wechatpay">微信</label></div> -->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb20">
|
|
|
|
|
<span class="promote-name path-name">支付宝账号:</span>
|
|
|
|
|
<b class="alipay_account_s"></b>
|
|
|
|
|
<b class="weixin_account_s" style="display:none"></b>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb20"><span class="promote-name">推广员账号:</span><b class="promote-name_s"></b></div>
|
|
|
|
|
<div class="mb20"><span class="promote-name">结算金额:</span><b>¥<font class="promote-money_s"></font></b></div>
|
|
|
|
|
<div class="mb20">
|
|
|
|
|
<span class="promote-name path-name">超管手机号:</span>
|
|
|
|
|
<b class="puser">{$adminmobile}</b>
|
|
|
|
|
<a href="javascript:;" class="pop-code smcode sendvcode">获取验证码</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb20">
|
|
|
|
|
<span class="promote-name path-name">手机验证码:</span>
|
|
|
|
|
<input type="txt" name="code">
|
|
|
|
|
</div>
|
|
|
|
|
<a href="javascript:;" id="promote_btn"><div class="promote-btn" >确定打款</div></a>
|
|
|
|
|
</li>
|
|
|
|
|
</ol>
|
|
|
|
|
</form>
|
|
|
|
|
</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>
|
|
|
|
|
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
|
|
|
|
|
<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 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>
|
|
|
|
|
<volist name=":I('get.')" id="vo">
|
|
|
|
|
Think.setValue('{$key}',"{$vo}");
|
|
|
|
|
</volist>
|
|
|
|
|
$(".select_gallery").select2();
|
|
|
|
|
</script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
//导航高亮
|
|
|
|
|
highlight_subnav('{:U('Query/withdraw')}');
|
|
|
|
|
$(function(){
|
|
|
|
|
$(".paixu").click(function(){
|
|
|
|
|
$ddd=$(this).attr('date-url');
|
|
|
|
|
$sum_money="{:I('sum_money')}";
|
|
|
|
|
$create_time = "{:I('create_time')}";
|
|
|
|
|
if($ddd=='sum_money'){
|
|
|
|
|
if($sum_money==1){
|
|
|
|
|
$(".sortBy").attr('name','sum_money');
|
|
|
|
|
$(".sortBy").attr('value',2);
|
|
|
|
|
$("#search").click();
|
|
|
|
|
}else{
|
|
|
|
|
$(".sortBy").attr('name','sum_money');
|
|
|
|
|
$(".sortBy").attr('value',1);
|
|
|
|
|
$("#search").click();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if($ddd=='create_time' ){
|
|
|
|
|
if($create_time==1){
|
|
|
|
|
$(".sortBy").attr('name','create_time');
|
|
|
|
|
$(".sortBy").attr('value',2);
|
|
|
|
|
$("#search").click();
|
|
|
|
|
}else{
|
|
|
|
|
$(".sortBy").attr('name','create_time');
|
|
|
|
|
$(".sortBy").attr('value',1);
|
|
|
|
|
$("#search").click();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
//搜索功能
|
|
|
|
|
$("#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;
|
|
|
|
|
});
|
|
|
|
|
$(".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);
|
|
|
|
|
$("#search").click();
|
|
|
|
|
}else if($order_type=='3'){
|
|
|
|
|
$(".sortBy").attr('name','data_order');
|
|
|
|
|
val='4,'+$data_order;
|
|
|
|
|
$(".sortBy").attr('value',val);
|
|
|
|
|
$("#search").click();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//回车自动提交
|
|
|
|
|
$('.jssearch').find('input').keyup(function(event){
|
|
|
|
|
if(event.keyCode===13){
|
|
|
|
|
$("#search").click();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$('#time-start').datetimepicker({
|
|
|
|
|
format: 'yyyy-mm-dd',
|
|
|
|
|
language:"zh-CN",
|
|
|
|
|
minView:2,
|
|
|
|
|
autoclose:true
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#datetimepicker').datetimepicker({
|
|
|
|
|
format: 'yyyy-mm-dd',
|
|
|
|
|
language:"zh-CN",
|
|
|
|
|
minView:2,
|
|
|
|
|
autoclose:true,
|
|
|
|
|
pickerPosition:'bottom-left'
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
$('#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 details(settlement_number){
|
|
|
|
|
layer.open({
|
|
|
|
|
type: 2,
|
|
|
|
|
title: '结算详情',
|
|
|
|
|
shadeClose: true,
|
|
|
|
|
shade: 0.8,
|
|
|
|
|
area: ['80%', '70%'],
|
|
|
|
|
content: '/admin.php?s=/Query/withdrawDetails/settlement_number/'+settlement_number+'' //iframe的url
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<!--打款弹出层-->
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
|
|
|
|
|
|
//点击同意按钮
|
|
|
|
|
$('.agree').click(function(){
|
|
|
|
|
|
|
|
|
|
var that = $(this);
|
|
|
|
|
|
|
|
|
|
$("#hd_ids").val($(this).attr("data-id"));
|
|
|
|
|
$("#hd_promote_id").val($(this).attr("data-id"));
|
|
|
|
|
$(".promote-name_s").text($(this).attr('promote-name')); //推广员账号
|
|
|
|
|
$(".promote-money_s").text($(this).attr('promote-money')); //结算金额
|
|
|
|
|
|
|
|
|
|
$(".alipay_account_s").text(that.attr('alipay_account')); //支付宝账号
|
|
|
|
|
$(".weixin_account_s").text(that.attr('weixin_account')); //微信账号
|
|
|
|
|
var lh = '320px';
|
|
|
|
|
var val = parseInt($.trim($('input:radio[name="withdraw_type"]:checked').val()));
|
|
|
|
|
if(val==2) {lh='610px';}
|
|
|
|
|
layer.open({
|
|
|
|
|
type: 1,
|
|
|
|
|
title: ' ',
|
|
|
|
|
shadeClose: true,
|
|
|
|
|
shade: 0.8,
|
|
|
|
|
area: ['387px', lh],
|
|
|
|
|
content: $('.promote-layer')
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//打款方式选择
|
|
|
|
|
$('input:radio[name="withdraw_type"]').change(function(){
|
|
|
|
|
var index=$(this).val();
|
|
|
|
|
// console.log(index);
|
|
|
|
|
if(index==1){
|
|
|
|
|
$(".promote-con-con").eq(0).addClass("promote-show").siblings().removeClass("promote-show");
|
|
|
|
|
$(".layui-layer").css("height","320px");
|
|
|
|
|
$(".layui-layer-content").css("height","280px");
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
$(".promote-con-con").eq(1).addClass("promote-show").siblings().removeClass("promote-show");
|
|
|
|
|
$(".layui-layer").css("height","610px");
|
|
|
|
|
$(".layui-layer").css("top","250px");
|
|
|
|
|
$(".layui-layer-content").css("height","540px");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 打款途径选择
|
|
|
|
|
$('input:radio[name="withdraw_way"]').change(function(){
|
|
|
|
|
var index=$(this).val();
|
|
|
|
|
if(index==1){
|
|
|
|
|
$(".alipay_account_s").show();
|
|
|
|
|
$(".weixin_account_s").hide();
|
|
|
|
|
$(".path-name").html("支付宝账号");
|
|
|
|
|
}else{
|
|
|
|
|
$(".alipay_account_s").hide();
|
|
|
|
|
$(".weixin_account_s").show();
|
|
|
|
|
$(".path-name").html("微信账号");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#agree_btn").click(function () {
|
|
|
|
|
|
|
|
|
|
$("#ajaxForm").ajaxSubmit(function (res) {
|
|
|
|
|
if(res.status==1){
|
|
|
|
|
layer.msg('操作成功');
|
|
|
|
|
setTimeout('location.href=location.href',1000);
|
|
|
|
|
}else{
|
|
|
|
|
layer.msg('操作失败');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#promote_btn").click(function () {
|
|
|
|
|
$promote_btn_val = $('input:radio[name="withdraw_way"]:checked').val();
|
|
|
|
|
if($promote_btn_val==1&&$('.alipay_account_s').text()=='未知'){
|
|
|
|
|
layer.msg('未填写支付宝账号,请填写或选择其他打款方式');
|
|
|
|
|
return false;
|
|
|
|
|
}else if($promote_btn_val==2&&$('.weixin_account_s').text()=='未知'){
|
|
|
|
|
layer.msg('未绑定微信账号,请绑定或选择其他打款方式');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
that = $(this);
|
|
|
|
|
if( that.hasClass('disabled')){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
that.addClass('disabled');
|
|
|
|
|
$("#ajaxForm").ajaxSubmit(function (res) {
|
|
|
|
|
var index = layer.load(1, {
|
|
|
|
|
shade: [0.1,'#fff'] //0.1透明度的白色背景
|
|
|
|
|
});
|
|
|
|
|
if(res.status==1){
|
|
|
|
|
layer.close(index);
|
|
|
|
|
layer.msg(res.info);
|
|
|
|
|
setTimeout('location.href=location.href',1000);
|
|
|
|
|
}else{
|
|
|
|
|
layer.close(index);
|
|
|
|
|
that.removeClass('disabled');
|
|
|
|
|
layer.msg(res.info);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
var f=function(msg,obj) {
|
|
|
|
|
layer.msg(msg);
|
|
|
|
|
};
|
|
|
|
|
//发送验证码
|
|
|
|
|
$(".sendvcode").on('click',function() {
|
|
|
|
|
account=$.trim($('.puser').text());
|
|
|
|
|
if (!(/^1[3456789]\d{9}$/.test(account))) {
|
|
|
|
|
f('手机号码格式不正确');return;
|
|
|
|
|
}else{
|
|
|
|
|
$(".sendvcode").addClass('phoneok');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 发送安全码
|
|
|
|
|
if (!$(this).hasClass('disabled')&&$(this).hasClass('phoneok')) {
|
|
|
|
|
var e = this,p = account;
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
type:'post',
|
|
|
|
|
url: '{:U("Phone/not_account_telsvode")}',
|
|
|
|
|
data: 'phone='+p,
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function(d) {
|
|
|
|
|
if (parseInt(d.status) >0) {
|
|
|
|
|
$(e).addClass('disabled');
|
|
|
|
|
addCookie("secondsremainede",60,60);//添加cookie记录,有效时间60s
|
|
|
|
|
$.cookie('phone',p);
|
|
|
|
|
settime();
|
|
|
|
|
} else {
|
|
|
|
|
$(e).siblings('.regyzm').addClass('msg-fail');
|
|
|
|
|
layer.msg(d.msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var r = function(i, t) {
|
|
|
|
|
if (i>0) {
|
|
|
|
|
var r = 60;
|
|
|
|
|
$(e).addClass('disabled');
|
|
|
|
|
var a = setInterval(function() {
|
|
|
|
|
r--;
|
|
|
|
|
$(e).text('成功'+r + '秒'),
|
|
|
|
|
0 == r && ($(e).removeClass('disabled'), $(e).text('获取验证码'), clearInterval(a))
|
|
|
|
|
},1e3)
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
function addCookie(name,value,expiresHours){
|
|
|
|
|
//判断是否设置过期时间,0代表关闭浏览器时失效
|
|
|
|
|
if(expiresHours>0){
|
|
|
|
|
var date=new Date();
|
|
|
|
|
date.setTime(date.getTime()+expiresHours*1000);
|
|
|
|
|
$.cookie(name, escape(value), {expires: date});
|
|
|
|
|
}else{
|
|
|
|
|
$.cookie(name, escape(value));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//修改cookie的值
|
|
|
|
|
function editCookie(name,value,expiresHours){
|
|
|
|
|
if(expiresHours>1){
|
|
|
|
|
var date=new Date();
|
|
|
|
|
date.setTime(date.getTime()+expiresHours*1000); //单位是毫秒
|
|
|
|
|
$.cookie(name, escape(value), {expires: date});
|
|
|
|
|
} else{
|
|
|
|
|
$.cookie(name, escape(value));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//根据名字获取cookie的值
|
|
|
|
|
function getCookieValue(name){
|
|
|
|
|
return $.cookie(name);
|
|
|
|
|
}
|
|
|
|
|
$(function(){
|
|
|
|
|
s = $.cookie('secondsremainede');
|
|
|
|
|
if(s>0){
|
|
|
|
|
settime();//开始倒计时
|
|
|
|
|
$('#sendphone').val($.cookie('phone'));
|
|
|
|
|
}else{
|
|
|
|
|
$.cookie('phone','');
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//发送验证码
|
|
|
|
|
//开始倒计时
|
|
|
|
|
var countdown;
|
|
|
|
|
function settime(obj){
|
|
|
|
|
var obj = $('.sendvcode');
|
|
|
|
|
countdown=getCookieValue("secondsremainede");
|
|
|
|
|
if (countdown == 0 || isNaN(countdown)) {
|
|
|
|
|
obj.removeClass('disabled').removeClass('phoneok').text('获取验证码')
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
obj.addClass('phoneok');
|
|
|
|
|
obj.addClass("disabled");
|
|
|
|
|
obj.text('成功'+countdown + '秒');
|
|
|
|
|
countdown--;
|
|
|
|
|
editCookie("secondsremainede",countdown,countdown+1);
|
|
|
|
|
}
|
|
|
|
|
setTimeout(function() { settime() },1000) //每1000毫秒执行一次
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</block>
|