Merge branch 'feature/promote' into dev

master
ELF 5 years ago
commit 68d39bb3c9

@ -5714,7 +5714,7 @@ if ($key == 'model'){
if (!empty(I("root_id"))) {
$root_id = I("root_id");
$parentData = $this->getParentSpendData($root_id,$month,2);
$map['chain'] =['like','%'.$root_id.'%'];
$map['chain'] =['like','%/'.$root_id.'/%'];
$map['level'] = 2;
} else if(!empty(I("sign"))){
$map['parent_id'] = ['neq',0];
@ -5793,7 +5793,7 @@ if ($key == 'model'){
$parentData = $this->getParentSpendData($root_id,$month,3);
$map['chain'] =['like','%'.$root_id.'%'];
$map['chain'] =['like','%/'.$root_id.'/%'];
$map['level'] = 3;
} else if(!empty(I("sign"))){
@ -5873,7 +5873,7 @@ if ($key == 'model'){
$parent_id = I("parent_id");
$parentData = $this->getParentSpendData($parent_id,$month,4);
$map['chain'] =['like','%'.$parent_id.'%'];
$map['chain'] =['like','%/'.$parent_id.'/%'];
$map['level'] = 4;
}

@ -44,6 +44,32 @@ class FileController extends AdminController
$this->ajaxReturn($return);
}
/* 文件上传--cxj */
public function uploadNew()
{
$return = array('status' => 1, 'info' => '上传成功', 'id' => '');
/* 调用文件上传组件上传文件 */
$File = D('File');
$file_driver = C('DOWNLOAD_UPLOAD_DRIVER');
$info = $File->upload(
$_FILES,
C('DOWNLOAD_UPLOAD'),
C('DOWNLOAD_UPLOAD_DRIVER'),
C("UPLOAD_{$file_driver}_CONFIG")
);
/* 记录附件信息 */
if ($info) {
$return['id'] = $info['file']['id'];
} else {
$return['status'] = 0;
$return['info'] = $File->getError();
}
/* 返回JSON数据 */
$this->ajaxReturn($return);
}
/* 文件分片上传 */
public function shard_upload()
{

File diff suppressed because it is too large Load Diff

@ -2,6 +2,7 @@
<block name="css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/promote.css" type="text/css"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
<style>
.select2-container--default .select2-selection--single {
color: #000;
@ -23,28 +24,40 @@
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;
}
</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>
<p class="description_text">说明:推广员后台申请提现的记录,后台审批操作 <span style="color: red;">注意:批量通过不支持自动打款</span></p>
<p class="description_text">说明:推广员后台申请提现的记录,后台审批操作</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>
<a class="ajax-post" target-form="ids" url="{:U('set_withdraw_status')}"><span class="button_icon button_icon12"></span>通 过</a>
<a class="agree" data-id="ids"><span class="button_icon button_icon13"></span>驳 回</a>
</div>
</div>
</empty>
@ -62,14 +75,14 @@
</select>
</div>
<div class="input-list">
<input type="text" name="settlement_number" class="" value="{:I('settlement_number')}" placeholder="提现单号">
<input type="text" name="widthdraw_number" class="" value="{:I('widthdraw_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>
<?php foreach (promoteWithdrawStatus() as $key => $value) :?>
<option value="<?=$key?>"><?=$value?></option>
<?php endforeach;?>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">
@ -82,7 +95,6 @@
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
@ -94,16 +106,12 @@
<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> -->
<th>操作</th>
</tr>
</thead>
@ -125,44 +133,20 @@
<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>{$data.widthdraw_number}</td>
<td onclick="details('{$data["id"]}')"><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>{:promoteWithdrawStatus($data['status'])}</td>
<td>{$data.respond}</td>
<td><notempty name="data.audit_time">{$data.audit_time|date='Y-m-d H:i:s',###}<else />---</notempty></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> -->
<a class="ajax-get" url="{:U('set_withdraw_status',array('ids'=>$data['id']))}">通过</a>
<a class="agree" data-id="{$data['id']}">驳回</a>
<elseif condition="$data.status eq 1"/>
<a class="upload-transfer-proof" data-id="{$data['id']}">上传汇款证明</a>
</if>
</div>
</td>
@ -192,60 +176,40 @@
</div>
<!--打款弹出层-->
<div class="promote-layer mb20">
<form id="ajaxForm" action="{:U('set_withdraw_agree')}" method="post">
<form id="ajaxForm" action="{:U('set_withdraw')}" 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>
<input type="hidden" name="case" id="case" value="deny" />
<ol class="promote-con">
<li class="promote-con-con promote-show">
<div class="mb20"><span class="promote-name">推广员账号:</span><b>&nbsp;<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 ">
<li class="promote-con-con " id="deny">
<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> -->
<span class="promote-name"><i class="mustmark">*</i>说明:</span>
<textarea class="textarea-style" name="respond"></textarea>
</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">
<a href="javascript:;" id="agree_btn"><div class="promote-btn">驳回</div></a>
</li>
<li class="promote-con-con" id="upload">
<div class="mb20" style="display: flex;">
<span class="promote-name"><i class="mustmark">*</i>汇款证明:</span>
<div id="uploader" class="wu-example">
<!--用来存放文件信息-->
<div class="btns">
<div id="picker">选择文件</div>
</div>
<div style="display: flex;">
<div id="thelist" class="uploader-list"></div>
<div class="uploader-list" style="margin-left: 20px;">
<img id="imgList">
</div>
</div>
<input type="hidden" name="transfer_proof" id="transfer_proof">
</div>
</div>
<a href="javascript:;" id="promote_btn"><div class="promote-btn" >确定打款</div></a>
<a href="javascript:;" id="save"><div class="promote-btn">保存</div></a>
</li>
</ol>
</form>
</div>
</block>
<block name="script">
@ -267,51 +231,11 @@ $(".select_gallery").select2();
//导航高亮
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}';
console.log($order_type);
if($order_type==''||$order_type=='4'){
$(".sortBy").attr('name','data_order');
val='3,'+$data_order;
@ -324,86 +248,66 @@ $(function(){
$("#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;
});
//回车自动提交
$('.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){
function details(id){
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
content: '/admin.php?s=/Query/withdrawDetails/id/'+id+'' //iframe的url
});
}
</script>
<!--打款弹出层-->
<script type="text/javascript">
var ids = [];
var uploaderFile = false;
$(function(){
//点击同意按钮
$('.agree').click(function(){
var that = $(this);
var id = that.attr("data-id");
ids = [];
$("#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')); //结算金额
if (id === 'ids') {
$('input[class=ids]:checked').each(function (e) {
ids.push(parseInt($(this).val()));
});
if (ids.length === 0) {
updateAlert('请选择需要操作的数据','tip_error');
setTimeout(function(){
$('#tip').find('.tipclose').click();
},1500);
return false;
}
$("#hd_ids").val(ids);
} else {
$("#hd_ids").val($(this).attr("data-id"));
}
$(".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';}
@ -415,189 +319,144 @@ function details(settlement_number){
area: ['387px', lh],
content: $('.promote-layer')
});
$('#case').val('deny');
$('#deny').addClass('promote-show');
$('#upload').removeClass('promote-show');
});
//打款方式选择
$('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");
}
});
$('.upload-transfer-proof').click(function(){
var that = $(this);
var id = that.attr("data-id");
$("#hd_ids").val($(this).attr("data-id"));
uploadFile();
// 打款途径选择
$('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("微信账号");
}
var lh = '320px';
var val = parseInt($.trim($('input:radio[name="withdraw_type"]:checked').val()));
if(val==2) {lh='610px';}
layer.open({
type: 1,
title: '&nbsp',
shadeClose: true,
shade: 0.8,
area: ['387px', lh],
content: $('.promote-layer')
});
$('#case').val('upload_transfer_proof');
$('#upload').addClass('promote-show');
$('#deny').removeClass('promote-show');
});
$("#agree_btn").click(function () {
$("#agree_btn,#save").click(function () {
$("#ajaxForm").ajaxSubmit(function (res) {
layer.msg(res.msg);
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透明度的白色背景
});
function uploadFile() {
if (uploaderFile === false) {
uploaderFile = true;
var uploader = WebUploader.create({
// 选完文件后,是否自动上传。
auto: true,
// swf文件路径
swf: '__STATIC__/webuploader/Uploader.swf',
// 文件接收服务端。
server: "{:U('File/uploadNew',array('session_id'=>session_id()))}",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建可能是input元素也可能是flash.
pick: {
id:'#picker',
multiple:true
},
// dnd: false,
paste: document.body,
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false,
disableGlobalDnd: true,
fileNumLimit:1,
threads:5,
thumb:true,
compress:false,
prepareNextFile: true,
chunked:false,
duplicate: true
});
// 当有文件添加进来的时候
uploader.on( 'fileQueued', function( file ) {
var thelist = $('#thelist');
// $list为容器jQuery实例
thelist.append( '<div id="' + file.id + '" class="item">' +
'<h4 class="info">' + file.name + '</h4>' +
'<p class="state">等待上传...</p>' +
'<p class="del" style="color: #145ccd;cursor: pointer;">删除</p>' +
'</div>' );
//删除按钮
$('.del').on('click', function () {
uploader.removeFile(file);
thelist.empty();
$('#imgList').attr('src', '');
});
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);
// 创建缩略图
// 如果为非图片文件,可以不用调用此方法。
// thumbnailWidth x thumbnailHeight 为 100 x 100
console.log(file)
if (file.type.indexOf("image") !== -1) {
uploader.makeThumb( file, function( error, src ) {
if ( error ) {
$('#imgList').replaceWith('<span>不能预览</span>');
return;
}
$('#imgList').attr( 'src', src );
}, 80, 80 );
}
});
});
});
// 文件上传过程中创建进度条实时显示。
uploader.on( 'uploadProgress', function( file, percentage ) {
var $li = $( '#'+file.id ),
$percent = $li.find('.progress .progress-bar');
// 避免重复创建
if ( !$percent.length ) {
$percent = $('<div class="progress progress-striped active">' +
'<div class="progress-bar" role="progressbar" style="width: 0%">' +
'</div>' +
'</div>').appendTo( $li ).find('.progress-bar');
}
</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');
}
$li.find('p.state').text('上传中');
// 发送安全码
if (!$(this).hasClass('disabled')&&$(this).hasClass('phoneok')) {
var e = this,p = account;
$percent.css( 'width', percentage * 100 + '%' );
});
$.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();
uploader.on( 'uploadSuccess', function( file, response ) {
var text = '已上传';
if (response.status == 1) {
$('#transfer_proof').val(response.id);
} else {
$(e).siblings('.regyzm').addClass('msg-fail');
layer.msg(d.msg);
text = '存储失败';
}
}
});
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));
}
}
$( '#'+file.id ).find('p.state').text(text);
});
//根据名字获取cookie的值
function getCookieValue(name){
return $.cookie(name);
}
$(function(){
s = $.cookie('secondsremainede');
if(s>0){
settime();//开始倒计时
$('#sendphone').val($.cookie('phone'));
}else{
$.cookie('phone','');
}
})
uploader.on( 'uploadError', function( file ) {
$( '#'+file.id ).find('p.state').text('上传出错');
});
//发送验证码
//开始倒计时
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);
uploader.on( 'uploadComplete', function( file ) {
$( '#'+file.id ).find('.progress').fadeOut();
});
}
}
setTimeout(function() { settime() },1000) //每1000毫秒执行一次
}
</script>
</block>

