jbRotk 5 years ago
parent 0fba64c6f1
commit 65461ff200

@ -5887,6 +5887,10 @@ class ExportController extends Controller
if (strlen(I('company_belong'))) { if (strlen(I('company_belong'))) {
$map['company_belong'] = I("company_belong"); $map['company_belong'] = I("company_belong");
} }
if (!is_null(I('admin_uid', null))) {
$map['admin_id'] = I('admin_uid');
}
//为数据权限添加 //为数据权限添加
setPowerPromoteIds($map, 'tab_promote.id'); setPowerPromoteIds($map, 'tab_promote.id');
@ -7114,6 +7118,7 @@ class ExportController extends Controller
$xlsCell = array( $xlsCell = array(
array('game_name','游戏'), array('game_name','游戏'),
array('game_type_name','游戏类型'),
array('partner_name','合作公司'), array('partner_name','合作公司'),
array('cash_count','游戏现金金额'), array('cash_count','游戏现金金额'),
array('balance_coin_count','平台币直充支出'), array('balance_coin_count','平台币直充支出'),
@ -7145,6 +7150,10 @@ class ExportController extends Controller
$map['_string'] .= " s.pay_time < {$timeend}"; $map['_string'] .= " s.pay_time < {$timeend}";
} }
if (!empty(I('game_type_id'))) {
$map['g.game_type_id'] = I('game_type_id');
}
$xlsData = D("spend")->gameStatistics($map); $xlsData = D("spend")->gameStatistics($map);
foreach ($xlsData as $key => $value) { foreach ($xlsData as $key => $value) {
$xlsData[$key]['all_cash_count'] = $value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count']; $xlsData[$key]['all_cash_count'] = $value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count'];

@ -725,6 +725,10 @@ class FinanceController extends ThinkController
} }
$map['_string'] .= " s.pay_time < {$timeend}"; $map['_string'] .= " s.pay_time < {$timeend}";
} }
if (!empty(I('game_type_id'))) {
$map['g.game_type_id'] = I('game_type_id');
}
$startTime = time(); $startTime = time();
//游戏统计列表 //游戏统计列表
$data = D("spend")->gameStatistics($map, $row, $p); $data = D("spend")->gameStatistics($map, $row, $p);
@ -749,6 +753,8 @@ class FinanceController extends ThinkController
$sumInside = $totalData['inside_cash_count']; $sumInside = $totalData['inside_cash_count'];
$sumAll = $sumCash + $sumBalance + $sumInside; $sumAll = $sumCash + $sumBalance + $sumInside;
$game_types = M("game_type", 'tab_')->field('id, type_name')->select();
$this->assign('game_types', $game_types);
$this->assign('sumCash', $sumCash); $this->assign('sumCash', $sumCash);
$this->assign('sumBalance', $sumBalance); $this->assign('sumBalance', $sumBalance);
$this->assign('sumInside', $sumInside); $this->assign('sumInside', $sumInside);

@ -99,6 +99,11 @@ class PromoteController extends ThinkController
if (strlen(I('company_belong'))) { if (strlen(I('company_belong'))) {
$map['company_belong'] = I("company_belong"); $map['company_belong'] = I("company_belong");
} }
if (!is_null(I('admin_uid', null))) {
$map['admin_id'] = I('admin_uid');
}
$this->m_title = '推广员列表'; $this->m_title = '推广员列表';
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find()); $this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find());
if (isset($_REQUEST['row'])) { if (isset($_REQUEST['row'])) {
@ -176,6 +181,8 @@ class PromoteController extends ThinkController
if ($page) { if ($page) {
$this->assign('_page', $page); $this->assign('_page', $page);
} }
$admins = M('member')->field('uid,nickname')->select();
$this->assign('admins', $admins);
$this->assign('list_data', $list_data); $this->assign('list_data', $list_data);
$this->display(); $this->display();
} }
@ -1216,6 +1223,13 @@ class PromoteController extends ThinkController
$map['pb.can_view_recharge'] = I('can_view_recharge'); $map['pb.can_view_recharge'] = I('can_view_recharge');
} }
if (!is_null(I('company_id', null))) {
$map['p.company_id'] = I('company_id');
}
if (!is_null(I('admin_id', null))) {
$map['p.admin_id'] = I('admin_id');
}
$this->m_title = '推广公会归属管理'; $this->m_title = '推广公会归属管理';
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/belong','status'=>1])->find()); $this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/belong','status'=>1])->find());
if (isset($_REQUEST['row'])) { if (isset($_REQUEST['row'])) {
@ -1229,8 +1243,9 @@ class PromoteController extends ThinkController
$model = M('promote_belong', 'tab_'); $model = M('promote_belong', 'tab_');
$list_data = $model->alias('pb') $list_data = $model->alias('pb')
->join('left join tab_promote as p on p.id=pb.promote_id') ->join('left join tab_promote as p on p.id=pb.promote_id')
->join('left join tab_promote_company as pc on pc.id = p.company_id')
->where($map) ->where($map)
->field('p.*,pb.*') ->field('p.*,pb.*, pc.company_name')
->page($p, $row) ->page($p, $row)
->order('verify_status asc,applicant_time asc') ->order('verify_status asc,applicant_time asc')
->select(); ->select();
@ -1241,8 +1256,12 @@ class PromoteController extends ThinkController
if ($page) { if ($page) {
$this->assign('_page', $page); $this->assign('_page', $page);
} }
$companys = M('promote_company', 'tab_')->field('id, company_name')->select();
$admins = M('member')->field('uid,nickname')->select();
$this->assign('is_admin', is_administrator()); $this->assign('is_admin', is_administrator());
$this->assign('list_data', $list_data); $this->assign('list_data', $list_data);
$this->assign('companys', $companys);
$this->assign('admins', $admins);
$this->display(); $this->display();
} }

