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

master
ELF 5 years ago
commit 5bfecf5fc6

@ -160,7 +160,9 @@ class FinanceController extends BaseController
$page = intval(I('get.p', 1)); $page = intval(I('get.p', 1));
$page = $page ? $page : 1; //默认显示第一页数据arraypage $page = $page ? $page : 1; //默认显示第一页数据arraypage
$row = intval(I('get.row', 10)); $row = intval(I('get.row', 10));
$gameId = intval(I('game_id', 0));
$payOrderNumber = I('pay_order_number', ''); $payOrderNumber = I('pay_order_number', '');
$status = intval(I('status', 0));
$nowTime = date('Y-m-d'); $nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime))); $initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime'); $initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
@ -172,13 +174,16 @@ class FinanceController extends BaseController
$parameter['p'] = $page; $parameter['p'] = $page;
$parameter['row'] = $row; $parameter['row'] = $row;
$parameter['game_id'] = $gameId;
$parameter['pay_order_number'] = $payOrderNumber; $parameter['pay_order_number'] = $payOrderNumber;
$parameter['status'] = $status;
$parameter['begtime'] = $initBegTime; $parameter['begtime'] = $initBegTime;
$parameter['endtime'] = $initEndTime; $parameter['endtime'] = $initEndTime;
$data = []; $data = [];
$count = 0; $count = 0;
if (intval($endTime - $begTime) / (24 * 3600) <= 31) { if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
$withdrawIds = [];
$map['chain'] = ['like', $this->loginPromote['chain'] . $this->loginPromote['id'] . '/%']; $map['chain'] = ['like', $this->loginPromote['chain'] . $this->loginPromote['id'] . '/%'];
$ids = M('promote', 'tab_')->where($map)->getField('id', true); $ids = M('promote', 'tab_')->where($map)->getField('id', true);
$ids[] = $this->loginPromote['id']; $ids[] = $this->loginPromote['id'];
@ -186,10 +191,29 @@ class FinanceController extends BaseController
$map = []; $map = [];
$map['promote_id'] = ['in', $ids]; $map['promote_id'] = ['in', $ids];
$map['pay_status'] = 1;
$map['pay_time'] = ['between', [$begTime, $endTime]]; $map['pay_time'] = ['between', [$begTime, $endTime]];
if (!empty($gameId)) {
$map['game_id'] = $gameId;
}
if (!empty($payOrderNumber)) { if (!empty($payOrderNumber)) {
$map['pay_order_number'] = $payOrderNumber; $map['pay_order_number'] = $payOrderNumber;
} }
if (isset($_GET['status'])) {
if ($status == -2) {
$map['selle_status'] = 0;
} else {
$withdrawMap['promote_id'] = $this->loginPromote['id'];
$withdrawMap['status'] = $status;
$withdrawIds = M('withdraw', 'tab_')->where($withdrawMap)->getField('id', true);
if (empty($withdrawIds)) {
$map = '1 = 2';
} else {
$map['withdraw_id'] = ['in', $withdrawIds];
}
}
}
$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,pay_time,selle_status,pay_status,withdraw_id') $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,pay_time,selle_status,pay_status,withdraw_id')
->where($map) ->where($map)
@ -199,10 +223,12 @@ class FinanceController extends BaseController
$count = $model->where($map)->count(); $count = $model->where($map)->count();
//提现状态 //提现状态
$withdrawIds = [0]; if (empty($withdrawIds)) {
foreach ($data as $key => $value) { $withdrawIds = [0];
if ($value['withdraw_id'] > 0 && !in_array($value['withdraw_id'], $withdrawIds)) { foreach ($data as $key => $value) {
$withdrawIds[] = $value['withdraw_id']; if ($value['withdraw_id'] > 0 && !in_array($value['withdraw_id'], $withdrawIds)) {
$withdrawIds[] = $value['withdraw_id'];
}
} }
} }
$withdrawStatus = M('withdraw', 'tab_') $withdrawStatus = M('withdraw', 'tab_')

