Merge branch 'feature/promote' of 47.111.118.107:/srv/git/platform into feature/promote

master
chenzhi 5 years ago
commit 0df9045e67

@ -97,7 +97,7 @@ unset($_REQUEST['parent_id']);
parent::order_lists(self::model_name,$p,$map);
}
private function siteApplyList($request,$p){
private function siteApplyList($p){
if(isset($_REQUEST['promote_id'])){
$map['promote_id']=$_REQUEST['promote_id'];
unset($_REQUEST['promote_id']);

@ -8,7 +8,8 @@ class PromoteRepository {
}
private function assembleZero($allKeys, $records, $zeroValue) {
private function assembleZero($allKeys, $records, $zeroValue)
{
$noExistKeys = array_diff($allKeys, array_keys($records));
foreach ($noExistKeys as $key) {
$records[$key] = $zeroValue;

@ -762,7 +762,7 @@ class PromoteService {
public function getLevelName($level)
{
return self::levels[$level] ?? '未知';
return self::$levels[$level] ?? '未知';
}
public function addPromote($params, $parent = null)

@ -13,5 +13,75 @@ use Base\Repository\UserRepository;
*/
class FinanceController extends BaseController
{
public function settlementDtl()
{
$model = M('spend', 'tab_');
$page = intval(I('get.p', 1));
$page = $page ? $page : 1; //默认显示第一页数据arraypage
$row = intval(I('get.row', 10));
$payOrderNumber = I('pay_order_number', '');
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
$initEndTime = $nowTime;
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$loginPromote = $this->getLoginPromote();
$parameter['p'] = $page;
$parameter['row'] = $row;
$parameter['pay_order_number'] = $payOrderNumber;
$parameter['begtime'] = $initBegTime;
$parameter['endtime'] = $initEndTime;
$map['chain'] = ['like', $loginPromote['chain'] . $loginPromote['id'] . '/%'];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$ids[] = $loginPromote['id'];
$ids = implode(',', $ids);
// var_dump($ids);
// die;
$map = [];
$map['promote_id'] = ['in', $ids];
if (!empty($payOrderNumber)) {
$map['pay_order_number'] = $payOrderNumber;
}
if (!empty($begTime) && empty($endTime)) {
$map['pay_time'] = ['egt', $begTime];
} elseif (empty($begTime) && !empty($endTime)) {
$map['pay_time'] = ['elt', $endTime + 86399];
} elseif (!empty($begTime) && !empty($endTime)) {
$map['pay_time'] = ['between', [$begTime, $endTime + 86399]];
}
$data = $model->field('pay_order_number,game_name,user_account,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,convert(pay_amount*if(selle_ratio >= 0,selle_ratio,0),decimal(10,2)) as income,pay_time,selle_status')
->where($map)
->order('id desc')
->page($page, $row)
->select();
$count = $model->where($map)->count();
foreach ($data as &$list) {
switch ($list['selle_status']) {
case 0:
$list['selle_status'] = '未提现';
break;
default:
$list['selle_status'] = '';
break;
}
$list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']);
}
$page = set_pagination($count, $row, $parameter);
$this->assign('listData', $data);
$this->assign('count', $count);
$this->assign('initBegTime', $initBegTime);
$this->assign('initEndTime', $initEndTime);
$this->assign('_page', $page);
$this->assign('meta_title', '结算明细');
$this->display();
}
}

@ -588,13 +588,9 @@ class PromoteCoinController extends BaseController
if ($promoteCoin['source_type'] == 2) {
return '玩家转账';
} else {
if ($promote['parent_id'] == 1) {
return '会长转账';
} elseif ($promote['parent_id'] > 0 && $promote['grand_id'] == 0) {
return '组长转账';
} elseif ($promote['grand_id'] > 0) {
return '推广员转账';
}
$promoteService = new PromoteService();
$levelName = $promoteService->getLevelName($promote['level']);
return $levelName . '转账';
}
}
@ -760,9 +756,10 @@ class PromoteCoinController extends BaseController
{
$account = I('account', '');
$mobile = I('mobile', '');
$id = session('promote_auth.pid');
$promoteIds = D('Promote')->field('id')->where('parent_id=' . $id . ' or grand_id=' . $id)->select();
$promoteIds = array_merge(array_column($promoteIds, 'id'), [$id]);
$promote = $this->getLoginPromote();
$map = ['chain' => ['like', $promote['chain'] . $promote['id'] . '/%']];
$promoteIds = D('Promote')->field('id')->where($map)->getField('id', true);
$promoteIds[] = $id;
$rows = D('UserPlay')->field(['id', 'user_id'])->where(['promote_id' => ['in', $promoteIds]])->select();
$map = [];

@ -7,6 +7,7 @@ use User\Api\PromoteApi;
use Base\Repository\PromoteRepository;
use Base\Repository\SpendRepository;
use Base\Repository\UserRepository;
use Base\Service\PromoteService;
/**
* 前台首页控制器
@ -705,21 +706,13 @@ class QueryController extends BaseController
$sdkVersion = I('sdk_version', 0);
$gameId = I('game_id', 0);
$serverId = I('server_id', 0);
$promoteId = I('promote_id', 0);
$subPromoteId = I('sub_promote_id', 0);
$promote = $this->getLoginPromote();
$searchPromote = $promote;
if ($promoteId > 0) {
$searchPromote = M('promote', 'tab_')->where(['id' => $promoteId])->find();
}
if ($subPromoteId > 0) {
$searchPromote = M('promote', 'tab_')->where(['id' => $subPromoteId])->find();
}
$map = [
$levelPromote = $this->getLevelPromote();
$searchPromote = $this->getQueryPromote($levelPromote);
$map[] = [
'_logic' => 'or',
'id' => $searchPromote['id'],
'parent_id' => $searchPromote['id'],
'grand_id' => $searchPromote['id'],
'chain' => ['like', $searchPromote['chain'] . $searchPromote['id'] . '/%']
];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
@ -795,11 +788,10 @@ class QueryController extends BaseController
public function gameArpu()
{
$promote = $this->getLoginPromote();
$map = [
$map[] = [
'_logic' => 'or',
'id' => $promote['id'],
'parent_id' => $promote['id'],
'grand_id' => $promote['id'],
'chain' => ['like', $promote['chain'] . $promote['id'] . '/%']
];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
@ -1649,42 +1641,6 @@ class QueryController extends BaseController
$this->display('view_role');
}
public function users()
{
$promote = $this->getLoginPromote();
$promoteId = $promote['id'];
$map = [
'_logic' => 'or',
'id' => $promoteId,
'parent_id' => $promoteId,
'grand_id' => $promoteId,
];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$promotes = [];
$groupPromotes = [];
if ($promote['parent_id'] == 0) {
$groupPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promoteId])->select();
$promotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['grand_id' => $promoteId])->select();
}
if ($promote['parent_id'] > 0 && $promote['grand_id'] == 0) {
$promotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promoteId])->select();
}
$fields = [
'id', 'account', 'promote_account', 'promote_id', 'device_number', 'register_time', 'register_ip', 'login_time', 'login_ip', 'device_type'
];
$query = M('user', 'tab_')->field($fields)->where(['promote_id' => ['in', $ids]]);
list($records, $pagination, $count) = $this->paginate($query);
$this->assign('promotes', $promotes);
$this->assign('groupPromotes', $groupPromotes);
$this->assign('records', $records);
$this->assign('pagination', $pagination);
$this->assign('count', $count);
$this->display();
}
private function getLevelPromote()
{
$levelPromote = [];
@ -1933,17 +1889,6 @@ class QueryController extends BaseController
return $promotes;
}
private function getNormalPromotes($promote)
{
$promotes = [];
if ($promote['parent_id'] > 0 && $promote['grand_id'] == 0) {
$promotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promote['id']])->select();
} elseif ($promote['parent_id'] == 0) {
$promotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['grand_id' => $promote['id']])->select();
}
return $promotes;
}
public function getGameServers()
{
$gameId = I('game_id', 0);
@ -2018,29 +1963,36 @@ class QueryController extends BaseController
$parentId = I('parent_id', 0);
$promoteId = I('promote_id', 0);
$status = I('status', 0);
$searchLevel = 0;
$searchLevelName = '';
$currentDisplay = '';
$prevParentId = 0;
$promoteService = new PromoteService();
$loginPromote = $this->getLoginPromote();
$promote = null;
$searchPromoteType = 0;
$parent = null;
if ($parentId > 0) {
$promote = M('promote', 'tab_')->where(['id' => $parentId])->find();
$searchPromoteType = 2;
$parent = M('promote', 'tab_')->where(['id' => $parentId])->find();
$currentDisplay = $promoteService->getLevelName($parent['level']) . '推广';
$prevParentId = $parent['parent_id'] == $loginPromote['parent_id'] ? 0 : $parent['parent_id'];
} else {
$promote = $loginPromote;
$searchPromoteType = 1;
$parent = $loginPromote;
$currentDisplay = '自己';
}
$searchLevel = $parent['level'] + 1;
$searchLevelName = $promoteService->getLevelName($searchLevel);
$games = $this->getGamesByPromote($promote);
$games = $this->getGamesByPromote($parent);
$subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promote['id']])->select();
$subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $parent['id']])->select();
$map = ['parent_id' => $promote['id']];
$map = ['parent_id' => $parent['id']];
if ($promoteId > 0) {
$map['id'] = $promoteId;
}
$query = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where($map);
$query = M('promote', 'tab_')->field(['id', 'account', 'real_name', 'level'])->where($map);
list($promotes, $pagination, $count) = $this->paginate($query);
$ids = array_column($promotes, 'id');
@ -2099,9 +2051,10 @@ class QueryController extends BaseController
$selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$promote['id']], $selfParams);
$records[] = [
'id' => $promote['id'],
'account' => $promote['account'],
'real_name' => $promote['real_name'],
'id' => $parent['id'],
'account' => $parent['account'],
'real_name' => $parent['real_name'],
'level' => $parent['level'],
'create_role_count' => $selfCreateRoleCountList[$promote['id']],
'create_role_user_count' => $selfCreateRoleUserCountList[$promote['id']],
'new_create_role_user_count' => $selfNewCreateRoleUserCountList[$promote['id']],
@ -2114,16 +2067,16 @@ class QueryController extends BaseController
'recharge_by_ban_coin' => $selfRechargeAmountList[$promote['id']]['ban_coin'],
'recharge_by_coin' => $selfRechargeAmountList[$promote['id']]['coin'],
'recharge_by_cash' => $selfRechargeAmountList[$promote['id']]['cash'],
'search_promote_type' => $searchPromoteType,
'current_display' => $currentDisplay,
];
}
foreach ($promotes as $promote) {
$id = $promote['id'];
$records[] = [
'id' => $id,
'account' => $promote['account'],
'real_name' => $promote['real_name'],
'level' => $promote['level'],
'create_role_count' => $createRoleCountList[$id],
'create_role_user_count' => $createRoleUserCountList[$id],
'new_create_role_user_count' => $newCreateRoleUserCountList[$id],
@ -2136,23 +2089,14 @@ class QueryController extends BaseController
'recharge_by_ban_coin' => $rechargeAmountList[$id]['ban_coin'],
'recharge_by_coin' => $rechargeAmountList[$id]['coin'],
'recharge_by_cash' => $rechargeAmountList[$id]['cash'],
'search_promote_type' => 0,
'current_display' => '',
];
}
$level = 0;
if ($parentId > 0) {
$level = 2;
} elseif ($loginPromote['parent_id'] == 0) {
$level = 1;
} elseif ($loginPromote['parent_id'] > 0 && $loginPromote['grand_id'] == 0) {
$level = 2;
} elseif ($loginPromote['parent_id'] > 0 && $loginPromote['grand_id'] > 0) {
$level = 3;
}
$this->assign('prevParentId', $prevParentId);
$this->assign('searchLevelName', $searchLevelName);
$this->assign('games', $games);
$this->assign('level', $level);
$this->assign('parent', $parent);
$this->assign('subPromotes', $subPromotes);
$this->assign('records', $records);
$this->assign('pagination', $pagination);

@ -0,0 +1,227 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/manager.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css?v=1.2" rel="stylesheet">
</block>
<block name="body">
<style>
@media screen and (max-width: 1500px) {
.normal_form {
padding-top: 45px;
}
.trunk-search .normal_txt {
width: 100px
}
.select2-container--default .select2-selection--single {
width: 125px;
}
.trunk-search .select-time .txt {
width: 100px;
}
.form-group .submit {
width: 55px;
}
}
.selected-color {
color: #2bd8ed;
}
.pointer-hand {
cursor: pointer;
}
.icon-spend {
position: relative;
font-size: 1.2rem;
top: 3px;
float: right;
right: 10px;
}
.th-hide {
display: none;
}
.form-group {
float: left;
margin-bottom: 10px;
}
.form-group label {
line-height: 34px;
height: 34px;
}
.form-group .txt {
width: 180px;
height: 34px;
}
</style>
<div class="page-search normal_list query-recharge-search jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>财务管理></span><span>{$meta_title}</span></div>
</div>
<img src="__IMG__/20180207/icon_chongzhi.png">
<span class="title_main">{$meta_title}</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<div class="tab normal_tab">
</div>
<!-- <form action="{:U('Finance/settlementDtl')}" method="get" enctype="multipart/form-data" class="normal_form"> -->
<div class="form-group normal_space">
<input type="text" name="pay_order_number" class="txt normal_txt" placeholder="请输入游戏订单号"
value="{:I('pay_order_number','')}">
</div>
<div class="form-group normal_space">
<label class="form-title select-title" style="position: relative;">充值时间:</label>
<div class="select-time">
<input type="text" readonly id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{$initBegTime}">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" readonly id="edate" class="txt" name="endtime" placeholder="结束时间" value="{$initEndTime}">
</div>
</div>
<div class="form-group normal_space">
<input type="submit" class="submit" id='submit' url="{:U('Finance/settlementDtl','model='.$model['name'],false)}"
value="查询">
</div>
<!-- </form> -->
</div>
</div>
<div class="page-list apply-app_apply-list query-recharge-list">
<div class="trunk-content article">
<div class="tabcon trunk-list">
<table class="table normal_table">
<tr class="odd">
<th>游戏订单号</th>
<th>游戏</th>
<th>玩家账号</th>
<th>推广员账号</th>
<th>订单总额</th>
<th>直充</th>
<th>内充</th>
<th>分成比例(直充|内充)</th>
<th>收益</th>
<th>充值时间</th>
<th>订单状态</th>
</tr>
<empty name="listData">
<tr class="num2">
<td colspan="99" 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="listData" id="vo">
<tr class="num2">
<td>{$vo.pay_order_number}</td>
<td>{$vo.game_name}</td>
<td>{$vo.user_account}</td>
<td>{$vo.promote_account}</td>
<td>{$vo.pay_amount}</td>
<if condition="$vo.pay_way eq -1">
<td>0</td>
<td>{$vo.pay_amount}</td>
<else/>
<td>{$vo.pay_amount}</td>
<td>0</td>
</if>
<td>{$vo.selle_ratio}%|{$vo.selle_ratio}%</td>
<td>{$vo.income}</td>
<td>{$vo.pay_time}</td>
<td>{$vo.selle_status}</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 src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>
<script type="text/javascript">
$().ready(function () {
$("#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();
});
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
});
$('#submit').click(function () {
var sdate = $('#sdate').val();
var edate = $('#edate').val();
if (Date.parse(sdate) > Date.parse(edate)) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
var url = $(this).attr('url');
console.log(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;
});
$(".select_gallery").select2();
});
</script>
</block>

@ -69,15 +69,15 @@
</div>
<?php endif;?>
<!-- <div class="subNav jssubNav"><i class="prev_icon icon_caiwu"></i><span>财务管理</span><i class="arrow_icon"></i></div> -->
<!-- <div class="navContent jsnavContent"> -->
<div class="subNav jssubNav"><i class="prev_icon icon_caiwu"></i><span>财务管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<!-- <a href="{:U('Query/my_earning')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq my_earning '>active</if> ">我的结算</a> -->
<a href="{:U('Finance/settlementDtl')}" class="<if condition='CONTROLLER_NAME eq Finance and ACTION_NAME eq settlementDtl '>active</if> ">结算明细</a>
<!-- <lt name="Think.const.PRO_GRADE" value="3"> -->
<!-- <a href="{:U('Query/son_earning')}" class="<if condition='CONTROLLER_NAME eq Query and (ACTION_NAME eq son_earning or ACTION_NAME eq son_list)'>active</if> ">子渠道结算</a> -->
<!-- </lt> -->
<!-- </div> -->
<lt name="Think.const.PRO_GRADE" value="3">
<a href="{:U('Query/son_earning')}" class="<if condition='CONTROLLER_NAME eq Query and (ACTION_NAME eq son_earning or ACTION_NAME eq son_list)'>active</if> ">子渠道结算</a>
</lt>
</div>
<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>-->
@ -107,8 +107,6 @@
<a href="{:U('TestResource/supportNumberList')}" class="<if condition='CONTROLLER_NAME eq TestResource and (ACTION_NAME eq supportNumberList or ACTION_NAME eq freezeSupport or ACTION_NAME eq unfreezeSupport or ACTION_NAME eq rechangePassward ) '>active</if> ">扶持号管理</a>
<a href="{:U('TestResource/protectLogList')}" class="<if condition='CONTROLLER_NAME eq TestResource and ACTION_NAME eq protectLogList '>active</if> ">日志管理</a>
</div>
<?php endif;?>
<!--<eq name="parent_id" value="0">
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>扶持管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">

@ -46,42 +46,29 @@
</select>
</div>
<div class="form-group normal_space">
<select name="status" class="reselect select_gallery" style="width: 220px;" >
<option value="0">帐号状态</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>
<if condition="I('parent_id', 0) eq 0 and $parent_id eq 0">
<div class="form-group normal_space">
<select name="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}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}({$promote.real_name})</option>
</volist>
<select name="status" class="reselect select_gallery" style="width: 220px;" >
<option value="0">帐号状态</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>
</if>
<if condition="I('parent_id', 0) neq 0 or ($parent_id gt 0 and $grand_id eq 0)">
<div class="form-group normal_space">
<select name="promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择推广员</option>
<option value="0">请选择{$searchLevelName}</option>
<volist name="subPromotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}</option>
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}({$promote.real_name})</option>
</volist>
</select>
</div>
</if>
<div class="form-group normal_space fr">
<!-- <label>起止时间:</label> -->
<input type="text" class="txt range-date" name="time" placeholder="起止时间" value="{:I('time', date('Y-m-d'))}" >
</div>
<div class="form-group">
<input type="submit" class="submit normal_space" value="查询">
</div>
<?php if (I('parent_id', 0) > 0):?>
<?php if ($prevParentId > 0):?>
<div class="form-group">
<a class="submit normal_space" href="{:U('Query/achievement', ['row'=>I('get.row')])}" style="line-height: 36px; display: inline-block; text-align: center; background: #E5E5E5; color: #2bd8ed; cursor: pointer;">返回上级</a>
<a class="submit normal_space" href="{:U('Query/achievement', ['row'=>I('get.row'), 'parent_id' => $prevParentId])}" style="line-height: 36px; display: inline-block; text-align: center; background: #E5E5E5; color: #2bd8ed; cursor: pointer;">返回上级</a>
</div>
<?php endif;?>
</form>
@ -102,7 +89,7 @@
<th>现金充值</th>
<th>通用币充值</th>
<th>绑定币充值</th>
<?php if($level == 1):?>
<?php if($parent['level'] < 4):?>
<th>操作</th>
<?php endif;?>
</tr>
@ -112,8 +99,9 @@
<volist name="records" id="record" mod="2">
<tr data-id="{$vo.id}" class="<eq name='mod' value='1'>odd</eq>">
<td>{$record.account}({$record.real_name})
<?php if($record['search_promote_type'] == 1):?><span style="color: #06C;">[自己]</span><?php endif;?>
<?php if($record['search_promote_type'] == 2):?><span style="color: #06C;">[组长推广]</span><?php endif;?>
<?php if($record['current_display'] != ''):?>
<span style="color: #06C;">[{$record['current_display']}]</span>
<?php endif;?>
</td>
<td>{$record.create_role_count}</td>
<td>{$record.create_role_user_count}</td>
@ -127,8 +115,12 @@
<td>{$record.recharge_by_cash}</td>
<td>{$record.recharge_by_coin}</td>
<td>{$record.recharge_by_ban_coin}</td>
<?php if($record['search_promote_type'] == 0 && $level == 1):?>
<td><a href="{:U('Query/achievement', ['parent_id' => $record['id']])}">查看下级</a></td>
<?php if($parent['level'] < 4):?>
<td>
<?php if($record['current_display'] == '' && $record['level'] < 4):?>
<a href="{:U('Query/achievement', ['parent_id' => $record['id']])}">查看下级</a>
<?php endif;?>
</td>
<?php endif;?>
</tr>
</volist>

@ -217,6 +217,7 @@
<script type="text/javascript" src="__JS__/20170831/pagination.js"></script>
<script type="text/javascript" src="__JS__/20170831/string.js"></script>
<script type="text/javascript" src="__JS__/20170831/tabpage.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>
<eq name='timeout' value='1'>
<script>
layer.msg('时间间隔不能超过30天');

@ -1,121 +0,0 @@
<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_game.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 fr">
<input type="submit" class="submit normal_space" value="查询">
</div>
<div class="form-group fr normal_space">
<input type="text" name="account" class="txt normal_txt" placeholder="请输入玩家帐号" value="{:I('account')}">
</div>
<div class="form-group fr normal_space">
<select name="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>
<if condition="$grand_id eq 0">
<div class="form-group fr normal_space">
<select name="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>
</if>
<if condition="$parent_id eq 0">
<div class="form-group fr normal_space">
<select name="headman_promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择组长</option>
<volist name="groupPromotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}">{$promote.account}</option>
</volist>
</select>
</div>
</if>
<div class="form-group normal_space fr">
<label>注册时间:</label>
<input type="text" id="search-play-time" class="txt" name="register_time" placeholder="注册时间" value="{:I('register_time')}" >
</div>
</form>
</div>
<div class="trunk-list list_normal">
<table class="table normal_table">
<tr class="odd">
<th>玩家帐号</th>
<th>推广账号</th>
<th>设备IMIE/IDFA</th>
<th>设备类型</th>
<th>注册时间</th>
<th>注册IP</th>
<th>最近登录时间</th>
<th>最近登陆IP</th>
<th>操作</th>
</tr>
<empty name="records">
<tr><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="records" id="record" mod="2">
<tr data-id="{$record.id}" class="<eq name='mod' value='1'>odd</eq>">
<td>{$record.account}</td>
<td>{$record.promote_account}</td>
<td>{$record.device_number}</td>
<td></td>
<td>{$record.register_time|date='Y-m-d H:i:s',###}</td>
<td>{$record.register_ip}</td>
<td>{$record.login_time|date='Y-m-d H:i:s',###}</td>
<td>{$record.login_ip}</td>
<td><a href="{:U('Query/userRoles', ['id' => $record['id']])}">查看角色</a></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>
{$_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>
</block>
<block name="script">
<link rel="stylesheet" href="__STATIC__/flatpickr/flatpickr.min.css">
<script src="__STATIC__/flatpickr/flatpickr.min.js"></script>
<script src="__STATIC__/flatpickr/l10n/zh.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
$(function(){
$('#search-play-time').flatpickr({
mode: 'range',
locale: 'zh',
})
$('.select_gallery').select2();
})
</script>
</block>

@ -298,4 +298,28 @@ CREATE TABLE `tab_spend_user_count` (
KEY `chain` (`chain`) USING BTREE,
KEY `level` (`level`) USING BTREE,
KEY `count_date` (`count_date`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='流水角色聚合表';
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='流水角色聚合表';
--downloadlog
DROP TABLE IF EXISTS `tab_downloadlog`;
CREATE TABLE IF NOT EXISTS `tab_downloadlog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`logid` varchar(254) NOT NULL DEFAULT '0' COMMENT '日志id',
`admin_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广者|管理员id',
`type` varchar(254) NOT NULL DEFAULT '0' COMMENT '下载控制器地址',
`dataname` varchar(254) NOT NULL DEFAULT '0' COMMENT '导出数据名称',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '下载状态 0未下载 1已下载',
`addtime` int(11) NOT NULL DEFAULT '0' COMMENT '添加下载时间戳',
`begintime` int(11) NOT NULL DEFAULT '0' COMMENT '开始下载时间戳',
`content` mediumtext COMMENT '备注内容',
`conditions` varchar(1024) DEFAULT '[]' COMMENT '下载筛选条件',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=220 DEFAULT CHARSET=utf8 COMMENT='下载管理日志';
ALTER TABLE `tab_promote`
ADD COLUMN `ver_status` TINYINT(2) NULL DEFAULT NULL COMMENT '资质认证审核状态(1是审核成功2审核失败3未审核)' AFTER `child_game_permission`,
ADD COLUMN `idcarpic` CHAR(253) NULL DEFAULT NULL COMMENT '身份证证件照' AFTER `ver_status`,
ADD COLUMN `businesspic` CHAR(253) NULL DEFAULT NULL COMMENT '营业执照' AFTER `idcarpic`,
ADD COLUMN `agreementpic` CHAR(253) NULL DEFAULT NULL COMMENT '合同' AFTER `businesspic`,
ADD COLUMN `address` VARCHAR(520) NULL DEFAULT NULL COMMENT '住址' AFTER `agreementpic`,
ADD COLUMN `account_type` INT(11) NULL DEFAULT NULL COMMENT '(1为公司2为个人)' AFTER `address`;
Loading…
Cancel
Save