@ -841,7 +841,7 @@ class SpendModel extends Model
public function gameStatistics($map, $row = 0, $page = 1) public function gameStatistics($map, $row = 0, $page = 1)
{ {
$query = $this->alias("s") $query = $this->alias("s")
->field("s.game_id,s.game_name,p.partner as partner_name, ->field("s.game_id,s.game_name,p.partner as partner_name, g.game_type_name,
SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count, SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count, SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count") SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count")

@ -107,6 +107,15 @@
</select> </select>
</div> </div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_type_id" name="game_type_id" class="select_gallery" >
<option value="">请选择游戏类型</option>
<volist name="game_types" id="type">
<option value="{$type.id}" <if condition="$type.id eq I('game_type_id', null)">selected</if> >{$type.type_name}</option>
</volist>
</select>
</div>
<div class="input-list"> <div class="input-list">
<input type="text" readonly id="time-start" name="timestart" class="" value="{$startDate}" <input type="text" readonly id="time-start" name="timestart" class="" value="{$startDate}"
placeholder="开始时间"/> placeholder="开始时间"/>
@ -152,6 +161,8 @@
<th >游戏</th> <th >游戏</th>
<th>游戏类型</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>
@ -180,6 +191,7 @@
<tr> <tr>
<td ><if condition="$data.partner_name neq ''">{$data.partner_name}<else/></if></td> <td ><if condition="$data.partner_name neq ''">{$data.partner_name}<else/></if></td>
<td ><if condition="$data.game_name neq ''">{$data.game_name}<else/></if></td> <td ><if condition="$data.game_name neq ''">{$data.game_name}<else/></if></td>
<td ><if condition="$data.game_type_name neq ''">{$data.game_type_name}<else/></if></td>
<td ><if condition="$data.cash_count neq ''">{$data.cash_count}<else/>0</if></td> <td ><if condition="$data.cash_count neq ''">{$data.cash_count}<else/>0</if></td>
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" <td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer"
data-url="{:U('Finance/coinDetail',array( data-url="{:U('Finance/coinDetail',array(
@ -215,7 +227,7 @@
</tr> </tr>
</volist> </volist>
<tr> <tr>
<td colspan="2" ><span>总计</span></td> <td colspan="3" ><span>总计</span></td>
<td ><span><if condition="$sumCash neq ''">{$sumCash}<else/>0</if></span></td> <td ><span><if condition="$sumCash neq ''">{$sumCash}<else/>0</if></span></td>
<td><if condition="$sumBalance neq ''">{$sumBalance}<else/>0</if></td> <td><if condition="$sumBalance neq ''">{$sumBalance}<else/>0</if></td>
<td><if condition="$sumInside neq ''">{$sumInside}<else/>0</if></td> <td><if condition="$sumInside neq ''">{$sumInside}<else/>0</if></td>

@ -57,6 +57,22 @@
<div class="input-list"> <div class="input-list">
<input type="text" name="account" placeholder="请输入会长账号" value="{:I('account')}"> <input type="text" name="account" placeholder="请输入会长账号" value="{:I('account')}">
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="company_id" name="company_id" class="select_gallery" >
<option value="">推广公司</option>
<volist name="companys" id="c">
<option value="{$c.id}" <if condition="$c.id eq I('company_id', null)">selected</if> >{$c.company_name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="admin_id" name="admin_id" class="select_gallery" >
<option value="">归属管理员</option>
<volist name="admins" id="admin">
<option value="{$admin.uid}" <if condition="$admin.uid eq I('admin_id')">selected</if> >{$admin.nickname}</option>
</volist>
</select>
</div> </div>
<div class="input-list input-list-channelstatus"> <div class="input-list input-list-channelstatus">
<select name="company_relation"> <select name="company_relation">
@ -101,6 +117,7 @@
<th>会长ID</th> <th>会长ID</th>
<th>会长账号</th> <th>会长账号</th>
<th>手机号码</th> <th>手机号码</th>
<th>推广公司</th>
<th ><a class="paixu" data-order='create_time'>注册时间</a></th> <th ><a class="paixu" data-order='create_time'>注册时间</a></th>
<th>状态</th> <th>状态</th>
<th>身份状态</th> <th>身份状态</th>
@ -112,6 +129,7 @@
<th>审核</th> <th>审核</th>
<th>申请人</th> <th>申请人</th>
<th>确认人</th> <th>确认人</th>
<th>归属管理员</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
</thead> </thead>
@ -144,6 +162,7 @@
</if>--> </if>-->
{$data.mobile_phone} {$data.mobile_phone}
</td> </td>
<td>{$data.company_name}</td>
<td>{:set_show_time($data['create_time'])}</td> <td>{:set_show_time($data['create_time'])}</td>
<td> <td>
<?php $status_str = get_info_status($data['status'],3); $status_str = $status_str ?: '待审核';?> <?php $status_str = get_info_status($data['status'],3); $status_str = $status_str ?: '待审核';?>
@ -213,6 +232,7 @@
</td> </td>
<td>{$data['applicant_name']}</td> <td>{$data['applicant_name']}</td>
<td>{$data['approver_name']}</td> <td>{$data['approver_name']}</td>
<td>{:get_admin_nickname($data['admin_id'])}</td>
<td> <td>
<a href="{:U('belong_edit',array('id'=>$data['id']))}" class="">编辑</a> <a href="{:U('belong_edit',array('id'=>$data['id']))}" class="">编辑</a>
</td> </td>

@ -102,6 +102,14 @@
<option value="4">组员</option> <option value="4">组员</option>
</select> </select>
</div> </div>
<div class="input-list input-list-game search_label_rehab">
<select id="admin_uid" name="admin_uid" class="select_gallery" >
<option value="">归属管理员</option>
<volist name="admins" id="admin">
<option value="{$admin.uid}" <if condition="$admin.uid eq I('admin_uid')">selected</if> >{$admin.nickname}</option>
</volist>
</select>
</div>
<div class="input-list input-list-admin search_label_rehab"> <div class="input-list input-list-admin search_label_rehab">
<select id="admin_id" name="admin_id" class="select_gallery" > <select id="admin_id" name="admin_id" class="select_gallery" >
<option value="">商务专员</option> <option value="">商务专员</option>
@ -196,6 +204,7 @@
<th>所属会长</th> <th>所属会长</th>
<th>工会归属</th> <th>工会归属</th>
<th>工会关系</th> <th>工会关系</th>
<th>归属管理员</th>
<th>商务专员</th> <th>商务专员</th>
<th>状态</th> <th>状态</th>
<th>身份状态</th> <th>身份状态</th>
@ -248,6 +257,7 @@
</td> </td>
<td>{$data['company_belong_str']}</td> <td>{$data['company_belong_str']}</td>
<td>{$data['company_relation_str']}</td> <td>{$data['company_relation_str']}</td>
<td>{:get_admin_nickname($data['admin_id'])}</td>
<td>{:get_business_affairs_account($data['ba_id'])}</td> <td>{:get_business_affairs_account($data['ba_id'])}</td>
<td> <td>
<?php $status_str = get_info_status($data['status'],3); $status_str = $status_str ?: '待审核';?> <?php $status_str = get_info_status($data['status'],3); $status_str = $status_str ?: '待审核';?>
@ -325,7 +335,7 @@
<tbody> <tbody>
<if condition = "empty($list_data)"> <if condition = "empty($list_data)">
<tr> <tr>
<td colspan="7" class="text-center">aOh! 暂时还没有内容!</td> <td colspan="10" class="text-center">aOh! 暂时还没有内容!</td>
</tr> </tr>
</if> </if>
<notemtpy name = "list_data"> <notemtpy name = "list_data">

Loading…
Cancel
Save