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

master
ELF 5 years ago
commit 38c2efdd08

@ -5444,6 +5444,8 @@ if ($key == 'model'){
foreach ($xlsData as $key => $value) {
$xlsData[$key]['inside_cash_count'] = number_format($insideDataSum[$value['game_id']],2,'.','');
$xlsData[$key]['all_cash_count'] = number_format($insideDataSum[$value['game_id']]+$xlsData[$key]['all_cash_count'],2,'.','');
}
$sumCash = D("spend_count")->sumSpendCountField($map,"cash_count");

@ -85,7 +85,7 @@ class FinanceController extends ThinkController
$order = "id DESC";
$data = M('spend_month_count','tab_')
->field("cash_count,balance_coin_count,inside_cash_count,all_count,count_date,balance_coin_deposit")
->field("cash_count,balance_coin_count,inside_cash_count,all_count,count_date,balance_coin_deposit,bind_coin_count")
->where($map)
->page($page,$row)
->order($order)
@ -98,7 +98,7 @@ class FinanceController extends ThinkController
->select();
$sumData = M('spend_month_count','tab_')
->field("sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count,sum(all_count) as all_count,count_date,sum(balance_coin_deposit) as balance_coin_deposit")
->field("sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count,sum(all_count) as all_count,count_date,sum(balance_coin_deposit) as balance_coin_deposit,sum(bind_coin_count) as bind_coin_count")
->where($map)
->order($order)
->find();
@ -202,6 +202,7 @@ class FinanceController extends ThinkController
foreach ($data as $key => $value) {
$data[$key]['inside_cash_count'] = number_format($insideDataSum[$value['game_id']],2,'.','');
$data[$key]['all_cash_count'] = number_format($insideDataSum[$value['game_id']]+$data[$key]['all_cash_count'],2,'.','');
}
$sumCash = D("spend_count")->sumSpendCountField($map,"cash_count");
@ -328,14 +329,14 @@ class FinanceController extends ThinkController
$map['parent_id'] = 0;
$map['root_id'] = 0;
$subQueryAll = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count')
->where($map)
->group('promote_id')
->page($page,$row)
->select();
$sumData = M('spend_user_count','tab_')
->field('sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->field('sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count')
->where($map)
->find();
@ -395,7 +396,7 @@ class FinanceController extends ThinkController
$subQueryAll = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count')
->where($map)
->group('promote_id')
->page($page,$row)
@ -405,7 +406,7 @@ class FinanceController extends ThinkController
}
$sumData = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count')
->where($map)
->find();
if (empty(I("root_name"))) {
@ -413,6 +414,7 @@ class FinanceController extends ThinkController
$sumData['balance_coin_count'] = number_format($sumData['balance_coin_count'] + $parentData[0]['balance_coin_count'], 2, '.', '');
$sumData['inside_cash_count'] = number_format($sumData['inside_cash_count'] + $parentData[0]['inside_cash_count'], 2, '.', '');
$sumData['all_count'] = number_format($sumData['all_count'] + $parentData[0]['all_count'], 2, '.', '');
$sumData['bind_coin_count'] = number_format($sumData['bind_coin_count'] + $parentData[0]['bind_coin_count'], 2, '.', '');
}
$count = M('spend_user_count','tab_')
@ -466,7 +468,7 @@ class FinanceController extends ThinkController
// var_dump($map);die();
$subQueryAll = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count')
->where($map)
->group('promote_id')
->page($page,$row)
@ -475,13 +477,14 @@ class FinanceController extends ThinkController
$subQueryAll = array_merge($parentData,$subQueryAll);
$sumData = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count')
->where($map)
->find();
$sumData['cash_count'] = number_format($sumData['cash_count']+$parentData[0]['cash_count'],2,'.','');
$sumData['balance_coin_count'] = number_format($sumData['balance_coin_count']+$parentData[0]['balance_coin_count'],2,'.','');
$sumData['inside_cash_count'] = number_format($sumData['inside_cash_count']+$parentData[0]['inside_cash_count'],2,'.','');
$sumData['all_count'] = number_format($sumData['all_count']+$parentData[0]['all_count'],2,'.','');
$sumData['bind_coin_count'] = number_format($sumData['bind_coin_count']+$parentData[0]['bind_coin_count'],2,'.','');
$count = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
@ -544,19 +547,20 @@ class FinanceController extends ThinkController
}
$data = M('spend_user_count','tab_')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count+inside_cash_count) as all_count')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count')
->where($map)->select();
$map1['parent_id'] = $data[0]['promote_id'];
$map1['count_date'] = $date;
$sunData = M('spend_user_count','tab_')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count+inside_cash_count) as all_count')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count')
->where($map1)->find();
$data[0]['cash_count'] = number_format($data[0]['cash_count']-$sunData['cash_count'],2,'.','');
$data[0]['balance_coin_count'] = number_format($data[0]['balance_coin_count']-$sunData['balance_coin_count'],2,'.','');
$data[0]['inside_cash_count'] = number_format($data[0]['inside_cash_count']-$sunData['inside_cash_count'],2,'.','');
$data[0]['all_count'] = number_format($data[0]['all_count']-$sunData['all_count'],2,'.','');
$data[0]['bind_coin_count'] = number_format($data[0]['bind_coin_count']-$sunData['bind_coin_count'],2,'.','');
// $map['inside_cash_count'] = ['neq',0];
// $insideData = D("spend_count")->getSpendCountData($map,"promote_id,inside_cash_count as count","promote_id,count_date");

@ -129,11 +129,11 @@
<th ><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">平台币支出<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">内充消耗<span class="tooltiptext"><span style="margin-left: -10px">绑币消费所产生的流水</span></span></div></th>
<th ><div class="tooltip">公会内充支出<span class="tooltiptext"><span style="margin-left: -10px">绑币消费所产生的流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币支出+公会内充支出</span></span></div></th>
<th >操作</th>
</tr>