@ -70,7 +70,7 @@ function str2arr($str, $glue = ',')
* @return string
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
function arr2str($arr=[], $glue = ',')
function arr2str($arr = [], $glue = ',')
{
return implode($glue, $arr);
}
@ -1369,55 +1369,80 @@ function get_game_wxlogin_param($game_id)
}
}
function pp($val='', $isdie=true) {
var_dump($val);
if ($isdie) die();
function pp($val = '', $isdie = true)
{
var_dump($val);
if ($isdie) die();
}
function curl_post($url = '', $post_data = array()) {
if (empty($url) || empty($post_data)) {
return false;
}
$requestString = http_build_query($post_data);
$postUrl = $url;
$curl = curl_init();//初始化curl
curl_setopt($curl, CURLOPT_URL, $postUrl); // 要访问的地址
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // 从证书中检查SSL加密算法是否存在
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转
curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer
curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求
curl_setopt($curl, CURLOPT_POSTFIELDS, $requestString); // Post提交的数据包
curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环
curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
$data = curl_exec($curl);//运行curl
curl_close($curl);
return $data;
function curl_post($url = '', $post_data = array())
{
if (empty($url) || empty($post_data)) {
return false;
}
$requestString = http_build_query($post_data);
$postUrl = $url;
$curl = curl_init();//初始化curl
curl_setopt($curl, CURLOPT_URL, $postUrl); // 要访问的地址
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // 从证书中检查SSL加密算法是否存在
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转
curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer
curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求
curl_setopt($curl, CURLOPT_POSTFIELDS, $requestString); // Post提交的数据包
curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环
curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
$data = curl_exec($curl);//运行curl
curl_close($curl);
return $data;
}
if(!function_exists('dd')){
function dd($var){
if (!function_exists('dd')) {
function dd($var)
{
if (func_num_args() > 1) {
$var = func_get_args();
}
$debug = debug_backtrace();
echo '<pre class="yun-debug" style="background:#EAEAEA;padding:10px;">';
echo '<div class="file" style="color:#f00;">',$debug[0]['file'],' ',$debug[0]['line'],PHP_EOL,'</div>';
echo '<div class="file" style="color:#f00;">', $debug[0]['file'], ' ', $debug[0]['line'], PHP_EOL, '</div>';
if (is_object($var) || is_array($var)) {
$mode = 0;
} else {
$mode = 1;
}
switch($mode){
case 0: print_r($var); break;
case 1: var_dump($var); break;
default: print_r($var);
switch ($mode) {
case 0:
print_r($var);
break;
case 1:
var_dump($var);
break;
default:
print_r($var);
}
echo '</pre>';
exit;
}
}
//获取推广员提现状态
function promoteWithdrawStatus($status = null)
{
$statusData = [
-1 => '审核未通过',
0 => '待审核',
1 => '汇款中',
2 => '已汇款',
];
if (isset($statusData[$status])) {
return $statusData[$status];
}
return $statusData;
}

File diff suppressed because it is too large Load Diff

@ -38,16 +38,6 @@ class QueryController extends BaseController
$row = 10;
}
// $childPromoteIds = getAllChildPromoteList(3);
// if (empty($childPromoteIds)) {
// $map['tab_spend.promote_id'] = PID;
// } else {
// $childPromoteIds .= ',' . PID;
//
// $map['tab_spend.promote_id'] = ['in', $childPromoteIds];
// }
$map1['chain'] = ['like', '%' . PID . '/' . '%'];
$rs = M('promote', 'tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = '';
@ -200,16 +190,6 @@ class QueryController extends BaseController
$row = 10;
}
//$childPromoteIds = getAllChildPromoteList(3);
// if (empty($childPromoteIds)) {
// $map['tab_user.promote_id'] = PID;
// } else {
// $childPromoteIds .= ',' . PID;
//
// $map['tab_user.promote_id'] = ['in', $childPromoteIds];
// }
// $map['tab_user.promote_id'] = ['like','%'.PID.'/'.'%'];
$map1['chain'] = ['like', '%' . PID . '/' . '%'];
$rs = M('promote', 'tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = '';

@ -0,0 +1,238 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<style>
.selected-color {
color: #2bd8ed;
}
.pointer-hand {
cursor: pointer;
}
.icon-spend {
position: relative;
font-size: 1.2rem;
top: 3px;
float: right;
right: 10px;
}
.current {
display: inline-block;
margin-right: 10px;
padding-left: 10px;
padding-right: 10px;
height: 34px;
border: 1px solid #E5E5E5;
color: red;
border-radius: 4px;
line-height: 34px;
text-align: center;
}
.chakan {
display: inline-block;
margin-right: 10px;
padding-left: 10px;
padding-right: 10px;
height: 34px;
border: 1px solid #06C;
color: red;
border-radius: 4px;
line-height: 34px;
text-align: center;
}
</style>
</block>
<block name="body">
<div class="page-search normal_list query-register-search">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>下载管理></span><span>控制台</span></div>
</div>
<img src="__IMG__/20180207/icon_zhuce.png">
<span class="title_main">下载日志</span>
<span class="details">记录数据管理中导出数据事件</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('download/index')}" method="post" enctype="multipart/form-data">
<div class="form-group fl">
<input type="text" name="dataname" class="txt normal_txt" id="uid" placeholder="请输入数据名称"
value="{:I('dataname')}">
</div>
<div class="form-group fl" style='margin-left:10px'>
<input type="text" name="logid" class="txt normal_txt" id="lid" placeholder="输入日志编号"
value="{:I('logid')}">
</div>
<div class="form-group fl" style="margin-left:10px">
<select id="pid" name="pid" class="reselect select_gallery" style="min-width:200px;width: 175px;">
<option value="0">请选择推广员</option>
<volist name="promoteNameArr" id="vo">
<option value="{$vo.promote_id}" title="{$vo.name}">{$vo.name}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fl">
<label class="form-title select-title" style="position: relative;">申请时间:</label>
<div class="select-time">
<input type="text" id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{:I('begtime')}">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" id="edate" class="txt" name="endtime" placeholder="结束时间" value="{:I('endtime')}">
</div>
</div>
<div class="form-group normal_space fl">
<input type="submit" class="submit" id='submit' value="查询">
</div>
</form>
</div>
</div>
<div class="page-list query-register-list">
<div class="trunk-content article">
<div class="trunk-list list_normal" style="">
<table class="table normal_table">
<tr class="odd">
<th>ID</th>
<th>报表类型</th>
<th>操作人</th>
<th>申请时间</th>
<th>下载时间</th>
<th>状态</th>
</tr>
<empty name="data">
<tr class="num2">
<td colspan="8" style="text-align: center;height: 45vh;">
<img src="__IMG__/20180207/icon_wushujv2.png"/>
<p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
</td>
</tr>
<else/>
<volist name="data" id="vo">
<tr class="num2">
<td>{$vo.logid}</td>
<td>{$vo.dataname}</td>
<td>{$vo.actor}</td>
<td>{$vo.addtime|date='Y-m-d H:i:s',###}</td>
<td>
<if condition="$vo['begintime'] neq 0">
{$vo.begintime|date='Y-m-d H:i:s',###}
<else />
暂无下载时间
</if>
</td>
<td>
<if condition="$vo['status'] eq 0">
<a href="{:U('download/export',array('conditions'=>$vo['conditions'],'id'=>$vo['id'],'dataname'=>$vo['dataname']))}" style="cursor: pointer"
class="chakan"><span>可下载</span></a>
<else /> <a href="javascript:;" class="current"><span style="color:#9D9D9D">已下载</span></a>
</if>
</td>
</tr>
</volist>
</empty>
</table>
</div>
<div class="pagenation clearfix">
{$_page}
</div>
</div>
</div>
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<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 type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
$().ready(function () {
setValue('team_leader_id', {$Think.request.team_leader_id |default = '""'});
setValue('promote_id', {$Think.request.promote_id |default = 0});
setValue('row', '{:I("get.row",10)}');
var date = "{$setdate}";
$('#sdate').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
scrollMonth: false,
scrollTime: false,
scrollInput: false,
endDate: date
});
$('#edate').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
pickerPosition: 'bottom-left',
scrollMonth: false,
scrollTime: false,
scrollInput: false,
endDate: date
});
$('#own').on('click',function () {
var ownId = $('#own_id').val();
var checkBox = $(this).children('i');
if (ownId > 0) {
checkBox.removeClass('iconfangxingxuanzhongfill');
checkBox.removeClass('selected-color');
checkBox.addClass('iconfangxingweixuanzhong');
$('#own_id').val(0);
} else {
checkBox.removeClass('iconfangxingweixuanzhong');
checkBox.addClass('iconfangxingxuanzhongfill');
checkBox.addClass('selected-color');
$('#own_id').val({$pID});
}
});
$("#pagehtml a").on("click", function (event) {
event.preventDefault();//使a自带的方法失效即无法调整到href中的URL(http://www.baidu.com)
var geturl = $(this).attr('href');
$('#data_form').attr('action', geturl);
$('#data_form').submit();
});
$(".select_gallery").select2();
$('.submit').click(function () {
var sdate = $('#sdate').val();
var edate = $('#edate').val();
if (Date.parse(sdate) > Date.parse(edate)) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
});
});
</script>
<script>
setValue('pid', {$Think.request.pid |default = '""'});
</script>
</block>

@ -77,6 +77,8 @@
</table>
</div>
<div class="pagenation clearfix">
<a id="sch-btn" href="{:U('download/financeindex_data_export',array_merge(['xlsname'=>'ceshi'],I('get.')))}" class="ajax-get">
导出</a>
{$_page}
</div>
</div>

@ -155,6 +155,7 @@
</table>
</div>
<div class="pagenation clearfix">
<a id="sch-btn" data-href="{:U('download/settlementDtl_data_export',array_merge(['xlsname'=>'ceshi'],I('get.')))}" class="ajax-get">导出</a>
{$_page}
</div>
</div>

@ -188,6 +188,7 @@
</table>
</div>
<div class="pagenation clearfix">
<a id="sch-btn" data-href="{:U('download/withdrawDtl_data_export',array_merge(['xlsname'=>'ceshi'],I('get.')))}" class="ajax-get">导出</a>
{$_page}
</div>
</div>

@ -180,6 +180,7 @@
</table>
</div>
<div class="pagenation clearfix">
<a id="sch-btn" data-href="{:U('download/withdrawRecord_data_export',array_merge(['xlsname'=>'ceshi'],I('get.')))}" class="ajax-get">导出</a>
{$_page}
</div>
</div>

@ -123,6 +123,7 @@
</div>
<div class="pagenation clearfix">
<a id="sch-btn" data-href="{:U('download/children_data_export',array_merge(['promote_type'=>I('promote_type')],I('post.')))}" class="ajax-get" >导出</a>
{$pagination}
</div>
</div>

@ -0,0 +1,443 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
</block>
<block name="body">
<div class="page-list normal_list promote-mychlid-list">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>管理中心></span><span>组长管理</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_ziqudao.png">
<span class="title_main">组长列表</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('Promote/mychlid',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data">
<div class="form-group fl normal_space">
<a href="{:U('Promote/add_chlid', ['type' => 1])}" class="submit btn"><i class="add_qudao"></i><span>添加组长</span></a>
</div>
<div class="form-group fr">
<input type="submit" class="submit normal_space" value="查询">
</div>
<div class="form-group fr normal_space">
<select name="status" class="reselect select_gallery" style="width: 220px;" >
<option value="all">请选择状态</option>
<option value="1" <if condition="I('status') === '1'">selected</if>>启用</option>
<option value="2" <if condition="I('status') === '2'">selected</if>>冻结中</option>
</select>
</div>
<div class="form-group fr normal_space">
<input type="text" name="real_name" class="txt normal_txt" id="uid" placeholder="请输入姓名" value="{:I('real_name')}">
</div>
<div class="form-group fr normal_space">
<input type="text" name="mobile" class="txt normal_txt" id="uid" placeholder="请输入手机号" value="{:I('mobile')}">
</div>
<div class="form-group fr normal_space">
<input type="text" name="idcard" class="txt normal_txt" id="uid" placeholder="请输入身份证" value="{:I('idcard')}">
</div>
<div class="form-group fr normal_space">
<input type="text" name="account" class="txt normal_txt" id="uid" placeholder="请输入帐号" value="{:I('account')}">
</div>
</form>
</div>
<div class="trunk-list list_normal">
<table class="table normal_table">
<tr class="odd">
<th>ID</th>
<th>帐号</th>
<th>真实姓名</th>
<th>身份证</th>
<th>手机号</th>
<th>上级渠道</th>
<th>昵称</th>
<th>帐号状态</th>
<th>创建时间</th>
<th>操作</th>
</tr>
<empty name="list_data">
<tr><td colspan="10" style="text-align: center;height: 45vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td></tr>
<else />
<volist name="list_data" id="vo" mod="2">
<tr data-id="{$vo.id}" class="<eq name='mod' value='1'>odd</eq>">
<td>{$vo.id}</td>
<td class="account">{$vo.account}</td>
<td class="real-name">{$vo.real_name}</td>
<td>{$vo.idcard}</td>
<td>{$vo.mobile_phone}</td>
<td><?= $parentPromotes[$vo['parent_id']] ?></td>
<td>{$vo.nickname}</td>
<td>
<if condition="$vo['status'] eq 0">
<span class="status_close">审核中</span>
<elseif condition="$vo['status'] eq 1"/>
启用
<elseif condition="$vo['status'] eq 2"/>
<span class="status_close">冻结中</span>
<else />
<span class="status_close">未知状态</span>
</if>
</td>
<td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
<td>
<a href="{:U('Promote/edit_chlid','id='.$vo['id'])}" class="editbtn">修改</a>
<if condition="$vo['status'] eq 1">
<a href="javascript:;" class="froze-btn editbtn">冻结</a>
<elseif condition="$vo['status'] eq 2"/>
<a href="javascript:;" style="color: red;" class="unfreeze-btn editbtn">解冻</a>
</if>
<a href="javascript:;" class="reset-password-btn editbtn">重置密码</a>
<?php if(in_array($vo['id'], $hasChildList)):?>
<?php if(!in_array($vo['id'], $hasShiftList)):?>
<a href="javascript:;" class="shift-btn editbtn">渠道迁移</a>
<?php else:?>
<a href="javascript:;" style="color: red;" class="cancel-shift-btn editbtn">取消渠道迁移</a>
<?php endif;?>
<?php endif;?>
<?php if(in_array($vo['id'], $hasPlayerList)):?>
<?php if(!in_array($vo['id'], $hasShiftPlayerList)):?>
<a href="javascript:;" class="shift-player-btn editbtn">玩家迁移</a>
<?php else:?>
<a href="javascript:;" style="color: red;" class="cancel-shift-player-btn editbtn">取消玩家迁移</a>
<?php endif;?>
<?php endif;?>
</td>
</tr>
</volist>
</empty>
</table>
</div>
<div class="pagenation clearfix">
<!-- <a class="sch-btn" href="{:U('Export/child',array(
'p'=>I('p'),
'account'=>I('account'),'xlsname'=>'管理中心_'.get_pro_grade_name(PRO_GRADE,1),'row'=>I('request.row')
))}" >导出</a>-->
<a id="sch-btn" data-href="{:U('download/children_data_export',array_merge(['promote_type'=>I('promote_type')],I('post.')))}" class="ajax-get" >导出</a>
{$_page}
</div>
</div>
<div class="page-explain promote-mychlid-explain">
<div class="trunk-content article border_normal">
<!-- <table class="desccontent">
<tr><td class="title" style="width: 100px;display: inline-block;">二级渠道说明:</td><td class="det">推广员默认为一级渠道,一级渠道可通过推广员后台新增二级渠道;二级渠道由一级渠道管理开启权限,并由一级渠道给二级渠道结算,结算可到财务管理操作。</td></tr>
</table>-->
</div>
</div>
</div>
<script>
setValue('row','{:I("get.row",10)}');
</script>
<div id="shift-box" class="layer-box" style="display: none;">
<form action="{:U('Promote/mychlid',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data">
<input type="hidden" name="promote_id" value="">
<div class="form-group">
<label>账号(真实姓名)</label>
<div class="form-item">
<p class="static-input show-account"></p>
</div>
</div>
<div class="form-group">
<label>转移至推广账号</label>
<div class="form-item">
<select name="to_promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择推广账号</option>
<volist name="promotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}">{$promote.account}</option>
</volist>
</select>
</div>
</div>
<div class="form-group">
<label>指定订单日期</label>
<div class="form-item">
<input type="text" id="shift-order-time" autocomplete="off" class="form-input" name="order_time" placeholder="订单日期"" value="" style="width: 199px;">
</div>
</div>
<div class="form-group">
<label>平台币管理</label>
<div class="form-item">
<label class="radio-item"><input type="radio" value="1" name="balance_coin_mode" checked> 平台币平移最高账户</label>
<label class="radio-item"><input type="radio" value="2" name="balance_coin_mode"> 平台币清零</label>
</div>
</div>
<div class="form-group">
<label></label>
<a id="shift-submit" href="javascript:;" class="shift-submit btn">确定</a>
</div>
</form>
</div>
<div id="shift-player-box" class="layer-box" style="display: none;">
<form action="{:U('Promote/mychlid',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data">
<input type="hidden" name="promote_id" value="">
<div class="form-group">
<label>账号(真实姓名)</label>
<div class="form-item">
<p class="static-input show-account"></p>
</div>
</div>
<div class="form-group">
<label>转移至推广账号</label>
<div class="form-item">
<select name="to_promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择推广账号</option>
<volist name="subPromotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}">{$promote.account}</option>
</volist>
</select>
</div>
</div>
<div class="form-group">
<label>指定订单日期</label>
<div class="form-item">
<input type="text" id="shift-player-order-time" autocomplete="off" class="form-input" name="order_time" placeholder="订单日期"" value="" style="width: 199px;">
</div>
</div>
<div class="form-group">
<label></label>
<a id="shift-player-submit" href="javascript:;" class="shift-submit btn">确定</a>
</div>
</form>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<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 type="text/javascript">
$(function(){
$(".select_gallery").select2();
$('#shift-player-order-time').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true,
scrollMonth:false,
scrollTime:false,
scrollInput:false
});
$('#shift-order-time').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true,
scrollMonth:false,
scrollTime:false,
scrollInput:false
});
$('.reset-password-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
layer.confirm('是否确认重置密码?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:U('Promote/resetPassword')}",
data: {promote_id: id},
type: 'post',
dataType: 'json',
success: function(response) {
layer.close(index)
if (response.status == 1) {
layer.open({
content: '重置密码成功,您的新密码为:' + response.data.password
})
} else {
layer.msg(response.msg)
}
}
})
})
}
})
$('.froze-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
layer.confirm('是否确认冻结帐号?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:U('Promote/froze')}",
data: {promote_id: id},
type: 'post',
dataType: 'json',
success: function(response) {
layer.msg(response.msg, {time: 1000}, function() {
window.location.href = window.location.href
})
}
})
})
}
})
$('.unfreeze-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
layer.confirm('是否确认解冻帐号?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:U('Promote/unfreeze')}",
data: {promote_id: id},
type: 'post',
dataType: 'json',
success: function(response) {
layer.msg(response.msg, {time: 1000}, function() {
window.location.href = window.location.href
})
}
})
})
}
})
$('.cancel-shift-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
layer.confirm('是否要取消渠道迁移?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:U('Promote/cancelShift')}",
data: {promote_id: id, type: 1},
type: 'post',
dataType: 'json',
success: function(response) {
layer.msg(response.msg, {time: 1000}, function() {
window.location.href = window.location.href
})
}
})
})
}
})
$('.cancel-shift-player-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
layer.confirm('是否要取消玩家迁移?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:U('Promote/cancelShift')}",
data: {promote_id: id, type: 2},
type: 'post',
dataType: 'json',
success: function(response) {
layer.msg(response.msg, {time: 1000}, function() {
window.location.href = window.location.href
})
}
})
})
}
})
$('.shift-btn').on({
click: function() {
var box = $('#shift-box')
var id = $(this).parents('tr').eq(0).attr('data-id')
var account = $(this).parents('tr').eq(0).find('td.account').html()
var realName = $(this).parents('tr').eq(0).find('td.real-name').html()
box.find('.show-account').html(account + (realName == '' ? '' : '(' + realName + ')'))
box.find('[name=promote_id]').val(id)
layer.open({
title: '渠道迁移',
type: 1,
content: box,
area: ['600px', '350px'],
zIndex: 250,
})
}
})
$('#shift-submit').on({
click: function() {
var box = $('#shift-box')
var id = box.find('[name=promote_id]').val()
var toPromoteId = box.find('[name=to_promote_id]').val()
var orderTime = box.find('[name=order_time]').val()
var balanceCoinMode = box.find('[name=balance_coin_mode]:checked').val()
if (toPromoteId == 0) {
layer.msg('请选择转移至的推广账号')
return
}
var data = {
from_promote_id: id,
to_promote_id: toPromoteId,
order_time: orderTime,
balance_coin_mode: balanceCoinMode,
type: 1,
}
$.ajax({
url: "{:U('Promote/shift')}",
data: data,
type: 'post',
dataType: 'json',
success: function(response) {
if (response.status) {
layer.msg(response.msg, {time: 2000}, function() {
window.location.href = window.location.href
})
} else {
layer.msg(response.msg)
}
}
})
}
})
$('.shift-player-btn').on({
click: function() {
var box = $('#shift-player-box')
var id = $(this).parents('tr').eq(0).attr('data-id')
var account = $(this).parents('tr').eq(0).find('td.account').html();
var realName = $(this).parents('tr').eq(0).find('td.real-name').html();
box.find('.show-account').html(account + (realName == '' ? '' : '(' + realName + ')'))
box.find('[name=promote_id]').val(id)
layer.open({
title: '玩家迁移',
type: 1,
content: box,
area: ['600px', '350px'],
zIndex: 250,
})
}
})
$('#shift-player-submit').on({
click: function() {
var box = $('#shift-player-box')
var id = box.find('[name=promote_id]').val()
var toPromoteId = box.find('[name=to_promote_id]').val()
var orderTime = box.find('[name=order_time]').val()
var balanceCoinMode = box.find('[name=balance_coin_mode]:checked').val()
if (toPromoteId == 0) {
layer.msg('请选择转移至的推广账号')
return
}
var data = {
from_promote_id: id,
to_promote_id: toPromoteId,
order_time: orderTime,
balance_coin_mode: balanceCoinMode,
type: 2,
}
$.ajax({
url: "{:U('Promote/shift')}",
data: data,
type: 'post',
dataType: 'json',
success: function(response) {
if (response.status) {
layer.msg(response.msg, {time: 2000}, function() {
window.location.href = window.location.href
})
} else {
layer.msg(response.msg)
}
}
})
}
})
})
</script>
</block>