@ -127,7 +127,7 @@
return false; return false;
} }
if ((edate - sdate) > 2592000) { if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过30天,请重新选择日期', {icon: 5}); layer.msg('时间间隔不能超过31天,请重新选择日期', {icon: 5});
return false; return false;
} }

@ -85,10 +85,35 @@
</div> </div>
<!-- <form action="{:U('Finance/settlementDtl')}" method="get" enctype="multipart/form-data" class="normal_form"> --> <!-- <form action="{:U('Finance/settlementDtl')}" method="get" enctype="multipart/form-data" class="normal_form"> -->
<div class="form-group normal_space" style="margin-left: 0;"> <div class="form-group normal_space" style="margin-left: 0;">
<select id="game_id" name="game_id" class="reselect select_gallery" style="min-width:200px;width: 175px;">
<option value="" title="请选择游戏">请选择游戏</option>
<volist name=":getPromoteSearchGame()" id="vo">
<option value="{$vo.id}" title="{$vo.game_name}"
<if condition="I('game_id') eq $vo['id']">selected</if>
>{$vo.game_name} </option>
</volist>
</select>
</div>
<div class="form-group normal_space">
<input type="text" name="pay_order_number" class="txt normal_txt" placeholder="游戏订单号" <input type="text" name="pay_order_number" class="txt normal_txt" placeholder="游戏订单号"
value="{:I('pay_order_number','')}"> value="{:I('pay_order_number','')}">
</div> </div>
<div class="form-group normal_space">
<select id="status" name="status" class="reselect select_gallery" style="min-width:200px;width: 175px;">
<option value="" title="请选择状态">请选择状态</option>
<option value="-2" title="未提现"
<if condition="I('status') eq -2">selected</if>
>未提现 </option>
<?php foreach (promoteWithdrawStatus() as $key => $value) :?>
<option value="{$key}" title="{$value}"
<if condition="$key eq I('get.status') and isset($_GET['status'])"> selected </if>
>{$value}</option>
<?php endforeach;?>
</select>
</div>
<div class="form-group normal_space"> <div class="form-group normal_space">
<label class="form-title select-title" style="position: relative;">充值时间:</label> <label class="form-title select-title" style="position: relative;">充值时间:</label>
<div class="select-time"> <div class="select-time">
@ -218,7 +243,7 @@
return false; return false;
} }
if ((edate - sdate) > 2592000) { if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过30天,请重新选择日期', {icon: 5}); layer.msg('时间间隔不能超过31天,请重新选择日期', {icon: 5});
return false; return false;
} }

@ -136,7 +136,7 @@
value="查询"> value="查询">
</div> </div>
<div class="form-group normal_space" style="margin-left: 60px;"> <div class="form-group normal_space" style="margin-left: 46px;">
<label style="line-height: 34px;cursor: pointer;" id="own"> <label style="line-height: 34px;cursor: pointer;" id="own">
<i class="iconfont {:empty($ownId)?'iconfangxingweixuanzhong':'iconfangxingxuanzhongfill selected-color'}" <i class="iconfont {:empty($ownId)?'iconfangxingweixuanzhong':'iconfangxingxuanzhongfill selected-color'}"
style="font-size: 1.5rem;position: relative;top: 3px;margin-right: 2px;"></i>本账号 style="font-size: 1.5rem;position: relative;top: 3px;margin-right: 2px;"></i>本账号