@ -112,11 +112,13 @@
<th><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">平台币支出<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">公会内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>
<th ><div class="tooltip">公会内充支出<span class="tooltiptext"><span style="margin-left: -10px">绑币消耗流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币支出+公会内充支出=总流水</span></span></div></th>
<th >操作</th>
@ -141,6 +143,7 @@
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.bind_coin_count}</td>
<td >{$data.all_count}</td>
<td ><if condition="$data['promote_id'] neq $_GET['root_id']">
<a href="{:U('Finance/gameFinance',array('sign'=>1,'parent_id'=>$data['promote_id'],'root_id'=>$_GET['root_id'],'count_date'=>$_GET['count_date'],'from'=>'getParentUser'))}" >游戏查看</a>
@ -154,6 +157,7 @@
<td ><span>{$sumData.cash_count}</span></td>
<td ><span>{$sumData.balance_coin_count}</span></td>
<td ><span>{$sumData.inside_cash_count}</span></td>
<td ><span>{$sumData.bind_coin_count}</span></td>
<td ><span>{$sumData.all_count}</span></td>
<td >
<a href="{:U('Finance/gameFinance',array('sign'=>1,'count_date'=>$_GET['count_date'],'root_id'=>$_GET['root_id'],'parent_id'=>$_GET['root_name']?$data['promote_id']:'','from'=>'getParentUser'))}" >游戏查看</a>

@ -103,11 +103,13 @@
<th><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">平台币支出<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">公会内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>
<th ><div class="tooltip">公会内充支出<span class="tooltiptext"><span style="margin-left: -10px">绑币消耗流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币支出+公会内充支出=总流水/span></span></div></th>
<th >操作</th>
@ -132,6 +134,7 @@
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.bind_coin_count}</td>
<td >{$data.all_count}</td>
<td ><if condition="$data['promote_id'] neq $_GET['parent_id']">
<a href="{:U('Finance/gameFinance',array('promote_id'=>$data['promote_id'],'count_date'=>$_GET['count_date'],'from'=>'getPromoteUser'))}" >游戏查看</a>
@ -144,6 +147,7 @@
<td ><span>{$sumData.cash_count}</span></td>
<td ><span>{$sumData.balance_coin_count}</span></td>
<td ><span>{$sumData.inside_cash_count}</span></td>
<td ><span>{$sumData.bind_coin_count}</span></td>
<td ><span>{$sumData.all_count}</span></td>
<td ><a href="{:U('Finance/gameFinance',array('count_date'=>$_GET['count_date'],'parent_id'=>$_GET['parent_id'],'sign'=>3,'from'=>'getPromoteUser'))}" >游戏查看</a>
</tr>

@ -113,11 +113,13 @@
<th><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">平台币支出<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">公会内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>
<th ><div class="tooltip">公会内充支出<span class="tooltiptext"><span style="margin-left: -10px">绑币消耗流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币支出+公会内充支出=总流水</span></span></div></th>
<th >操作</th>
@ -142,6 +144,7 @@
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.bind_coin_count}</td>
<td >{$data.all_count}</td>
<td ><a href="{:U('Finance/gameFinance',array('root_id'=>$data['promote_id'],'count_date'=>$_GET['count_date'],'from'=>'getRootUser','sign'=>1))}" >游戏查看</a>
<a href="{:U('Finance/getParentUser',array('count_date'=>$_GET['count_date'],'root_id'=>$data['promote_id']))}" >组长渠道</a></td>
@ -151,6 +154,7 @@
<td ><span>{$sumData.cash_count}</span></td>
<td ><span>{$sumData.balance_coin_count}</span></td>
<td ><span>{$sumData.inside_cash_count}</span></td>
<td ><span>{$sumData.bind_coin_count}</span></td>
<td ><span>{$sumData.all_count}</span></td>
<td ><a href="{:U('Finance/gameFinance',array('count_date'=>$_GET['count_date'],'sign'=>1,'root_id'=>$_GET['root_name']?$data['promote_id']:'','from'=>'getRootUser'))}" >游戏查看</a>
<!-- <a href="{:U('Finance/getParentUser',array('count_date'=>$_GET['count_date'],'root_name'=>$_GET['root_name'],'sign'=>1))}" >渠道查看</a></td>-->

@ -137,9 +137,11 @@
<th ><div class="tooltip">内充流水<span class="tooltiptext"><span style="margin-left: -10px">管理后台下发的所有平台币,绑定币流水(平台币订单-后台发放(玩家/推广员)),绑币订单-后台发放(玩家),平台币回收与绑币回收需要进行扣除</span></span></div></th>
<th ><div class="tooltip">内充支出<span class="tooltiptext"><span style="margin-left: -10px">绑定币流水</span></span></div></th>
<th ><div class="tooltip">平台币支出<span class="tooltiptext"><span style="margin-left: -10px">指示为玩家充值消耗平台,不计入总流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币收入+内充流水</span></span></div></th>
<th >操作</th>
</tr>
@ -163,6 +165,7 @@
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_deposit}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.bind_coin_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.all_count}</td>
<td >
@ -179,6 +182,7 @@
<td ><span><if condition="$sumData.cash_count neq ''">{$sumData.cash_count}<else/>0</if></span></td>
<td><if condition="$sumData.balance_coin_count neq ''">{$sumData.balance_coin_deposit}<else/>0</if></td>
<td><if condition="$sumData.inside_cash_count neq ''">{$sumData.inside_cash_count}<else/>0</if></td>
<td><if condition="$sumData.balance_coin_count neq ''">{$sumData.bind_coin_count}<else/>0</if></td>
<td><if condition="$sumData.balance_coin_count neq ''">{$sumData.balance_coin_count}<else/>0</if></td>
<td><if condition="$sumData.all_count neq ''">{$sumData.all_count}<else/>0</if></td>
<td>