@ -193,6 +193,7 @@
</div>
<div class="pagenation clearfix">
<!-- <a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>8,'xlsname'=>'会长福利_平台币入账记录'),I('post.')))}" >导出</a>-->
<a id="sch-btn" href="{:U('download/mycoin_data_export',array_merge(['promote_type'=>'xxx'],I('get.')))}" class="ajax-get" >导出</a>
{$_page}
</div>
</div>

@ -103,6 +103,7 @@
</table>
<div class="pagenation clearfix">
<a id="sch-btn" href="{:U('download/coinrecord_data_export',array_merge(['promote_type'=>'xxx'],I('post.')))}" class="ajax-get" >导出</a>
{$pagination}
</div>
</div>

@ -94,7 +94,7 @@
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>安全管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<!-- <a href="{:U('Apply/app_index')}" class="<if condition='CONTROLLER_NAME eq Apply and ACTION_NAME eq app_index '>active</if> ">APP列表</a>-->
<a href="{:U('Download/index')}" class="<if condition='CONTROLLER_NAME eq Download and (ACTION_NAME eq index or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">下载日志管理</a>
<a href="{:U('Download/listsindex')}" class="<if condition='CONTROLLER_NAME eq Apply and (ACTION_NAME eq index or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">下载日志管理</a>
<a href="{:U('Safe/modifyloginpassword')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq modifyloginpassword or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">修改登录密码</a>
<a href="{:U('Safe/setSafeIndex')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq setSafeIndex or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">设置安全密码</a>
<a href="{:U('Safe/modifyBaseInfo')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq modifyBaseInfo or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">用户基本信息</a>