@ -51,6 +51,19 @@
float: right; float: right;
right: 10px; right: 10px;
} }
.form-group {
float: left;
margin-bottom: 10px;
}
.form-group label {
line-height: 34px;
height: 34px;
}
.form-group .txt {
width: 180px;
height: 34px;
}
</style> </style>
<div class="page-search normal_list query-recharge-search jssearch"> <div class="page-search normal_list query-recharge-search jssearch">
<div class="trunk-title"> <div class="trunk-title">
@ -63,30 +76,9 @@
</div> </div>
<div class="trunk-content article"> <div class="trunk-content article">
<div class="trunk-search clearfix"> <div class="trunk-search clearfix">
<input type="hidden" id="top-promote-id" value="{$loginer.id}"> <include file="Public/promote_select" />
<if condition="$loginer.level elt 1">
<div class="form-group normal_space fl"> <div class="form-group normal_space">
<select name="level_promote_2" class="level-promote reselect select_gallery" style="width: 220px;" data-level="2" data-val="{:I('level_promote_2', 0)}">
<option value="0">请选择部门长</option>
</select>
</div>
</if>
<if condition="$loginer.level elt 2">
<div class="form-group normal_space fl">
<select name="level_promote_3" class="level-promote reselect select_gallery" style="width: 220px;" data-level="3" data-val="{:I('level_promote_3', 0)}">
<option value="0">请选择组长</option>
</select>
</div>
</if>
<if condition="$loginer.level elt 3">
<div class="form-group normal_space fl">
<select name="level_promote_4" class="level-promote reselect select_gallery" style="width: 220px;" data-level="4" data-val="{:I('level_promote_4', 0)}">
<option value="0">请选择推广员</option>
</select>
</div>
</if>
<div class="form-group normal_space fl">
<select id="relation_game_id" name="relation_game_id" class="reselect select_gallery"> <select id="relation_game_id" name="relation_game_id" class="reselect select_gallery">
<option value="">请选择游戏</option> <option value="">请选择游戏</option>
<volist name=":get_promote_serach_game()" id="vo"> <volist name=":get_promote_serach_game()" id="vo">
@ -95,7 +87,7 @@
</select> </select>
</div> </div>
<div class="form-group normal_space fl"> <div class="form-group normal_space">
<select id="sdk_version" name="sdk_version" class="reselect select_gallery" style="width:215px;"> <select id="sdk_version" name="sdk_version" class="reselect select_gallery" style="width:215px;">
<option value="0">请选择设备类型</option> <option value="0">请选择设备类型</option>
<volist name=":getSDKType()" id="vo" key="k"> <volist name=":getSDKType()" id="vo" key="k">
@ -104,7 +96,7 @@
</select> </select>
</div> </div>
<div class="form-group normal_space fl"> <div class="form-group normal_space">
<select id="server_id" name="server_id" class=" reselect select_gallery"> <select id="server_id" name="server_id" class=" reselect select_gallery">
<option value="">请选择区服</option> <option value="">请选择区服</option>
<volist name="serverData" id="vo"> <volist name="serverData" id="vo">
@ -113,17 +105,17 @@
</select> </select>
</div> </div>
<div class="form-group fl"> <div class="form-group normal_space">
<input type="text" name="game_player_name" class="txt normal_txt" placeholder="请输入角色名" <input type="text" name="game_player_name" class="txt normal_txt" placeholder="请输入角色名"
value="{:I('game_player_name')}"> value="{:I('game_player_name')}">
</div> </div>
<div class="form-group fl"> <div class="form-group normal_space">
<input type="text" name="user_account" class="txt normal_txt" id="uid" placeholder="请输入玩家账号" <input type="text" name="user_account" class="txt normal_txt" id="uid" placeholder="请输入玩家账号"
value="{:I('user_account')}"> value="{:I('user_account')}">
</div> </div>
<div class="form-group normal_space fl"> <div class="form-group normal_space">
<label class="form-title select-title" style="position: relative;">起止时间:</label> <label class="form-title select-title" style="position: relative;">起止时间:</label>
<div class="select-time"> <div class="select-time">
<input type="text" id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{:I('begtime')}"> <input type="text" id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{:I('begtime')}">
@ -134,12 +126,12 @@
</div> </div>
</div> </div>
<div class="form-group normal_space fl"> <div class="form-group normal_space">
<input type="text" name="order_number" class="txt normal_txt" placeholder="请输入订单号" <input type="text" name="order_number" class="txt normal_txt" placeholder="请输入订单号"
value="{:I('order_number')}"> value="{:I('order_number')}">
</div> </div>
<div class="form-group normal_space fl"> <div class="form-group normal_space">
<select id="pay_way" name="pay_way" class="reselect select_gallery" style="min-width:130px;"> <select id="pay_way" name="pay_way" class="reselect select_gallery" style="min-width:130px;">
<option value="-2">支付方式</option> <option value="-2">支付方式</option>
<foreach name="payWayData" item="vo" key="k"> <foreach name="payWayData" item="vo" key="k">
@ -152,12 +144,12 @@
</select> </select>
</div> </div>
<div class="form-group normal_space fl"> <div class="form-group normal_space">
<input type="submit" class="submit" id='submit' url="{:U('Query/recharge','model='.$model['name'],false)}" <input type="submit" class="submit" id='submit' url="{:U('Query/recharge','model='.$model['name'],false)}"
value="查询"> value="查询">
</div> </div>
<div class="form-group normal_space fl" style="margin-left: 60px;"> <div class="form-group normal_space" style="margin-left: 46px;">
<label style="line-height: 34px;cursor: pointer;" id="own"> <label style="line-height: 34px;cursor: pointer;" id="own">
<i class="iconfont {:empty(I('own_id'))?'iconfangxingweixuanzhong':'iconfangxingxuanzhongfill selected-color'}" style="font-size: 1.5rem;position: relative;top: 3px;margin-right: 2px;"></i>本账号 <i class="iconfont {:empty(I('own_id'))?'iconfangxingweixuanzhong':'iconfangxingxuanzhongfill selected-color'}" style="font-size: 1.5rem;position: relative;top: 3px;margin-right: 2px;"></i>本账号
<input type="hidden" name="own_id" id="own_id" value="{:empty(I('own_id'))?0:I('own_id')}" /> <input type="hidden" name="own_id" id="own_id" value="{:empty(I('own_id'))?0:I('own_id')}" />

