Merge branch 'feature/pay_white_list' of wmtx/platform into release
支付意向 支付限额白名单master
commit
b9f466f73c
@ -0,0 +1,511 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | OneThink [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
use User\Api\UserApi;
|
||||
use Com\Wechat;
|
||||
use Com\WechatAuth;
|
||||
|
||||
/**
|
||||
* 后台用户控制器
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
class PayChannelIntentionController extends AdminController
|
||||
{
|
||||
|
||||
public static $arr_pay_way = ['alipay'=>'支付宝','wxpay'=>'微信支付','sqpay'=>'双乾快捷支付','yeepay'=>'易宝支付'];
|
||||
|
||||
public function index($p = 0) {
|
||||
|
||||
$page = intval($p);
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
|
||||
if (isset($_REQUEST['row'])) {
|
||||
$row = $_REQUEST['row'];
|
||||
} else {
|
||||
$row = 10;
|
||||
}
|
||||
|
||||
$map = [];
|
||||
|
||||
if ($_REQUEST['timestart']&&!$_REQUEST['timeend']) {
|
||||
$map['create_time'] = ['egt',strtotime($_REQUEST['timestart'])];
|
||||
}
|
||||
|
||||
if (!$_REQUEST['timestart']&&$_REQUEST['timeend']) {
|
||||
$map['create_time'] = ['elt',strtotime($_REQUEST['timeend'])+86399];
|
||||
}
|
||||
|
||||
if ($_REQUEST['timestart']&&$_REQUEST['timeend']) {
|
||||
$map['create_time'] = ['between',[strtotime($_REQUEST['timestart']),strtotime($_REQUEST['timeend'])+86399]];
|
||||
// $map['create_time'] = ['elt',strtotime($_REQUEST['time_end'])];
|
||||
}
|
||||
|
||||
if ($_REQUEST['pay_type']) {
|
||||
$map['pay_ways'] = ['like',"%,{$_REQUEST['pay_type']}"];
|
||||
}
|
||||
|
||||
$show_data = M('pay_channel_intention','tab_')
|
||||
->field('group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways,tab_pay_channel_intention.user_account,
|
||||
tab_pay_channel_intention.pay_amount,CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status,tab_pay_channel_intention.pay_order_number')
|
||||
// ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number')
|
||||
->group('tab_pay_channel_intention.pay_order_number')
|
||||
->order('tab_pay_channel_intention.create_time ASC')
|
||||
->select(false);
|
||||
|
||||
$data = M()->table('('.$show_data.') as a')
|
||||
->field('pay_ways,user_account,pay_status,
|
||||
SUM(if(pay_status=0,pay_amount,0)) fail_invest_amount,
|
||||
SUM(if(pay_status=1,pay_amount,0)) success_invest_amount,
|
||||
SUM(if(pay_status=2,pay_amount,0)) nothing_invest_amount,
|
||||
count(if(pay_status=0,pay_amount,null)) fail_invest_count,
|
||||
count(if(pay_status=1,pay_amount,null)) success_invest_count,
|
||||
count(if(pay_status=2,pay_amount,null)) nothing_invest_count')
|
||||
->where($map)
|
||||
->group('a.pay_ways,a.user_account,a.pay_status')
|
||||
->select(false);
|
||||
|
||||
$data = M()->table('('.$data.') as a')
|
||||
->field('pay_ways,sum(fail_invest_amount) fail_invest_amount,
|
||||
sum(success_invest_amount) success_invest_amount,
|
||||
sum(nothing_invest_amount) nothing_invest_amount,
|
||||
count(if(pay_status=0,fail_invest_count,NULL)) fail_invest_count,
|
||||
count(if(pay_status=1,success_invest_count,NULL)) success_invest_count,
|
||||
count(if(pay_status=2,nothing_invest_count,NULL)) nothing_invest_count')
|
||||
->page($page,$row)
|
||||
->where($map)
|
||||
->group('a.pay_ways')
|
||||
->select();
|
||||
|
||||
|
||||
$sum = M()->table('('.$show_data.') as a')
|
||||
->field('pay_ways,user_account,pay_status,
|
||||
SUM(if(pay_status=0,pay_amount,0)) fail_invest_amount,
|
||||
SUM(if(pay_status=1,pay_amount,0)) success_invest_amount,
|
||||
SUM(if(pay_status=2,pay_amount,0)) nothing_invest_amount,
|
||||
count(if(pay_status=0,pay_amount,null)) fail_invest_count,
|
||||
count(if(pay_status=1,pay_amount,null)) success_invest_count,
|
||||
count(if(pay_status=2,pay_amount,null)) nothing_invest_count')
|
||||
->group('a.user_account,a.pay_status')
|
||||
->select(false);
|
||||
|
||||
$sum = M()->table('('.$sum.') as a')
|
||||
->field('pay_ways,sum(fail_invest_amount) fail_invest_amount,
|
||||
sum(success_invest_amount) success_invest_amount,
|
||||
sum(nothing_invest_amount) nothing_invest_amount,
|
||||
count(if(pay_status=0,fail_invest_count,NULL)) fail_invest_count,
|
||||
count(if(pay_status=1,success_invest_count,NULL)) success_invest_count,
|
||||
count(if(pay_status=2,nothing_invest_count,NULL)) nothing_invest_count')
|
||||
->where($map)
|
||||
->find();
|
||||
|
||||
|
||||
$this->assign('sum',$sum);
|
||||
|
||||
$count = M()->table('('.$show_data.') as a')
|
||||
->field('count(pay_amount) count')
|
||||
->group('a.pay_ways')
|
||||
->select(false);
|
||||
|
||||
$count = M()->table('('.$count.') as a')->count();
|
||||
|
||||
$page = set_pagination($count, $row);
|
||||
if ($page) {
|
||||
$this->assign('_page', $page);//分页
|
||||
}
|
||||
|
||||
foreach($data as $key => $value) {
|
||||
|
||||
$arr = explode(',',$data[$key]['pay_ways']);
|
||||
|
||||
$data[$key]['pay_way'] = self::$arr_pay_way[end($arr)];
|
||||
|
||||
$data[$key]['pay_ways_ch'] = '';
|
||||
foreach ($arr as $k=>$v) {
|
||||
$data[$key]['pay_ways_ch'] = $data[$key]['pay_ways_ch'].($k+1).','.self::$arr_pay_way[$v];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$this->assign('data',$data);
|
||||
|
||||
$this->display();
|
||||
|
||||
}
|
||||
|
||||
public function export_index() {
|
||||
|
||||
$xlsName = '支付意向统计导出';
|
||||
|
||||
$xlsCell = array(
|
||||
"充值点击行为", "最终使用方式", '充值成功用户数', '充值成功金额(汇总)',
|
||||
'下单未支付用户数', '下单未支付用户数金额(汇总)', '充值失败用户数', '充值失败金额(汇总)'
|
||||
);
|
||||
|
||||
$map = [];
|
||||
|
||||
if ($_REQUEST['timestart']&&!$_REQUEST['timeend']) {
|
||||
$map['create_time'] = ['egt',strtotime($_REQUEST['timestart'])];
|
||||
}
|
||||
|
||||
if (!$_REQUEST['timestart']&&$_REQUEST['timeend']) {
|
||||
$map['create_time'] = ['elt',strtotime($_REQUEST['timeend'])+86399];
|
||||
}
|
||||
|
||||
if ($_REQUEST['timestart']&&$_REQUEST['timeend']) {
|
||||
$map['create_time'] = ['between',[strtotime($_REQUEST['timestart']),strtotime($_REQUEST['timeend'])+86399]];
|
||||
// $map['create_time'] = ['elt',strtotime($_REQUEST['time_end'])];
|
||||
}
|
||||
|
||||
if ($_REQUEST['pay_type']) {
|
||||
$map['pay_ways'] = ['like',"%,{$_REQUEST['pay_type']}"];
|
||||
}
|
||||
|
||||
$show_data = M('pay_channel_intention','tab_')
|
||||
->field('group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways,tab_pay_channel_intention.user_account,
|
||||
tab_pay_channel_intention.pay_amount,CASE WHEN pay_status is null THEN 2 ELSE pay_status END as pay_status,tab_pay_channel_intention.pay_order_number')
|
||||
->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number')
|
||||
->group('tab_pay_channel_intention.pay_order_number')
|
||||
->order('tab_pay_channel_intention.create_time ASC')
|
||||
->select(false);
|
||||
|
||||
$csvFileName = $xlsName.'.csv';
|
||||
//设置好告诉浏览器要下载excel文件的headers
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: application/vnd.ms-excel');
|
||||
header('Content-Disposition: attachment; filename="'. $csvFileName .'"');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate');
|
||||
header('Pragma: public');
|
||||
$fp = fopen('php://output', 'a');//打开output流
|
||||
mb_convert_variables('GBK', 'UTF-8', $xlsCell);
|
||||
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
|
||||
|
||||
|
||||
$count = M()->table('('.$show_data.') as a')
|
||||
->field('count(pay_amount) count')
|
||||
->group('a.pay_ways')
|
||||
->select(false);
|
||||
|
||||
$accessNum = M()->table('('.$count.') as a')->count();
|
||||
|
||||
$perSize = 2000;//每次查询的条数
|
||||
$pages = ceil($accessNum / $perSize);
|
||||
|
||||
for($i = 1; $i <= $pages; $i++) {
|
||||
|
||||
|
||||
$xlsData = M()->table('('.$show_data.') as a')
|
||||
->field('"" as pay_ways_ch,"" as pay_way,pay_ways,user_account,
|
||||
count(if(pay_status=1,pay_amount,null)) success_invest_count,
|
||||
SUM(if(pay_status=1,pay_amount,0)) success_invest_amount,
|
||||
count(if(pay_status=2,pay_amount,null)) nothing_invest_count,
|
||||
SUM(if(pay_status=2,pay_amount,0)) nothing_invest_amount,
|
||||
count(if(pay_status=0,pay_amount,null)) fail_invest_count,
|
||||
SUM(if(pay_status=0,pay_amount,0)) fail_invest_amount')
|
||||
->limit(($i-1)*$perSize ,$perSize)
|
||||
->where($map)
|
||||
->group('a.pay_ways,a.user_account,a.pay_status')
|
||||
->select();
|
||||
|
||||
|
||||
foreach($xlsData as $key =>$value) {
|
||||
$arr = explode(',',$value['pay_ways']);
|
||||
|
||||
$value['pay_way'] = self::$arr_pay_way[end($arr)];
|
||||
|
||||
|
||||
|
||||
$value['pay_ways_ch'] = '';
|
||||
foreach ($arr as $k=>$v) {
|
||||
$value['pay_ways_ch'] = $value['pay_ways_ch'].($k+1).','.self::$arr_pay_way[$v];
|
||||
|
||||
}
|
||||
|
||||
unset($value['pay_ways']);
|
||||
unset($value['user_account']);
|
||||
|
||||
mb_convert_variables('GBK', 'UTF-8', $value);
|
||||
fputcsv($fp, $value);
|
||||
}
|
||||
unset($xlsData);//释放变量的内存
|
||||
//刷新输出缓冲到浏览器
|
||||
ob_flush();
|
||||
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
|
||||
}
|
||||
|
||||
$sum = M()->table('('.$show_data.') as a')
|
||||
->field('pay_ways,user_account,
|
||||
SUM(if(pay_status=0,pay_amount,0)) fail_invest_amount,
|
||||
SUM(if(pay_status=1,pay_amount,0)) success_invest_amount,
|
||||
SUM(if(pay_status=2,pay_amount,0)) nothing_invest_amount,
|
||||
count(if(pay_status=0,pay_amount,null)) fail_invest_count,
|
||||
count(if(pay_status=1,pay_amount,null)) success_invest_count,
|
||||
count(if(pay_status=2,pay_amount,null)) nothing_invest_count')
|
||||
->group('a.pay_ways')
|
||||
->select(false);
|
||||
|
||||
$sum = M()->table('('.$sum.') as a')
|
||||
->field('"" as pay_ways_ch,"" as pay_way,
|
||||
sum(success_invest_count) success_invest_count,
|
||||
sum(success_invest_amount) success_invest_amount,
|
||||
sum(nothing_invest_count) nothing_invest_count,
|
||||
sum(nothing_invest_amount) nothing_invest_amount,
|
||||
sum(fail_invest_count) fail_invest_count,
|
||||
sum(fail_invest_amount) fail_invest_amount')
|
||||
->find();
|
||||
mb_convert_variables('GBK', 'UTF-8', $sum);
|
||||
fputcsv($fp, $sum);
|
||||
//刷新输出缓冲到浏览器
|
||||
ob_flush();
|
||||
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
|
||||
|
||||
fclose($fp);
|
||||
|
||||
$getData = $_GET;
|
||||
unset($getData['id']);
|
||||
unset($getData['xlsname']);
|
||||
|
||||
}
|
||||
|
||||
public function detail($p = 0) {
|
||||
|
||||
$page = intval($p);
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
|
||||
if (isset($_REQUEST['row'])) {
|
||||
$row = $_REQUEST['row'];
|
||||
} else {
|
||||
$row = 10;
|
||||
}
|
||||
|
||||
$map = [];
|
||||
|
||||
if ($_REQUEST['pay_ways']) {
|
||||
$map['pay_ways'] = $_REQUEST['pay_ways'];
|
||||
}
|
||||
|
||||
if ($_REQUEST['user_account']) {
|
||||
$map['user_account'] = $_REQUEST['user_account'];
|
||||
}
|
||||
|
||||
if ($_REQUEST['pay_status'] || $_REQUEST['pay_status'] == '0') {
|
||||
$map['pay_status'] = $_REQUEST['pay_status'];
|
||||
if ($_REQUEST['pay_status'] == 3) {
|
||||
$map['pay_status'] = 1;
|
||||
$map['pay_game_status'] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$data = M('pay_channel_intention','tab_')
|
||||
->field('group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways,
|
||||
count(if(tab_pay_channel_intention.pay_way="alipay",tab_pay_channel_intention.pay_way,null)) alipay,
|
||||
count(if(tab_pay_channel_intention.pay_way="wxpay",tab_pay_channel_intention.pay_way,null)) wxpay,
|
||||
count(if(tab_pay_channel_intention.pay_way="sqshorcut",tab_pay_channel_intention.pay_way,null)) sqshorcut,
|
||||
count(if(tab_pay_channel_intention.pay_way="shorcut",tab_pay_channel_intention.pay_way,null)) shorcut,
|
||||
tab_pay_channel_intention.user_account,
|
||||
tab_pay_channel_intention.pay_amount,
|
||||
CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status,
|
||||
CASE WHEN is_submit = 0 THEN 2 ELSE pay_game_status END as pay_game_status,
|
||||
tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time')
|
||||
// ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number')
|
||||
->group('tab_pay_channel_intention.pay_order_number')
|
||||
->order('tab_pay_channel_intention.create_time ASC')
|
||||
->select(false);
|
||||
|
||||
// var_dump($data);die();
|
||||
|
||||
$count = M()->table('('.$data.') as a')
|
||||
->where($map)
|
||||
->count();
|
||||
|
||||
$data = M()->table('('.$data.') as a')
|
||||
->page($page,$row)
|
||||
->where($map)
|
||||
->select();
|
||||
|
||||
|
||||
$page = set_pagination($count, $row);
|
||||
if ($page) {
|
||||
$this->assign('_page', $page);//分页
|
||||
}
|
||||
|
||||
$sum = M('pay_channel_intention','tab_')
|
||||
->field('group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways,
|
||||
count(if(tab_pay_channel_intention.pay_way="alipay",tab_pay_channel_intention.pay_way,null)) alipay,
|
||||
count(if(tab_pay_channel_intention.pay_way="wxpay",tab_pay_channel_intention.pay_way,null)) wxpay,
|
||||
count(if(tab_pay_channel_intention.pay_way="sqshorcut",tab_pay_channel_intention.pay_way,null)) sqshorcut,
|
||||
count(if(tab_pay_channel_intention.pay_way="shorcut",tab_pay_channel_intention.pay_way,null)) shorcut,
|
||||
tab_pay_channel_intention.user_account,
|
||||
tab_pay_channel_intention.pay_amount,
|
||||
CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status,
|
||||
CASE WHEN is_submit = 0 THEN 2 ELSE pay_game_status END as pay_game_status,
|
||||
tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time')
|
||||
// ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number')
|
||||
->group('tab_pay_channel_intention.pay_order_number')
|
||||
->order('tab_pay_channel_intention.create_time ASC')
|
||||
->select(false);
|
||||
|
||||
$sum = M()->table('('.$sum.') as a')
|
||||
->field("sum(pay_amount) pay_amount,sum(alipay) alipay,sum(wxpay) wxpay,sum(sqshorcut) sqshorcut,sum(shorcut) shorcut")
|
||||
->where($map)
|
||||
->find();
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
|
||||
$data[$key]['create_time'] = date('Y-m-d H:i:s',$data[$key]['create_time']);
|
||||
|
||||
}
|
||||
|
||||
$this->assign('data',$data);
|
||||
$this->assign('sum',$sum);
|
||||
|
||||
$this->display();
|
||||
|
||||
}
|
||||
|
||||
public function export_detail() {
|
||||
|
||||
$xlsName = '支付意向统计详情导出';
|
||||
|
||||
$xlsCell = array(
|
||||
"用户", "充值金额", '支付宝', '微信',
|
||||
'易宝', '双乾快捷支付', '时间', '支付状态', '关联订单'
|
||||
);
|
||||
|
||||
$map = [];
|
||||
|
||||
if ($_REQUEST['pay_ways']) {
|
||||
$map['pay_ways'] = $_REQUEST['pay_ways'];
|
||||
}
|
||||
|
||||
if ($_REQUEST['user_account']) {
|
||||
$map['user_account'] = $_REQUEST['user_account'];
|
||||
}
|
||||
|
||||
if ($_REQUEST['pay_status'] || $_REQUEST['pay_status'] == '0') {
|
||||
$map['pay_status'] = $_REQUEST['pay_status'];
|
||||
if ($_REQUEST['pay_status'] == 3) {
|
||||
$map['pay_status'] = 1;
|
||||
$map['pay_game_status'] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$data = M('pay_channel_intention','tab_')
|
||||
->field('group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways,
|
||||
count(if(tab_pay_channel_intention.pay_way="alipay",tab_pay_channel_intention.pay_way,null)) alipay,
|
||||
count(if(tab_pay_channel_intention.pay_way="wxpay",tab_pay_channel_intention.pay_way,null)) wxpay,
|
||||
count(if(tab_pay_channel_intention.pay_way="sqshorcut",tab_pay_channel_intention.pay_way,null)) sqshorcut,
|
||||
count(if(tab_pay_channel_intention.pay_way="shorcut",tab_pay_channel_intention.pay_way,null)) shorcut,
|
||||
tab_pay_channel_intention.user_account,
|
||||
tab_pay_channel_intention.pay_amount,
|
||||
CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status,
|
||||
CASE WHEN is_submit = 0 THEN 2 ELSE pay_game_status END as pay_game_status,
|
||||
tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time')
|
||||
// ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number')
|
||||
->group('tab_pay_channel_intention.pay_order_number')
|
||||
->order('tab_pay_channel_intention.create_time ASC')
|
||||
->select(false);
|
||||
|
||||
$csvFileName = $xlsName.'.csv';
|
||||
//设置好告诉浏览器要下载excel文件的headers
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: application/vnd.ms-excel');
|
||||
header('Content-Disposition: attachment; filename="'. $csvFileName .'"');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate');
|
||||
header('Pragma: public');
|
||||
$fp = fopen('php://output', 'a');//打开output流
|
||||
mb_convert_variables('GBK', 'UTF-8', $xlsCell);
|
||||
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
|
||||
|
||||
$accessNum = M()->table('('.$data.') as a')
|
||||
->where($map)
|
||||
->count();
|
||||
|
||||
$perSize = 2000;//每次查询的条数
|
||||
$pages = ceil($accessNum / $perSize);
|
||||
|
||||
for($i = 1; $i <= $pages; $i++) {
|
||||
|
||||
$xlsData = M()->table('('.$data.') as a')
|
||||
->field('user_account,pay_amount,alipay,wxpay,shorcut,sqshorcut,create_time,pay_status,pay_game_status,pay_order_number')
|
||||
->where($map)
|
||||
->limit(($i-1)*$perSize ,$perSize)
|
||||
->select();
|
||||
|
||||
|
||||
foreach($xlsData as $key =>$value) {
|
||||
|
||||
if ($value['pay_status'] == 0) {
|
||||
$value['pay_status'] = '支付失败';
|
||||
} else if($value['pay_status'] == 1) {
|
||||
$value['pay_status'] = '支付成功';
|
||||
} else if($value['pay_status'] == 2) {
|
||||
$value['pay_status'] = '下单未支付';
|
||||
}
|
||||
|
||||
if ($value['pay_game_status'] == 0) {
|
||||
$value['pay_status'] .= '通知失败';
|
||||
} else if($value['pay_game_status'] == 1) {
|
||||
$value['pay_status'] .= '通知成功';
|
||||
} else if($value['pay_game_status'] == 2) {
|
||||
$value['pay_status'] .= '未通知';
|
||||
}
|
||||
unset($value['pay_game_status']);
|
||||
|
||||
$value['create_time'] = date('Y-m-d H:i:s',$value['create_time']);
|
||||
// var_dump($value);die();
|
||||
|
||||
mb_convert_variables('GBK', 'UTF-8', $value);
|
||||
fputcsv($fp, $value);
|
||||
}
|
||||
unset($xlsData);//释放变量的内存
|
||||
//刷新输出缓冲到浏览器
|
||||
ob_flush();
|
||||
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
|
||||
}
|
||||
|
||||
$sum = M('pay_channel_intention','tab_')
|
||||
->field('group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways,
|
||||
count(if(tab_pay_channel_intention.pay_way="alipay",tab_pay_channel_intention.pay_way,null)) alipay,
|
||||
count(if(tab_pay_channel_intention.pay_way="wxpay",tab_pay_channel_intention.pay_way,null)) wxpay,
|
||||
count(if(tab_pay_channel_intention.pay_way="sqshorcut",tab_pay_channel_intention.pay_way,null)) sqshorcut,
|
||||
count(if(tab_pay_channel_intention.pay_way="shorcut",tab_pay_channel_intention.pay_way,null)) shorcut,
|
||||
tab_pay_channel_intention.user_account,
|
||||
tab_pay_channel_intention.pay_amount,
|
||||
CASE WHEN pay_status is null THEN 2 ELSE pay_status END as pay_status,
|
||||
CASE WHEN pay_game_status is null THEN 2 ELSE pay_game_status END as pay_game_status,
|
||||
tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time')
|
||||
// ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number')
|
||||
->group('tab_pay_channel_intention.pay_order_number')
|
||||
->order('tab_pay_channel_intention.create_time ASC')
|
||||
->select(false);
|
||||
|
||||
$sum = M()->table('('.$sum.') as a')
|
||||
->field("'汇总(检索时间内所有数据的统计)' as user_account,sum(pay_amount) pay_amount,sum(alipay) alipay,sum(wxpay) wxpay,sum(sqshorcut) sqshorcut,sum(shorcut) shorcut")
|
||||
->where($map)
|
||||
->find();
|
||||
|
||||
mb_convert_variables('GBK', 'UTF-8', $sum);
|
||||
fputcsv($fp, $sum);
|
||||
//刷新输出缓冲到浏览器
|
||||
ob_flush();
|
||||
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
|
||||
|
||||
fclose($fp);
|
||||
|
||||
$getData = $_GET;
|
||||
unset($getData['id']);
|
||||
unset($getData['xlsname']);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,230 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
use User\Api\UserApi as UserApi;
|
||||
|
||||
/**
|
||||
* 推广查询控制器
|
||||
* @author 王贺
|
||||
*/
|
||||
class UserPayWhiteListController extends ThinkController
|
||||
{
|
||||
public function index($p = 1) {
|
||||
|
||||
$page = intval($p);
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
$row=10;
|
||||
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
|
||||
|
||||
$map = [];
|
||||
|
||||
if ($_SESSION['onethink_admin']['user_group_id']) {
|
||||
|
||||
$group_id = $_SESSION['onethink_admin']['user_group_id'];
|
||||
|
||||
}
|
||||
|
||||
$empower_type = M('AuthGroup')->field('show_data')->where(array('id'=>$group_id))->find();
|
||||
|
||||
if (($empower_type['show_data']==1||$group_id==1)) {
|
||||
$this->assign('show',1);
|
||||
}
|
||||
|
||||
if ($_REQUEST['show']&&($empower_type['show_data']==1||$group_id==1)) {
|
||||
|
||||
$data = M('user_pay_whitelist','tab_')->where($map)
|
||||
->page($page,$row)
|
||||
->order('update_time DESC')
|
||||
->select();
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
if ($value['status']==2) {
|
||||
$data[$key]['time_status'] = '永久';
|
||||
} else {
|
||||
$data[$key]['time_status'] = '有效期至'.date('Y-m-d H:i:s',$value['update_time']+$value['time']);
|
||||
}
|
||||
|
||||
$data[$key]['update_time'] = date('Y-m-d H:i:s',$value['update_time']);
|
||||
|
||||
}
|
||||
|
||||
$count = M('user_pay_whitelist','tab_')->where($map)->count();
|
||||
|
||||
$this->assign('data',$data);
|
||||
|
||||
$page = set_pagination($count,$row);
|
||||
if($page) {$this->assign('_page', $page);}
|
||||
}
|
||||
|
||||
$this->assign('data',$data);
|
||||
$this->meta_title = '玩家支付限制白名单';
|
||||
|
||||
$this->display();
|
||||
|
||||
}
|
||||
|
||||
public function export() {
|
||||
|
||||
$xlsName = '支付限制白名单账号导出';
|
||||
|
||||
$xlsCell = array(
|
||||
"序号", "账号", '状态', '有效日期',
|
||||
'时间'
|
||||
);
|
||||
|
||||
$map = [];
|
||||
|
||||
$csvFileName = $xlsName.'.csv';
|
||||
//设置好告诉浏览器要下载excel文件的headers
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: application/vnd.ms-excel');
|
||||
header('Content-Disposition: attachment; filename="'. $csvFileName .'"');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate');
|
||||
header('Pragma: public');
|
||||
$fp = fopen('php://output', 'a');//打开output流
|
||||
mb_convert_variables('GBK', 'UTF-8', $xlsCell);
|
||||
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
|
||||
|
||||
|
||||
$accessNum = M('user_pay_whitelist','tab_')->where($map)->count();
|
||||
|
||||
$perSize = 2000;//每次查询的条数
|
||||
$pages = ceil($accessNum / $perSize);
|
||||
|
||||
for($i = 1; $i <= $pages; $i++) {
|
||||
|
||||
|
||||
$xlsData = M('user_pay_whitelist','tab_')
|
||||
->field("id,user_account,status,'' as time_status,update_time,time")
|
||||
->where($map)
|
||||
->limit(($i-1)*$perSize ,$perSize)
|
||||
->order('update_time DESC')
|
||||
->select();
|
||||
|
||||
foreach ($xlsData as $key => $value) {
|
||||
if ($value['status']==2) {
|
||||
$value['time_status'] = '永久';
|
||||
$value['status'] = '永久';
|
||||
} else if($value['status']==1){
|
||||
$value['time_status'] = '有效期至'.date('Y-m-d H:i:s',$value['update_time']+$value['time']);
|
||||
$value['status'] = '30天允许支付';
|
||||
} else {
|
||||
$value['time_status'] = '有效期至'.date('Y-m-d H:i:s',$value['update_time']+$value['time']);
|
||||
$value['status'] = '7天允许支付';
|
||||
}
|
||||
unset($value['time']);
|
||||
|
||||
$value['update_time'] = date('Y-m-d H:i:s',$value['update_time']);
|
||||
|
||||
mb_convert_variables('GBK', 'UTF-8', $value);
|
||||
fputcsv($fp, $value);
|
||||
|
||||
}
|
||||
|
||||
unset($xlsData);//释放变量的内存
|
||||
//刷新输出缓冲到浏览器
|
||||
ob_flush();
|
||||
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
|
||||
}
|
||||
|
||||
fclose($fp);
|
||||
|
||||
$getData = $_GET;
|
||||
unset($getData['id']);
|
||||
unset($getData['xlsname']);
|
||||
|
||||
}
|
||||
|
||||
public function add() {
|
||||
|
||||
if (IS_POST) {
|
||||
|
||||
$post = $_POST;
|
||||
|
||||
if($post['account']!=$post['account_check']) {
|
||||
$this->ajaxReturn(['status'=>0,'msg'=>'两次输入不一致']);
|
||||
exit();
|
||||
}
|
||||
|
||||
$hav_user = M('user','tab_')->where(['account'=>$post['account']])->find();
|
||||
|
||||
if(!$hav_user) {
|
||||
$this->ajaxReturn(['status'=>0,'msg'=>'账号不存在']);
|
||||
exit();
|
||||
}
|
||||
|
||||
$whiteList = M('user_pay_whitelist','tab_')->where(['user_id'=>$hav_user['id']])->find();
|
||||
|
||||
$insert = [];
|
||||
|
||||
$insert['user_id'] = $hav_user['id'];
|
||||
$insert['user_account'] = $hav_user['account'];
|
||||
|
||||
if(!$whiteList) {
|
||||
|
||||
$insert['status'] = 0;
|
||||
$insert['time'] = 7*86400;
|
||||
$insert['create_time'] = time();
|
||||
$insert['update_time'] = time();
|
||||
|
||||
$is_success = M('user_pay_whitelist','tab_')->add($insert);
|
||||
|
||||
} else {
|
||||
$insert['update_time'] = time();
|
||||
if($whiteList['status']==0) {
|
||||
$insert['status'] = 1;
|
||||
$insert['time'] = 30*86400;
|
||||
} elseif($whiteList['status']==1) {
|
||||
$insert['status'] = 2;
|
||||
$insert['time'] = 1;
|
||||
|
||||
}
|
||||
|
||||
if($whiteList['status']==2) {
|
||||
$this->ajaxReturn(['status'=>0,'msg'=>'该账号已经是永久无需再进行操作']);
|
||||
exit();
|
||||
}
|
||||
|
||||
$is_success = M('user_pay_whitelist','tab_')->where(['user_id'=>$hav_user['id']])->save($insert);
|
||||
}
|
||||
|
||||
if($is_success) {
|
||||
$this->ajaxReturn(['status'=>1,'msg'=>'操作成功']);
|
||||
exit();
|
||||
} else {
|
||||
$this->ajaxReturn(['status'=>0,'msg'=>'操作失败']);
|
||||
exit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->meta_title = '新增支付限制白名单账号';
|
||||
|
||||
$this->display();
|
||||
|
||||
}
|
||||
|
||||
public function del() {
|
||||
|
||||
if (!$_REQUEST['id']) {
|
||||
$this->ajaxReturn(['status'=>0,'msg'=>'id不能为空']);
|
||||
exit();
|
||||
}
|
||||
|
||||
$is_del = M('user_pay_whitelist','tab_')->where(['id'=>$_REQUEST['id']])->delete();
|
||||
|
||||
if($is_del) {
|
||||
$this->ajaxReturn(['status'=>1,'msg'=>'删除成功']);
|
||||
exit();
|
||||
} else {
|
||||
$this->ajaxReturn(['status'=>0,'msg'=>'删除失败']);
|
||||
exit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,586 @@
|
||||
<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;
|
||||
}
|
||||
|
||||
.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;}
|
||||
.layui-layer-dialog .layui-layer-content{color:red}
|
||||
.butnbox {padding:10px 0 10px;}
|
||||
.butnbox .butnlist {overflow:hidden;clear:both;}
|
||||
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
|
||||
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
|
||||
.butnbox .butnlist .butn.last {background:#009900;}
|
||||
.butnbox .butnlist .butn~.butn {margin-left:20px;}
|
||||
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
|
||||
.layui-layer-title {
|
||||
text-align: center;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.chk_1,.chk_2,.chk_3,.chk_4 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*******STYLE 3*******/
|
||||
.chk_3 + label {
|
||||
background-color: #fafbfa;
|
||||
padding: 9px;
|
||||
border-radius: 50px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin-right: 30px;
|
||||
-webkit-transition: all 0.1s ease-in;
|
||||
transition: all 0.1s ease-in;
|
||||
width: 40px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.chk_3 + label:after {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
-webkit-transition: box-shadow 0.1s ease-in;
|
||||
transition: box-shadow 0.1s ease-in;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 100px;
|
||||
box-shadow: inset 0 0 0 0 #eee, 0 0 1px rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.chk_3 + label:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
background: white;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
z-index: 999999;
|
||||
width: 31px;
|
||||
-webkit-transition: all 0.1s ease-in;
|
||||
transition: all 0.1s ease-in;
|
||||
height: 31px;
|
||||
border-radius: 100px;
|
||||
box-shadow: 0 3px 1px rgba(0,0,0,0.05), 0 0px 1px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.chk_3:active + label:after {
|
||||
box-shadow: inset 0 0 0 20px #eee, 0 0 1px #eee;
|
||||
}
|
||||
|
||||
.chk_3:active + label:before {
|
||||
width: 37px;
|
||||
}
|
||||
|
||||
.chk_3:checked:active + label:before {
|
||||
width: 37px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.chk_3 + label:active {
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px 1px 3px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.chk_3:checked + label:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
left: 26px;
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
.chk_3:checked + label:after {
|
||||
content: ' ';
|
||||
font-size: 1.5em;
|
||||
position: absolute;
|
||||
background: #4cda60;
|
||||
box-shadow: 0 0 1px #4cda60;
|
||||
}
|
||||
|
||||
#checkbox_d2 + label:after, #checkbox_d2 + label:before, #checkbox label {
|
||||
-webkit-transition: all 0.1s ease-in;
|
||||
transition: all 0.1s ease-in;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
|
||||
<h3 class="page_title">支付渠道意向统计</h3>
|
||||
<p class="description_text">说明:对意向流程相同的用户进行记录统计</p>
|
||||
<!-- <div class="demo">-->
|
||||
<!-- <div class="wrap" ><span style="float: right;margin-top: 7px;margin-right: 120px">开</span>-->
|
||||
<!-- <input type="checkbox" id="checkbox_c2" class="chk_3" <if condition="$apple_interior_buy eq 1">checked</if> /><label for="checkbox_c2" style="float: right;margin-right: 5px" onclick="setAppleInteriorBuyStatus({$set_apple_interior_buy})"></label>-->
|
||||
<!-- <span style="float: right;margin-top: 7px;margin-right: 5px">关</span>-->
|
||||
<!-- <span style="float: right;margin-top: 7px;margin-right: 30px">全游戏苹果内购支付成功通知默认限制</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="fr">-->
|
||||
<!-- <a class="tabchose" href="">游戏充值统计</a>-->
|
||||
<!-- <a class="" href="{:U('Finance/payTypeStatistics')}">充值方式统计</a>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list">
|
||||
<!--游戏类型搜索END-->
|
||||
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:history.go(-1)" style="background:#fff;color: #000;border: #000 solid 1px;width: 100px">返回</a>
|
||||
</div>
|
||||
|
||||
<div class="input-list">
|
||||
<input type="text" name="user_account" placeholder="请选择玩家账号" class=""
|
||||
value="{:I('user_account')}">
|
||||
</div>
|
||||
|
||||
<input type="text" name="pay_ways" placeholder="请选择支付状态" class=""
|
||||
value="{$_GET['pay_ways']}" style="display: none">
|
||||
|
||||
<div class="input-list input-list-server search_label_rehab">
|
||||
<select id="pay_status" name="pay_status" class="select_gallery" style="color: #404040;">
|
||||
<option value="">请选择支付状态</option>
|
||||
<option value="1" <if condition="$_GET['pay_status'] eq '1'">selected</if>>支付成功通知成功</option>
|
||||
<option value="2" <if condition="$_GET['pay_status'] eq '2'">selected</if>>下单未支付</option>
|
||||
<option value="3" <if condition="$_GET['pay_status'] eq '3'">selected</if>>支付成功通知失败</option>
|
||||
<option value="0" <if condition="$_GET['pay_status'] eq '0'">selected</if>>支付失败</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-list">
|
||||
<input type="text" id="timestart" name="timestart" class="" value="{:I('timestart')}" placeholder="下单开始时间" autocomplete="off"/>
|
||||
-
|
||||
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
||||
<input type="text" id="timeend" name="timeend" class="" value="{:I('timeend')}" placeholder="下单结束时间" autocomplete="off"/>
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="" value="" class="sortBy">
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search"
|
||||
style="width: 100px;border: #3C95C8 solid 1px; " url="{:U('PayChannelIntention/detail','model='.$model['name'].'&row='.I('row'),false)}">搜索</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<empty name="show_status">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th >序号</th>
|
||||
|
||||
<th >用户</th>
|
||||
|
||||
<th >充值金额</th>
|
||||
|
||||
<th >支付宝</th>
|
||||
|
||||
<th >微信</th>
|
||||
|
||||
<th >易宝</th>
|
||||
|
||||
<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" key="index">
|
||||
<tr>
|
||||
<td >{$index}</td>
|
||||
<td >{$data.user_account}</td>
|
||||
<td >{$data.pay_amount}</td>
|
||||
<td >{$data.alipay}</td>
|
||||
<td >{$data.wxpay}</td>
|
||||
<td >{$data.shorcut}</td>
|
||||
<td >{$data.sqshorcut}</td>
|
||||
<td >{$data.create_time}</td>
|
||||
<td ><if condition="$data.pay_status eq 0"> 支付失败 <elseif condition="$data.pay_status eq 2"/> 下单未支付 <else/> 支付成功 </if><br>
|
||||
<if condition="$data.pay_game_status eq 0"> 通知失败 <elseif condition="$data.pay_game_status eq 2"/> 未通知 <else/> 通知成功 </if></td>
|
||||
<td >{$data.pay_order_number}</td>
|
||||
</tr>
|
||||
</volist>
|
||||
<tr>
|
||||
<td colspan="2">汇总(检索时间内所有数据的统计)</td>
|
||||
<td >{$sum.pay_amount}</td>
|
||||
<td >{$sum.alipay}</td>
|
||||
<td >{$sum.wxpay}</td>
|
||||
<td >{$sum.shorcut}</td>
|
||||
<td >{$sum.sqshorcut}</td>
|
||||
<td ></td>
|
||||
<td ></td>
|
||||
<td ></td>
|
||||
</tr>
|
||||
</notemtpy>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</empty>
|
||||
</div>
|
||||
<div class="page">
|
||||
<if condition="$is_admin eq true ">
|
||||
<a class="sch-btn export-btn"
|
||||
href="{:U('PayChannelIntention/export_detail',array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
|
||||
<!-- <a class="sch-btn" href="{:U('Export/expUser',array_merge(['id'=>3,'xlsname'=>'玩家_玩家列表_'.(I('get.type')==2?'第三方玩家':'本站玩家')],I('get.')))}">导出</a> -->
|
||||
</if>
|
||||
{$_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">
|
||||
|
||||
|
||||
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('PayChannelIntention/index')}');
|
||||
|
||||
$('.page a').click(function () {
|
||||
var href = $(this).attr('href');
|
||||
$(this).removeAttr('href');
|
||||
window.location.replace(href)
|
||||
console.log(href)
|
||||
});
|
||||
|
||||
$('#forbit').click(function () {
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
return $(elem).val();
|
||||
}).get().join(",");
|
||||
|
||||
layer.confirm('【警告】是否确认此操作', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
if (!text) {
|
||||
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/operateIp')}",
|
||||
type: "get",
|
||||
data: {id: text,status:0},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '批量限制失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '批量限制成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//搜索功能
|
||||
$("#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);
|
||||
});
|
||||
|
||||
$('#noforbit').click(function () {
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
return $(elem).val();
|
||||
}).get().join(",");
|
||||
|
||||
layer.confirm('【警告】是否确认此操作', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
if (!text) {
|
||||
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/operateIp')}",
|
||||
type: "get",
|
||||
data: {id: text,status:1},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '批量不限制失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '批量不限制成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('#delete').click(function () {
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
return $(elem).val();
|
||||
}).get().join(",");
|
||||
|
||||
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
if (!text) {
|
||||
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/del')}",
|
||||
type: "get",
|
||||
data: {id: text},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '批量删除失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '批量删除成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('#add').click(function () {
|
||||
|
||||
});
|
||||
|
||||
function limit(id,status) {
|
||||
|
||||
layer.confirm('【警告】是否确认此操作', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/operateIp')}",
|
||||
type: "get",
|
||||
data: {id: id,status: status},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '操作失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '操作成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function del(id) {
|
||||
|
||||
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/del')}",
|
||||
type: "get",
|
||||
data: {id: id},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '操作失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '操作成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function setAppleInteriorBuyStatus(status) {
|
||||
|
||||
var text = '【警告】是否确认打开全游戏苹果内购支付成功通知';
|
||||
|
||||
if(status == 0) {
|
||||
|
||||
text = '【警告】是否确认关闭全游戏苹果内购支付成功通知';
|
||||
|
||||
}
|
||||
|
||||
layer.confirm(text, {
|
||||
btn: ['确认','取消'],
|
||||
area: ['380px','120px'],
|
||||
title: false
|
||||
}, function(index) {
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/setAppleInteriorBuyStatus')}",
|
||||
type: "get",
|
||||
data: {status: status},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '操作失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '操作成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,601 @@
|
||||
<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;
|
||||
}
|
||||
|
||||
.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;}
|
||||
.layui-layer-dialog .layui-layer-content{color:red}
|
||||
.butnbox {padding:10px 0 10px;}
|
||||
.butnbox .butnlist {overflow:hidden;clear:both;}
|
||||
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
|
||||
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
|
||||
.butnbox .butnlist .butn.last {background:#009900;}
|
||||
.butnbox .butnlist .butn~.butn {margin-left:20px;}
|
||||
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
|
||||
.layui-layer-title {
|
||||
text-align: center;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.chk_1,.chk_2,.chk_3,.chk_4 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*******STYLE 3*******/
|
||||
.chk_3 + label {
|
||||
background-color: #fafbfa;
|
||||
padding: 9px;
|
||||
border-radius: 50px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin-right: 30px;
|
||||
-webkit-transition: all 0.1s ease-in;
|
||||
transition: all 0.1s ease-in;
|
||||
width: 40px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.chk_3 + label:after {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
-webkit-transition: box-shadow 0.1s ease-in;
|
||||
transition: box-shadow 0.1s ease-in;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 100px;
|
||||
box-shadow: inset 0 0 0 0 #eee, 0 0 1px rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.chk_3 + label:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
background: white;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
z-index: 999999;
|
||||
width: 31px;
|
||||
-webkit-transition: all 0.1s ease-in;
|
||||
transition: all 0.1s ease-in;
|
||||
height: 31px;
|
||||
border-radius: 100px;
|
||||
box-shadow: 0 3px 1px rgba(0,0,0,0.05), 0 0px 1px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.chk_3:active + label:after {
|
||||
box-shadow: inset 0 0 0 20px #eee, 0 0 1px #eee;
|
||||
}
|
||||
|
||||
.chk_3:active + label:before {
|
||||
width: 37px;
|
||||
}
|
||||
|
||||
.chk_3:checked:active + label:before {
|
||||
width: 37px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.chk_3 + label:active {
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px 1px 3px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.chk_3:checked + label:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
left: 26px;
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
.chk_3:checked + label:after {
|
||||
content: ' ';
|
||||
font-size: 1.5em;
|
||||
position: absolute;
|
||||
background: #4cda60;
|
||||
box-shadow: 0 0 1px #4cda60;
|
||||
}
|
||||
|
||||
#checkbox_d2 + label:after, #checkbox_d2 + label:before, #checkbox label {
|
||||
-webkit-transition: all 0.1s ease-in;
|
||||
transition: all 0.1s ease-in;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
|
||||
<h3 class="page_title">支付渠道意向统计</h3>
|
||||
<p class="description_text">说明:对意向流程相同的用户进行记录统计</p>
|
||||
<!-- <div class="demo">-->
|
||||
<!-- <div class="wrap" ><span style="float: right;margin-top: 7px;margin-right: 120px">开</span>-->
|
||||
<!-- <input type="checkbox" id="checkbox_c2" class="chk_3" <if condition="$apple_interior_buy eq 1">checked</if> /><label for="checkbox_c2" style="float: right;margin-right: 5px" onclick="setAppleInteriorBuyStatus({$set_apple_interior_buy})"></label>-->
|
||||
<!-- <span style="float: right;margin-top: 7px;margin-right: 5px">关</span>-->
|
||||
<!-- <span style="float: right;margin-top: 7px;margin-right: 30px">全游戏苹果内购支付成功通知默认限制</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="fr">-->
|
||||
<!-- <a class="tabchose" href="">游戏充值统计</a>-->
|
||||
<!-- <a class="" href="{:U('Finance/payTypeStatistics')}">充值方式统计</a>-->
|
||||
<!-- </div>-->
|
||||
</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="pay_type" name="pay_type" class="select_gallery" >
|
||||
<option value="">选择订单类型</option>
|
||||
<option value="alipay" <if condition="$_GET['pay_type'] eq 'alipay'">selected</if>>支付宝</option>
|
||||
<option value="wxpay" <if condition="$_GET['pay_type'] eq 'wxpay'">selected</if>>微信支付</option>
|
||||
<option value="shorcut" <if condition="$_GET['pay_type'] eq 'shorcut'">selected</if>>易宝支付</option>
|
||||
<option value="sqshorcut" <if condition="$_GET['pay_type'] eq 'sqshorcut'">selected</if>>双乾快捷支付</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-list">
|
||||
<input type="text" id="timestart" name="timestart" class="" value="{:I('timestart')}" placeholder="下单开始时间" autocomplete="off"/>
|
||||
-
|
||||
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
||||
<input type="text" id="timeend" name="timeend" class="" value="{:I('timeend')}" placeholder="下单结束时间" autocomplete="off"/>
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="" value="" class="sortBy">
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search"
|
||||
style="width: 100px;border: #3C95C8 solid 1px; " url="{:U('PayChannelIntention/index','model='.$model['name'].'&row='.I('row'),false)}">搜索</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<empty name="show_status">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th >序号</th>
|
||||
|
||||
<th >充值点击行为</th>
|
||||
|
||||
<th >最终使用方式</th>
|
||||
|
||||
<th >充值成功用户数</th>
|
||||
|
||||
<th >充值成功金额(汇总)</th>
|
||||
|
||||
<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" key="index">
|
||||
<tr>
|
||||
<td >{$index}</td>
|
||||
<td >{$data.pay_ways_ch}</td>
|
||||
<td >{$data.pay_way}</td>
|
||||
<td ><a class="detail" data-way="{$data.pay_ways}" data-status="1">{$data.success_invest_count}</a></td>
|
||||
<td >{$data.success_invest_amount}</td>
|
||||
<td ><a class="detail" data-way="{$data.pay_ways}" data-status="2">{$data.nothing_invest_count}</a></td>
|
||||
<td >{$data.nothing_invest_amount}</td>
|
||||
<td ><a class="detail" data-way="{$data.pay_ways}" data-status="0">{$data.fail_invest_count}</a></td>
|
||||
<td >{$data.fail_invest_amount}</td>
|
||||
</tr>
|
||||
</volist>
|
||||
<tr>
|
||||
<td colspan="2">汇总(检索时间内所有数据的统计)</td>
|
||||
<td ></td>
|
||||
<td ><a class="detail" data-status="1">{$sum.success_invest_count}</a></td>
|
||||
<td >{$sum.success_invest_amount}</td>
|
||||
<td ><a class="detail" data-status="2">{$sum.nothing_invest_count}</a></td>
|
||||
<td >{$sum.nothing_invest_amount}</td>
|
||||
<td ><a class="detail" data-status="0">{$sum.fail_invest_count}</a></td>
|
||||
<td >{$sum.fail_invest_amount}</td>
|
||||
</tr>
|
||||
</notemtpy>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</empty>
|
||||
</div>
|
||||
<div class="page">
|
||||
<if condition="$is_admin eq true ">
|
||||
<a class="sch-btn export-btn"
|
||||
href="{:U('PayChannelIntention/export_index',array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
|
||||
<!-- <a class="sch-btn" href="{:U('Export/expUser',array_merge(['id'=>3,'xlsname'=>'玩家_玩家列表_'.(I('get.type')==2?'第三方玩家':'本站玩家')],I('get.')))}">导出</a> -->
|
||||
</if>
|
||||
{$_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">
|
||||
|
||||
|
||||
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('PayChannelIntention/index')}');
|
||||
|
||||
$('#timestart').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'
|
||||
})
|
||||
|
||||
|
||||
$('.detail').click(function () {
|
||||
|
||||
var pay_way = $(this).attr('data-way');
|
||||
if (pay_way) {
|
||||
pay_way = 'pay_ways/' + pay_way + '/';
|
||||
} else {
|
||||
pay_way = '';
|
||||
}
|
||||
|
||||
var pay_status = $(this).attr('data-status');
|
||||
|
||||
if (pay_status) {
|
||||
pay_status = 'pay_status/' + pay_status + '/';
|
||||
} else {
|
||||
pay_status = '';
|
||||
}
|
||||
|
||||
var url = "admin.php?s=/PayChannelIntention/detail/" + pay_way + pay_status;
|
||||
|
||||
window.location.href = url;
|
||||
|
||||
});
|
||||
|
||||
$('#forbit').click(function () {
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
return $(elem).val();
|
||||
}).get().join(",");
|
||||
|
||||
layer.confirm('【警告】是否确认此操作', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
if (!text) {
|
||||
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/operateIp')}",
|
||||
type: "get",
|
||||
data: {id: text,status:0},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '批量限制失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '批量限制成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//搜索功能
|
||||
$("#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.href = url;
|
||||
});
|
||||
|
||||
$('#noforbit').click(function () {
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
return $(elem).val();
|
||||
}).get().join(",");
|
||||
|
||||
layer.confirm('【警告】是否确认此操作', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
if (!text) {
|
||||
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/operateIp')}",
|
||||
type: "get",
|
||||
data: {id: text,status:1},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '批量不限制失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '批量不限制成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('#delete').click(function () {
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
return $(elem).val();
|
||||
}).get().join(",");
|
||||
|
||||
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
if (!text) {
|
||||
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/del')}",
|
||||
type: "get",
|
||||
data: {id: text},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '批量删除失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '批量删除成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('#add').click(function () {
|
||||
|
||||
});
|
||||
|
||||
function limit(id,status) {
|
||||
|
||||
layer.confirm('【警告】是否确认此操作', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/operateIp')}",
|
||||
type: "get",
|
||||
data: {id: id,status: status},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '操作失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '操作成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function del(id) {
|
||||
|
||||
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/del')}",
|
||||
type: "get",
|
||||
data: {id: id},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '操作失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '操作成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function setAppleInteriorBuyStatus(status) {
|
||||
|
||||
var text = '【警告】是否确认打开全游戏苹果内购支付成功通知';
|
||||
|
||||
if(status == 0) {
|
||||
|
||||
text = '【警告】是否确认关闭全游戏苹果内购支付成功通知';
|
||||
|
||||
}
|
||||
|
||||
layer.confirm(text, {
|
||||
btn: ['确认','取消'],
|
||||
area: ['380px','120px'],
|
||||
title: false
|
||||
}, function(index) {
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('AmericaIpForbit/setAppleInteriorBuyStatus')}",
|
||||
type: "get",
|
||||
data: {status: status},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg("<em style='color:white'>" + '操作失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '操作成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,131 @@
|
||||
<extend name="Public/base" />
|
||||
|
||||
<block name="body">
|
||||
<!-- <link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all"> -->
|
||||
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/provincecityarea/jquery-1.7.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
|
||||
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<!-- <ul class="tabnav1711 fr jstabnav">-->
|
||||
<!-- <li data-tab="tab1" class="current"><a href="javascript:void(0);">基本信息</a></li></li>-->
|
||||
<!-- <li data-tab="tab2" ><a href="javascript:void(0);">结算信息</a></li>-->
|
||||
<!-- </ul>-->
|
||||
<h3 class="page_title">新增支付限制白名单账号</h3>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 标签页导航 -->
|
||||
<div class="tab-wrap">
|
||||
|
||||
<div class="tab-content tabcon1711">
|
||||
<!-- 表单 -->
|
||||
<form id="form" action="{:U('add?model='.$model['id'])}" method="post" class="form-horizontal">
|
||||
|
||||
<!-- 基础文档模型 -->
|
||||
<div id="tab1" class="tab-pane in tab1">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l">账号:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" id="account" name="account" value="{$_REQUEST['account']}" onKeyUp="value=value.replace(/[^\w\.\/]/ig,'')">
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">账号确认:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" id="account_check" name="account_check" value="{$_REQUEST['account']}" onKeyUp="value=value.replace(/[^\w\.\/]/ig,'')">
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="form-item cf">
|
||||
<button class="submit_btn mlspacing" id="save" type="button">
|
||||
保存
|
||||
</button>
|
||||
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back(-1);" >
|
||||
返回
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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="Promote/lists/type/1">
|
||||
</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>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('UserPayWhiteList/index')}');
|
||||
|
||||
$(function(){
|
||||
// var pro="{:$data['bank_area']['0']}";
|
||||
// alert (pro);
|
||||
showTab();
|
||||
prov="{:substr($data['bank_area'],0,2)}";
|
||||
city="{:substr($data['bank_area'],2,2)}";
|
||||
ciarea="{:substr($data['bank_area'],4,2)}";
|
||||
//initComplexArea('seachprov', 'seachcity', 'seachdistrict', area_array, sub_array, prov, city, ciarea);
|
||||
|
||||
$("#save").click(function () {
|
||||
var text = [];
|
||||
|
||||
$('#tip').css('display','none');
|
||||
|
||||
text.push({"account": $("#account").val(), "account_check": $("#account_check").val()});
|
||||
$('#tip').find('.tipclose').click();
|
||||
layer.confirm('【警告】如需继续请点击确认', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function() {
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('UserPayWhiteList/add')}",
|
||||
type: "post",
|
||||
data: text[0],
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.status == 0) {
|
||||
layer.msg("<em style='color:white'>" + data.msg + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + data.msg + "</em>")
|
||||
|
||||
setTimeout(function(){
|
||||
window.location.href = "/admin.php?s=/UserPayWhiteList/index.html";
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</block>
|
||||
|
@ -0,0 +1,657 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
|
||||
<script src="__STATIC__/jquery.form.js"></script>
|
||||
<script src="__STATIC__/layer/layer.js"></script>
|
||||
<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;}
|
||||
.layui-layer-dialog .layui-layer-content{color:red}
|
||||
.butnbox {padding:10px 0 10px;}
|
||||
.butnbox .butnlist {overflow:hidden;clear:both;}
|
||||
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
|
||||
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
|
||||
.butnbox .butnlist .butn.last {background:#009900;}
|
||||
.butnbox .butnlist .butn~.butn {margin-left:20px;}
|
||||
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
|
||||
.layui-layer-title {
|
||||
text-align: center;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">支付限制白名单账号</h3>
|
||||
<p class="description_text" id="order_url"></p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--<div class="cf top_nav_list" style="height: 38px;">-->
|
||||
<!--<!– 高级搜索 –>-->
|
||||
<!--<div class="jssearch fl cf search_list" style="margin-bottom: 0">-->
|
||||
<!--<div class="input-list input-list-promote search_label_rehab">-->
|
||||
<!--<select id="statement_type" name="statement_type" class="select_gallery" style="width:150px;">-->
|
||||
<!--<option value="">对账类型</option>-->
|
||||
<!--<option value="0">上游对账单</option>-->
|
||||
<!--<option value="1">下游对账单</option>-->
|
||||
<!--<option value="2">下游补点对账单</option>-->
|
||||
<!--</select>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="input-list input-list-promote search_label_rehab">-->
|
||||
<!--<select id="company_id" name="company_id" class="select_gallery" >-->
|
||||
<!--<option company-type="" value="">请选择或输入对账公司</option>-->
|
||||
<!--<volist name=":getCompanyList()" id="vo">-->
|
||||
<!--<option company-type="{$vo.company_type}" value="{$vo.company_name}" <?php echo $vo.company_name == I('company_name') ? 'selected':''; ?> >{$vo.company_name}</option>-->
|
||||
<!--</volist>-->
|
||||
<!--</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-promote search_label_rehab">-->
|
||||
<!--<select id="verify_status" name="verify_status" class="select_gallery" >-->
|
||||
<!--<option value="">请选择审核状态</option>-->
|
||||
<!--<option value="0">未审核</option>-->
|
||||
<!--<option value="1">审核通过</option>-->
|
||||
<!--<option value="2">审核拒绝</option>-->
|
||||
<!--</select>-->
|
||||
<!--</div>-->
|
||||
<!--<input type="hidden" name="" value="" class="sortBy">-->
|
||||
<!--<input type="hidden" name="type" value="{$_GET['type']}">-->
|
||||
<!--<div class="input-list">-->
|
||||
<!--<a class="sch-btn" href="javascript:;" id="search" url="{:U('StatementMangement/lists','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>-->
|
||||
<!--</div>-->
|
||||
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
|
||||
<div class="butnbox" >
|
||||
<div class="butnlist jscheckbutn" style="margin-left: 2px">
|
||||
<a class="butn" style="width:180px" href="/admin.php?s=/UserPayWhiteList/add.html">添加允许支付账号</a>
|
||||
<if condition="$show eq 1"><a class="butn" style="width:180px" href="/admin.php?s=/UserPayWhiteList/index/show/1.html">查看允许支付白名单</a></if>
|
||||
</div>
|
||||
</div>
|
||||
<if condition = "!empty($data)">
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input class="check-all" type="checkbox"></th>
|
||||
<th>序号</th>
|
||||
<th>账号</th>
|
||||
<th>状态</th>
|
||||
<th>有效时间</th>
|
||||
<th>时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<if condition = "empty($data)">
|
||||
<tr>
|
||||
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
</if>
|
||||
<notemtpy name = "data">
|
||||
<volist name="data" id="data">
|
||||
<tr>
|
||||
<td ><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]" >
|
||||
</td>
|
||||
<td>{$data.id}</td>
|
||||
<td>{$data.user_account}</td>
|
||||
<td><if condition="$data['status'] eq 0">7天允许支付<elseif condition="$data['status'] eq 1"/>30天允许支付<elseif condition="$data['status'] eq 2"/>永久允许支付</if></td>
|
||||
<td>{$data.time_status}</td>
|
||||
<td>{$data.update_time}</td>
|
||||
<td><a data-id="{$data.id}" class="delete">删除</a></td>
|
||||
</tr>
|
||||
</volist>
|
||||
</notemtpy>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</if>
|
||||
<div class="page">
|
||||
<a class="sch-btn" href="{:U('UserPayWhiteList/export',array_merge(['xlsname'=>'推广员管理_推广员列表'.((I('type',1)==2)?'_混服申请':'_推广员列表')],I('get.')))}">导出</a>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
<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="Promote/lists/type/{:I('type',1)}">
|
||||
</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>
|
||||
|
||||
</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 src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
$(".select_gallery").select2();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav("{:U('UserPayWhiteList/index')}");
|
||||
function reload() {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
$(function(){
|
||||
|
||||
$("#shenhe").click(function () {
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
return $(elem).val();
|
||||
}).get().join(",");
|
||||
|
||||
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
if (!text) {
|
||||
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('statementMangement/verifyStatementStatus')}",
|
||||
type: "get",
|
||||
data: {order: text},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.status == 0) {
|
||||
layer.msg("<em style='color:white'>" + '审核通过失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '审核通过成功' + "</em>")
|
||||
setTimeout(function(){
|
||||
window.parent.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
|
||||
$("#reject").click(function () {
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
return $(elem).val();
|
||||
}).get().join(",");
|
||||
|
||||
|
||||
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index) {
|
||||
if (!text) {
|
||||
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('statementMangement/rejectStatementStatus')}",
|
||||
type: "get",
|
||||
data: {order: text},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.status == 0) {
|
||||
layer.msg("<em style='color:white'>" + '审核拒绝失败' + "</em>");
|
||||
} else {
|
||||
layer.msg("<em style='color:white'>" + '审核拒绝成功' + "</em>")
|
||||
|
||||
setTimeout(function(){
|
||||
window.parent.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
//搜索功能
|
||||
var start = $("#time_start").val();
|
||||
var end = $("#time_end").val();
|
||||
if(start !='' && end != ''){
|
||||
if (Date.parse(start) > Date.parse(end)){
|
||||
layer.msg('开始时间必须小于等于结束时间');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//设置对账网址
|
||||
var order_url = window.location.protocol+"//"+window.location.host+"/admin.php?s=/Public/cp_login.html";
|
||||
$("#order_url").html("说明:允许玩家正常支付的白名单");
|
||||
|
||||
$("#upstream").click(function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "海南万盟天下科技有限公司",
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['70%', '80%'],
|
||||
content:'/admin.php?s=/Statement/createCpStatement/'
|
||||
});
|
||||
});
|
||||
|
||||
$("#downstream").click(function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "海南万盟天下科技有限公司",
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['70%', '80%'],
|
||||
content: '/admin.php?s=/statementMangement/createDownstreamOrder/'
|
||||
});
|
||||
});
|
||||
|
||||
$("#persondownstream").click(function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "海南万盟天下科技有限公司",
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['70%', '80%'],
|
||||
content: '/admin.php?s=/statementMangement/PersonOrderList/'
|
||||
});
|
||||
});
|
||||
|
||||
$(".statement_edit").click(function () {
|
||||
|
||||
var edit = $(this).data();
|
||||
var ext_field = $(this).attr('ext_field');
|
||||
if(edit.type == 0){
|
||||
var url = "/admin.php?s=/Statement/editCpStatement/id/"+edit.id;
|
||||
}else if(edit.type == 1){
|
||||
var url = "/admin.php?s=/StatementMangement/editDownstreamOrder/id/"+edit.id+"/ext_field/"+ext_field;
|
||||
}else if(edit.type == 2){
|
||||
var url = "/admin.php?s=/StatementMangement/PersonOrderEdit/id/"+edit.id+"/withdraw/"+ext_field+"/time_start/"+edit.start+"/time_end/"+edit.end;
|
||||
}
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "海南万盟天下科技有限公司",
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['70%', '80%'],
|
||||
content: url
|
||||
});
|
||||
});
|
||||
$(".statement_view").click(function () {
|
||||
var id = $(this).data("id");
|
||||
|
||||
var type = $(this).data("type");
|
||||
if (type == 2) {
|
||||
var url = "/admin.php?s=/StatementMangement/personOrderDetail/id/"+id;
|
||||
} else {
|
||||
var url = "/admin.php?s=/VerifyBill/show/id/"+id+"/from/pc";
|
||||
}
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "海南万盟天下科技有限公司",
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['70%', '80%'],
|
||||
content: url
|
||||
});
|
||||
});
|
||||
$(".statement_del").click(function () {
|
||||
var del = $(this).data();
|
||||
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(){
|
||||
if(del.type == 0){
|
||||
var url = "/admin.php?s=/Statement/delCpStatement/id/"+del.id;
|
||||
}else{
|
||||
var url = "/admin.php?s=/StatementMangement/delStatementData/id/"+del.id;
|
||||
}
|
||||
layer.load(2);
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "get",
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if(data.code == 0){
|
||||
layer.closeAll('loading');
|
||||
layer.msg("<font style='color:#fff'>删除成功</font>");
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},350);
|
||||
}else{
|
||||
alert("删除失败,请联系管理员")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}, function(){
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
$("#search").click(function(){
|
||||
|
||||
var start = $("#time_start").val();
|
||||
var end = $("#time_end").val();
|
||||
if(start !='' && end != ''){
|
||||
if (Date.parse(start) > Date.parse(end)){
|
||||
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.href = url;
|
||||
});
|
||||
|
||||
$('#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'
|
||||
})
|
||||
|
||||
|
||||
$("#company_id").change(function(){
|
||||
|
||||
var str = '<option value="">对账类型</option>';
|
||||
console.log($("#company_id option:selected").attr('company-type'))
|
||||
if ($("#company_id option:selected").attr('company-type') == '1') {
|
||||
str += ' <option value="1" selected=selected>下游游对账单</option>\n' +
|
||||
' <option value="0">上游对账单</option>';
|
||||
} else if ($("#company_id option:selected").attr('company-type') == '0') {
|
||||
str += ' <option value="1">下游对账单</option>\n' +
|
||||
' <option value="0" selected=selected>上游对账单</option>';
|
||||
}
|
||||
|
||||
|
||||
$("#statement_type").empty();
|
||||
$("#statement_type").append(str);
|
||||
$("#statement_type").select2();
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(".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();
|
||||
}
|
||||
});
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
$("#admin").on('click',function(event) {
|
||||
var navlist = $(this).find('.i_list_li');
|
||||
if (navlist.hasClass('hidden')) {
|
||||
navlist.removeClass('hidden');
|
||||
$(this).find('#i_list_id').focus().val('');
|
||||
} else {
|
||||
navlist.addClass('hidden');
|
||||
}
|
||||
$(document).one("click", function(){
|
||||
navlist.addClass('hidden');
|
||||
});
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$('#admin #i_list_id').on('keyup',function(event) {
|
||||
var val = $.trim($(this).val()).toLowerCase();
|
||||
$(this).closest('.drop-down').find('#i_list_idh').val(val);
|
||||
});
|
||||
|
||||
$("#admin #i_list_li").find("a").each(function(){
|
||||
$(this).click(function(){
|
||||
var text = $.trim($(this).text()).toLowerCase();
|
||||
$(this).closest('.drop-down').find("#i_list_id").val(text);
|
||||
$(this).closest('.drop-down').find('#i_list_idh').val(text);
|
||||
})
|
||||
});
|
||||
|
||||
//下拉内容框
|
||||
$(".drop-down2").on('click',function(event) {
|
||||
var navlist = $(this).find('.i_list_li');
|
||||
if (navlist.hasClass('hidden')) {
|
||||
navlist.removeClass('hidden');
|
||||
$('#i_list_id').focus().val('');
|
||||
} else {
|
||||
navlist.addClass('hidden');
|
||||
}
|
||||
$(document).one("click", function(){
|
||||
navlist.addClass('hidden');
|
||||
});
|
||||
event.stopPropagation();
|
||||
});
|
||||
/* 状态搜索子菜单 */
|
||||
/*渠道删除*/
|
||||
$('.delete').click(function(){
|
||||
var id = $(this).attr('data-id');
|
||||
layer.confirm('【警告】删除后不可回退如需继续请点击确认', {
|
||||
icon:0,
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{:U('del')}",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: {id:id},
|
||||
success:function(data){
|
||||
if(data.status==1){
|
||||
layer.msg(data.msg);
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function(){
|
||||
layer.close();
|
||||
});
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//点击字母按照条件按钮筛选
|
||||
$(".pro_promot_select_list_con").click(function(){
|
||||
//选中高亮样式
|
||||
$(this).addClass('active');
|
||||
$(this).siblings().removeClass('active');
|
||||
|
||||
var that = $(this);
|
||||
var index = $(this).attr("data-index");
|
||||
|
||||
$("#game_list li").each(function(index,ele){
|
||||
var short = $(this).attr('data-short');
|
||||
$(this).show();
|
||||
if(that.attr('data-index')){
|
||||
if(that.attr('data-index')!=short.charAt(0)){
|
||||
$(this).hide();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
//打开弹窗
|
||||
$(".ajax-view").click(function(){
|
||||
//获取游戏列表
|
||||
var url = "{:U('Promote/getPromoteGame')}";
|
||||
var id = $(this).attr('data-id');
|
||||
$.post(url,{id:id},function(res){
|
||||
if(res.code==1){
|
||||
|
||||
$(".pro_promot_select_list a").eq(0).addClass('active');
|
||||
$(".pro_promot_select_list a").eq(0).siblings().removeClass('active');
|
||||
|
||||
var game_list = res.data.game_list;
|
||||
var promote_info = res.data.promote_info;
|
||||
var lis = [];
|
||||
|
||||
$.each(game_list,function(index,ele){
|
||||
if(ele.game_name.length>6){
|
||||
ele.game_name = ele.game_name .substring(0,6)+"..."
|
||||
}
|
||||
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
|
||||
|
||||
|
||||
if(promote_info['game_ids']==''){
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||||
}else{
|
||||
if(promote_info['game_ids'].indexOf(ele.id)>-1){
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||||
}else{
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
|
||||
}
|
||||
}
|
||||
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
|
||||
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
|
||||
lis.push('</li>');
|
||||
});
|
||||
|
||||
$("#game_list").html(lis.join(''));
|
||||
$(".pro_promot_number").text(res.data.promote_info.account);
|
||||
$("#se_promote_id").val(res.data.promote_info.id);
|
||||
$(".pro_promot").css("display","block");
|
||||
|
||||
jsgameid();
|
||||
|
||||
}else{
|
||||
var tip_msg = res.info ? res.info : '操作失败';
|
||||
layer.msg(tip_msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//保存修改
|
||||
$(".pro_promot_btn_confirm").click(function(){
|
||||
$("#ajaxForm").ajaxSubmit(function(res){
|
||||
layer.msg(res.msg);
|
||||
$(".pro_promot").hide();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//关闭弹窗
|
||||
$(".pro_promot_close").click(function(){
|
||||
$(".pro_promot").css("display","none");
|
||||
});
|
||||
//取消修改
|
||||
$(".pro_promot_btn_cancel").click(function(){
|
||||
$(".pro_promot").css("display","none");
|
||||
layer.msg('修改已取消');
|
||||
});
|
||||
|
||||
$(".jsgamecheckall").click(function(){
|
||||
$(this).closest('.jsgamecheckallbox').siblings("#game_list").find(".jsgameid").prop("checked", this.checked);
|
||||
});
|
||||
|
||||
//可申请游戏 全选及全选反选 功能 @author zwm date 20180604
|
||||
function jsgameid(){
|
||||
$(".jsgameid").click(function(){
|
||||
var option = $(this).closest('ul').find(".jsgameid"),
|
||||
checkall = $(this).closest('ul').siblings('.jsgamecheckallbox').find('.jsgamecheckall');
|
||||
option.each(function(i){
|
||||
if(!this.checked){
|
||||
checkall.prop("checked", false);
|
||||
return false;
|
||||
}else{
|
||||
checkall.prop("checked", true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</block>
|
Loading…
Reference in New Issue