@ -129,6 +129,7 @@
</div>
<div class="pagenation clearfix">
<a id="sch-btn" data-href="{:U('download/achievement_data_export',array_merge(['parent_id'=>$parentid],I('post.')))}" class="ajax-get">导出</a>
{$pagination}
</div>
</div>

@ -205,6 +205,10 @@
</table>
</table>
</div>
<div class="pagenation clearfix">
<a id="sch-btn" data-href="{:U('download/arpu_data_export',array_merge(['xlsname'=>'ceshi'],I('post.')))}" class="ajax-get">导出</a>
</div>
</div>
</div>
</div>
@ -300,7 +304,8 @@ var gameId = $('#game-select').val();
}
});
}
var promoteUrl = "{:U('Query/getSubPromotes')}"
initPromoteSelect(promoteUrl)
</script>
</block>

@ -237,6 +237,9 @@
</volist>
</empty>
</table>
</div>
<div class="pagenation clearfix">
<p id="sch-btn" data-href="{:U('download/dailysummary_data_export',array_merge(['xlsname'=>'ceshi'],I('get.')))}" class="ajax-get">导出</p>
</div>
<div style="margin-bottom: 150px;">

@ -220,6 +220,7 @@
</table>
</div>
<div class="pagenation clearfix">
<a id="sch-btn" data-href="{:U('download/recharge_data_export',array_merge(['xlsname'=>'ceshi'],I('get.')))}" class="ajax-get">导出</a>
{$_page}
</div>
</div>