@ -1,7 +1,11 @@
<?php
namespace Home\Controller;
use Think\Controller;
class BaseController extends HomeController{
class BaseController extends HomeController
{
protected $loginPromote = null;
protected function _initialize()
@ -9,46 +13,45 @@ class BaseController extends HomeController{
parent::_initialize();
$this->login();
$loginer = $this->getLoginPromote();
$pid = is_login_promote();
define('PLEVEL', $loginer['parent_id']);
define('PID', $pid);
define('PROMOTE_ACCOUNT',session('promote_auth.account'));
if($loginer['grand_id']>0) {/* 三级 */
define('PRO_GRADE',3);
} elseif($loginer['parent_id']>0) {/* 二级 */
define('PRO_GRADE',2);
define('SETTLEMENT_GRADE','third_status'); /* 给三级结算 */
define('G_SETTLEMENT_GRADE','third_status');
define('PROMOTE_ACCOUNT', session('promote_auth.account'));
if ($loginer['grand_id'] > 0) {/* 三级 */
define('PRO_GRADE', 3);
} elseif ($loginer['parent_id'] > 0) {/* 二级 */
define('PRO_GRADE', 2);
define('SETTLEMENT_GRADE', 'third_status'); /* 给三级结算 */
define('G_SETTLEMENT_GRADE', 'third_status');
} else {/* 一级 */
define('PRO_GRADE',1);
define('SETTLEMENT_GRADE','sub_status'); /* 给二级结算 */
define('G_SETTLEMENT_GRADE','sub_status,third_status');
define('PRO_GRADE', 1);
define('SETTLEMENT_GRADE', 'sub_status'); /* 给二级结算 */
define('G_SETTLEMENT_GRADE', 'sub_status,third_status');
}
$this->assign('loginer', $loginer);
$this->assign("parent_id", $loginer['parent_id']);
$this->assign("grand_id", $loginer['grand_id']);
$result = M('site_apply','tab_')->where("promote_id=$pid")->getField('status');
if($result['status'] == 1) {
$this -> assign('noapplysite', $result);
$result = M('site_apply', 'tab_')->where("promote_id=$pid")->getField('status');
if ($result['status'] == 1) {
$this->assign('noapplysite', $result);
}
if (in_array(CONTROLLER_NAME,array('SiteBase','SiteGame','SiteGift','SiteGroup','SiteServer','SiteAdv'))) {
if ($result != 1) {
$this->redirect('SiteApply/index',array('msg'=>1));
}
if (in_array(CONTROLLER_NAME, array('SiteBase', 'SiteGame', 'SiteGift', 'SiteGroup', 'SiteServer', 'SiteAdv'))) {
if ($result != 1) {
$this->redirect('SiteApply/index', array('msg' => 1));
}
}
}
/* 用户登录检测 */
protected function login(){
protected function login()
{
/* 用户登录检测 */
is_login_promote() || $this->error('您还没有登录,请先登录!', U('Index/index'));
}
@ -56,10 +59,11 @@ class BaseController extends HomeController{
/**
* 显示指定模型列表数据
* @param String $model 模型标识
* @param String $model 模型标识
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
public function lists($model = null, $p = 0, $extend_map = array(), \Closure $appendCallback = null){
public function lists($model = null, $p = 0, $extend_map = array(), \Closure $appendCallback = null)
{
$model || $this->error('模型名标识必须!');
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
@ -71,92 +75,105 @@ class BaseController extends HomeController{
//解析列表规则
$fields = array();
// 关键字搜索
$map = $extend_map;
$key = $model['search_key']?$model['search_key']:'title';
if(isset($_REQUEST[$key])){
$map[$key] = array('like','%'.$_GET[$key].'%');
$map = $extend_map;
$key = $model['search_key'] ? $model['search_key'] : 'title';
if (isset($_REQUEST[$key])) {
$map[$key] = array('like', '%' . $_GET[$key] . '%');
unset($_REQUEST[$key]);
}
// 条件搜索
foreach($_REQUEST as $name=>$val){
if(in_array($name,$fields)){
$map[$name] = $val;
foreach ($_REQUEST as $name => $val) {
if (in_array($name, $fields)) {
$map[$name] = $val;
}
}
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$name = parse_name(get_table_name($model['id']), true);
$data = M($name,"tab_")
$data = M($name, "tab_")
/* 查询指定字段,不指定则查询所有字段 */
->field(empty($fields) ? true : $fields)
// 查询条件
->where($map)
/* 默认通过id逆序排列 */
->order($model['need_pk']?'id DESC':'')
->order($model['need_pk'] ? 'id DESC' : '')
/* 数据分页 */
->page($page, $row)
/* 执行查询 */
->select();
/* 查询记录总数 */
$count = M($name,"tab_")->where($map)->count();
$count = M($name, "tab_")->where($map)->count();
//分页
$parameter = $_POST;
$parameter['p']=I('get.p',1);
$parameter['row']=I('get.row');
$page = set_pagination($count,$row,$parameter);
if($page) {$this->assign('_page', $page);}
$parameter = $_POST;
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$hasList = false;
if ($appendCallback) {
$appends = $appendCallback($data);
foreach ($appends as $key => $value) {
if ($key == 'list_data') {
$hasList = true;
$appends = $appendCallback($data);
foreach ($appends as $key => $value) {
if ($key == 'list_data') {
$hasList = true;
}
$this->assign($key, $value);
}
$this->assign($key, $value);
}
}
$this->assign("count",$count);
$this->assign("count", $count);
$this->assign('model', $model);
$this->assign('list_grids', $grids);
if ($hasList == false) {
$this->assign('list_data', $data);
$this->assign('list_data', $data);
}
$this->meta_title = $model['title'].'列表';
$this->meta_title = $model['title'] . '列表';
$this->display($model['template_list']);
}
public function data_lists($p,$model,$extend=[]){
public function data_lists($p, $model, $extend = [])
{
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$model = D($model);
// 条件搜索
$map = [];
foreach(I('get.') as $name=>$val){
$map[$name] = $val;
foreach (I('get.') as $name => $val) {
$map[$name] = $val;
}
$map = array_merge($map,$extend['map']);
$lists_data = $model->where($map)->page($page,$row)->order($extend['order'])->select();
$map = array_merge($map, $extend['map']);
$lists_data = $model->where($map)->page($page, $row)->order($extend['order'])->select();
$count = $model->where($map)->count();
//分页
$parameter = $_POST;
$parameter['p']=I('get.p',1);
$parameter['row']=I('get.row');
$page = set_pagination($count,$row,$parameter);
if($page) {$this->assign('_page', $page);}
$this->assign('lists_data',$lists_data);
$this->assign('count',$count);
$parameter = $_POST;
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('lists_data', $lists_data);
$this->assign('count', $count);
$this->display();
}
@ -166,63 +183,63 @@ class BaseController extends HomeController{
*/
public function paginate($query, $defaultPageSize = 10, $defaultPage = 1)
{
$page = I('get.p', $defaultPage);
$pageSize = I('get.row', $defaultPageSize);
$countQuery = clone $query;
$count = $countQuery->count();
$records = $query->page($page, $pageSize)->select();
$params = [
'p' => $page,
'row' => $pageSize
];
$params = array_merge($params, $_POST);
$params = array_merge($params, $_GET);
$pagination = set_pagination($count, $pageSize, $params);
return [$records, $pagination, $count];
$page = I('get.p', $defaultPage);
$pageSize = I('get.row', $defaultPageSize);
$countQuery = clone $query;
$count = $countQuery->count();
$records = $query->page($page, $pageSize)->select();
$params = [
'p' => $page,
'row' => $pageSize
];
$params = array_merge($params, $_POST);
$params = array_merge($params, $_GET);
$pagination = set_pagination($count, $pageSize, $params);
return [$records, $pagination, $count];
}
public function getRecordsByIds($query, $ids, $params = [])
{
if (count($ids) == 0) {
return [];
}
$field = isset($params['field']) ? $params['field'] : 'id';
$indexBy = isset($params['indexBy']) ? $params['indexBy'] : '';
$items = $query->where([$field => ['in', $ids]])->select();
$records = [];
if ($indexBy) {
foreach ($items as $item) {
$records[$item[$field]] = $item;
if (count($ids) == 0) {
return [];
}
return $records;
}
return $items;
$field = isset($params['field']) ? $params['field'] : 'id';
$indexBy = isset($params['indexBy']) ? $params['indexBy'] : '';
$items = $query->where([$field => ['in', $ids]])->select();
$records = [];
if ($indexBy) {
foreach ($items as $item) {
$records[$item[$field]] = $item;
}
return $records;
}
return $items;
}
public function getColumnsByIds($query, $ids, $column, $params = [])
{
if (count($ids) == 0) {
return [];
}
$field = isset($params['field']) ? $params['field'] : 'id';
$indexBy = isset($params['indexBy']) ? $params['indexBy'] : '';
$items = $query->where([$field => ['in', $ids]])->select();
$records = [];
if ($indexBy) {
foreach ($items as $item) {
$records[$item[$field]] = $item[$column];
}
} else {
foreach ($items as $item) {
$records[] = $item[$column];
}
}
return $records;
if (count($ids) == 0) {
return [];
}
$field = isset($params['field']) ? $params['field'] : 'id';
$indexBy = isset($params['indexBy']) ? $params['indexBy'] : '';
$items = $query->where([$field => ['in', $ids]])->select();
$records = [];
if ($indexBy) {
foreach ($items as $item) {
$records[$item[$field]] = $item[$column];
}
} else {
foreach ($items as $item) {
$records[] = $item[$column];
}
}
return $records;
}
public function getLoginPromote()
@ -233,4 +250,39 @@ class BaseController extends HomeController{
}
return $this->loginPromote;
}
//验证安全密码--视图
public function verifyPasswordView($modelList, $metaTitle)
{
$securityCode = empty(session('game_divide_second_pwd')) ? '' : session('game_divide_second_pwd');//安全密码
$model = new \User\Api\PromoteApi();
$res = $model->verify_er_User(PID, $securityCode);//验证安全密码
if ($res) {
return true;
}
$this->assign('modelList', $modelList);
$this->assign('metaTitle', $metaTitle);
$this->display('Public/verify_password');
exit;
}
//验证安全密码
public function verifyPassword()
{
$password = I('post.password');
$model = new \User\Api\PromoteApi();
$res = $model->verify_er_User(PID, $password);
if ($res) {
session('game_divide_second_pwd', $password);
$data['status'] = 1;
$data['msg'] = '验证成功';
} else {
$data['status'] = 0;
$data['msg'] = '安全密码不正确';
}
$this->ajaxReturn($data);
}
}

@ -3,7 +3,6 @@
namespace Home\Controller;
use OT\DataDictionary;
use User\Api\PromoteApi;
use Base\Repository\PromoteRepository;
use Base\Repository\SpendRepository;
use Base\Repository\UserRepository;
@ -15,78 +14,75 @@ class FinanceController extends BaseController
{
public function settlementDtl()
{
$securityCode = empty(session('game_divide_second_pwd')) ? '' : session('game_divide_second_pwd');//安全密码
$model = new PromoteApi();
$res = $model->verify_er_User(PID, $securityCode);//验证安全密码
if ($res) {
$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();
//验证安全密码
$metaTitle = '结算明细';
$modelList = ['财务管理', $metaTitle];
$this->verifyPasswordView($modelList, $metaTitle);
$parameter['p'] = $page;
$parameter['row'] = $row;
$parameter['pay_order_number'] = $payOrderNumber;
$parameter['begtime'] = $initBegTime;
$parameter['endtime'] = $initEndTime;
$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();
$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;
$parameter['p'] = $page;
$parameter['row'] = $row;
$parameter['pay_order_number'] = $payOrderNumber;
$parameter['begtime'] = $initBegTime;
$parameter['endtime'] = $initEndTime;
$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]];
}
$map['chain'] = ['like', $loginPromote['chain'] . $loginPromote['id'] . '/%'];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$ids[] = $loginPromote['id'];
$ids = implode(',', $ids);
$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']);
}
$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]];
}
$page = set_pagination($count, $row, $parameter);
$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();
$this->assign('listData', $data);
$this->assign('count', $count);
$this->assign('initBegTime', $initBegTime);
$this->assign('initEndTime', $initEndTime);
$this->assign('_page', $page);
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();
}

@ -5,7 +5,6 @@ namespace Home\Controller;
use Admin\Model\PromoteModel;
use Think\Controller;
use User\Api\PromoteApi;
/**
* 游戏分成比例控制器
@ -15,91 +14,70 @@ class GameDivideController extends BaseController
//首页
public function index()
{
$parentId = getParentPromoteId(PID);//上级ID
if ($parentId > 0) {
$loginPromote = $this->getLoginPromote();
if ($loginPromote['parent_id'] > 0) {//只开会长权限
$this->error('权限异常');
}
$securityCode = empty(session('game_divide_second_pwd')) ? '' : session('game_divide_second_pwd');//安全密码
$model = new PromoteApi();
$res = $model->verify_er_User(PID, $securityCode);//验证安全密码
if ($res) {
$map['tab_game.online_status'] = 1;//开发者游戏上线状态
$map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请
$map['tab_game.game_status'] = 1;//游戏状态
empty(I('relation_game_id')) || $map['relation_game_id'] = I('relation_game_id');
empty(I('sdk_version')) || $map['sdk_version'] = I('sdk_version');
empty(I('server_type')) || $map['server_type'] = I('server_type');
$minRatio = floatval(I('min_ratio', 0));
$maxRatio = floatval(I('max_ratio', 0));
if (!empty($minRatio) && empty($maxRatio)) {
$map['ratio'] = ['egt', $minRatio];
} elseif (empty($minRatio) && !empty($maxRatio)) {
$map['ratio'] = ['elt', $maxRatio];
} elseif (!empty($minRatio) && !empty($maxRatio)) {
$map['ratio'] = ['between', [$minRatio, $maxRatio]];
}
$page = intval(I('get.p', 0));
$page = $page ? $page : 1; //默认显示第一页数据
if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$data = M('Game', 'tab_')
->field('id,icon,game_name,game_type_name,sdk_version,server_type,discount,ratio')
->where($map)
->order('sort desc')
->page($page, $row)
->select();
$count = M('Game', 'tab_')
->where($map)
->count();
//分页
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
empty(I('relation_game_id')) || $parameter['relation_game_id'] = I('relation_game_id');
empty(I('sdk_version')) || $parameter['sdk_version'] = I('sdk_version');
empty(I('server_type')) || $parameter['server_type'] = I('server_type');
empty($minRatio) || $parameter['min_ratio'] = $minRatio;
empty($maxRatio) || $parameter['max_ratio'] = $maxRatio;
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('dataList', $data);
$this->assign('count', $count);
$this->assign('serverType', I('server_type', 0));
//验证安全密码
$metaTitle = '分成比例';
$modelList = ['游戏管理', $metaTitle];
$this->verifyPasswordView($modelList, $metaTitle);
$map['tab_game.online_status'] = 1;//开发者游戏上线状态
$map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请
$map['tab_game.game_status'] = 1;//游戏状态
empty(I('relation_game_id')) || $map['relation_game_id'] = I('relation_game_id');
empty(I('sdk_version')) || $map['sdk_version'] = I('sdk_version');
empty(I('server_type')) || $map['server_type'] = I('server_type');
$minRatio = floatval(I('min_ratio', 0));
$maxRatio = floatval(I('max_ratio', 0));
if (!empty($minRatio) && empty($maxRatio)) {
$map['ratio'] = ['egt', $minRatio];
} elseif (empty($minRatio) && !empty($maxRatio)) {
$map['ratio'] = ['elt', $maxRatio];
} elseif (!empty($minRatio) && !empty($maxRatio)) {
$map['ratio'] = ['between', [$minRatio, $maxRatio]];
}
$this->meta_title = "分成比例";
$this->display();
}
//验证安全密码
public function verifyPassword()
{
$password = I('post.password');
$model = new PromoteApi();
$res = $model->verify_er_User(PID, $password);
if ($res) {
session('game_divide_second_pwd', $password);
$page = intval(I('get.p', 0));
$page = $page ? $page : 1; //默认显示第一页数据
$data['status'] = 1;
$data['msg'] = '验证成功';
if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$data['status'] = 0;
$data['msg'] = '安全密码不正确';
$row = 10;
}
$this->ajaxReturn($data);
$data = M('Game', 'tab_')
->field('id,icon,game_name,game_type_name,sdk_version,server_type,discount,ratio')
->where($map)
->order('sort desc')
->page($page, $row)
->select();
$count = M('Game', 'tab_')
->where($map)
->count();
//分页
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
empty(I('relation_game_id')) || $parameter['relation_game_id'] = I('relation_game_id');
empty(I('sdk_version')) || $parameter['sdk_version'] = I('sdk_version');
empty(I('server_type')) || $parameter['server_type'] = I('server_type');
empty($minRatio) || $parameter['min_ratio'] = $minRatio;
empty($maxRatio) || $parameter['max_ratio'] = $maxRatio;
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('dataList', $data);
$this->assign('count', $count);
$this->assign('serverType', I('server_type', 0));
$this->meta_title = $metaTitle;
$this->display();
}
}

@ -2262,17 +2262,12 @@ class PromoteController extends BaseController
$this->error('权限异常');
}
$securityCode = empty(session('game_divide_second_pwd')) ? '' : session('game_divide_second_pwd');//安全密码
$model = new PromoteApi();
$res = $model->verify_er_User(PID, $securityCode);//验证安全密码
if ($_POST) {
if (!$res) {
$data['status'] = 0;
$data['msg'] = '权限异常';
$this->ajaxReturn($data);
}
//验证安全密码
$metaTitle = '设置';
$modelList = ['游戏管理', $metaTitle];
$this->verifyPasswordView($modelList, $metaTitle);
if ($_POST) {
$save['child_game_permission'] = I('post.child_game_permission');
$saveRes = D('Promote')->where(array('id' => PID))->save($save);
if ($saveRes === false) {
@ -2285,14 +2280,11 @@ class PromoteController extends BaseController
$this->ajaxReturn($data);
} else {
if ($res) {
$map['id'] = PID;
$promoteData = D('Promote')->field('id,child_game_permission')->where($map)->find();
$this->assign('data', $promoteData);
}
$map['id'] = PID;
$promoteData = D('Promote')->field('id,child_game_permission')->where($map)->find();
$this->meta_title = "设置";
$this->assign('data', $promoteData);
$this->meta_title = $metaTitle;
$this->display();
}
}

@ -1099,6 +1099,9 @@ class QueryController extends BaseController
$params['game_id'] = ['in', $gameIds];
}
}
if ($serverId > 0) {
$params['server_id'] = $serverId;
}
$params['begin_time'] = $begTime;
$params['end_time'] = $endTime;

@ -3,7 +3,6 @@
<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="__CSS__/detailed.css?v=1.1" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css?v=1.2" rel="stylesheet">
</block>
@ -63,144 +62,95 @@
width: 180px;
height: 34px;
}
.input-security {
width: 500px;
height: 2.5rem;
padding-left: 10px;
border-radius: 5px;
border: 0;
}
.btn-security {
width: 300px;
height: 2.4rem;
border: 0;
border-radius: 5px;
background-color: #358fe4;
color: #fff;
}
.btn-security-close {
width: 300px;
height: 2.4rem;
border: 0;
border-radius: 5px;
background-color: #fff;
color: #999;
}
</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>
<if condition="isset($listData)">
<img src="__IMG__/20180207/icon_chongzhi.png">
<span class="title_main">{$meta_title}</span>
<else/>
<span class="title_main">安全密码</span>
</if>
<img src="__IMG__/20180207/icon_chongzhi.png">
<span class="title_main">{$meta_title}</span>
</div>
<div class="trunk-content article">
<if condition="isset($listData)">
<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="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 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>
<div class="form-group normal_space">
<input type="submit" class="submit" id='submit' url="{:U('Finance/settlementDtl','model='.$model['name'],false)}"
value="查询">
<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>
<!-- </form> -->
</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>
<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 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>
<empty name="listData">
<else/>
<volist name="listData" id="vo">
<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_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>
<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>
<else/>
<div class="trunk-search clearfix" style="display: table-caption;">
<div class="tab detailed-box" style="margin-top: 40px;align-items: center;">
<label class="detailed-title detailed-label" style="margin-right: 20px;">安全密码:</label>
<div class="detailed-content-box">
<input class="input-security" id="security_password" type="password" placeholder="安全密码">
</div>
<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="tab detailed-box">
<label class="detailed-title detailed-label" style="margin-right: 20px;"></label>
<div class="detailed-content-box" style="display: flex;width: 100%;">
<button class="btn-security" style="margin-right: 20px;">确定</button>
<button class="btn-security-close">取消</button>
</div>
<div class="pagenation clearfix">
{$_page}
</div>
</div>
</if>
</div>
</div>
</div>
@ -248,31 +198,6 @@
endDate: date
});
$('.btn-security').on('click', function () {
var password = $('#security_password').val();
$.ajax({
type: "post",
url: "{:U('GameDivide/verifyPassword')}",
dataType: "json",
data: {'password': password},
success: function (data) {
if (data.status == 1) {
window.location.reload();
} else {
layer.msg(data.msg, {icon: 5});
}
},
error: function (result) {
layer.msg('网络异常', {icon: 5});
}
});
});
$('.btn-security-close').on('click', function () {
window.location.href = "{:U('Promote/index')}";
});
$('#submit').click(function () {
var sdate = $('#sdate').val();
var edate = $('#edate').val();

@ -5,7 +5,6 @@
<link href="__CSS__/20180207/game.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__CSS__/game_detailed.css" rel="stylesheet">
<link href="__CSS__/detailed.css?v=1.1" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<style type="text/css">
@ -105,32 +104,6 @@
width: 80px;
text-align: center;
}
.input-security {
width: 500px;
height: 2.5rem;
padding-left: 10px;
border-radius: 5px;
border: 0;
}
.btn-security {
width: 300px;
height: 2.4rem;
border: 0;
border-radius: 5px;
background-color: #358fe4;
color: #fff;
}
.btn-security-close {
width: 300px;
height: 2.4rem;
border: 0;
border-radius: 5px;
background-color: #fff;
color: #999;
}
</style>
</block>
@ -138,130 +111,108 @@
<div class="page-list normal_list apply-index-list jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>分成比例</span></div>
<div class="location-container">当前位置:<span>游戏管理></span><span>{$meta_title}</span></div>
</div>
<if condition="isset($dataList)">
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">分成比例</span>
<else/>
<span class="title_main">安全密码</span>
</if>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">{$meta_title}</span>
</div>
<div class="trunk-content article">
<if condition="isset($dataList)">
<div class="trunk-search clearfix">
<div class="tab marg_top20" style="clear:both;display: flex;"></div>
<!-- <form action="{:U('index',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data"-->
<!-- class="marg_top20" style="float: left;">-->
<div class="form-group normal_space fl">
<select id="relation_game_id" name="relation_game_id" class="reselect select_gallery" style="min-width:200px;width: 175px;">
<option value="">请选择游戏</option>
<volist name=":get_promote_serach_game()" id="vo">
<option value="{$vo.relation_game_id}" title="{$vo.relation_game_name}">{$vo.relation_game_name}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fl">
<select id="sdk_version" name="sdk_version" class="reselect select_gallery" style="width:215px;">
<option value="0">请选择设备类型</option>
<volist name=":getSDKType()" id="vo" key="k">
<option value="{$k}">{$vo}</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="min_ratio" class="txt input-number" name="min_ratio" placeholder="" value="{:I('min_ratio')}">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" id="max_ratio" class="txt input-number" name="max_ratio" placeholder="" value="{:I('max_ratio')}">
</div>
</div>
<div class="trunk-search clearfix">
<div class="tab marg_top20" style="clear:both;display: flex;"></div>
<!-- <form action="{:U('index',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data"-->
<!-- class="marg_top20" style="float: left;">-->
<div class="form-group normal_space fl">
<select id="relation_game_id" name="relation_game_id" class="reselect select_gallery" style="min-width:200px;width: 175px;">
<option value="">请选择游戏</option>
<volist name=":get_promote_serach_game()" id="vo">
<option value="{$vo.relation_game_id}" title="{$vo.relation_game_name}">{$vo.relation_game_name}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fl">
<div style="display: flex;">
<div class="btn btn-role <if condition='$serverType eq 0'>highlight</if>" server-type="0">
<p>全部</p>
</div>
<div class="form-group normal_space fl">
<select id="sdk_version" name="sdk_version" class="reselect select_gallery" style="width:215px;">
<option value="0">请选择设备类型</option>
<volist name=":getSDKType()" id="vo" key="k">
<option value="{$k}">{$vo}</option>
</volist>
</select>
</div>
<div class="btn btn-role <if condition='$serverType eq 2'>highlight</if>" style="border-left: 0;border-right: 0;" server-type="2">
<p>混服</p>
</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="min_ratio" class="txt input-number" name="min_ratio" placeholder="" value="{:I('min_ratio')}">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" id="max_ratio" class="txt input-number" name="max_ratio" placeholder="" value="{:I('max_ratio')}">
</div>
</div>
<div class="btn btn-role <if condition='$serverType eq 1'>highlight</if>" server-type="1">
<p>专服</p>
</div>
</div>
<div class="form-group normal_space fl">
<div style="display: flex;">
<div class="btn btn-role <if condition='$serverType eq 0'>highlight</if>" server-type="0">
<p>全部</p>
</div>
<div class="form-group normal_space fl" style="display: none;">
<input id="server_type" name="server_type">
<div class="btn btn-role <if condition='$serverType eq 2'>highlight</if>" style="border-left: 0;border-right: 0;" server-type="2">
<p>混服</p>
</div>
<div class="form-group normal_space fl">
<input type="submit" class="submit" id='submit' url="{:U('index','model='.$model['name'],false)}"
value="查询">
<div class="btn btn-role <if condition='$serverType eq 1'>highlight</if>" server-type="1">
<p>专服</p>
</div>
<!-- </form>-->
</div>
</div>
<div class="form-group normal_space fl" style="display: none;">
<input id="server_type" name="server_type">
</div>
<div class="form-group normal_space fl">
<input type="submit" class="submit" id='submit' url="{:U('index','model='.$model['name'],false)}"
value="查询">
</div>
<div class="trunk-list">
<div class="div_bgtab">
<table class="table normal_table zwm_tab">
<tr class="odd <if condition='get_parent_id(PID) eq 0'>pid</if> zwm_tr">
<th>游戏图标</th>
<th>游戏名称</th>
<th>游戏类型</th>
<th>平台</th>
<th>混服情况</th>
<th>玩家折扣</th>
<th>分成比例</th>
<!-- </form>-->
</div>
<div class="trunk-list">
<div class="div_bgtab">
<table class="table normal_table zwm_tab">
<tr class="odd <if condition='get_parent_id(PID) eq 0'>pid</if> zwm_tr">
<th>游戏图标</th>
<th>游戏名称</th>
<th>游戏类型</th>
<th>平台</th>
<th>混服情况</th>
<th>玩家折扣</th>
<th>分成比例</th>
</tr>
<empty name="dataList">
<tr>
<td colspan="7" style="text-align: center;height: 45vh;">
<img src="__IMG__/20180207/icon_wushujv2.png"/>
<p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
</td>
</tr>
<empty name="dataList">
<else/>
<volist name="dataList" id="vo">
<tr>
<td colspan="7" style="text-align: center;height: 45vh;">
<img src="__IMG__/20180207/icon_wushujv2.png"/>
<p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
</td>
<td><img src="__ROOT__{$vo.icon|get_cover='path'}" style="width: 50px;height: 50px;border-radius: 8px;"/></td>
<td>{$vo.game_name}</td>
<td>{$vo.game_type_name}</td>
<td>{:getSDKTypeName($vo['sdk_version'])}</td>
<td><?=($vo['server_type']==1)?'专服':'混服'?></td>
<td><?=($vo['discount']==10)?'----':($vo['discount'].'折')?></td>
<td>{$vo.ratio}%</td>
</tr>
<else/>
<volist name="dataList" id="vo">
<tr>
<td><img src="__ROOT__{$vo.icon|get_cover='path'}" style="width: 50px;height: 50px;border-radius: 8px;"/></td>
<td>{$vo.game_name}</td>
<td>{$vo.game_type_name}</td>
<td>{:getSDKTypeName($vo['sdk_version'])}</td>
<td><?=($vo['server_type']==1)?'专服':'混服'?></td>
<td><?=($vo['discount']==10)?'----':($vo['discount'].'折')?></td>
<td>{$vo.ratio}%</td>
</tr>
</volist>
</empty>
</table>
</div>
<div class="pagenation clearfix">
{$_page}
</div>
</volist>
</empty>
</table>
</div>
<else/>
<div class="trunk-search clearfix" style="display: table-caption;">
<div class="tab detailed-box" style="margin-top: 40px;align-items: center;">
<label class="detailed-title detailed-label" style="margin-right: 20px;">安全密码:</label>
<div class="detailed-content-box">
<input class="input-security" id="security_password" type="password" placeholder="安全密码">
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label" style="margin-right: 20px;"></label>
<div class="detailed-content-box" style="display: flex;width: 100%;">
<button class="btn-security" style="margin-right: 20px;">确定</button>
<button class="btn-security-close">取消</button>
</div>
</div>
<div class="pagenation clearfix">
{$_page}
</div>
</if>
</div>
</div>
</div>
</block>
@ -291,31 +242,6 @@
$(document).ready(function () {
$(".select_gallery").select2();
$('.btn-security').on('click', function () {
var password = $('#security_password').val();
$.ajax({
type: "post",
url: "__URL__/verifyPassword",
dataType: "json",
data: {'password': password},
success: function (data) {
if (data.status == 1) {
window.location.reload();
} else {
layer.msg(data.msg, {icon: 5});
}
},
error: function (result) {
layer.msg('网络异常', {icon: 5});
}
});
});
$('.btn-security-close').on('click', function () {
window.location.href = "{:U('Promote/index')}";
});
$('#submit').click(function () {
var url = $(this).attr('url');
console.log(url);

@ -4,116 +4,14 @@
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/game.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__CSS__/game_detailed.css" rel="stylesheet">
<link href="__CSS__/detailed.css?v=1.1" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<style type="text/css">
.trunk-list {
position: relative;
min-height: 66vh;
}
.pagenation {
text-align: center;
line-height: 5vh;
}
.lwx_dialog_prompt .layui-layer-content {
padding-top: 15px;
}
.lwx_dialog_title {
margin: 0;
padding: 0;
}
.launch_platform_prompt .layui-layer-input, .lwx_dialog_input, .lwx_dialog_select, .lwx_dialog_textarea {
display: block;
width: 220px;
height: 32px;
margin: 0 auto;
line-height: 32px;
padding: 0 5px;
border: 1px solid #ccc;
box-shadow: 1px 1px 5px rgba(0, 0, 0, .1) inset;
color: #333;
}
.lwx_dialog_select {
width: 272px;
}
.lwx_dialog_textarea {
height: 64px;
width: 260px;
margin-top: 10px;
resize: none;
}
.lwx_dialog_input {
width: 260px;
margin-top: 10px;
}
.launch_platform_prompt .layui-layer-btn, .lwx_dialog_prompt .layui-layer-btn {
text-align: center;
padding-bottom: 25px;
}
.launch_platform_prompt .layui-layer-btn .layui-layer-btn0, .lwx_dialog_prompt .layui-layer-btn .layui-layer-btn0 {
width: 81%;
line-height: 32px;
height: 32px;
margin: 0;
}
.lwx_dialog_notice {
position: absolute;
bottom: 6px;
left: 20px;
font-size: 12px;
color: #999;
}
.lwx_dialog_prompt .select2-container, .select2-container--default .select2-selection--single {
width: 272px !important;
}
.applycbtn {
display: block;
color: #50B370;
}
textarea {
font-family: inherit;
}
.trunk-content {
margin: 0 2%;
}
.pic-prev:hover, .pic-next:hover {
background-color: #4ac5c3;
}
.add-disable {
color: #999;
}
.input-number {
width: 80px;
text-align: center;
}
.input-security {
width: 500px;
height: 2.5rem;
padding-left: 10px;
border-radius: 5px;
border: 0;
}
.btn-security {
width: 300px;
height: 2.4rem;
@ -122,15 +20,6 @@
background-color: #358fe4;
color: #fff;
}
.btn-security-close {
width: 300px;
height: 2.4rem;
border: 0;
border-radius: 5px;
background-color: #fff;
color: #999;
}
</style>
</block>
@ -138,49 +27,29 @@
<div class="page-list normal_list apply-index-list">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>设置</span></div>
<div class="location-container">当前位置:<span>游戏管理></span><span>{$meta_title}</span></div>
</div>
<if condition="isset($data)">
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">设置</span>
<else/>
<span class="title_main">安全密码</span>
</if>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">{$meta_title}</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix" style="display: table-caption;">
<if condition="isset($data)">
<div class="tab detailed-box" style="margin-top: 40px;align-items: center;">
<label class="detailed-title detailed-label" style="margin-right: 20px;width: 200px;">下级账号游戏展示:</label>
<div class="detailed-content-box">
<label style="margin-right: 20px;">
<input name="child_game_permission" value="1" type="radio" <if condition="$data.child_game_permission eq 1">checked</if>> 所有游戏
</label>
<label>
<input name="child_game_permission" value="0" type="radio" <if condition="$data.child_game_permission eq 0">checked</if>> 会长已添加游戏
</label>
</div>
<div class="tab detailed-box" style="margin-top: 40px;align-items: center;">
<label class="detailed-title detailed-label" style="margin-right: 20px;width: 200px;">下级账号游戏展示:</label>
<div class="detailed-content-box">
<label style="margin-right: 20px;">
<input name="child_game_permission" value="1" type="radio" <if condition="$data.child_game_permission eq 1">checked</if>> 所有游戏
</label>
<label>
<input name="child_game_permission" value="0" type="radio" <if condition="$data.child_game_permission eq 0">checked</if>> 会长已添加游戏
</label>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label" style="margin-right: 20px;width: 200px;"></label>
<div class="detailed-content-box" style="display: flex;">
<button class="btn-security" id="btn_save" style="margin-right: 20px;width: 200px;">保存</button>
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label" style="margin-right: 20px;width: 200px;"></label>
<div class="detailed-content-box" style="display: flex;">
<button class="btn-security" id="btn_save" style="margin-right: 20px;width: 200px;">保存</button>
</div>
<else/>
<div class="tab detailed-box" style="margin-top: 40px;align-items: center;">
<label class="detailed-title detailed-label" style="margin-right: 20px;">安全密码:</label>
<div class="detailed-content-box">
<input class="input-security" id="security_password" type="password" placeholder="安全密码">
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label" style="margin-right: 20px;"></label>
<div class="detailed-content-box" style="display: flex;width: 100%;">
<button class="btn-security" id="btn_security" style="margin-right: 20px;">确定</button>
<button class="btn-security-close" id="btn_security_close">取消</button>
</div>
</div>
</if>
</div>
</div>
</div>
</div>
@ -190,31 +59,6 @@
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#btn_security').on('click', function () {
var password = $('#security_password').val();
$.ajax({
type: "post",
url: "{:U('GameDivide/verifyPassword')}",
dataType: "json",
data: {'password': password},
success: function (data) {
if (data.status == 1) {
window.location.reload();
} else {
layer.msg(data.msg, {icon: 5});
}
},
error: function (result) {
layer.msg('网络异常', {icon: 5});
}
});
});
$('#btn_security_close').on('click', function () {
window.location.href = "{:U('Promote/index')}";
});
$('#btn_save').on('click', function () {
var childGamePermission = $('input[name=child_game_permission]:checked').val();

@ -0,0 +1,110 @@
<extend name="Public/promote_base"/>
<block name="css">
<link rel="stylesheet" href="__CSS__/20170831/select2.min.css" type="text/css"/>
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/game.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__CSS__/detailed.css?v=1.1" rel="stylesheet">
<style type="text/css">
.trunk-content {
margin: 0 2%;
}
.input-security {
width: 500px;
height: 2.5rem;
padding-left: 10px;
border-radius: 5px;
border: 0;
}
.btn-security {
width: 300px;
height: 2.4rem;
border: 0;
border-radius: 5px;
background-color: #358fe4;
color: #fff;
}
.btn-security-close {
width: 300px;
height: 2.4rem;
border: 0;
border-radius: 5px;
background-color: #fff;
color: #999;
}
</style>
</block>
<block name="body">
<div class="page-list normal_list apply-index-list jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:
<volist name="modelList" id="vo" key="k">
<?php if ($k == count($modelList)) {
echo "<span>$vo</span>";
} else {
echo "<span>$vo></span>";
}?>
</volist>
</div>
</div>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">{$meta_title}</span>
<span class="title_main">安全密码</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix" style="display: table-caption;">
<div class="tab detailed-box" style="margin-top: 40px;align-items: center;">
<label class="detailed-title detailed-label" style="margin-right: 20px;">安全密码:</label>
<div class="detailed-content-box">
<input class="input-security" id="security_password" type="password" placeholder="安全密码">
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label" style="margin-right: 20px;"></label>
<div class="detailed-content-box" style="display: flex;width: 100%;">
<button class="btn-security" style="margin-right: 20px;">确定</button>
<button class="btn-security-close">取消</button>
</div>
</div>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$(".select_gallery").select2();
$('.btn-security').on('click', function () {
var password = $('#security_password').val();
$.ajax({
type: "post",
url: "__URL__/verifyPassword",
dataType: "json",
data: {'password': password},
success: function (data) {
if (data.status == 1) {
window.location.reload();
} else {
layer.msg(data.msg, {icon: 5});
}
},
error: function (result) {
layer.msg('网络异常', {icon: 5});
}
});
});
$('.btn-security-close').on('click', function () {
window.location.href = "{:U('Promote/index')}";
});
});
</script>
</block>
Loading…
Cancel
Save