@ -20,6 +20,19 @@
float: right; float: right;
right: 10px; right: 10px;
} }
.form-group {
float: left;
margin-bottom: 10px;
}
.form-group label {
line-height: 34px;
height: 34px;
}
.form-group .txt {
width: 180px;
height: 34px;
}
</style> </style>
</block> </block>
@ -36,40 +49,19 @@
<div class="trunk-content article"> <div class="trunk-content article">
<div class="trunk-search clearfix"> <div class="trunk-search clearfix">
<form action="{:U('Query/register',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data"> <form action="{:U('Query/register',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data">
<input type="hidden" id="top-promote-id" value="{$loginer.id}"> <include file="Public/promote_select" />
<if condition="$loginer.level elt 1">
<div class="form-group fl">
<select name="level_promote_2" class="level-promote reselect select_gallery" style="width: 220px;" data-level="2" data-val="{:I('level_promote_2', 0)}">
<option value="0">请选择部门长</option>
</select>
</div>
</if>
<if condition="$loginer.level elt 2">
<div class="form-group fl">
<select name="level_promote_3" class="level-promote reselect select_gallery" style="width: 220px;" data-level="3" data-val="{:I('level_promote_3', 0)}">
<option value="0">请选择组长</option>
</select>
</div>
</if>
<if condition="$loginer.level elt 3">
<div class="form-group fl">
<select name="level_promote_4" class="level-promote reselect select_gallery" style="width: 220px;" data-level="4" data-val="{:I('level_promote_4', 0)}">
<option value="0">请选择推广员</option>
</select>
</div>
</if>
<div class="form-group fl"> <div class="form-group normal_space">
<input type="text" name="account" class="txt normal_txt" placeholder="请输入玩家账号" <input type="text" name="account" class="txt normal_txt" placeholder="请输入玩家账号"
value="{:I('account')}"> value="{:I('account')}">
</div> </div>
<div class="form-group fl"> <div class="form-group normal_space">
<input type="text" name="id" class="txt normal_txt" placeholder="请输入玩家ID" <input type="text" name="id" class="txt normal_txt" placeholder="请输入玩家ID"
value="{:I('id')}"> value="{:I('id')}">
</div> </div>
<div class="form-group normal_space fl"> <div class="form-group normal_space">
<label class="form-title select-title" style="position: relative;">起止时间:</label> <label class="form-title select-title" style="position: relative;">起止时间:</label>
<div class="select-time"> <div class="select-time">
<input type="text" id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{:I('begtime')}"> <input type="text" id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{:I('begtime')}">
@ -80,11 +72,11 @@
</div> </div>
</div> </div>
<div class="form-group normal_space fl"> <div class="form-group normal_space">
<input type="submit" class="submit normal_space" value="查询"> <input type="submit" class="submit normal_space" value="查询">
</div> </div>
<div class="form-group normal_space fl" style="margin-left: 60px;"> <div class="form-group normal_space" style="margin-left: 46px;">
<label style="line-height: 34px;cursor: pointer;" id="own"> <label style="line-height: 34px;cursor: pointer;" id="own">
<i class="iconfont {:empty(I('own_id'))?'iconfangxingweixuanzhong':'iconfangxingxuanzhongfill selected-color'}" style="font-size: 1.5rem;position: relative;top: 3px;margin-right: 2px;"></i>本账号 <i class="iconfont {:empty(I('own_id'))?'iconfangxingweixuanzhong':'iconfangxingxuanzhongfill selected-color'}" style="font-size: 1.5rem;position: relative;top: 3px;margin-right: 2px;"></i>本账号
<input type="hidden" name="own_id" id="own_id" value="{:empty(I('own_id'))?0:I('own_id')}" /> <input type="hidden" name="own_id" id="own_id" value="{:empty(I('own_id'))?0:I('own_id')}" />