@ -134,6 +134,7 @@
</table>
</div>
<div class="pagenation clearfix">
<a id="sch-btn" data-href="{:U('download/regist_data_export',array_merge(['xlsname'=>'ceshi'],I('post.')))}" class="ajax-get">导出</a>
{$_page}
</div>
</div>

@ -208,6 +208,7 @@
</table>
</div>
<div class="pagenation clearfix">
<a id="sch-btn" data-href="{:U('download/summary_data_export',array_merge(['xlsname'=>'ceshi'],I('get.')))}" class="ajax-get">导出</a>
{$_page}
</div>
</div>

@ -108,6 +108,7 @@
</div>
<div class="pagenation clearfix">
<a id="sch-btn" data-href="{:U('download/userRecharge_data_export',array_merge(['xlsname'=>'ceshi'],I('post.')))}" class="ajax-get">导出</a>
{$pagination}
</div>
</div>

@ -107,6 +107,7 @@
</div>
<div class="pagenation clearfix">
<a id="sch-btn" data-href="{:U('download/userRoles_data_export',array_merge(['xlsname'=>'ceshi'],I('post.')))}" class="ajax-get">导出</a>
{$pagination}
</div>
</div>

@ -292,7 +292,7 @@
</div>
<div class="pagenation clearfix">
<a id="sch-btn" href="{:U('download/testresource_data_export',array_merge(['promote_type'=>'xxx'],I('get.')))}" class="ajax-get" >导出</a>
{$_page}
</div>

