合并statistcs
commit
0ef4241570
@ -0,0 +1,830 @@
|
||||
<?php
|
||||
namespace Admin\Controller;
|
||||
class FinancePromoteController extends AdminController
|
||||
{
|
||||
public function _initialize(Type $var = null)
|
||||
{
|
||||
parent::_initialize();
|
||||
// echo "<pre>";
|
||||
}
|
||||
public function index()
|
||||
{
|
||||
//排序
|
||||
if(!array_key_exists("time_start",$_REQUEST)){
|
||||
$this->redirect(ACTION_NAME, array('time_start' => date('Y-m-d',strtotime('-30 day')),"time_end"=>date('Y-m-d')));
|
||||
}
|
||||
if ($_REQUEST['data_order'] != '') {
|
||||
$data_order = reset(explode(',', $_REQUEST['data_order']));
|
||||
$data_order_type = end(explode(',', $_REQUEST['data_order']));
|
||||
$this->assign('userarpu_order', $data_order);
|
||||
$this->assign('userarpu_order_type', $data_order_type);
|
||||
}
|
||||
//时间
|
||||
$istimeselect = false;
|
||||
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
||||
$istimeselect = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
|
||||
} elseif (isset($_REQUEST['time_start'])) {
|
||||
$istimeselect = ['GT', strtotime($_REQUEST['time_start'])];
|
||||
} elseif (isset($_REQUEST['time_end'])) {
|
||||
$istimeselect = ['LT', strtotime($_REQUEST['time_end']) + 86399];
|
||||
}
|
||||
|
||||
$senddata = [];
|
||||
//获取各会长的充值方式
|
||||
$cash = self::getJoinPromoteData([],$istimeselect);
|
||||
foreach($cash as $k=>$v){
|
||||
$senddata[$v['p_id']] = $v;
|
||||
}
|
||||
//内冲
|
||||
$inside = self::getJoinPromoteData([],$istimeselect,"promote_coin");
|
||||
foreach($inside as $k=>$v){
|
||||
if(array_key_exists($v['p_id'],$senddata)){
|
||||
$senddata[$v['p_id']]['inside_cash_count']= $v['pay_amount']-$v['back_amount'];
|
||||
}else{
|
||||
$v['inside_cash_count'] = $v['pay_amount']-$v['back_amount'];
|
||||
unset($v['pay_amount']);
|
||||
unset($v['back_amount']);
|
||||
$senddata[$v['p_id']] = $v;
|
||||
};
|
||||
}
|
||||
if(array_key_exists(0,$senddata) || $_REQUEST['promote_id']==0){
|
||||
$pmap['status']=1;
|
||||
if($istimeselect){
|
||||
$pmap['create_time'] = $istimeselect;
|
||||
}
|
||||
$admininside = M("provide_user p","tab_")->field("sum(amount) amount")->where($pmap)->find();
|
||||
if($admininside['amount'] >0){
|
||||
$senddata[0]['inside_cash_count']= $admininside['amount'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$data = [];
|
||||
$count =array(
|
||||
"cash_count"=>0,
|
||||
"balance_coin_count"=>0,
|
||||
"bind_coin_count"=>0,
|
||||
"inside_cash_count"=>0,
|
||||
);
|
||||
foreach($senddata as $k=>$v){
|
||||
|
||||
if(empty($v['company_name'])) $v['company_name']= "万盟天下科技";
|
||||
if(!array_key_exists('cash_count',$v)) $v['cash_count']=0;
|
||||
if(!array_key_exists('balance_coin_count',$v)) $v['balance_coin_count']=0;
|
||||
if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0;
|
||||
if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0;
|
||||
$v['promote_account'] = get_promote_name($v['p_id']);
|
||||
$v['allcount'] = $v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'];
|
||||
$count['cash_count'] += $v['cash_count'];
|
||||
$count['balance_coin_count'] += $v['balance_coin_count'];
|
||||
$count['bind_coin_count'] += $v['bind_coin_count'];
|
||||
$count['inside_cash_count'] += $v['inside_cash_count'];
|
||||
$count['all_count'] += $v['allcount'];
|
||||
$data[] = $v;
|
||||
}
|
||||
$data = my_sort($data, $data_order_type, (int)$data_order);
|
||||
if(isset($_REQUEST['export'])){
|
||||
data2csv($data,'公会统计',array(
|
||||
"company_name"=>"推广公司",
|
||||
"promote_account"=>"会长渠道",
|
||||
"cash_count"=>"游戏现金金额",
|
||||
"balance_coin_count"=>"平台币直充支出",
|
||||
"bind_coin_count"=>"内充支出",
|
||||
"inside_cash_count"=>"平台币内充",
|
||||
"allcount"=>"渠道游戏内充值合计"
|
||||
));
|
||||
}
|
||||
$this->assign('list_data', $data);
|
||||
$this->assign('all_count', $count);
|
||||
$this->meta_title = '公会统计';
|
||||
$this->display();
|
||||
# code...
|
||||
}
|
||||
private function getJoinPromoteData($map,$istimeselect,$type="spend")
|
||||
{
|
||||
if ($_REQUEST['promote_id'] != '') {
|
||||
if ($_REQUEST['promote_id'] == 0) {
|
||||
$map['s.promote_id'] = 0;
|
||||
} else {
|
||||
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
|
||||
if ($promoter_ids) {
|
||||
$map['s.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))];
|
||||
}
|
||||
}
|
||||
}
|
||||
if($type == "spend"){
|
||||
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {
|
||||
$map["s.game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
|
||||
}
|
||||
if($istimeselect){
|
||||
$map['s.pay_time']=$istimeselect;
|
||||
}
|
||||
|
||||
$map['s.pay_status']=1;
|
||||
$field= "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 = -1 THEN pay_amount ELSE 0 END) as bind_coin_count,
|
||||
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) p_id,
|
||||
IFNULL(company_id,0) company_id,company_name";
|
||||
return M()
|
||||
->table("tab_spend s")
|
||||
->field($field)
|
||||
->where($map)
|
||||
->join("tab_promote promote ON s.promote_id = promote.id","left")
|
||||
->join("tab_promote_company company ON promote.company_id = company.id","left")
|
||||
->group('p_id')
|
||||
->select();
|
||||
}else{
|
||||
if($istimeselect){
|
||||
$map['s.create_time']=$istimeselect;
|
||||
}
|
||||
$map['s.status']=1;
|
||||
$map['s.source_id']=0;
|
||||
$field= "SUM(CASE WHEN s.type = 1 THEN num ELSE 0 END) as pay_amount,SUM(CASE WHEN s.type = 2 THEN num ELSE 0 END) as back_amount,IFNULL(if(substring_index(substring_index(`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(`chain`,'/',2),'/',-1)),0) p_id";
|
||||
return M("promote_coin s","tab_")
|
||||
->field($field)
|
||||
->where($map)
|
||||
->join("tab_promote promote ON s.promote_id = promote.id","left")
|
||||
->group('p_id')
|
||||
->select();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//渠道查看
|
||||
public function promoteUser($p = 0)
|
||||
{
|
||||
$page = intval($p);
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
$arraypage = $page;
|
||||
|
||||
if (isset($_REQUEST['row'])) {
|
||||
$row = $_REQUEST['row'];
|
||||
} else {
|
||||
$row = 10;
|
||||
}
|
||||
|
||||
$istimeselect = false;
|
||||
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
||||
$istimeselect = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
|
||||
} elseif (isset($_REQUEST['time_start'])) {
|
||||
$istimeselect = ['GT', strtotime($_REQUEST['time_start'])];
|
||||
} elseif (isset($_REQUEST['time_end'])) {
|
||||
$istimeselect = ['LT', strtotime($_REQUEST['time_end']) + 86399];
|
||||
}
|
||||
$senddata = [];
|
||||
//获取各会长的现金充值
|
||||
$cash = self::promoteUserData([],$istimeselect);
|
||||
foreach($cash as $k=>$v){
|
||||
$senddata[$v['promote_id']] = $v;
|
||||
}
|
||||
$inside = self::promoteUserData([],$istimeselect,"promote_coin");
|
||||
foreach($inside as $k=>$v){
|
||||
if(array_key_exists($v['promote_id'],$senddata)){
|
||||
$senddata[$v['promote_id']]['inside_cash_count']= $v['pay_amount'];
|
||||
}else{
|
||||
$v['inside_cash_count'] = $v['pay_amount'];
|
||||
unset($v['pay_amount']);
|
||||
$senddata[$v['promote_id']] = $v;
|
||||
};
|
||||
}
|
||||
if(array_key_exists(0,$senddata) || $_REQUEST['promote_id']==0){
|
||||
$pmap['status']=1;
|
||||
if($istimeselect){
|
||||
$pmap['create_time'] = $istimeselect;
|
||||
}
|
||||
$admininside = M("provide_user p","tab_")->field("sum(amount) amount")->where($pmap)->find();
|
||||
if($admininside['amount'] >0){
|
||||
$senddata[0]['inside_cash_count']= $admininside['amount'];
|
||||
}
|
||||
|
||||
}
|
||||
$count = count($senddata);
|
||||
if ($_REQUEST['data_order'] != '') {
|
||||
$data_order = reset(explode(',', $_REQUEST['data_order']));
|
||||
$data_order_type = end(explode(',', $_REQUEST['data_order']));
|
||||
$this->assign('userarpu_order', $data_order);
|
||||
$this->assign('userarpu_order_type', $data_order_type);
|
||||
}
|
||||
|
||||
$page = set_pagination($count, $row);
|
||||
if ($page) {
|
||||
$this->assign('_page', $page);
|
||||
}
|
||||
$data = [];
|
||||
$allcount =array(
|
||||
"cash_count"=>0,
|
||||
"balance_coin_count"=>0,
|
||||
"bind_coin_count"=>0,
|
||||
"inside_cash_count"=>0,
|
||||
);
|
||||
foreach($senddata as $k=>$v){
|
||||
|
||||
if(empty($v['company_name'])) $v['company_name']= "万盟天下科技";
|
||||
if(!array_key_exists('cash_count',$v)) $v['cash_count']=0;
|
||||
if(!array_key_exists('balance_coin_count',$v)) $v['balance_coin_count']=0;
|
||||
if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0;
|
||||
if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0;
|
||||
$v['allcount'] = $v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'];
|
||||
$allcount['cash_count'] += $v['cash_count'];
|
||||
$allcount['balance_coin_count'] += $v['balance_coin_count'];
|
||||
$allcount['bind_coin_count'] += $v['bind_coin_count'];
|
||||
$allcount['inside_cash_count'] += $v['inside_cash_count'];
|
||||
$allcount['all_count'] += $v['allcount'];
|
||||
$data[] = $v;
|
||||
}
|
||||
|
||||
$data = my_sort($data, $data_order_type, (int)$data_order);
|
||||
if(isset($_REQUEST['export'])){
|
||||
data2csv($data,'渠道统计',array(
|
||||
"company_name"=>"推广公司",
|
||||
"promote_account"=>"推广员账号",
|
||||
"cash_count"=>"游戏现金金额",
|
||||
"balance_coin_count"=>"平台币直充支出",
|
||||
"bind_coin_count"=>"内充支出",
|
||||
"inside_cash_count"=>"平台币内充",
|
||||
"allcount"=>"渠道游戏内充值合计"
|
||||
));
|
||||
}
|
||||
$size = $row;
|
||||
$data = array_slice($data, ($arraypage - 1) * $size, $size);
|
||||
$this->assign('all_count', $allcount);
|
||||
$this->assign('list_data', $data);
|
||||
$this->meta_title = '渠道统计';
|
||||
$this->display();
|
||||
// dump($senddata);
|
||||
|
||||
}
|
||||
private function promoteUserData($map,$istimeselect,$type="spend")
|
||||
{
|
||||
if ($_REQUEST['promote_id'] != '') {
|
||||
if ($_REQUEST['promote_id'] == 0) {
|
||||
$map['s.promote_id'] = 0;
|
||||
} else {
|
||||
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
|
||||
if ($promoter_ids) {
|
||||
$map['s.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($type == "spend") {
|
||||
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {
|
||||
$map["s.game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
|
||||
}
|
||||
if($istimeselect){
|
||||
$map['s.pay_time']=$istimeselect;
|
||||
}
|
||||
$map['s.pay_status']=1;
|
||||
$field= "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 = -1 THEN pay_amount ELSE 0 END) as bind_coin_count,
|
||||
IFNULL(company_id,0) company_id,company_name,promote_id,promote.account promote_account";
|
||||
return M()
|
||||
->table("tab_spend s")
|
||||
->field($field)
|
||||
->where($map)
|
||||
->join("tab_promote promote ON s.promote_id = promote.id", "left")
|
||||
->join("tab_promote_company company ON promote.company_id = company.id", "left")
|
||||
->group('promote_id')
|
||||
->select();
|
||||
}else{
|
||||
if($istimeselect){
|
||||
$map['s.create_time']=$istimeselect;
|
||||
}
|
||||
$map['s.status']=1;
|
||||
$map['s.source_id']=0;
|
||||
$map['s.type']=1;
|
||||
$field= "sum(num) pay_amount,promote_id";
|
||||
return M("promote_coin s","tab_")
|
||||
->field($field)
|
||||
->where($map)
|
||||
->join("tab_promote promote ON s.promote_id = promote.id","left")
|
||||
->group('promote_id')
|
||||
->select();
|
||||
}
|
||||
# code...
|
||||
}
|
||||
/**
|
||||
*游戏统计
|
||||
*/
|
||||
public function gameStatistics($p = 1) {
|
||||
$page = intval($p);
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
$row = $_REQUEST['row'] ?? 10;
|
||||
|
||||
$map = [];
|
||||
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {
|
||||
$map["s.game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
|
||||
}
|
||||
if (!empty(I('partner_id'))) {
|
||||
$map['g.partner_id'] = I('partner_id');
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
||||
$map['s.pay_time'] = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
|
||||
} elseif (isset($_REQUEST['time_start'])) {
|
||||
$map['s.pay_time'] = ['GT', strtotime($_REQUEST['time_start'])];
|
||||
} elseif (isset($_REQUEST['time_end'])) {
|
||||
$map['s.pay_time'] = ['LT', strtotime($_REQUEST['time_end']) + 86399];
|
||||
}
|
||||
//判断是否有推广员
|
||||
$level = 1;
|
||||
if ($_REQUEST['promote_id'] != '') {
|
||||
if ($_REQUEST['promote_id'] != 0){
|
||||
$level = M('promote', 'tab_')->field('level')->where(array('id' => $_REQUEST['promote_id']))->find()['level'];
|
||||
}
|
||||
if ($_REQUEST['promote_id'] == 0 || $_REQUEST['promote_type'] == 2) {
|
||||
$map['s.promote_id'] = $_REQUEST['promote_id'];
|
||||
} else {
|
||||
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
|
||||
if ($promoter_ids) {
|
||||
$map['s.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))];
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->assign('promote_level', $level);
|
||||
|
||||
//游戏统计列表
|
||||
$data =self::gameStatisticsData($map, $row, $p);
|
||||
if(isset($_REQUEST['export'])){
|
||||
$data =self::gameStatisticsData($map);
|
||||
}else {
|
||||
$data =self::gameStatisticsData($map, $row, $p);
|
||||
}
|
||||
foreach ($data as $key => &$value) {
|
||||
$value['cash_count']?:0;
|
||||
$value['balance_coin_count']?:0;
|
||||
$value['inside_cash_count']?:0;
|
||||
$value['all_cash_count'] = $value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count'];
|
||||
if(!$value['partner_name']) $value['partner_name'] = "无";
|
||||
if(!$value['game_name']) $value['game_name'] = "无";
|
||||
}
|
||||
if (isset($_REQUEST['export'])) {
|
||||
data2csv($data,'游戏统计', array(
|
||||
"partner_name"=>"合作公司",
|
||||
"game_name"=>"游戏",
|
||||
"cash_count"=>"游戏现金金额",
|
||||
"balance_coin_count"=>"平台币直充支出",
|
||||
"inside_cash_count"=>"内充支出",
|
||||
"all_cash_count"=>"游戏内充值合计"
|
||||
));
|
||||
}
|
||||
|
||||
$allData = self::gameStatisticsData($map);//列表总数
|
||||
$count = count($allData);
|
||||
$page = set_pagination($count, $row);
|
||||
if ($page) {
|
||||
$this->assign('_page', $page);//分页
|
||||
}
|
||||
|
||||
//统计合计
|
||||
$totalData = self::totalGameStatisticsData($map);
|
||||
|
||||
$sumCash = $totalData['cash_count'];
|
||||
$sumBalance = $totalData['balance_coin_count'];
|
||||
$sumInside = $totalData['inside_cash_count'];
|
||||
$sumAll = $sumCash + $sumBalance + $sumInside;
|
||||
|
||||
$this->assign('sumCash', $sumCash);
|
||||
$this->assign('sumBalance', $sumBalance);
|
||||
$this->assign('sumInside', $sumInside);
|
||||
$this->assign('sumAll', $sumAll);
|
||||
$this->assign('data',$data);
|
||||
$this->meta_title = '游戏统计';
|
||||
$this->display();
|
||||
}
|
||||
//游戏订单详情
|
||||
public function gameStatisticsDetail($p = 1) {
|
||||
set_time_limit(0);
|
||||
if(isset($_REQUEST['game_id'])){
|
||||
|
||||
//转化为名称和类型,重新请求
|
||||
$game = M("game","tab_")->field("relation_game_name,sdk_version")->where(" id = {$_REQUEST['game_id']} ")->find();
|
||||
if($game === false){
|
||||
$this->error("参数错误");
|
||||
}
|
||||
$_GET['game_name'] = $game['relation_game_name'];
|
||||
$_GET['game_type'] = $game['sdk_version'];
|
||||
unset($_GET['game_id']);
|
||||
$this->redirect(ACTION_NAME, I('get.'));
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['pay_way'])) {
|
||||
$map['pay_way'] = $_REQUEST['pay_way'];
|
||||
}
|
||||
|
||||
if (!empty($_REQUEST['pay_order_number'])) {
|
||||
$map['pay_order_number'] = $_REQUEST['pay_order_number'];
|
||||
}
|
||||
|
||||
if (!empty(I('partner_id'))) {
|
||||
$wherePartner = I('partner_id');
|
||||
$gameId = M("game","tab_")->field("id")->where("partner_id={$wherePartner}")->select();
|
||||
$gameId = implode(',',array_column($gameId,'id'));
|
||||
$map['game_id'] = ['in',$gameId];
|
||||
}
|
||||
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {
|
||||
$map["game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
||||
$map['pay_time'] = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
|
||||
} elseif (isset($_REQUEST['time_start'])) {
|
||||
$map['pay_time'] = ['GT', strtotime($_REQUEST['time_start'])];
|
||||
} elseif (isset($_REQUEST['time_end'])) {
|
||||
$map['pay_time'] = ['LT', strtotime($_REQUEST['time_end']) + 86399];
|
||||
}
|
||||
|
||||
//判断是否有推广员
|
||||
if ($_REQUEST['promote_id'] != '') {
|
||||
if ($_REQUEST['promote_id'] == 0 || $_REQUEST['promote_type'] == 2) {
|
||||
$map['promote_id'] = $_REQUEST['promote_id'];
|
||||
} else {
|
||||
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
|
||||
if ($promoter_ids) {
|
||||
$map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty(I("root_id"))) {
|
||||
$root_id = I("root_id");
|
||||
$promote_id = $this->getPromoteList($root_id);
|
||||
array_push($promote_id, $root_id);
|
||||
}
|
||||
|
||||
if ($_REQUEST['root_id']=='0') {
|
||||
$map['promote_id'] = $_REQUEST['root_id'];
|
||||
}
|
||||
|
||||
$promote_id = implode(',',$promote_id);
|
||||
if ($promote_id) {
|
||||
$map['promote_id'] = ['in',$promote_id];
|
||||
}
|
||||
|
||||
$page = intval($p);
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
if (isset($_REQUEST['row'])) {
|
||||
$row = $_REQUEST['row'];
|
||||
} else {
|
||||
$row = 10;
|
||||
}
|
||||
$map['pay_status'] = 1;
|
||||
if (!empty(I("game_id"))) {
|
||||
$map['game_id'] = I("game_id");
|
||||
}
|
||||
if (!empty(I('user_account'))) {
|
||||
$map['user_account'] = array('like','%'.I("user_account").'%');
|
||||
}
|
||||
if (!empty(I('user_nickname'))) {
|
||||
$map['game_player_name'] = array('like',I("user_nickname").'%');
|
||||
}
|
||||
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way";
|
||||
$group = "";
|
||||
$order = "pay_time DESC";
|
||||
if(isset($_REQUEST['export'])){
|
||||
$data = D('spend')->getSpendData($map,$field,$group,$order);
|
||||
}else {
|
||||
$data = D('spend')->getSpendData($map,$field,$group,$order,$page,$row);
|
||||
}
|
||||
foreach($data as $key => $value) {
|
||||
$data[$key]['pay_way'] = getPayType($value['pay_way']);
|
||||
}
|
||||
if (isset($_REQUEST['export'])) {
|
||||
data2csv($data,'游戏订单查看', array(
|
||||
"pay_order_number"=>"支付订单号",
|
||||
"pay_time"=>"充值时间",
|
||||
"user_account"=>"玩家账号",
|
||||
"game_name"=>"游戏名称",
|
||||
"promote_account"=>"所属推广员",
|
||||
"spend_ip"=>"充值ip",
|
||||
"server_name"=>"游戏区服",
|
||||
"game_player_name"=>"角色名称",
|
||||
"cost"=>"订单金额",
|
||||
"pay_amount"=>"实付金额",
|
||||
"pay_way"=>"充值方式",
|
||||
));
|
||||
}
|
||||
$totalData = self::totalGameStatisticsData($map, false);
|
||||
$sumCash = $totalData['cash_count'] ?? 0;
|
||||
$sumBalance = $totalData['balance_coin_count'] ?? 0;
|
||||
$sumInside = $totalData['inside_cash_count'] ?? 0;
|
||||
$sumAll = $sumCash + $sumBalance + $sumInside;
|
||||
|
||||
$this->assign('sumCash', $sumCash);
|
||||
$this->assign('sumBalance', $sumBalance);
|
||||
$this->assign('sumInside', $sumInside);
|
||||
$this->assign('sumAll', null_to_0($sumAll));
|
||||
|
||||
$count = D("spend")->getSpendData($map,$field,$group,$order);
|
||||
|
||||
$count = count($count);
|
||||
$page = set_pagination($count,$row);
|
||||
if($page) {$this->assign('_page', $page);}
|
||||
$this->meta_title = '游戏订单查看';
|
||||
|
||||
$this->assign('data',$data);
|
||||
$from = I('from', '');
|
||||
$this->display($from);
|
||||
}
|
||||
|
||||
private function gameStatisticsData($map, $row = 0, $page = 1)
|
||||
{
|
||||
$map['s.pay_status']=1;
|
||||
$query = M("spend","tab_")->alias("s")
|
||||
->field("s.game_id,s.game_name,p.partner as partner_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 balance_coin_count,
|
||||
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count")
|
||||
->join('LEFT JOIN tab_game as g ON s.game_id=g.id')
|
||||
->join('LEFT JOIN tab_partner as p ON g.partner_id=p.id')
|
||||
->where($map)
|
||||
->group('s.game_id');
|
||||
if ($row != 0) {
|
||||
$query = $query->page($page,$row);
|
||||
}
|
||||
$data = $query->select();
|
||||
// dump($data);die();
|
||||
return $data;
|
||||
}
|
||||
private function totalGameStatisticsData($map, $join = true)
|
||||
{
|
||||
$query = M("spend","tab_")->alias("s")
|
||||
->field("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 = -1 THEN pay_amount ELSE 0 END) as inside_cash_count");
|
||||
if ($join) {
|
||||
$query = $query->join('LEFT JOIN tab_game as g ON s.game_id=g.id')
|
||||
->join('LEFT JOIN tab_partner as p ON g.partner_id=p.id');
|
||||
}
|
||||
$data = $query->where(['s.pay_status' => 1])
|
||||
->where($map)
|
||||
->find();
|
||||
return $data;
|
||||
}
|
||||
//游戏弹框详情
|
||||
public function gameCoinDetail($p = 1) {
|
||||
|
||||
set_time_limit(0);
|
||||
|
||||
if (isset($_REQUEST['pay_way'])) {
|
||||
$map['pay_way'] = $_REQUEST['pay_way'];
|
||||
$this->assign('pay_way', $map['pay_way']);
|
||||
}
|
||||
|
||||
if (!empty($_REQUEST['pay_order_number'])) {
|
||||
$map['pay_order_number'] = $_REQUEST['pay_order_number'];
|
||||
}
|
||||
|
||||
if (!empty(I('partner_id'))&&empty(I("game_id"))) {
|
||||
$wherePartner = I('partner_id');
|
||||
$gameId = M("game","tab_")->field("id")->where("partner_id={$wherePartner}")->select();
|
||||
$gameId = implode(',',array_column($gameId,'id'));
|
||||
$map['tab_spend.game_id'] = ['in',$gameId];
|
||||
}
|
||||
if (!empty(I("game_id"))) {
|
||||
$map['tab_spend.game_id'] = I("game_id");
|
||||
}
|
||||
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {
|
||||
$map["tab_spend.game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
||||
$map['pay_time'] = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
|
||||
} elseif (isset($_REQUEST['time_start'])) {
|
||||
$map['pay_time'] = ['GT', strtotime($_REQUEST['time_start'])];
|
||||
} elseif (isset($_REQUEST['time_end'])) {
|
||||
$map['pay_time'] = ['LT', strtotime($_REQUEST['time_end']) + 86399];
|
||||
}
|
||||
|
||||
if ($_REQUEST['promote_id'] != '') {
|
||||
if ($_REQUEST['promote_id'] == 0 || $_REQUEST['promote_type'] == 2) {
|
||||
$map['tab_spend.promote_id'] = $_REQUEST['promote_id'];
|
||||
} else {
|
||||
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
|
||||
if ($promoter_ids) {
|
||||
$map['tab_spend.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$page = intval($p);
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
if (isset($_REQUEST['row'])) {
|
||||
$row = $_REQUEST['row'];
|
||||
} else {
|
||||
$row = 10;
|
||||
}
|
||||
$map['pay_status'] = 1;
|
||||
|
||||
if (!empty(I('user_account'))) {
|
||||
$map['tab_spend.user_account'] = array('like','%'.I("user_account").'%');
|
||||
}
|
||||
if (!empty(I('user_nickname'))) {
|
||||
$map['tab_spend.game_player_name'] = array('like',I("user_nickname").'%');
|
||||
}
|
||||
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,tab_spend.user_account,
|
||||
tab_spend.user_nickname,tab_spend.game_name,tab_spend.promote_account,spend_ip,tab_spend.server_name,
|
||||
game_player_name,pay_amount,cost,pay_way";
|
||||
$group = "";
|
||||
$order = "pay_time DESC";
|
||||
$join = false;
|
||||
if ($map['pay_way'] ==-1) {//绑定币
|
||||
$field2 = $field . ',bind_balance';
|
||||
$join = 'left join tab_user_play as p on p.user_id = tab_spend.user_id and tab_spend.game_id=p.game_id';
|
||||
} elseif ($map['pay_way'] ==0) {//平台币
|
||||
$field2 = $field . ',balance';
|
||||
$join = 'left join tab_user as u on u.id = tab_spend.user_id';
|
||||
}
|
||||
if(isset($_REQUEST['export'])){
|
||||
$data = D('spend')->getSpendData($map, $field2, $group, $order,0,0, $join);
|
||||
}else {
|
||||
$data = D('spend')->getSpendData($map, $field2, $group, $order, $page, $row, $join);
|
||||
}
|
||||
|
||||
foreach($data as $key => $value) {
|
||||
$data[$key]['pay_way'] = getPayType($value['pay_way']);
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['export'])) {
|
||||
$field = array(
|
||||
"pay_order_number"=>"支付订单号",
|
||||
"pay_time"=>"充值时间",
|
||||
"user_account"=>"玩家账号",
|
||||
"game_name"=>"游戏名称",
|
||||
"server_name"=>"游戏区服",
|
||||
"game_player_name"=>"角色名称",
|
||||
"cost"=>"订单金额",
|
||||
"pay_amount"=>"实付金额",
|
||||
"pay_way"=>"充值方式"
|
||||
);
|
||||
if ($map['pay_way'] ==-1) {
|
||||
$field["bind_balance"] = "绑定币余额";
|
||||
$title = "内充支出明细";
|
||||
} elseif ($map['pay_way'] ==0) {
|
||||
$field["balance"] = "平台币余额";
|
||||
$title = "平台币直充明细";
|
||||
}
|
||||
data2csv($data,$title,$field);
|
||||
}
|
||||
$count = D("spend")->getSpendData($map,$field,$group,$order);
|
||||
$count = count($count);
|
||||
$page = set_pagination($count,$row);
|
||||
|
||||
|
||||
// $map['pay_game_status'] = 1;
|
||||
$total_cost = D('spend')->sumSpend($map, 'cost');//订单金额合计
|
||||
$total_pay_amount = D('spend')->sumSpend($map, 'pay_amount');//实付金额合计
|
||||
|
||||
$this->assign('total_cost', $total_cost);
|
||||
$this->assign('total_pay_amount', $total_pay_amount);
|
||||
|
||||
if($page) {$this->assign('_page', $page);}
|
||||
$this->meta_title = '游戏订单查看';
|
||||
|
||||
$this->assign('data',$data);
|
||||
$this->display();
|
||||
}
|
||||
//平台币内充弹框
|
||||
public function insideCoinDetail($p = 1)
|
||||
{
|
||||
$page = intval($p);
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
if (isset($_REQUEST['row'])) {
|
||||
$row = $_REQUEST['row'];
|
||||
} else {
|
||||
$row = 10;
|
||||
}
|
||||
//时间
|
||||
$istimeselect = false;
|
||||
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
||||
$istimeselect = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
|
||||
} elseif (isset($_REQUEST['time_start'])) {
|
||||
$istimeselect = ['GT', strtotime($_REQUEST['time_start'])];
|
||||
} elseif (isset($_REQUEST['time_end'])) {
|
||||
$istimeselect = ['LT', strtotime($_REQUEST['time_end']) + 86399];
|
||||
}
|
||||
|
||||
//是否是官方渠道
|
||||
$isgf = false;
|
||||
if ($_REQUEST['promote_id'] != '') {
|
||||
if($_REQUEST['promote_id'] == 0){
|
||||
$isgf = true;
|
||||
}
|
||||
$map['s.promote_id'] = $_REQUEST['promote_id'];
|
||||
}
|
||||
//检索
|
||||
if (isset($_REQUEST['sn'])) {
|
||||
$pmap['order_number'] = array("LIKE","%".$_REQUEST['sn']."%");
|
||||
$map['sn'] = array("LIKE","%".$_REQUEST['sn']."%");
|
||||
}
|
||||
if (isset($_REQUEST['type'])) {
|
||||
if($_REQUEST['type'] == 2){
|
||||
$pmap['op_id'] =0;//肯定false
|
||||
}
|
||||
$map['s.type'] =$_REQUEST['type'];
|
||||
}
|
||||
|
||||
//
|
||||
$senddata = [];
|
||||
$count =0;
|
||||
$total_cost = 0;
|
||||
if($isgf){
|
||||
$pmap['status']=1;
|
||||
if($istimeselect){
|
||||
$pmap['create_time'] = $istimeselect;
|
||||
}
|
||||
$admincount = M("provide_user p","tab_")->field("sum(amount) amount,count(*) count")->where($pmap)->find();
|
||||
$count = $admincount["count"]?:0;
|
||||
$total_cost = $admincount["amount"]?:0;
|
||||
if($count >0){
|
||||
$admininside = M("provide_user p","tab_")
|
||||
->field("order_number,user_account,amount,balance,create_time")
|
||||
->join("left join tab_user as u on u.id = p.user_id")
|
||||
->where($pmap);
|
||||
|
||||
if(isset($_REQUEST['export'])){
|
||||
$admininside = $admininside->select();
|
||||
}else {
|
||||
$admininside = $admininside->page($page, $row)->select();
|
||||
}
|
||||
|
||||
foreach ($admininside as $k => $v) {
|
||||
$temp = [
|
||||
"sn"=>$v['order_number'],
|
||||
"op_type"=>"收入",
|
||||
"op_sty"=>"后台发放玩家",
|
||||
"account"=>"管理员",
|
||||
"op_num"=>$v['amount'],
|
||||
"balance_coin"=>$v['balance']?:'0.00',
|
||||
"mark"=>"后台发放平台币",
|
||||
"create_time"=>date("Y-m-d H:i:s",$v['create_time'])
|
||||
];
|
||||
$senddata[] = $temp;
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
if($istimeselect){
|
||||
$map['s.create_time']=$istimeselect;
|
||||
}
|
||||
$map['s.status']=1;
|
||||
$map['s.source_id']=0;
|
||||
$ininsidecount = M("promote_coin s","tab_")
|
||||
->field("SUM(CASE WHEN s.type = 1 THEN num ELSE 0 END) as pay_amount,SUM(CASE WHEN s.type = 2 THEN num ELSE 0 END) as back_amount,count(*) count")
|
||||
->where($map)
|
||||
->find();
|
||||
$count = $ininsidecount["count"]?:0;
|
||||
$total_cost = ($ininsidecount["pay_amount"]-$ininsidecount["back_amount"]);
|
||||
if ($count >0) {
|
||||
$field= "num,sn,promote.balance_coin,account,s.type,remark,s.create_time";
|
||||
$ininside = M("promote_coin s", "tab_")
|
||||
->field($field)
|
||||
->where($map)
|
||||
->join("tab_promote promote ON s.promote_id = promote.id", "left");
|
||||
if(isset($_REQUEST['export'])){
|
||||
$ininside = $ininside->select();
|
||||
}else {
|
||||
$ininside = $ininside->page($page, $row)->select();
|
||||
}
|
||||
foreach ($ininside as $k => $v) {
|
||||
$temp = [
|
||||
"sn"=>$v['sn'],
|
||||
"op_type"=>($v['type'] == 1) ? "收入":"支出",
|
||||
"op_sty"=>($v['type'] == 1) ? "后台发放":"后台回收",
|
||||
"account"=>"管理员",
|
||||
"op_num"=>$v['num']?:'0.00',
|
||||
"balance_coin"=>$v['balance_coin'],
|
||||
"mark"=>$v["remark"]?:"后台发放平台币",
|
||||
"create_time"=>date("Y-m-d H:i:s",$v['create_time'])
|
||||
];
|
||||
$senddata[] = $temp;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
if (isset($_REQUEST['export'])) {
|
||||
$field = array(
|
||||
"sn"=>"流水号",
|
||||
"op_type"=>"操作类型",
|
||||
"op_sty"=>"操作方式",
|
||||
"account"=>"对手账号类型",
|
||||
"op_num"=>"平台币数量",
|
||||
"balance_coin"=>"平台币余额",
|
||||
"mark"=>"交易说明",
|
||||
"create_time"=>"交易时间"
|
||||
);
|
||||
data2csv($senddata,"平台币内充明细",$field);
|
||||
}
|
||||
|
||||
$this->assign('total_cost', $total_cost);
|
||||
$page = set_pagination($count,$row);
|
||||
if($page) {$this->assign('_page', $page);}
|
||||
$this->assign('data',$senddata);
|
||||
$this->display();
|
||||
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
{"news":[{"time":"0:00","count":6},{"time":"1:00","count":9},{"time":"2:00","count":7},{"time":"3:00","count":11},{"time":"4:00","count":16},{"time":"5:00","count":7},{"time":"6:00","count":9},{"time":"7:00","count":11},{"time":"8:00","count":14},{"time":"9:00","count":40},{"time":"10:00","count":58},{"time":"11:00","count":86},{"time":"12:00","count":41},{"time":"13:00","count":55},{"time":"14:00","count":194},{"time":"15:00","count":180},{"time":"16:00","count":121},{"time":"17:00","count":98},{"time":"18:00","count":120},{"time":"19:00","count":147},{"time":"20:00","count":146},{"time":"21:00","count":124},{"time":"22:00","count":93},{"time":"23:00","count":56}],"sum":{"news":1649,"active":8210,"player":1715,"money":226618},"active":[{"time":"0:00","count":967},{"time":"1:00","count":343},{"time":"2:00","count":176},{"time":"3:00","count":135},{"time":"4:00","count":118},{"time":"5:00","count":177},{"time":"6:00","count":465},{"time":"7:00","count":661},{"time":"8:00","count":622},{"time":"9:00","count":547},{"time":"10:00","count":480},{"time":"11:00","count":414},{"time":"12:00","count":326},{"time":"13:00","count":237},{"time":"14:00","count":354},{"time":"15:00","count":328},{"time":"16:00","count":215},{"time":"17:00","count":219},{"time":"18:00","count":256},{"time":"19:00","count":335},{"time":"20:00","count":274},{"time":"21:00","count":244},{"time":"22:00","count":197},{"time":"23:00","count":120}],"player":[{"time":"0:00","count":211},{"time":"1:00","count":84},{"time":"2:00","count":29},{"time":"3:00","count":25},{"time":"4:00","count":16},{"time":"5:00","count":24},{"time":"6:00","count":32},{"time":"7:00","count":56},{"time":"8:00","count":71},{"time":"9:00","count":66},{"time":"10:00","count":63},{"time":"11:00","count":69},{"time":"12:00","count":58},{"time":"13:00","count":62},{"time":"14:00","count":50},{"time":"15:00","count":99},{"time":"16:00","count":68},{"time":"17:00","count":61},{"time":"18:00","count":77},{"time":"19:00","count":157},{"time":"20:00","count":107},{"time":"21:00","count":101},{"time":"22:00","count":74},{"time":"23:00","count":55}],"money":[{"time":"0:00","count":"31554.00"},{"time":"1:00","count":"4117.00"},{"time":"2:00","count":"1839.00"},{"time":"3:00","count":"4513.00"},{"time":"4:00","count":"1008.00"},{"time":"5:00","count":"1981.00"},{"time":"6:00","count":"1270.00"},{"time":"7:00","count":"1906.00"},{"time":"8:00","count":"6683.00"},{"time":"9:00","count":"6119.00"},{"time":"10:00","count":"8974.00"},{"time":"11:00","count":"14147.00"},{"time":"12:00","count":"9775.00"},{"time":"13:00","count":"11908.00"},{"time":"14:00","count":"6781.00"},{"time":"15:00","count":"12626.00"},{"time":"16:00","count":"6742.00"},{"time":"17:00","count":"8303.00"},{"time":"18:00","count":"8804.00"},{"time":"19:00","count":"23476.00"},{"time":"20:00","count":"17464.00"},{"time":"21:00","count":"16899.00"},{"time":"22:00","count":"13143.00"},{"time":"23:00","count":"6586.00"}]}
|
@ -1 +0,0 @@
|
||||
[]
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"access_token":"ae739TcAabBazUPsDH_SWTPgpgkqMTEWoG4_dkF1z4iF6mhLxQT99BTCbqHm3b_-E-MwDhfbxcu1EFcBg6moVrpz2RpH3WE2fZAsi3QDe3OXRj45t0R832EdE61gNsnjHXTeAEACSO","expires_in":7200,"expires_in_validity":1484799529}
|
@ -1 +0,0 @@
|
||||
{"access_token":"jda2SxmAdo6-1W4njmho_5dRfujy0H5LVQfayhNR6GowgFvUj_Ro7evGvgAnFM2Pw0ebrDKeMXtTs_g82P5pyR0fLXUAwGUiPa1mfr2gXbd5tg6ynLq90QMYo9syC0XTDQXiAAAPCJ","expires_in":7200,"expires_in_validity":1482811765}
|
@ -0,0 +1,421 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
color: #000;
|
||||
resize: none;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
||||
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
|
||||
height:28px;border-radius:3px;font-size:12px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
line-height:35px;
|
||||
line-height:28px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height:26px;
|
||||
}
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
height:26px;line-height:26px;font-size:12px;
|
||||
}
|
||||
.select2-results__option[aria-selected] {font-size:12px;}
|
||||
|
||||
.tooltip {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
color: #056dae;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 250%;
|
||||
background-color: #fff;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 80%;
|
||||
left: 0;
|
||||
margin-left: -70%;
|
||||
border: #000 solid 1px;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: black transparent transparent transparent;
|
||||
}
|
||||
|
||||
.tooltip:hover .tooltiptext {
|
||||
|
||||
color: #000;
|
||||
visibility: visible;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
|
||||
<h3 class="page_title">{$_REQUEST['count_date']}游戏统计</h3>
|
||||
<p class="description_text"></p>
|
||||
</div>
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list">
|
||||
<!--游戏类型搜索END-->
|
||||
<div class="input-list input-list-server search_label_rehab">
|
||||
<select id="partner_id" name="partner_id" class="select_gallery" style="width:120px;">
|
||||
<option value="">请选择合作公司</option>
|
||||
<volist name=":getPartner()" id="vo">
|
||||
<option partner-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $_GET['partner_id']">selected=selected</if>>{$vo.partner}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="game_name" name="game_name" class="select_gallery" >
|
||||
<option value="">游戏名称</option>
|
||||
<!-- <volist name=":get_game_list(null, $_GET['game_type'])" id="vo">
|
||||
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
|
||||
</volist> -->
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="sdk_type" name="sdk_type" class="select_gallery" >
|
||||
<option value="">请选择设备类型</option>
|
||||
<option value="1">安卓</option>
|
||||
<option value="2">苹果</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-list">
|
||||
<input type="text" readonly id="time-start" name="timestart" class="" value="{$startDate}"
|
||||
placeholder="开始时间"/>
|
||||
-
|
||||
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
||||
<input type="text" readonly id="time-end" name="timeend" class="" value="{$endDate}"
|
||||
placeholder="结束时间"/>
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="from" value="{$_GET['from']}"/>
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Finance/gameStatistics','model='.$model['name'].'&row='.I('row'),false)}"
|
||||
style="width: 100px;border: #3C95C8 solid 1px;">搜索</a>
|
||||
<!-- <a class="sch-btn" href="javascript:history.go(-1)" style="background:#fff;color: #000;border: #000 solid 1px;width: 100px">返回</a>-->
|
||||
<a class="sch-btn" href="{:U('Export/exportGameStatistics',
|
||||
array(
|
||||
'timestart'=>$_GET['timestart'],
|
||||
'timeend'=>$_GET['timeend'],
|
||||
'sdk_type'=>$_GET['sdk_type'],
|
||||
'game_name'=>$_GET['game_name'],
|
||||
'game_id'=>$_REQUEST['game_id'],
|
||||
'partner_id'=>$_REQUEST['partner_id'],
|
||||
false))}"
|
||||
style="width: 100px;border: #3C95C8 solid 1px;">导出</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
|
||||
<th >操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<style>
|
||||
.data-table thead th, .data-table tbody td{text-align:center}
|
||||
.data-table tbody td{border-right:1px solid #DDDDDD;}
|
||||
.d_list .drop-down ul {z-index:999;}
|
||||
</style>
|
||||
<if condition = "empty($data)">
|
||||
<tr>
|
||||
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
</if>
|
||||
<notemtpy name = "data">
|
||||
<volist name="data" id="data">
|
||||
<tr>
|
||||
<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.cash_count neq ''">{$data.cash_count}<else/>0</if></td>
|
||||
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer"
|
||||
data-url="{:U('Finance/coinDetail',array(
|
||||
'timestart'=>$_GET['timestart'],
|
||||
'timeend'=>$_GET['timeend'],
|
||||
'sdk_type'=>$_GET['sdk_type'],
|
||||
'game_id'=>$data['game_id'],
|
||||
'game_name'=>$data['game_name'],
|
||||
'partner_id'=>$_REQUEST['partner_id'],
|
||||
'pay_way'=>0,
|
||||
false))}">
|
||||
<if condition="$data.balance_coin_count neq ''">{$data.balance_coin_count}<else/>0</if></td>
|
||||
<td class="coin-detail" data-pay_type="-1" style="color: #0066cc;cursor: pointer" data-url="{:U('Finance/coinDetail',array(
|
||||
'timestart'=>$_GET['timestart'],
|
||||
'timeend'=>$_GET['timeend'],
|
||||
'sdk_type'=>$_GET['sdk_type'],
|
||||
'game_id'=>$data['game_id'],
|
||||
'game_name'=>$data['game_name'],
|
||||
'partner_id'=>$_REQUEST['partner_id'],
|
||||
'pay_way'=>-1,
|
||||
false))}"><if condition="$data.inside_cash_count neq ''">{$data.inside_cash_count}<else/>0</if></td>
|
||||
<td ><if condition="$data.all_cash_count neq ''">{$data.all_cash_count}<else/>0</if></td>
|
||||
<td >
|
||||
<a href="{:U('Finance/gameStatisticsDetail',array(
|
||||
'timestart'=>$_GET['timestart'],
|
||||
'timeend'=>$_GET['timeend'],
|
||||
'sdk_type'=>$_GET['sdk_type'],
|
||||
'game_id'=>$data['game_id'],
|
||||
'game_name'=>$data['game_name'],
|
||||
'partner_id'=>$_REQUEST['partner_id'],
|
||||
false))}" >查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</volist>
|
||||
<tr>
|
||||
<td colspan="2" ><span>总计</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="$sumInside neq ''">{$sumInside}<else/>0</if></td>
|
||||
<td><if condition="$sumAll neq ''">{$sumAll}<else/>0</if></td>
|
||||
<td>
|
||||
<a href="{:U('Finance/gameStatisticsDetail',
|
||||
array(
|
||||
'timestart'=>$_GET['timestart'],
|
||||
'timeend'=>$_GET['timeend'],
|
||||
'sdk_type'=>$_GET['sdk_type'],
|
||||
'game_name'=>$_GET['game_name'],
|
||||
'game_id'=>$_REQUEST['game_id'],
|
||||
'partner_id'=>$_REQUEST['partner_id'],
|
||||
false))}" >查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</notemtpy>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
|
||||
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
||||
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
|
||||
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function reloadIframe(url) {
|
||||
$("iframe").attr('src', url);
|
||||
// document.getElementsByTagName('iframe').src=url;
|
||||
}
|
||||
|
||||
$(".coin-detail").click(function () {
|
||||
var pay_type = $(this).data('pay_type');
|
||||
var url = $(this).data('url');
|
||||
var title = pay_type == -1 ? '内充支出明细' : '平台币直充明细';
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: title,
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['70%', '80%'],
|
||||
content: [url, 'no']
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('.page a').click(function () {
|
||||
var href = $(this).attr('href');
|
||||
$(this).removeAttr('href');
|
||||
window.location.replace(href)
|
||||
console.log(href)
|
||||
});
|
||||
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('Finance/gameStatistics')}');
|
||||
$(function(){
|
||||
|
||||
//搜索功能
|
||||
$("#search").click(function(){
|
||||
console.log(111);
|
||||
var starttime = $.trim($('#time-start').val());
|
||||
var endtime = $.trim($('#time-end').val());
|
||||
|
||||
if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}
|
||||
|
||||
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.jssearch').find('input').serialize();
|
||||
query += "&" + $('.jssearch').find('select').serialize();
|
||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
||||
query = query.replace(/^&/g,'');
|
||||
if( url.indexOf('?')>0 ){
|
||||
url += '&' + query;
|
||||
}else{
|
||||
url += '?' + query;
|
||||
}
|
||||
window.location.replace(url);
|
||||
});
|
||||
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
$(".ljcz").click(function(){
|
||||
var id = $(this).attr('data-value');
|
||||
var game_name = "{:I('game_name')}";
|
||||
var server_name = "{:I('server_id')}";
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '游戏消费记录',
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['70%', '80%'],
|
||||
content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url
|
||||
});
|
||||
});
|
||||
|
||||
function get_game_list()
|
||||
{
|
||||
var game_name = "{:I('game_name')}";
|
||||
$.ajax({
|
||||
url:"{:U('Finance/getGameList')}",
|
||||
type:"post",
|
||||
data:{partner_id:$("#partner_id option:selected").val(), sdk_type:$("#sdk_version1 option:selected").val()},
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
var str = "<option value=''>请选择游戏</option>";
|
||||
for (var i in data){
|
||||
str += "<option value='"+data[i].game_name+"'"+(game_name && data[i].game_name == game_name?'selected':'')+">"+data[i].game_name+"</option>"
|
||||
}
|
||||
// console.log(str);
|
||||
$("#game_name").empty();
|
||||
$("#game_name").append(str);
|
||||
// $("#server_id").select2();
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
$("#partner_id, #sdk_type").change(function(){
|
||||
get_game_list();
|
||||
});
|
||||
|
||||
$('#time-start').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
showMeridian:true,
|
||||
pickDate:true,
|
||||
minView: 2,
|
||||
autoclose: true,
|
||||
pickTime:true,
|
||||
todayBtn:true,
|
||||
}).on('change',function(ev){
|
||||
var val = new Date($.trim($(this).val())).getTime();
|
||||
var end = new Date($.trim($('#time-end').val())).getTime();
|
||||
if (val>end) {
|
||||
layer.msg('开始时间大于结束时间!');$(this).val('');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#time-end").datetimepicker({
|
||||
format:"yyyy-mm-dd",
|
||||
language: "zh-CN",
|
||||
showMeridian:true,
|
||||
minView:2,
|
||||
autoclose:true,
|
||||
todayBtn:true,
|
||||
}).on('change',function(ev){
|
||||
var val = new Date($.trim($(this).val())).getTime();
|
||||
var start = new Date($.trim($('#time-start').val())).getTime();
|
||||
if (val<start) {
|
||||
layer.msg('开始时间大于结束时间!');$(this).val('');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#partner_id").change();
|
||||
|
||||
function get_partnet_list()
|
||||
{
|
||||
var partner_id = "{:I('partner_id')}";
|
||||
$.ajax({
|
||||
url:"{:U('Finance/getPartnetList')}",
|
||||
type:"post",
|
||||
data:{game_name:$("#game_name option:selected").val(), sdk_type:$("#sdk_version1 option:selected").val()},
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
var str = "<option value=''>请选择合作公司</option>";
|
||||
for (var i in data){
|
||||
str += "<option value='"+data[i].id+"'"+(partner_id && data[i].id == partner_id?'selected':'')+">"+data[i].partner+"</option>"
|
||||
}
|
||||
// console.log(str);
|
||||
$("#partner_id").empty();
|
||||
$("#partner_id").append(str);
|
||||
// $("#server_id").select2();
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
$("#game_name, #sdk_type").change(function(){
|
||||
get_partnet_list();
|
||||
});
|
||||
|
||||
$("#game_name").change();
|
||||
})
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,257 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
color: #000;
|
||||
resize: none;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
||||
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
|
||||
height:28px;border-radius:3px;font-size:12px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
line-height:35px;
|
||||
line-height:28px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height:26px;
|
||||
}
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
height:26px;line-height:26px;font-size:12px;
|
||||
}
|
||||
.select2-results__option[aria-selected] {font-size:12px;}
|
||||
|
||||
.tooltip {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
color: #056dae;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 250%;
|
||||
background-color: #fff;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 80%;
|
||||
left: 0;
|
||||
margin-left: -70%;
|
||||
border: #000 solid 1px;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: black transparent transparent transparent;
|
||||
}
|
||||
|
||||
.tooltip:hover .tooltiptext {
|
||||
|
||||
color: #000;
|
||||
visibility: visible;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
|
||||
<h3 class="page_title">{$_REQUEST['count_date']}平台统计</h3>
|
||||
<p class="description_text"></p>
|
||||
<div class="fr">
|
||||
<a class="" href="{:U('PayChannel/index')}">游戏充值统计</a>
|
||||
<a class="tabchose" href="">充值方式统计</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list">
|
||||
|
||||
<div class="input-list">
|
||||
<input type="text" readonly id="time-start" name="timestart" class="" value="{$startDate}"
|
||||
placeholder="开始时间"/>
|
||||
-
|
||||
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
||||
<input type="text" readonly id="time-end" name="timeend" class="" value="{$endDate}"
|
||||
placeholder="结束时间"/>
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="from" value="{$_GET['from']}"/>
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Finance/payTypeStatistics','model='.$model['name'].'&row='.I('row'),false)}"
|
||||
style="width: 100px;border: #3C95C8 solid 1px;">搜索</a>
|
||||
<!-- <a class="sch-btn" href="javascript:history.go(-1)" style="background:#fff;color: #000;border: #000 solid 1px;width: 100px">返回</a>-->
|
||||
<a class="sch-btn" href="{:U('Finance/payTypeStatistics',
|
||||
array_merge(array('export'=>'1'),I('get.')))}"
|
||||
style="width: 100px;border: #3C95C8 solid 1px;">导出</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>充值方式</th>
|
||||
<th >现金充值</th>
|
||||
<th >平台币充值</th>
|
||||
<th >合计</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<style>
|
||||
.data-table thead th, .data-table tbody td{text-align:center}
|
||||
.data-table tbody td{border-right:1px solid #DDDDDD;}
|
||||
.d_list .drop-down ul {z-index:999;}
|
||||
</style>
|
||||
<if condition = "empty($data)">
|
||||
<tr>
|
||||
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
</if>
|
||||
<notemtpy name = "data">
|
||||
<volist name="data" id="data">
|
||||
<tr>
|
||||
<td ><if condition="$data.pay_type neq ''">{$data.pay_type}<else/>无</if></td>
|
||||
<td ><if condition="$data.pay_amount neq ''">{$data.pay_amount}<else/>无</if></td>
|
||||
<td ><if condition="$data.balance neq ''">{$data.balance}<else/>0</if></td>
|
||||
<td ><if condition="$data.total neq ''">{$data.total}<else/>0</if></td>
|
||||
</tr>
|
||||
</volist>
|
||||
<tr>
|
||||
<td><span>总计</span></td>
|
||||
<td ><span><if condition="$all_pay_amount neq ''">{$all_pay_amount}<else/>0</if></span></td>
|
||||
<td><if condition="$all_balance neq ''">{$all_balance}<else/>0</if></td>
|
||||
<td><if condition="$all_total neq ''">{$all_total}<else/>0</if></td>
|
||||
</tr>
|
||||
</notemtpy>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
|
||||
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
||||
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
|
||||
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$('.page a').click(function () {
|
||||
var href = $(this).attr('href');
|
||||
$(this).removeAttr('href');
|
||||
window.location.replace(href)
|
||||
console.log(href)
|
||||
});
|
||||
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('PayChannel/index')}');
|
||||
$(function(){
|
||||
|
||||
//搜索功能
|
||||
$("#search").click(function(){
|
||||
console.log(111);
|
||||
var starttime = $.trim($('#time-start').val());
|
||||
var endtime = $.trim($('#time-end').val());
|
||||
|
||||
if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}
|
||||
|
||||
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.jssearch').find('input').serialize();
|
||||
query += "&" + $('.jssearch').find('select').serialize();
|
||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
||||
query = query.replace(/^&/g,'');
|
||||
if( url.indexOf('?')>0 ){
|
||||
url += '&' + query;
|
||||
}else{
|
||||
url += '?' + query;
|
||||
}
|
||||
window.location.replace(url);
|
||||
});
|
||||
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
|
||||
$('#time-start').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
showMeridian:true,
|
||||
pickDate:true,
|
||||
minView: 2,
|
||||
autoclose: true,
|
||||
pickTime:true,
|
||||
todayBtn:true,
|
||||
}).on('change',function(ev){
|
||||
var val = new Date($.trim($(this).val())).getTime();
|
||||
var end = new Date($.trim($('#time-end').val())).getTime();
|
||||
if (val>end) {
|
||||
layer.msg('开始时间大于结束时间!');$(this).val('');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#time-end").datetimepicker({
|
||||
format:"yyyy-mm-dd",
|
||||
language: "zh-CN",
|
||||
showMeridian:true,
|
||||
minView:2,
|
||||
autoclose:true,
|
||||
todayBtn:true,
|
||||
}).on('change',function(ev){
|
||||
var val = new Date($.trim($(this).val())).getTime();
|
||||
var start = new Date($.trim($('#time-start').val())).getTime();
|
||||
if (val<start) {
|
||||
layer.msg('开始时间大于结束时间!');$(this).val('');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,367 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
color: #000;
|
||||
resize: none;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
||||
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
|
||||
height:28px;border-radius:3px;font-size:12px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
line-height:35px;
|
||||
line-height:28px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height:26px;
|
||||
}
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
height:26px;line-height:26px;font-size:12px;
|
||||
}
|
||||
.select2-results__option[aria-selected] {font-size:12px;}
|
||||
|
||||
.tooltip {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
color: #056dae;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 250%;
|
||||
background-color: #fff;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 80%;
|
||||
left: 0;
|
||||
margin-left: -70%;
|
||||
border: #000 solid 1px;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: black transparent transparent transparent;
|
||||
}
|
||||
|
||||
.tooltip:hover .tooltiptext {
|
||||
|
||||
color: #000;
|
||||
visibility: visible;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
|
||||
<h3 class="page_title">
|
||||
<if condition="isset($_GET['promote_id'])">
|
||||
[{:get_promote_name(I('promote_id'))}]
|
||||
</if>
|
||||
游戏统计
|
||||
</h3>
|
||||
<p class="description_text">
|
||||
<if condition="isset($_GET['promote_id'])">
|
||||
<if condition="$_GET['promote_type'] eq 1">
|
||||
统计推广员及其下属推广员的游戏相关统计
|
||||
<else/>
|
||||
仅统计推广员自己 <span style="color: red;">不含其下属推广员</span>的游戏相关统计
|
||||
</if>
|
||||
<else/>
|
||||
游戏相关统计
|
||||
</if>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list">
|
||||
<!--游戏类型搜索END-->
|
||||
<div class="input-list input-list-server search_label_rehab">
|
||||
<select id="partner_id" name="partner_id" class="select_gallery" style="width:120px;">
|
||||
<option value="">请选择合作公司</option>
|
||||
<volist name=":getPartner()" id="vo">
|
||||
<option partner-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $_GET['partner_id']">selected=selected</if>>{$vo.partner}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="game_name" name="game_name" class="select_gallery" >
|
||||
<option value="">游戏名称</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="game_type" name="game_type" class="select_gallery" >
|
||||
<option value="">请选择设备类型</option>
|
||||
<option value="1">安卓</option>
|
||||
<option value="2">苹果</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}"
|
||||
placeholder="开始时间" />
|
||||
-
|
||||
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
||||
<input type="text" readonly id="time_end" name="time_end" class="" value="{:I('time_end')}"
|
||||
placeholder="结束时间" />
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="from" value="{$_GET['from']}"/>
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search" url="{:U('FinancePromote/gameStatistics','model='.$model['name'].'&row='.I('row'),false)}"
|
||||
style="width: 100px;border: #3C95C8 solid 1px;">搜索</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
|
||||
<th >操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<style>
|
||||
.data-table thead th, .data-table tbody td{text-align:center}
|
||||
.data-table tbody td{border-right:1px solid #DDDDDD;}
|
||||
.d_list .drop-down ul {z-index:999;}
|
||||
</style>
|
||||
<if condition = "empty($data)">
|
||||
<tr>
|
||||
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
</if>
|
||||
<notemtpy name = "data">
|
||||
<volist name="data" id="data">
|
||||
<tr>
|
||||
<td >{$data.partner_name}</td>
|
||||
<td >{$data.game_name}</td>
|
||||
<td >{$data.cash_count}</td>
|
||||
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'game_id'=>$data['game_id'],p=>1,row=>10]))}">{$data.balance_coin_count}</td>
|
||||
<td class="coin-detail" data-pay_type="-1" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>-1,'game_id'=>$data['game_id'],p=>1,row=>10]))}">
|
||||
{$data.inside_cash_count}
|
||||
</td>
|
||||
<td >{$data.all_cash_count}</td>
|
||||
<td >
|
||||
<a href="{:U('FinancePromote/gameStatisticsDetail',array_merge(I('get.'),['game_id'=>$data['game_id'],'game_name'=>$data['game_name'],'promote_level'=>$promote_level]))}" >订单查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</volist>
|
||||
<tr>
|
||||
<td colspan="2" ><span>总计</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="$sumInside neq ''">{$sumInside}<else/>0</if></td>
|
||||
<td><if condition="$sumAll neq ''">{$sumAll}<else/>0</if></td>
|
||||
<td>
|
||||
<a href="{:U('FinancePromote/gameStatisticsDetail',array_merge(I('get.'),['promote_level'=>1]))}" >订单查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</notemtpy>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}">导出</a>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
|
||||
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
||||
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
|
||||
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function reloadIframe(url) {
|
||||
$("iframe").attr('src', url);
|
||||
// document.getElementsByTagName('iframe').src=url;
|
||||
}
|
||||
|
||||
$(".coin-detail").click(function () {
|
||||
var pay_type = $(this).data('pay_type');
|
||||
var url = $(this).data('url');
|
||||
var title = pay_type == -1 ? '内充支出明细' : '平台币直充明细';
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: title,
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['70%', '80%'],
|
||||
content: [url, 'no']
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('.page a:eq(1)').click(function () {
|
||||
var href = $(this).attr('href');
|
||||
$(this).removeAttr('href');
|
||||
window.location.replace(href)
|
||||
});
|
||||
|
||||
//导航高亮
|
||||
highlight_subnav('{:U("FinancePromote/index")}');
|
||||
$(function(){
|
||||
|
||||
//搜索功能
|
||||
$("#search").click(function(){
|
||||
var starttime = $.trim($('#time-start').val());
|
||||
var endtime = $.trim($('#time-end').val());
|
||||
|
||||
if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}
|
||||
|
||||
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.jssearch').find('input').serialize();
|
||||
query += "&" + $('.jssearch').find('select').serialize();
|
||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
||||
query = query.replace(/^&/g,'');
|
||||
if( url.indexOf('?')>0 ){
|
||||
url += '&' + query;
|
||||
}else{
|
||||
url += '?' + query;
|
||||
}
|
||||
window.location.replace(url);
|
||||
});
|
||||
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
// $(".ljcz").click(function(){
|
||||
// var id = $(this).attr('data-value');
|
||||
// var game_name = "{:I('game_name')}";
|
||||
// var server_name = "{:I('server_id')}";
|
||||
// layer.open({
|
||||
// type: 2,
|
||||
// title: '游戏消费记录',
|
||||
// shadeClose: true,
|
||||
// shade: 0.8,
|
||||
// area: ['70%', '80%'],
|
||||
// content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url
|
||||
// });
|
||||
// });
|
||||
|
||||
function get_game_list()
|
||||
{
|
||||
var game_name = "{:I('game_name')}";
|
||||
$.ajax({
|
||||
url:"{:U('Finance/getGameList')}",
|
||||
type:"post",
|
||||
data:{partner_id:$("#partner_id option:selected").val(), sdk_type:$("#sdk_version1 option:selected").val()},
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
var str = "<option value=''>请选择游戏</option>";
|
||||
for (var i in data){
|
||||
str += "<option value='"+data[i].game_name+"'"+(game_name && data[i].game_name == game_name?'selected':'')+">"+data[i].game_name+"</option>"
|
||||
}
|
||||
// console.log(str);
|
||||
$("#game_name").empty();
|
||||
$("#game_name").append(str);
|
||||
// $("#server_id").select2();
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
$("#partner_id, #game_type").change(function(){
|
||||
get_game_list();
|
||||
});
|
||||
$('#time_start').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
minView: 2,
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$('#datetimepicker').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
minView: 2,
|
||||
autoclose: true,
|
||||
pickerPosition: 'bottom-left'
|
||||
})
|
||||
$("#partner_id").change();
|
||||
|
||||
function get_partnet_list()
|
||||
{
|
||||
var partner_id = "{:I('partner_id')}";
|
||||
$.ajax({
|
||||
url:"{:U('Finance/getPartnetList')}",
|
||||
type:"post",
|
||||
data:{game_name:$("#game_name option:selected").val(), sdk_type:$("#sdk_version1 option:selected").val()},
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
var str = "<option value=''>请选择合作公司</option>";
|
||||
for (var i in data){
|
||||
str += "<option value='"+data[i].id+"'"+(partner_id && data[i].id == partner_id?'selected':'')+">"+data[i].partner+"</option>"
|
||||
}
|
||||
// console.log(str);
|
||||
$("#partner_id").empty();
|
||||
$("#partner_id").append(str);
|
||||
// $("#server_id").select2();
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
$("#game_name, #game_type").change(function(){
|
||||
get_partnet_list();
|
||||
});
|
||||
|
||||
$("#game_name").change();
|
||||
})
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,479 @@
|
||||
<extend name="Public/base" />
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
|
||||
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
color: #000;
|
||||
resize: none;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
||||
box-shadow: 0px 3px 3px #F7F8F9 inset;
|
||||
height: 35px;
|
||||
height: 28px;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
line-height: 35px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.select2-results__option[aria-selected] {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: relative;
|
||||
/* display: block; */
|
||||
/* color: #056dae; */
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext {
|
||||
display: none;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 10px 5px 5px;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 80%;
|
||||
left: 0;
|
||||
border: #000 solid 1px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: black transparent transparent transparent;
|
||||
}
|
||||
|
||||
.tooltip:hover .tooltiptext {
|
||||
color: #333;
|
||||
display: block;
|
||||
|
||||
}
|
||||
</style>
|
||||
<!-- 标题栏 -->
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
|
||||
<h3 class="page_title">公会统计</h3>
|
||||
<p class="description_text">说明:公会相关统计</p>
|
||||
</div>
|
||||
<style>
|
||||
|
||||
|
||||
</style>
|
||||
<div class="cf top_nav_list">
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch search_list fl cf">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
<div class="input-list input-list-resway search_label_rehab">
|
||||
<select id="company_id" name="company_id" class="select_gallery" style="width:150px;">
|
||||
<option value="">请选择推广公司</option>
|
||||
<volist name=":getPromoteCompany()" id="vo">
|
||||
<option value="{$vo.id}" <if condition="I('company_id') && $vo.id eq I('company_id')">selected
|
||||
</if> >{$vo.company_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list search_item input-list-gamenoticestatus">
|
||||
<select name="promote_id" style="color:#444" class="select_gallery" id="promote_id">
|
||||
<option value="">请选择会长</option>
|
||||
<option value="0" <?php if ($_POST['promote_id'] == 0):?>selected<?php endif;?>>官方渠道</option>
|
||||
<option value="UC" <?php if ($_POST['promote_id'] == 'UC'):?>selected<?php endif;?>>UC用户</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}"
|
||||
placeholder="开始时间" />
|
||||
-
|
||||
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
||||
<input type="text" readonly id="time_end" name="time_end" class="" value="{:I('time_end')}"
|
||||
placeholder="结束时间" />
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="game_name" name="game_name" class="select_gallery">
|
||||
<option value="">游戏名称</option>
|
||||
<volist name=":getAllGame()" id="vo">
|
||||
<option value="{$vo.game_name}" <if condition="$vo.game_name eq I('game_name')">selected</if>
|
||||
>{$vo.game_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="game_type" name="game_type" class="select_gallery">
|
||||
<option value="">设备类型</option>
|
||||
<option value="1" <?php echo I('game_type') == 1 ? "selected" : ''?>>安卓</option>
|
||||
<option value="2" <?php echo I('game_type') == 2 ? "selected" : ''?>>苹果</option>
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="" value="" class="sortBy">
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search"
|
||||
url="{:U('FinancePromote/index','model='.$model['name'] .'&row='.I('row'),false)}">
|
||||
搜索</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>推广公司</th>
|
||||
<th>会长渠道</th>
|
||||
|
||||
<th class="tooltip"><a class="paixu" data-order='cash_count'>
|
||||
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'cash_count'">游戏现金金额▲
|
||||
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'cash_count'" />
|
||||
游戏现金金额▼
|
||||
<else />游戏现金金额<img src="__IMG__/up-down.png" width="13px">
|
||||
</if>
|
||||
</a> <span class="tooltiptext">第三方支付(微信,支付宝,快捷)</span> </th>
|
||||
<th class="tooltip"><a class="paixu" data-order='balance_coin_count'>
|
||||
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'balance_coin_count'">
|
||||
平台币直充支出▲
|
||||
<elseif
|
||||
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'balance_coin_count'" />
|
||||
平台币直充支出▼
|
||||
<else />平台币直充支出<img src="__IMG__/up-down.png" width="13px">
|
||||
</if>
|
||||
</a> <span class="tooltiptext">平台币购买游戏道具所产生的金额</span> </th>
|
||||
<th class="tooltip"><a class="paixu" data-order='bind_coin_count'>
|
||||
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'bind_coin_count'">
|
||||
内充支出▲
|
||||
<elseif
|
||||
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'bind_coin_count'" />
|
||||
内充支出▼
|
||||
<else />内充支出<img src="__IMG__/up-down.png" width="13px">
|
||||
</if>
|
||||
</a> <span class="tooltiptext">公会下的玩家使用绑定币消费的金额</span> </th>
|
||||
<th class="tooltip"><a class="paixu" data-order='inside_cash_count'>
|
||||
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'inside_cash_count'">
|
||||
平台币内充▲
|
||||
<elseif
|
||||
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'inside_cash_count'" />
|
||||
平台币内充▼
|
||||
<else />平台币内充<img src="__IMG__/up-down.png" width="13px">
|
||||
</if>
|
||||
</a> <span class="tooltiptext">管理后台直接下放给会长的平台币</span> </th>
|
||||
<th class="tooltip">渠道游戏内充值合计 <span class="tooltiptext">游戏现金金额(游戏现金流水+平台币支出+公会内充支出=总流水</span>
|
||||
</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<empty name="list_data">
|
||||
<td colspan="15" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
<else />
|
||||
<volist name="list_data" id="data">
|
||||
<tr>
|
||||
<td>{$data.company_name}</td>
|
||||
<td>{$data['promote_account']}</td>
|
||||
|
||||
<td>{$data.cash_count}</td>
|
||||
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
|
||||
{$data.balance_coin_count}
|
||||
</td>
|
||||
<td class="coin-detail" data-pay_type="-1" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>-1,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
|
||||
{$data.bind_coin_count}
|
||||
</td>
|
||||
<td class="coin-detail" data-pay_type="-2" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/insideCoinDetail',array_merge(I('get.'),['promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
|
||||
{$data.inside_cash_count}
|
||||
</td>
|
||||
<!-- <td><span class='ljzc'
|
||||
data-value="{$data['id']}"><a>{$data.inside_cash_count}</a></span></td> -->
|
||||
<td>{$data.allcount}</td>
|
||||
|
||||
|
||||
<td>
|
||||
<a
|
||||
href="{:U('FinancePromote/gameStatistics',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id'],'promote_type'=>1],I('get.')))}">游戏查看</a>
|
||||
<a
|
||||
href="{:U('FinancePromote/promoteUser',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id']],I('get.')))}">渠道查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</volist>
|
||||
</empty>
|
||||
<tr class="data_summary">
|
||||
<td colspan="2" style="text-align: center;">汇总:</td>
|
||||
<td>{$all_count['cash_count']}</td>
|
||||
<td>{$all_count['balance_coin_count']}</td>
|
||||
<td>{$all_count['bind_coin_count']}</td>
|
||||
<td>{$all_count['inside_cash_count']}</td>
|
||||
<td>{$all_count['all_count']}</td>
|
||||
<td style="text-align: center;">
|
||||
<a
|
||||
href="{:U('FinancePromote/gameStatistics',array_merge(I('get.'),['promote_type'=>1]))}">游戏查看</a>
|
||||
<a href="{:U('FinancePromote/promoteUser',I('get.'))}">渠道查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
<a class="sch-btn"
|
||||
href="{:U('FinancePromote/index',array_merge(['export'=>1],I('get.')))}">导出</a>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
|
||||
<!-- 添加常用设置 begin-->
|
||||
<div class="common_settings">
|
||||
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
||||
<form class="addShortcutIcon">
|
||||
<input type="hidden" name="title" value="{$m_title}">
|
||||
<input type="hidden" name="url" value="Member/user_info">
|
||||
</form>
|
||||
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;"
|
||||
target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img
|
||||
src="__IMG__/zwmimages/icon_jia.png"><span>
|
||||
<notempty name='commonset'>已添加
|
||||
<else />添加至常用设置</notempty>
|
||||
</span></a>
|
||||
</div>
|
||||
<!--end 添加常用设置 -->
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
||||
<php>if(C('COLOR_STYLE')=='blue_color') echo '
|
||||
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
|
||||
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
|
||||
charset="UTF-8"></script>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//导航高亮
|
||||
highlight_subnav('{:U("FinancePromote/index")}');
|
||||
$(function () {
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function reloadIframe(url) {
|
||||
$("iframe").attr('src', url);
|
||||
// document.getElementsByTagName('iframe').src=url;
|
||||
}
|
||||
$(function () {
|
||||
$(".coin-detail").click(function () {
|
||||
var pay_type = $(this).data('pay_type');
|
||||
var url = $(this).data('url');
|
||||
var title = pay_type == -1 ? '内充支出明细' :(pay_type == 0 ? '平台币直充明细': '平台币内充明细');
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: title,
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['70%', '80%'],
|
||||
content: [url, 'no']
|
||||
});
|
||||
});
|
||||
$(".select_gallery").select2();
|
||||
//搜索功能
|
||||
$("#search").click(function () {
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.jssearch').find('input').serialize();
|
||||
query += "&" + $('.jssearch').find('select').serialize();
|
||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
|
||||
query = query.replace(/^&/g, '');
|
||||
if (url.indexOf('?') > 0) {
|
||||
url += '&' + query;
|
||||
} else {
|
||||
url += '?' + query;
|
||||
}
|
||||
var start = $("#time_start").val();
|
||||
var end = $("#time_end").val();
|
||||
if (start != '' && end != '') {
|
||||
if (Date.parse(start) > Date.parse(end)) {
|
||||
layer.msg('开始时间必须小于等于结束时间');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
window.location.href = url;
|
||||
});
|
||||
$(".paixu").click(function () {
|
||||
var that = $(this);
|
||||
$data_order = that.attr('data-order');
|
||||
$order_type = '{$userarpu_order}';
|
||||
if ($order_type == '' || $order_type == '4') {
|
||||
$(".sortBy").attr('name', 'data_order');
|
||||
val = '3,' + $data_order;
|
||||
$(".sortBy").attr('value', val);
|
||||
$("#search").click();
|
||||
} else if ($order_type == '3') {
|
||||
$(".sortBy").attr('name', 'data_order');
|
||||
val = '4,' + $data_order;
|
||||
$(".sortBy").attr('value', val);
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
|
||||
$('.jssamlllist').click(function () {
|
||||
var that = $(this), url = that.attr('data-url');
|
||||
var url =
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "【" + that.attr('data-account') + "】小号列表",
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['1062px', '80%'],
|
||||
content: url,//iframe的url
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".paixu").click(function () {
|
||||
var val = $(this).attr('data-order');
|
||||
if (val == 1) {
|
||||
val = 2;
|
||||
} else if (val == 2) {
|
||||
val = 1;
|
||||
}
|
||||
var name = $(this).attr('name');
|
||||
if (name == 'balance_status') {
|
||||
$('#key').val(1);
|
||||
} else {
|
||||
$('#key').val(2);
|
||||
}
|
||||
$("#" + name).val(val);
|
||||
$("#search").click();
|
||||
});
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
|
||||
$("#total_status").click(function () {
|
||||
$("#search").click();
|
||||
})
|
||||
|
||||
|
||||
$('#time_start').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
minView: 2,
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$('#datetimepicker').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
minView: 2,
|
||||
autoclose: true,
|
||||
pickerPosition: 'bottom-left'
|
||||
})
|
||||
var promote_id = "{:I('promote_id')}";
|
||||
function getPromotersByLevel() {
|
||||
$.ajax({
|
||||
url: "{:U('Ajax/getPromotersByLevel')}",
|
||||
type: "get",
|
||||
data: { level: 1 },
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
str = '<option value="">请选择会长</option><option value="0"' + (promote_id && 0 == promote_id ? 'selected' : '') + '>官方渠道</option>';
|
||||
// $.each(response.data, function(index, item){
|
||||
// console.log(item.id);
|
||||
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';
|
||||
// });
|
||||
data = response.data;
|
||||
for (var i in data) {
|
||||
str += "<option value='" + data[i].id + "' " + (promote_id && data[i].id == promote_id ? 'selected' : '') + ">" + data[i].nickname + "</option>"
|
||||
}
|
||||
$("#promote_id").empty();
|
||||
$("#promote_id").append(str);
|
||||
$("#promote_id").select2();
|
||||
}
|
||||
})
|
||||
}
|
||||
getPromotersByLevel();
|
||||
})
|
||||
|
||||
|
||||
function shenhe(status) {
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function (index, elem) {
|
||||
return $(elem).val();
|
||||
}).get().join("\n");
|
||||
var desc = '';
|
||||
if (status == 0) {
|
||||
desc = '锁定';
|
||||
} else {
|
||||
desc = '开启';
|
||||
}
|
||||
layer.prompt({
|
||||
formType: 2,
|
||||
value: text,
|
||||
placeholder: '玩家账号(一个账号一行)',
|
||||
title: '请输入要' + desc + '的玩家账号(一个账号一行)',
|
||||
area: ['800px', '350px'] //自定义文本域宽高
|
||||
}, function (value, index, elem) {
|
||||
if (value == '') {
|
||||
layer.msg("请输入账户ID");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "{:U('Member/lock_status')}",
|
||||
data: { accounts: value, lock_status: status },// 你的formid
|
||||
async: false,
|
||||
error: function (data) {
|
||||
layer.alert("服务器故障,请稍后重试!", { icon: 2 });
|
||||
},
|
||||
success: function (data) {
|
||||
// var obj = JSON.parse(data);
|
||||
// layer.alert(obj.info,{icon:obj.status})
|
||||
layer.alert(data.info, { icon: data.status })
|
||||
window.location.reload()
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</block>
|
@ -0,0 +1,451 @@
|
||||
<extend name="Public/base" />
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
|
||||
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
color: #000;
|
||||
resize: none;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
||||
box-shadow: 0px 3px 3px #F7F8F9 inset;
|
||||
height: 35px;
|
||||
height: 28px;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
line-height: 35px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.select2-results__option[aria-selected] {
|
||||
font-size: 12px;
|
||||
}
|
||||
.tooltip {
|
||||
position: relative;
|
||||
/* display: block; */
|
||||
/* color: #056dae; */
|
||||
}
|
||||
.tooltip .tooltiptext {
|
||||
display: none;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 10px 5px 5px;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 80%;
|
||||
left: 0;
|
||||
border: #000 solid 1px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: black transparent transparent transparent;
|
||||
}
|
||||
.tooltip:hover .tooltiptext {
|
||||
color: #333;
|
||||
display: block;
|
||||
|
||||
}
|
||||
</style>
|
||||
<!-- 标题栏 -->
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
|
||||
<h3 class="page_title">渠道统计</h3>
|
||||
<p class="description_text">说明:渠道相关统计</p>
|
||||
</div>
|
||||
<style>
|
||||
|
||||
|
||||
</style>
|
||||
<div class="cf top_nav_list">
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch search_list fl cf">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
<div class="input-list input-list-resway search_label_rehab">
|
||||
<select id="company_id" name="company_id" class="select_gallery" style="width:150px;">
|
||||
<option value="">请选择推广公司</option>
|
||||
<volist name=":getPromoteCompany()" id="vo">
|
||||
<option value="{$vo.id}" <if condition="I('company_id') && $vo.id eq I('company_id')">selected
|
||||
</if> >{$vo.company_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list search_item input-list-gamenoticestatus">
|
||||
<select name="promote_id" style="color:#444" class="select_gallery" id="promote_id">
|
||||
<option value="">请选择会长</option>
|
||||
<option value="0" <?php if ($_POST['promote_id'] == 0):?>selected<?php endif;?>>官方渠道</option>
|
||||
<option value="UC" <?php if ($_POST['promote_id'] == 'UC'):?>selected<?php endif;?>>UC用户</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}"
|
||||
placeholder="开始时间" />
|
||||
-
|
||||
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
||||
<input type="text" readonly id="time_end" name="time_end" class="" value="{:I('time_end')}"
|
||||
placeholder="结束时间" />
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="game_name" name="game_name" class="select_gallery">
|
||||
<option value="">游戏名称</option>
|
||||
<volist name=":getAllGame()" id="vo">
|
||||
<option value="{$vo.game_name}" <if condition="$vo.game_name eq I('game_name')">selected</if>
|
||||
>{$vo.game_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="game_type" name="game_type" class="select_gallery">
|
||||
<option value="">设备类型</option>
|
||||
<option value="1" <?php echo I('game_type') == 1 ? "selected" : ''?>>安卓</option>
|
||||
<option value="2" <?php echo I('game_type') == 2 ? "selected" : ''?>>苹果</option>
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="" value="" class="sortBy">
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search"
|
||||
url="{:U('FinancePromote/promoteUser','model='.$model['name'] .'&row='.I('row'),false)}">
|
||||
搜索</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>推广公司</th>
|
||||
<th>推广员账号</th>
|
||||
|
||||
<th class="tooltip"><a class="paixu" data-order='cash_count'>
|
||||
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'cash_count'">游戏现金金额▲
|
||||
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'cash_count'" />
|
||||
游戏现金金额▼
|
||||
<else />游戏现金金额<img src="__IMG__/up-down.png" width="13px">
|
||||
</if>
|
||||
</a> <span class="tooltiptext">第三方支付(微信,支付宝,快捷)</span> </th>
|
||||
<th class="tooltip"><a class="paixu" data-order='balance_coin_count'>
|
||||
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'balance_coin_count'">
|
||||
平台币直充支出▲
|
||||
<elseif
|
||||
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'balance_coin_count'" />
|
||||
平台币直充支出▼
|
||||
<else />平台币直充支出<img src="__IMG__/up-down.png" width="13px">
|
||||
</if>
|
||||
</a> <span class="tooltiptext">平台币购买游戏道具所产生的金额</span> </th>
|
||||
<th class="tooltip"><a class="paixu" data-order='bind_coin_count'>
|
||||
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'bind_coin_count'">
|
||||
内充支出▲
|
||||
<elseif
|
||||
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'bind_coin_count'" />
|
||||
内充支出▼
|
||||
<else />内充支出<img src="__IMG__/up-down.png" width="13px">
|
||||
</if>
|
||||
</a> <span class="tooltiptext">公会下的玩家使用绑定币消费的金额</span> </th>
|
||||
<th class="tooltip"><a class="paixu" data-order='inside_cash_count'>
|
||||
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'inside_cash_count'">
|
||||
平台币内充▲
|
||||
<elseif
|
||||
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'inside_cash_count'" />
|
||||
平台币内充▼
|
||||
<else />平台币内充<img src="__IMG__/up-down.png" width="13px">
|
||||
</if>
|
||||
</a> <span class="tooltiptext">管理后台直接下放给会长的平台币</span> </th>
|
||||
<th class="tooltip">渠道游戏内充值合计 <span class="tooltiptext">游戏现金金额(游戏现金流水+平台币支出+公会内充支出=总流水</span> </th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<empty name="list_data">
|
||||
<td colspan="15" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
<else />
|
||||
<volist name="list_data" id="data">
|
||||
<tr>
|
||||
<td>{$data.company_name}</td>
|
||||
<td>{$data['promote_account']}</td>
|
||||
|
||||
<td>{$data.cash_count}</td>
|
||||
<td>{$data.balance_coin_count}</td>
|
||||
<td>{$data.bind_coin_count}</td>
|
||||
<td>{$data.inside_cash_count}</td>
|
||||
<td>{$data.allcount}</td>
|
||||
|
||||
|
||||
<td>
|
||||
<a href="{:U('FinancePromote/gameStatistics',array_merge(I('get.'),['promote_id'=>$data['promote_id'],'company_id'=>$data['company_id'],'promote_type'=>2]))}" >游戏查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</volist>
|
||||
</empty>
|
||||
<tr class="data_summary">
|
||||
<td colspan="2" style="text-align: center;">汇总:</td>
|
||||
<td>{$all_count['cash_count']}</td>
|
||||
<td>{$all_count['balance_coin_count']}</td>
|
||||
<td>{$all_count['bind_coin_count']}</td>
|
||||
<td>{$all_count['inside_cash_count']}</td>
|
||||
<td>{$all_count['all_count']}</td>
|
||||
<td style="text-align: center;">
|
||||
<!-- <a href="{:U('FinancePromote/gameStatistics',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id'],'promote_type'=>2],I('get.')))}" >游戏查看</a> -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
<a class="sch-btn"
|
||||
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}">导出</a>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
|
||||
<!-- 添加常用设置 begin-->
|
||||
<div class="common_settings">
|
||||
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
||||
<form class="addShortcutIcon">
|
||||
<input type="hidden" name="title" value="{$m_title}">
|
||||
<input type="hidden" name="url" value="Member/user_info">
|
||||
</form>
|
||||
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;"
|
||||
target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img
|
||||
src="__IMG__/zwmimages/icon_jia.png"><span>
|
||||
<notempty name='commonset'>已添加
|
||||
<else />添加至常用设置</notempty>
|
||||
</span></a>
|
||||
</div>
|
||||
<!--end 添加常用设置 -->
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
||||
<php>if(C('COLOR_STYLE')=='blue_color') echo '
|
||||
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
|
||||
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
|
||||
charset="UTF-8"></script>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//导航高亮
|
||||
highlight_subnav('{:U("FinancePromote/index")}');
|
||||
$(function () {
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(".select_gallery").select2();
|
||||
//搜索功能
|
||||
$("#search").click(function () {
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.jssearch').find('input').serialize();
|
||||
query += "&" + $('.jssearch').find('select').serialize();
|
||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
|
||||
query = query.replace(/^&/g, '');
|
||||
if (url.indexOf('?') > 0) {
|
||||
url += '&' + query;
|
||||
} else {
|
||||
url += '?' + query;
|
||||
}
|
||||
var start = $("#time_start").val();
|
||||
var end = $("#time_end").val();
|
||||
if (start != '' && end != '') {
|
||||
if (Date.parse(start) > Date.parse(end)) {
|
||||
layer.msg('开始时间必须小于等于结束时间');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
window.location.replace(url);
|
||||
// window.location.href = url;
|
||||
});
|
||||
$('.page a:eq(1)').click(function () {
|
||||
var href = $(this).attr('href');
|
||||
$(this).removeAttr('href');
|
||||
window.location.replace(href)
|
||||
});
|
||||
$(".paixu").click(function () {
|
||||
var that = $(this);
|
||||
$data_order = that.attr('data-order');
|
||||
$order_type = '{$userarpu_order}';
|
||||
if ($order_type == '' || $order_type == '4') {
|
||||
$(".sortBy").attr('name', 'data_order');
|
||||
val = '3,' + $data_order;
|
||||
$(".sortBy").attr('value', val);
|
||||
$("#search").click();
|
||||
} else if ($order_type == '3') {
|
||||
$(".sortBy").attr('name', 'data_order');
|
||||
val = '4,' + $data_order;
|
||||
$(".sortBy").attr('value', val);
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
|
||||
$('.jssamlllist').click(function () {
|
||||
var that = $(this), url = that.attr('data-url');
|
||||
var url =
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "【" + that.attr('data-account') + "】小号列表",
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['1062px', '80%'],
|
||||
content: url,//iframe的url
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".paixu").click(function () {
|
||||
var val = $(this).attr('data-order');
|
||||
if (val == 1) {
|
||||
val = 2;
|
||||
} else if (val == 2) {
|
||||
val = 1;
|
||||
}
|
||||
var name = $(this).attr('name');
|
||||
if (name == 'balance_status') {
|
||||
$('#key').val(1);
|
||||
} else {
|
||||
$('#key').val(2);
|
||||
}
|
||||
$("#" + name).val(val);
|
||||
$("#search").click();
|
||||
});
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
|
||||
$("#total_status").click(function () {
|
||||
$("#search").click();
|
||||
})
|
||||
|
||||
|
||||
$('#time_start').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
minView: 2,
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$('#datetimepicker').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
minView: 2,
|
||||
autoclose: true,
|
||||
pickerPosition: 'bottom-left'
|
||||
})
|
||||
var promote_id = "{:I('promote_id')}";
|
||||
function getPromotersByLevel() {
|
||||
$.ajax({
|
||||
url: "{:U('Ajax/getPromotersByLevel')}",
|
||||
type: "get",
|
||||
data: { level: 1 },
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
str = '<option value="">请选择会长</option><option value="0"' + (promote_id && 0 == promote_id ? 'selected' : '') + '>官方渠道</option>';
|
||||
// $.each(response.data, function(index, item){
|
||||
// console.log(item.id);
|
||||
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';
|
||||
// });
|
||||
data = response.data;
|
||||
for (var i in data) {
|
||||
str += "<option value='" + data[i].id + "' " + (promote_id && data[i].id == promote_id ? 'selected' : '') + ">" + data[i].nickname + "</option>"
|
||||
}
|
||||
$("#promote_id").empty();
|
||||
$("#promote_id").append(str);
|
||||
$("#promote_id").select2();
|
||||
}
|
||||
})
|
||||
}
|
||||
getPromotersByLevel();
|
||||
})
|
||||
|
||||
|
||||
function shenhe(status) {
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function (index, elem) {
|
||||
return $(elem).val();
|
||||
}).get().join("\n");
|
||||
var desc = '';
|
||||
if (status == 0) {
|
||||
desc = '锁定';
|
||||
} else {
|
||||
desc = '开启';
|
||||
}
|
||||
layer.prompt({
|
||||
formType: 2,
|
||||
value: text,
|
||||
placeholder: '玩家账号(一个账号一行)',
|
||||
title: '请输入要' + desc + '的玩家账号(一个账号一行)',
|
||||
area: ['800px', '350px'] //自定义文本域宽高
|
||||
}, function (value, index, elem) {
|
||||
if (value == '') {
|
||||
layer.msg("请输入账户ID");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "{:U('Member/lock_status')}",
|
||||
data: { accounts: value, lock_status: status },// 你的formid
|
||||
async: false,
|
||||
error: function (data) {
|
||||
layer.alert("服务器故障,请稍后重试!", { icon: 2 });
|
||||
},
|
||||
success: function (data) {
|
||||
// var obj = JSON.parse(data);
|
||||
// layer.alert(obj.info,{icon:obj.status})
|
||||
layer.alert(data.info, { icon: data.status })
|
||||
window.location.reload()
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</block>
|
Loading…
Reference in New Issue