@ -122,7 +122,7 @@
value="查询"> value="查询">
</div> </div>
<div class="form-group normal_space" style="margin-left: 60px;"> <div class="form-group normal_space" style="margin-left: 46px;">
<label style="line-height: 34px;cursor: pointer;" id="own"> <label style="line-height: 34px;cursor: pointer;" id="own">
<i class="iconfont {:empty($ownId)?'iconfangxingweixuanzhong':'iconfangxingxuanzhongfill selected-color'}" style="font-size: 1.5rem;position: relative;top: 3px;margin-right: 2px;"></i>本账号 <i class="iconfont {:empty($ownId)?'iconfangxingweixuanzhong':'iconfangxingxuanzhongfill selected-color'}" style="font-size: 1.5rem;position: relative;top: 3px;margin-right: 2px;"></i>本账号
<input type="checkbox" name="own_id" id="own_id" style="display: none;" value="1" <input type="checkbox" name="own_id" id="own_id" style="display: none;" value="1"

@ -8,7 +8,7 @@
<block name="body"> <block name="body">
<div class="page-search normal_list query-register-search jssearch" style="font-size: small;"> <div class="page-search normal_list query-register-search jssearch" style="font-size: small;">
<div style="position: absolute;margin: .6% 2% 0 2%;margin-top: -30px;color: #6a7082;"> <div style="position: absolute;margin-top: -25px;color: #6a7082;">
<span class="back-btn" style="cursor: pointer;"><i class="iconfont iconreply"></i> 返回</span> <span class="back-btn" style="cursor: pointer;"><i class="iconfont iconreply"></i> 返回</span>
</div> </div>
<div class="trunk-title"> <div class="trunk-title">
@ -48,7 +48,7 @@
</select> </select>
</div> </div>
<div class="form-group fl"> <div class="form-group normal_space fl">
<input type="text" name="role_name" class="txt normal_txt" placeholder="请输入角色名" <input type="text" name="role_name" class="txt normal_txt" placeholder="请输入角色名"
value="{:I('role_name')}"> value="{:I('role_name')}">
</div> </div>

Loading…
Cancel
Save