@ -155,7 +155,10 @@
</empty>
</table>
<div class="pagenation clearfix">{$_page}</div>
<div class="pagenation clearfix">
<a id="sch-btn" href="{:U('download/testresourcelists_data_export',array_merge(['promote_type'=>'xxx'],I('get.')))}" class="ajax-get" >导出</a>
{$_page}
</div>
</div>
</div>
</div>

@ -177,7 +177,10 @@
</empty>
</table>
<div class="pagenation clearfix">{$_page}</div>
<div class="pagenation clearfix">
<a id="sch-btn" href="{:U('download/supportNumberList_data_export',array_merge(['promote_type'=>'xxx'],I('get.')))}" class="ajax-get" >导出</a>
{$_page}
</div>
</div>
</div>
</div>

@ -358,3 +358,6 @@ CREATE TABLE `tab_device_bans` (
-- 2019-11-07 elf 迁移任务
ALTER TABLE `sys_shift_task` ADD COLUMN `shift_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '迁移ID';
ALTER TABLE `sys_shift_task` ADD COLUMN `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注';
-- 2019-11-07 cxj
ALTER TABLE `platform_query`.`tab_withdraw` ADD COLUMN `transfer_proof` int(11) NOT NULL DEFAULT 0 COMMENT '汇款证明' AFTER `settlement_end_time`;

@ -288,6 +288,28 @@ input,select,button{outline:none;font-size:14px;font-family:inherit;}
position:relative;padding:0 5px 0 0;
}
.pagenation #sch-btn:before{
content:url(../../images/20180207/icon_daochu1.png);
position:relative;padding:0 5px 0 0;
}
#sch-btn {
font-size: 14px;
font-weight: normal;
cursor: pointer;
border-radius: 3px;
text-align: center;
border-bottom: none;
float: right;
width: 70px;
background: transparent;
color: #404040;
border: 1px solid #ccc;
margin-left: 8px;
height: 28px;
line-height: 28px;
}
.pagenation .totalvalue {float:right;border:none;}

@ -28,7 +28,7 @@ $(function(){
return false;
}
}
if ( (target = $(this).attr('href')) || (target = $(this).attr('url')) ) {
if ( (target = $(this).attr('data-href')) || (target = $(this).attr('url')) || (target = $(this).attr('href')) ) {
$.get(target).success(function(data){
if (data.status==1) {
if (data.url) {
@ -140,10 +140,10 @@ $(function(){
window.updateAlert = function (text,status,c) {
switch(status){
case 1:
layer.msg(text, {icon: 1});
layer.msg(text, {icon: 2});
break;
default:
layer.msg(text, {icon: 2});
layer.msg(text, {icon: 1});
break;
}
}

Loading…
Cancel
Save