Merge branch 'release' of wmtx/platform into master

版本更新
master
廖金灵 5 years ago committed by Gogs
commit 6a50314327

@ -886,3 +886,37 @@ function getSDKTypeName($sdkType, $chinese = false)
return $sdkName;
}
//游戏名称取消 (安卓版),(苹果版)
function clearGameNameType($game_name)
{
return preg_replace("/\(.*\)/","",$game_name);
}
//设备名称词典
function getGameTypeName($id,$chinese=true)
{
if(empty($id)){
return '无';
}
$android = 'Android';
$ios = 'ios';
if($chinese){
$android = '安卓';
$ios = '苹果';
}
$data = array(
["id"=>0,'name'=>"{$android}+{$ios}"],
["id"=>1,'name'=>$android],
["id"=>2,'name'=> $ios]
);
if($id > -1){
foreach($data as $k=>$v){
if($v['id'] == $id){
return $v['name'];
break;
}
}
}else{
return $data;
}
}

@ -2394,6 +2394,7 @@ class ExportController extends Controller
array('user_account', '测试账号'),
array('pay_time', '充值时间'),
array('game_name', '游戏名称'),
array('sdk_version', '设备名称'),
array('order_amount', '订单金额'),
array('pay_amount', '实付金额'),
array('pay_way', '充值方式'),
@ -2440,7 +2441,10 @@ class ExportController extends Controller
}
$orderData = M('test_order', 'tab_')->where($map)->order('add_time desc')->select();
$orderData =M('test_order t', 'tab_')
->field("t.*,g.sdk_version")
->join("tab_game g on t.game_id = g.id","left")
->where($map)->order('add_time desc')->select();
$sum_order_amount = M('test_order', 'tab_')->where($map)->field('sum(order_amount) as sum_order_amount,count(1) as count')->find();
$sum_pay_amount = M('test_order', 'tab_')->where($map)->field('sum(pay_amount) as sum_order_amount')->find();
$xlsData = [];
@ -2450,12 +2454,14 @@ class ExportController extends Controller
}else {
$order_list['server_type'] = '测试外网';
}
$order_list['game_name'] =clearGameNameType($v['game_name']);
$order_list['sdk_version'] =getGameTypeName($v['sdk_version']);
$order_list['order_type'] = get_order_type($v['order_type']);
$order_list['order_no'] = $v['order_no'];
$order_list['cp_order_no'] = $v['cp_order_no'];
$order_list['user_account'] = $v['user_account'];
$order_list['pay_time'] = date('Y-m-d H:i:s', $v['pay_time']);
$order_list['game_name'] = $v['game_name'];
// $order_list['game_name'] = $v['game_name'];
$order_list['order_amount'] = $v['order_amount'];
$order_list['pay_amount'] = $v['pay_amount'];
$order_list['pay_way'] = get_pay_way($v['pay_way']);
@ -2716,6 +2722,133 @@ class ExportController extends Controller
fclose($fp);
exit;
break;
case 30:
$xlsCell = array(
"限制序号","限制支付渠道", "限制规则", "限制方式", "限制时间"
);
$params = I('get.');
$payType = $params['pay_type'];
$limit_type = $params['limit_type'];
$map = [];
if (!empty($payType)) {
$map['pay_type'] = $payType;
}
if (!empty($limit_type)) {
$map['limit_type'] = $limit_type;
}
$datas = M('pay_limit_conf', 'tab_')
->field('id')
->where($map)
->order('id desc')
->select();
$csvFileName = '支付限额配置'.'.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流中
$counts = count($datas);
$perSize = 10000;//每次查询的条数
$pages = ceil($counts / $perSize);
for($i = 1; $i <= $pages; $i++) {
$datas = M('pay_limit_conf', 'tab_')
->where($map)
->order('id desc')
->limit(($i-1)*$perSize ,$perSize)
->select();
foreach ($datas as $key => $data) {
$csvdata['id'] = $data['id'];
if ($data['pay_type'] == 'alipay') {
$pay_type = '支付宝';
}
if ($data['pay_type'] == 'wxpay') {
$pay_type = '微信';
}
if ($data['pay_type'] == 'yeepay') {
$pay_type = '易宝';
}
if ($data['pay_type'] == 'sqpay') {
$pay_type = '双乾';
}
if ($data['limit_time_type'] == 'day') {
$limit_time_type = '每日,';
}
if ($data['limit_time_type'] == 'week') {
$limit_time_type = '每周,';
}
if ($data['limit_time_type'] == 'month') {
$limit_time_type = '每月,';
}
if ($data['limit_time_type'] == 'fix') {
$limit_time_type = '特殊,';
}
$csvdata['pay_type'] = $pay_type;
$limit_rule = '';
if ( $data['user_total_limit']) {
$limit_rule .= '玩家全渠道总流水限额'.$data['user_total_limit'];
}
if ( $data['total_limit']) {
$limit_rule .= '全渠道总流水限额'.$data['total_limit'];
}
if ( $data['user_one_limit']) {
$limit_rule .= '玩家单笔限制'.$data['user_one_limit'];
}
if ($limit_rule == '') {
$limit_rule = '暂无规则';
}
$csvdata['limit_rule'] = $limit_rule;
if ($data['limit_type'] == 'force') {
$csvdata['limit_type'] = '强制模式';
}
if ($data['limit_type'] == 'obstacles') {
$csvdata['limit_type'] = '障碍模式';
}
$start_timeArr = str_split($data['start_time'], 1);
$startTimeStr = '';
foreach ($start_timeArr as $timeKey => $start_time) {
if ($timeKey == 1 || $timeKey == 3) {
$startTimeStr .= $start_time.':';
}else {
$startTimeStr .= $start_time;
}
}
$end_timeArr = str_split($data['end_time'], 1);
$endTimeStr = '';
foreach ($end_timeArr as $timeKey1 => $end_time) {
if ($timeKey1 == 1 || $timeKey1 == 3) {
$endTimeStr .= $end_time. ':';
}else {
$endTimeStr .= $end_time;
}
}
$csvdata['limit_time'] = $limit_time_type .$data['limit_time_type_remark'].' '.$startTimeStr.'~'.$endTimeStr;
mb_convert_variables('GBK', 'UTF-8', $csvdata);
fputcsv($fp, $csvdata);
}
unset($csvdata);//释放变量的内存
//刷新输出缓冲到浏览器
ob_flush();
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
}
fclose($fp);
exit;
break;
default:
$xlsName = $xlsCell = $xlsData = [];
@ -7894,7 +8027,7 @@ class ExportController extends Controller
$xlsData = D("spend")->gameStatistics($map);
foreach ($xlsData as $key => $value) {
$xlsData[$key]['game_name'] = substr($value["game_name"],0,strrpos($value["game_name"],'('));
// $xlsData[$key]['game_name'] = substr($value["game_name"],0,strrpos($value["game_name"],'('));
$xlsData[$key]['all_cash_count'] = $value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count'];
if ($value['sdk_version'] == 1) {
$xlsData[$key]['sdk_version'] = '安卓';
@ -7902,7 +8035,6 @@ class ExportController extends Controller
$xlsData[$key]['sdk_version'] = '苹果';
}
}
$totalData = D("spend")->totalGameStatistics($map);
$sumCash = $totalData['cash_count'];
@ -8011,6 +8143,7 @@ class ExportController extends Controller
array('pay_time','充值时间'),
array('user_account','玩家账号'),
array('game_name','游戏名称'),
array('sdk_version','设备名称'),
array('server_name','游戏区服'),
array('game_player_name','角色名称'),
array('cost','订单金额'),
@ -8075,7 +8208,7 @@ class ExportController extends Controller
$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,
tab_spend.user_nickname,tab_spend.game_name,tab_spend.promote_account,spend_ip,tab_spend.server_name,tab_spend.sdk_version,
game_player_name,pay_amount,cost,pay_way";
$group = "";
$order = "pay_time DESC";
@ -8097,6 +8230,8 @@ class ExportController extends Controller
foreach($xlsData as $key => $value) {
$xlsData[$key]['pay_way'] = getPayType($value['pay_way']);
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
$xlsData[$key]['sdk_version'] =getGameTypeName($xlsData[$key]['sdk_version']);
}
$map['pay_game_status'] = 1;

@ -836,14 +836,41 @@ class FinanceController extends ThinkController
$map['game_player_name'] = array('like',I("user_nickname").'%');
}
// var_dump($map);die();
$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";
$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,sdk_version";
$group = "";
$order = "pay_time DESC";
$data = D('spend')->getSpendData($map,$field,$group,$order,$page,$row);
if(isset($_REQUEST['export'])){
$data = D('spend')->getSpendData($map,$field,$group,$order,0,0);
}else{
$data = D('spend')->getSpendData($map,$field,$group,$order,$page,$row);
}
foreach($data as $key => $value) {
$data[$key]['pay_way'] = getPayType($value['pay_way']);
$data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']);
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
}
if(isset($_REQUEST['export'])){
//操作日志
$GetData = $_GET;
unset($GetData['export']);
$dcop = array(
"pay_order_number"=>"支付订单号",
"pay_time"=>"充值时间",
"user_account"=>"玩家账号",
"game_name"=>"游戏名称",
"sdk_version"=>"设备类型",
"promote_account"=>"所属推广员",
"spend_ip"=>"充值ip",
"server_name"=>"游戏区服",
"game_player_name"=>"角色名称",
"cost"=>"订单金额",
"pay_amount"=>"实付金额",
"pay_way"=>"充值方式"
);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-游戏统计-订单查看-导出"]);
data2csv($data,"游戏统计订单查看",$dcop);
}
$totalData = D('spend')->totalGameStatistics($map, false);
@ -937,7 +964,7 @@ class FinanceController extends ThinkController
}
// var_dump($map);die();
$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,
tab_spend.user_nickname,tab_spend.game_name,tab_spend.promote_account,spend_ip,tab_spend.server_name,tab_spend.sdk_version,
game_player_name,pay_amount,cost,pay_way";
$group = "";
$order = "pay_time DESC";
@ -949,16 +976,46 @@ class FinanceController extends ThinkController
$field2 = $field . ',balance';
$join = 'left join tab_user as u on u.id = tab_spend.user_id';
}
$data = D('spend')->getSpendData($map, $field2, $group, $order, $page, $row, $join);
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']);
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
$data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']);
$data[$key]['cost'] = number_format($value['cost'],2,'.','');
$data[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.','');
}
if(isset($_REQUEST['export'])){
//操作日志
$GetData = $_GET;
unset($GetData['export']);
$dcop = array(
"pay_order_number"=>"支付订单号",
"pay_time"=>"充值时间",
"user_account"=>"玩家账号",
"game_name"=>"游戏名称",
"sdk_version"=>"设备名称",
"server_name"=>"游戏区服",
"game_player_name"=>"角色名称",
"cost"=>"订单金额",
"pay_amount"=>"实付金额",
"pay_way"=>"充值方式"
);
if ($map['pay_way'] ==-1) {
$title = "内充支出明细";
$dcop["bind_balance"]="绑定币余额";
} elseif ($map['pay_way'] ==0) {//平台币
$title = "平台币直充明细";
$dcop["balance"]="平台币余额";
}
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-游戏统计-{$title}-导出"]);
data2csv($data,$title,$dcop);
}
$count = D("spend")->getSpendData($map,$field,$group,$order);
$count = count($count);
$page = set_pagination($count,$row);

@ -456,7 +456,15 @@ class FinancePromoteController extends AdminController
$value['inside_cash_count']?:0;
$value['all_cash_count'] = number_format($value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count'],2,'.','');
$value['company_belong'] =getCompanyBlong($value['company_belong']);
$value['game_name'] =clearGameNameType($value['game_name']);
$value['sdk_version'] =getGameTypeName($value['sdk_version']);
if(!$value['game_name']) $value['game_name'] = "无";
//按类型判断pid
if($_REQUEST['promote_type'] == 2 && $_REQUEST['promote_id']){
$value['p_id'] = $_REQUEST['promote_id'];
}
}
if (isset($_REQUEST['export'])) {
@ -469,6 +477,7 @@ class FinancePromoteController extends AdminController
"account"=>"会长账号",
"company_belong"=>"团体类型",
"game_name"=>"游戏",
"sdk_version"=>"设备",
"cash_count"=>"游戏现金金额",
"balance_coin_count"=>"平台币直充支出",
"inside_cash_count"=>"内充支出",
@ -562,7 +571,7 @@ class FinancePromoteController extends AdminController
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";
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,user_nickname,game_name,sdk_version,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way";
$group = "";
$order = "pay_time DESC";
if(isset($_REQUEST['export'])){
@ -572,6 +581,8 @@ class FinancePromoteController extends AdminController
}
foreach($data as $key => $value) {
$data[$key]['pay_way'] = getPayType($value['pay_way']);
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
$data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']);
}
if (isset($_REQUEST['export'])) {
@ -584,6 +595,7 @@ class FinancePromoteController extends AdminController
"pay_time"=>"充值时间",
"user_account"=>"玩家账号",
"game_name"=>"游戏名称",
"sdk_version"=>"设备名称",
"promote_account"=>"所属推广员",
"spend_ip"=>"充值ip",
"server_name"=>"游戏区服",
@ -620,7 +632,7 @@ class FinancePromoteController extends AdminController
{
$map['s.pay_status']=1;
$query = M("spend","tab_")->alias("s")
->field("s.game_id,s.game_name,p.partner as partner_name,
->field("s.game_id,s.game_name,s.sdk_version,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,
@ -713,7 +725,7 @@ class FinancePromoteController extends AdminController
$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,
tab_spend.user_nickname,tab_spend.game_name,tab_spend.promote_account,spend_ip,tab_spend.server_name,tab_spend.sdk_version,
game_player_name,pay_amount,cost,pay_way";
$group = "";
$order = "pay_time DESC";
@ -734,6 +746,9 @@ class FinancePromoteController extends AdminController
foreach($data as $key => $value) {
$data[$key]['pay_way'] = getPayType($value['pay_way']);
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
$data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']);
$data[$key]['cost'] = number_format($value['cost'],2,'.','');
$data[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.','');
@ -747,6 +762,7 @@ class FinancePromoteController extends AdminController
"pay_time"=>"充值时间",
"user_account"=>"玩家账号",
"game_name"=>"游戏名称",
"sdk_version"=>"设备名称",
"server_name"=>"游戏区服",
"game_player_name"=>"角色名称",
"cost"=>"订单金额",
@ -1001,6 +1017,7 @@ class FinancePromoteController extends AdminController
}
$_POST['promote_level'] = $level;
// }
// dd($map);
}

@ -10,7 +10,9 @@ use Org\WeixinSDK\Weixin;
class PayChannelController extends ThinkController
{
public function index($p = 0) {
if(!array_key_exists("timestart",$_REQUEST)){
$this->redirect(ACTION_NAME, array('timestart' => date('Y-m-d',strtotime('-30 day')),"timeend"=>date('Y-m-d')));
}
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$arraypage = $page;
@ -59,7 +61,7 @@ class PayChannelController extends ThinkController
//游戏币计算
$data = M('spend use index(pay_channel)','tab_')
->field("game_name,sum(pay_amount) as pay_amount,game_id")
->field("game_name,sum(pay_amount) as pay_amount,game_id,sdk_version")
->where($map)
->group('game_id')
->order('pay_amount desc')
@ -73,7 +75,7 @@ class PayChannelController extends ThinkController
$coinData = M('pay_info','tab_')
->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number")
->field("tab_pay_info.game_name,0 as pay_amount,sum(tab_deposit.pay_amount) as platform_coin,0 as test_coin,tab_pay_info.game_id")
->field("tab_pay_info.game_name,0 as pay_amount,sum(tab_deposit.pay_amount) as platform_coin,0 as test_coin,tab_pay_info.game_id,tab_pay_info.sdk_version")
->where($coinMap)
->group("game_id")
->select();
@ -125,7 +127,8 @@ class PayChannelController extends ThinkController
$data[$key]['platform_coin'] = $handleCoinData[$value['game_id']]?$handleCoinData[$value['game_id']]:0;
$data[$key]['test_coin'] = $handleTestData[$value['game_id']]?$handleTestData[$value['game_id']]:0;
$data[$key]['test_platform_coin'] = $handleTestCoinData[$value['game_id']]?$handleTestCoinData[$value['game_id']]:0;
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
$data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']);
}
$superMap = $map;
// unset($superMap['promote_id']);
@ -172,7 +175,7 @@ class PayChannelController extends ThinkController
$bindRechargeData['pay_amount'] = $bindRechargeData['pay_amount']?$bindRechargeData['pay_amount']:0;
$offcialData['sum'] = $offcialData['pay_amount']+$bindRechargeData['pay_amount'];
$offcialData['pay_amount'] = $offcialData['pay_amount']+$bindRechargeData['pay_amount']-$offcialData['test_coin'];
$offcialData['pay_amount'] = number_format($offcialData['pay_amount']+$bindRechargeData['pay_amount']-$offcialData['test_coin'],2,'.','');
$this->assign('offcialData',$offcialData);
@ -184,8 +187,8 @@ class PayChannelController extends ThinkController
->field("0 as game_name,sum(pay_amount) as pay_amount,0 as platform_coin,id as test_coin")
->where($spreadMap)
->find();
$spreadData['pay_amount'] = $spreadData['pay_amount']?$spreadData['pay_amount']:0;
$spreadData['sum'] = $spreadData['pay_amount'];
$spreadData['pay_amount'] = $spreadData['pay_amount']?number_format($spreadData['pay_amount'],2,'.',''):'0.00';
$spreadData['sum'] = number_format($spreadData['pay_amount'],2,'.','');
$this->assign('spreadData',$spreadData);
@ -195,6 +198,8 @@ class PayChannelController extends ThinkController
$payTypeData['支付宝支付金额'] = 0;
$payTypeData['微信支付金额'] = 0;
$payTypeData['快捷支付金额'] = 0;
$payTypeData['苹果支付金额'] = 0;
$payTypeData['易宝支付金额'] = 0;
$payTypeData['其他支付金额'] = 0;
foreach($channelData as $key => $value) {
@ -205,6 +210,10 @@ class PayChannelController extends ThinkController
$payTypeData['微信支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if ($value['pay_way']==15) {
$payTypeData['快捷支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if($value['pay_way'] ==7){
$payTypeData['苹果支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if($value['pay_way'] ==17){
$payTypeData['易宝支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if($value['pay_way']){
$payTypeData['其他支付金额'] += number_format($value['pay_amount'],2,'.','');
}
@ -229,6 +238,8 @@ class PayChannelController extends ThinkController
// $channelData[$testOrderChannelData['pay_way']]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.','');
$testorderChannelArr[$trkey]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.','');
$testorderChannelArr[$trkey]['pay_way'] = get_pay_way($testOrderChannelData['pay_way']);
$channelData[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.','');
$channelData[$key]['pay_way'] = get_pay_way($value['pay_way']);
}
else {
$channelData[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.','');
@ -253,7 +264,7 @@ class PayChannelController extends ThinkController
$this->assign('_page', $page);
}
$sumData['game'] = '汇总';
$sumData['game_name'] = '汇总';
$sumData['pay_amount'] = 0;
$sumData['platform_coin'] = 0;
$sumData['test_coin'] = 0;
@ -272,56 +283,87 @@ class PayChannelController extends ThinkController
}
//汇总计算
$sumData['pay_amount'] += $value['pay_amount'] - $value['test_coin'];
$sumData['platform_coin'] += $handleCoinData[$value['game_id']]?$handleCoinData[$value['game_id']]:0;
$sumData['test_coin'] += $handleTestData[$value['game_id']]?$handleTestData[$value['game_id']]:0;
$sumData['test_platform_coin'] +=$handleTestCoinData[$value['game_id']]?$handleTestCoinData[$value['game_id']]:0;
$sumData['pay_amount'] += number_format($value['pay_amount'] - $value['test_coin'],2,'.','');
$sumData['platform_coin'] += $handleCoinData[$value['game_id']]?number_format($handleCoinData[$value['game_id']],2,'.',''):0;
$sumData['test_coin'] += $handleTestData[$value['game_id']]?number_format($handleTestData[$value['game_id']],2,'.',''):0;
$sumData['test_platform_coin'] +=$handleTestCoinData[$value['game_id']]?number_format($handleTestCoinData[$value['game_id']],2,'.',''):0;
}
// 汇总数据
if ($_REQUEST['game_id']) {
$sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin'];
$sumData['test_coin'] = $sumData['test_coin']+$sumData['test_platform_coin'];
$sumData['sum'] = $sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin'];
$sumData['platform_coin'] = number_format($sumData['platform_coin'] - $sumData['test_platform_coin'],2,'.','');
$sumData['test_coin'] = number_format($sumData['test_coin']+$sumData['test_platform_coin'],2,'.','');
$sumData['sum'] = number_format($sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin'],2,'.','');
} else {
$sumData['pay_amount'] = $sumData['pay_amount'] + $superSignData['pay_amount'] + $bindRechargeData['pay_amount'];
$sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin'] +
$offcialData['pay_amount'] + $spreadData['pay_amount'];
$sumData['test_coin'] = $sumData['test_coin']+$offcialTestCost+$testSuperSignCost+$sumData['test_platform_coin'];
$sumData['sum'] = $sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin'];
$coinSum = $coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost;
$sumData['pay_amount'] = number_format($sumData['pay_amount'] + $superSignData['pay_amount'] + $bindRechargeData['pay_amount'],2,'.','');
$sumData['platform_coin'] = number_format($sumData['platform_coin'] - $sumData['test_platform_coin'] + $offcialData['pay_amount'] + $spreadData['pay_amount'],2,'.','');
$sumData['test_coin'] = number_format($sumData['test_coin']+$offcialTestCost+$testSuperSignCost+$sumData['test_platform_coin'],2,'.','');
$sumData['sum'] = number_format($sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin'],2,'.','');
$coinSum = number_format($coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost,2,'.','');
}
$sum_pay_amount = M('test_order', 'tab_')->where($maptestorder)->field('sum(pay_amount) as sum_order_amount')->find();
$moneyAllCount = array_sum(array_column($channelData, 'pay_amount'));
if($_REQUEST['export'] == 1) {
$title = array('产品名称','游戏现金金额','平台币直冲金额','测试金额','支付渠道内合计');
$superSignData['game_name'] = '超级签';
$superSignData['platform_coin'] = '0';
$superSignData['sdk_version'] = '';
$offcialData['game_name'] = '官网';
$spreadData['game_name'] = '推广后台';
$offcialData['platform_coin'] = $offcialData['pay_amount'];
$offcialData['pay_amount'] = "0";
$offcialData['sdk_version'] = "";
$superSignData['platform_coin'] = '0';
$offcialData['platform_coin'] = '0';
$spreadData['platform_coin'] = '0';
$spreadData['game_name'] = '推广后台';
$spreadData['platform_coin'] = $spreadData['pay_amount'];
$spreadData['pay_amount'] = '0';
$spreadData['test_coin'] = '0';
$spreadData['sdk_version'] = '';
$sumData['sdk_version'] = '';
$testOrder["game_name"] = "测试环境内外网平台";
$testOrder["sdk_version"] = "";
$testOrder["pay_amount"] =$sum_pay_amount['sum_order_amount'] ?: "0";
$testOrder["platform_coin"] ="0";
$testOrder['test_coin'] = '0';
$testOrder['sum'] = $sum_pay_amount['sum_order_amount'] ?: "0";
//充值方式统计
$payTypeDataExport['game_name'] = '充值方式统计';
foreach($payTypeData as $key => $value) {
if ($value) {
$payTypeDataExport['pay_amount'] .= $key.''.$value." ";
$payTypeDataExport['sdk_version'] .= $key.''.$value." ";
}
}
$payTypeDataExport['pay_amount'] .= "平台币直充总金额(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计)".
$payTypeDataExport['sdk_version'] .= "平台币直充总金额(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计)".
($coinSum);
if ($sum_platform_pay_amount['sum_order_amount'] != 0) {
$testOrderDataExport['pay_amount'] = $sum_noplatform_pay_amount['sum_order_amount'];
}else {
$testOrderDataExport['pay_amount'] = '0.00';
}
if ($sum_noplatform_pay_amount['sum_order_amount'] != 0) {
$testOrderDataExport['platform_coin'] = $sum_platform_pay_amount['sum_order_amount'];
}else {
$testOrderDataExport['platform_coin'] = '0.00';
}
$testOrderDataExport['test_coin'] = '0.00';
$testOrderDataExport['sum'] = '0.00';
$channelDataExport['game_name'] = '支付渠道';
$channelDataExport2['game_name'] = '支付渠道占比';
foreach($channelData as $key => $value) {
if ($value) {
$channelDataExport['pay_amount'] .= $value['pay_way'].''.$value['pay_amount']." ";
$channelDataExport['sdk_version'] .= $value['pay_way'].''.$value['pay_amount']." ";
$channelDataExport2['sdk_version'] .= $value['pay_way'].''.round($value['pay_amount']*100/ $moneyAllCount,2)."% ";
}
}
unset($sumData['test_platform_coin']);
if ($_REQUEST['game_id']) {
@ -333,10 +375,9 @@ class PayChannelController extends ThinkController
$GetData = $_GET;
unset($GetData['export']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-支付渠道查看-导出"]);
db2csv(array_merge(array_merge(array_merge(array_merge(
array_merge(array_merge(
array_merge($data,[0=>$superSignData]),[0=>$offcialData])),[0=>$spreadData],[0=>$sumData])),[0=>$payTypeDataExport]),[0=>$channelDataExport]),'支付渠道统计导出',$title);
//处理导出数据
data2csv(array_merge($data,[$superSignData],[$offcialData],[$spreadData],[$sumData],[$testOrder],[$payTypeDataExport],[$channelDataExport],[$channelDataExport2]),"支付渠道统计导出",array(
"game_name"=>"产品名称","sdk_version"=>"设备名称","pay_amount"=>"游戏现金金额","platform_coin"=>"平台币直冲金额","test_coin"=>"测试金额","sum"=>"支付渠道内合计"));
}
@ -348,18 +389,19 @@ class PayChannelController extends ThinkController
$this->meta_title = "支付渠道统计";
$size = $row;//每页显示的记录数
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$sum_pay_amount = M('test_order', 'tab_')->where($maptestorder)->field('sum(pay_amount) as sum_order_amount')->find();
//平台币直充金额,下面列表
$this->assign('coinSum',$coinSum);
$channelData2 = $channelData;
$arr_merge = array_merge($channelData2,$testorderChannelArr);
$this->assign('sumData',$sumData);
$this->assign('channelData',$arr_merge);
$this->assign('listdata',$data);
$this->assign('sumData',$sumData);
$this->assign('channelData',$arr_merge);
$this->assign('listdata',$data);
//统计总额和比例
$this->assign('channelData2',$channelData);
$this->assign('sum_pay_amount',$sum_pay_amount);
$this->assign('sum_platform_pay_amount',$sum_platform_pay_amount);
$this->assign('sum_noplatform_pay_amount',$sum_noplatform_pay_amount);
$moneyAllCount = array_sum(array_column($channelData, 'pay_amount'));
$this->assign('moneyAllCount',$moneyAllCount);
$this->display();
@ -568,7 +610,7 @@ class PayChannelController extends ThinkController
// setPowerPromoteIds($coinMap,'tab_deposit.promote_id');
$spendData = M('spend','tab_')
->field("pay_order_number,pay_time,user_account,game_name,promote_account,spend_ip,server_name,game_player_name,cost,pay_amount,pay_way")
->field("pay_order_number,pay_time,user_account,game_name,promote_account,spend_ip,server_name,game_player_name,cost,pay_amount,pay_way,sdk_version")
->where($map)
->select(false);
// var_dump($spendData);die();
@ -578,7 +620,7 @@ class PayChannelController extends ThinkController
$coinData = M('pay_info','tab_')
->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number")
->field("pay_order_number,tab_deposit.create_time as pay_time,tab_deposit.user_account,tab_pay_info.game_name,tab_deposit.promote_account,
tab_deposit.pay_ip as spend_ip,tab_pay_info.server_name,tab_pay_info.game_player_name,
tab_deposit.pay_ip as spend_ip,tab_pay_info.server_name,tab_pay_info.game_player_name,tab_pay_info.sdk_version,
tab_deposit.pay_amount as cost,tab_deposit.pay_amount,tab_deposit.pay_way")
->where($coinMap)
->select(false);
@ -635,6 +677,11 @@ class PayChannelController extends ThinkController
foreach ($data as $key => $value) {
$data[$key]['pay_time'] = date('Y-m-d H:i:s',$value['pay_time']);
if ($model == 'spend') {
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
$data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']);
}
}
$sql = "select count(1) as count from ({$unionSql})t;";
@ -751,7 +798,7 @@ class PayChannelController extends ThinkController
}
$spendData = M('spend','tab_')
->field("pay_order_number,pay_time,user_account,game_name,promote_account,spend_ip,server_name,game_player_name,cost,pay_amount,pay_way")
->field("pay_order_number,pay_time,user_account,game_name,sdk_version,promote_account,spend_ip,server_name,game_player_name,cost,pay_amount,pay_way")
->where($map)
->select(false);
// var_dump($spendData);die();
@ -761,7 +808,7 @@ class PayChannelController extends ThinkController
$coinData = M('pay_info','tab_')
->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number")
->field("pay_order_number,tab_deposit.create_time as pay_time,tab_deposit.user_account,tab_pay_info.game_name,tab_deposit.promote_account,
->field("pay_order_number,tab_deposit.create_time as pay_time,tab_deposit.user_account,tab_pay_info.game_name,tab_pay_info.sdk_version,tab_deposit.promote_account,
tab_deposit.pay_ip as spend_ip,tab_pay_info.server_name,tab_pay_info.game_player_name,
tab_deposit.pay_amount as cost,tab_deposit.pay_amount,tab_deposit.pay_way")
->where($coinMap)
@ -804,7 +851,7 @@ class PayChannelController extends ThinkController
if ($model == 'spend') {
$xlsCell = array('支付订单号', '充值时间', '玩家账号', '游戏名称', '所属推广员', '充值ip', '游戏区服', '角色名称', '订单金额', '实付金额', '充值方式');
$xlsCell = array('支付订单号', '充值时间', '玩家账号', '游戏名称', '设备名称','所属推广员', '充值ip', '游戏区服', '角色名称', '订单金额', '实付金额', '充值方式');
$unionSql = "{$spendData} UNION ALL {$coinData}";
} elseif($model == 'coin_pay_order') {
$xlsCell = array('支付订单号', '充值时间', '所属推广员', '订单金额', '实付金额', '充值方式');
@ -842,8 +889,12 @@ class PayChannelController extends ThinkController
$sql = "select * from ({$unionSql})t order by pay_time DESC limit {$page},{$perSize};";
$xlsData = M()->query($sql);
foreach ($xlsData as $k => $v) {
if ($model == 'spend') {
$v['game_name'] =clearGameNameType($v['game_name']);
$v['sdk_version'] =getGameTypeName($v['sdk_version']);
}
$v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']);
$v['pay_way'] = get_pay_way($v['pay_way']);
@ -952,7 +1003,7 @@ class PayChannelController extends ThinkController
}
// setPowerPromoteIds($map,'promote_id');
$data = M('spend','tab_')
->field("pay_order_number,order_number,user_account,pay_time,game_name,server_name,game_player_name,cost,pay_amount,pay_way as pay_type,pay_way,pay_game_status")
->field("pay_order_number,order_number,user_account,pay_time,game_name,server_name,game_player_name,cost,pay_amount,pay_way as pay_type,pay_way,pay_game_status,sdk_version")
->join('inner join tab_test_white_list on tab_spend.user_id=tab_test_white_list.user_id')
->where($map)
// ->order('tab_spend.id DESC')
@ -980,7 +1031,7 @@ class PayChannelController extends ThinkController
->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number")
->join("inner join tab_test_white_list on tab_test_white_list.user_id=tab_pay_info.user_id")
->field("pay_order_number,tab_deposit.order_number,tab_deposit.user_account,tab_deposit.create_time as pay_time,
tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.game_player_name,tab_deposit.pay_amount as cost,
tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.game_player_name,tab_pay_info.sdk_version,tab_deposit.pay_amount as cost,
tab_deposit.pay_amount,tab_deposit.pay_way as pay_type,tab_deposit.pay_way,'' as pay_game_status")
->where($coinMap)
->select(false);
@ -1006,12 +1057,19 @@ class PayChannelController extends ThinkController
$data[$key]['pay_type'] = get_pay_way($value['pay_type']);
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
$data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']);
if ($value['pay_way']==1 || $value['pay_way']==9 ) {
$data[$key]['pay_way'] = '支付宝';
} else if ($value['pay_way']==2 || $value['pay_way']==3 ) {
$data[$key]['pay_way'] = '微信支付';
} else if ($value['pay_way']==15) {
$data[$key]['pay_way'] = '快捷支付';
} else if ($value['pay_way']==7) {
$data[$key]['pay_way'] = '苹果支付';
} else if ($value['pay_way']==17) {
$data[$key]['pay_way'] = '易宝支付';
} else if($value['pay_way']){
$data[$key]['pay_way'] = '其他支付';
}
@ -1077,6 +1135,8 @@ class PayChannelController extends ThinkController
$data[$key]['pay_time'] = Date('Y-m-d H:i:s',$value['pay_time']);
$data[$key]['pay_type'] = get_pay_way($value['pay_type']);
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
$data[$key]['sdk_version'] ="苹果";
if ($value['pay_way']==1 || $value['pay_way']==9 ) {
$data[$key]['pay_way'] = '支付宝';
@ -1084,6 +1144,10 @@ class PayChannelController extends ThinkController
$data[$key]['pay_way'] = '微信支付';
} else if ($value['pay_way']==15) {
$data[$key]['pay_way'] = '快捷支付';
} else if ($value['pay_way']==7) {
$data[$key]['pay_way'] = '苹果支付';
} else if ($value['pay_way']==17) {
$data[$key]['pay_way'] = '易宝支付';
} else if($value['pay_way']){
$data[$key]['pay_way'] = '其他支付';
}
@ -1126,6 +1190,10 @@ class PayChannelController extends ThinkController
$data[$key]['pay_way'] = '微信支付';
} else if ($value['pay_way']==15) {
$data[$key]['pay_way'] = '快捷支付';
} else if ($value['pay_way']==7) {
$data[$key]['pay_way'] = '苹果支付';
} else if ($value['pay_way']==17) {
$data[$key]['pay_way'] = '易宝支付';
} else if($value['pay_way']){
$data[$key]['pay_way'] = '其他支付';
}
@ -1175,6 +1243,8 @@ class PayChannelController extends ThinkController
$payTypeData['支付宝支付金额'] = 0;
$payTypeData['微信支付金额'] = 0;
$payTypeData['快捷支付金额'] = 0;
$payTypeData['苹果支付金额'] = 0;
$payTypeData['易宝支付金额'] = 0;
$payTypeData['其他支付金额'] = 0;
foreach($sumData as $key => $value) {
@ -1185,6 +1255,10 @@ class PayChannelController extends ThinkController
$payTypeData['微信支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if ($value['pay_way']==15) {
$payTypeData['快捷支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if ($value['pay_way']==7) {
$payTypeData['苹果支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if ($value['pay_way']==17) {
$payTypeData['易宝支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if($value['pay_way']){
$payTypeData['其他支付金额'] += number_format($value['pay_amount'],2,'.','');
}
@ -1195,6 +1269,9 @@ class PayChannelController extends ThinkController
$payTypeData['微信支付金额'] = number_format($payTypeData['微信支付金额'],2,'.','');
$payTypeData['快捷支付金额'] = number_format($payTypeData['快捷支付金额'],2,'.','');
$payTypeData['其他支付金额'] = number_format($payTypeData['其他支付金额'],2,'.','');
$payTypeData['苹果支付金额'] = number_format($payTypeData['苹果支付金额'],2,'.','');
$payTypeData['易宝支付金额'] = number_format($payTypeData['易宝支付金额'],2,'.','');
$this->assign('payTypeData',$payTypeData);
@ -1267,7 +1344,7 @@ class PayChannelController extends ThinkController
if ($model == 'spend') {
$xlsCell = array('支付订单号', 'cp订单号', '测试账号', '充值时间', '游戏名称', '游戏区服',
$xlsCell = array('支付订单号', 'cp订单号', '测试账号', '充值时间', '游戏名称','设备名称', '游戏区服',
'角色名称', '订单金额', ' 实付金额 ', '充值方式', '支付渠道', '游戏通知状态',);
mb_convert_variables('GBK', 'UTF-8', $xlsCell);
@ -1279,7 +1356,7 @@ class PayChannelController extends ThinkController
// setPowerPromoteIds($map,'promote_id');
$data = M('spend','tab_')
->field("pay_order_number,order_number,user_account,pay_time,game_name,server_name,game_player_name,cost,pay_amount,pay_way as pay_type,pay_way,pay_game_status")
->field("pay_order_number,order_number,user_account,pay_time,game_name,sdk_version,server_name,game_player_name,cost,pay_amount,pay_way as pay_type,pay_way,pay_game_status")
->join('inner join tab_test_white_list on tab_spend.user_id=tab_test_white_list.user_id')
->where($map)
// ->order('tab_spend.id DESC')
@ -1310,7 +1387,7 @@ class PayChannelController extends ThinkController
->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number")
->join("inner join tab_test_white_list on tab_test_white_list.user_id=tab_pay_info.user_id")
->field("pay_order_number,tab_deposit.order_number,tab_deposit.user_account,tab_deposit.create_time as pay_time,
tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.game_player_name,tab_deposit.pay_amount as cost,
tab_pay_info.game_name,tab_pay_info.sdk_version,tab_pay_info.server_name,tab_pay_info.game_player_name,tab_deposit.pay_amount as cost,
tab_deposit.pay_amount,tab_deposit.pay_way as pay_type,tab_deposit.pay_way,'' as pay_game_status")
->where($coinMap)
->select(false);
@ -1333,6 +1410,8 @@ class PayChannelController extends ThinkController
$value['pay_order_number'] = "'".$value['pay_order_number'];
$value['order_number'] = "'".$value['order_number'];
$value['game_name'] =clearGameNameType($value['game_name']);
$value['sdk_version'] =getGameTypeName($value['sdk_version']);
if (!$value['order_number']) {
$data[$key]['order_number'] = '无';
@ -1348,6 +1427,10 @@ class PayChannelController extends ThinkController
$value['pay_way'] = '微信支付';
} else if ($value['pay_way'] == 15) {
$value['pay_way'] = '快捷支付';
} else if ($value['pay_way']==7) {
$data[$key]['pay_way'] = '苹果支付';
} else if ($value['pay_way']==17) {
$data[$key]['pay_way'] = '易宝支付';
} else if ($value['pay_way']) {
$value['pay_way'] = '其他支付';
}
@ -1391,7 +1474,7 @@ class PayChannelController extends ThinkController
} elseif($model == 'game_supersign') {
$xlsCell = array('支付订单号', '测试账号', '充值时间', '游戏名称',
$xlsCell = array('支付订单号', '测试账号', '充值时间', '游戏名称','设备名称',
'订单金额', ' 实付金额 ', '充值方式', '支付渠道',);
mb_convert_variables('GBK', 'UTF-8', $xlsCell);
@ -1429,19 +1512,18 @@ class PayChannelController extends ThinkController
$page = ($i - 1) * $perSize;
$data = M('game_supersign', 'tab_')
->field("order_id as pay_order_number,account as user_account,pay_time,game_name,pay_price as cost,pay_price as pay_amount,pay_way as pay_type,pay_way")
->field("order_id as pay_order_number,account as user_account,pay_time,game_name,@t:='苹果' sdk_version,pay_price as cost,pay_price as pay_amount,pay_way as pay_type,pay_way")
->join('inner join tab_test_white_list on tab_game_supersign.user_id=tab_test_white_list.user_id')
->join('left join tab_game on tab_game_supersign.game_id= tab_game.id')
->where($map)
->limit($page ,$perSize)
->order('tab_game_supersign.id DESC')
->select();
foreach ($data as $key => $value) {
$value['pay_order_number'] = "'".$value['pay_order_number'];
$value['pay_time'] = Date('Y-m-d H:i:s', $value['pay_time']);
$value['game_name'] =clearGameNameType($value['game_name']);
$value['pay_type'] = get_pay_way($value['pay_type']);
if ($value['pay_way'] == 1 || $value['pay_way'] == 9) {
@ -1450,6 +1532,10 @@ class PayChannelController extends ThinkController
$value['pay_way'] = '微信支付';
} else if ($value['pay_way'] == 15) {
$value['pay_way'] = '快捷支付';
} else if ($value['pay_way']==7) {
$data[$key]['pay_way'] = '苹果支付';
} else if ($value['pay_way']==17) {
$data[$key]['pay_way'] = '易宝支付';
} else if ($value['pay_way']) {
$value['pay_way'] = '其他支付';
}
@ -1478,7 +1564,7 @@ class PayChannelController extends ThinkController
$map['create_time'] = $map['pay_time'];
unset($map['pay_time']);
}
// setPowerPromoteIds($map,'tab_deposit.promote_id');
// setPowerPromoteIds($map,'tab_deposit.promote_id');
$accessNum = M('deposit','tab_')
->field("pay_order_number,order_number,user_account,create_time as pay_time,pay_amount as cost,pay_amount,pay_way as pay_type,pay_way")
@ -1514,6 +1600,10 @@ class PayChannelController extends ThinkController
$value['pay_way'] = '微信支付';
} else if ($value['pay_way'] == 15) {
$value['pay_way'] = '快捷支付';
} else if ($value['pay_way']==7) {
$data[$key]['pay_way'] = '苹果支付';
} else if ($value['pay_way']==17) {
$data[$key]['pay_way'] = '易宝支付';
} else if ($value['pay_way']) {
$value['pay_way'] = '其他支付';
}
@ -1560,6 +1650,8 @@ class PayChannelController extends ThinkController
$payTypeData['微信支付金额'] = 0;
$payTypeData['快捷支付金额'] = 0;
$payTypeData['其他支付金额'] = 0;
$payTypeData['苹果支付金额'] = number_format($payTypeData['苹果支付金额'],2,'.','');
$payTypeData['易宝支付金额'] = number_format($payTypeData['易宝支付金额'],2,'.','');
foreach($sumData as $key => $value) {
@ -1569,6 +1661,10 @@ class PayChannelController extends ThinkController
$payTypeData['微信支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if ($value['pay_way']==15) {
$payTypeData['快捷支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if ($value['pay_way']==7) {
$payTypeData['苹果支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if ($value['pay_way']==17) {
$payTypeData['易宝支付金额'] += number_format($value['pay_amount'],2,'.','');
} else if($value['pay_way']){
$payTypeData['其他支付金额'] += number_format($value['pay_amount'],2,'.','');
}

@ -0,0 +1,589 @@
<?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,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 DESC')
->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,create_time')
// ->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,create_time,
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,create_time,
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 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 DESC')
->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);
$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('('.$data.') as a')
->field('"" as pay_ways_ch,"" as pay_way,pay_ways,user_account,
count(if(pay_status=1,success_invest_count,NULL)) success_invest_count,
sum(success_invest_amount) success_invest_amount,
count(if(pay_status=2,nothing_invest_count,NULL)) nothing_invest_count,
sum(nothing_invest_amount) nothing_invest_amount,
count(if(pay_status=0,fail_invest_count,NULL)) fail_invest_count,
sum(fail_invest_amount) fail_invest_amount')
->limit(($i-1)*$perSize ,$perSize)
->where($map)
->group('a.pay_ways')
->select();
// $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,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,"" other,
count(if(pay_status=1,success_invest_count,NULL)) success_invest_count,
sum(success_invest_amount) success_invest_amount,
count(if(pay_status=2,nothing_invest_count,NULL)) nothing_invest_count,
sum(nothing_invest_amount) nothing_invest_amount,
count(if(pay_status=0,fail_invest_count,NULL)) fail_invest_count,
sum(fail_invest_amount) fail_invest_amount
')
->where($map)
->find();
// $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'] == 4) {
$map['pay_status'] = 1;
$map['pay_game_status'] = 1;
}
if ($_REQUEST['pay_status'] == 3) {
$map['pay_status'] = 1;
$map['pay_game_status'] = 0;
}
}
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'])];
}
$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="sqpay",tab_pay_channel_intention.pay_way,null)) sqshorcut,
count(if(tab_pay_channel_intention.pay_way="yeepay",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 DESC')
->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="sqpay",tab_pay_channel_intention.pay_way,null)) sqshorcut,
count(if(tab_pay_channel_intention.pay_way="yeepay",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;
}
}
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'])];
}
$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="sqpay",tab_pay_channel_intention.pay_way,null)) sqshorcut,
count(if(tab_pay_channel_intention.pay_way="yeepay",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 DESC')
->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="sqpay",tab_pay_channel_intention.pay_way,null)) sqshorcut,
count(if(tab_pay_channel_intention.pay_way="yeepay",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("'汇总(检索时间内所有数据的统计)' 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']);
}
}

@ -1174,15 +1174,15 @@ class PromoteController extends ThinkController
{
if (IS_AJAX) {
//获取所有游戏
$game_list = M('game', 'tab_')->field('id,game_name,short')->where(['game_status'=>1,'down_port'=>1])->select();
$game_list = M('game', 'tab_')->field('relation_game_id id,relation_game_name game_name,short')->where(['game_status'=>1,'down_port'=>1])->group("relation_game_id")->select();
$data['data']['game_list'] = empty($game_list) ? '' : $game_list;
//获取推广员信息
$promote_info = M('promote', 'tab_')->field('id,account,game_ids')->where(['id'=>I('id', 0, 'intval')])->find();
if (!empty($promote_info['game_ids'])) {
$this->changeGameidToRelationGameid($promote_info['game_ids']);
$promote_info['game_ids'] = explode(',', $promote_info['game_ids']);
}
$data['data']['promote_info'] = empty($promote_info) ? '' : $promote_info;
$data['msg'] = '请求成功';
$data['code'] = 1;
@ -1190,6 +1190,14 @@ class PromoteController extends ThinkController
exit;
}
}
//普通游戏id转唯一游戏id
protected function changeGameidToRelationGameid(&$ids)
{
$rid = M('game', 'tab_')->field('relation_game_id')->where(["id"=>["in",$ids]])->group("relation_game_id")->select();
if($rid){
$ids = implode(",",array_column($rid,'relation_game_id'));
}
}
//更新推广员可推广游戏
@ -1203,6 +1211,7 @@ class PromoteController extends ThinkController
$game_ids = I('game_ids', '');
if (!empty($game_ids)) {
$game_ids = implode(',', $game_ids);
$this->changeRelationGameidToGameid($game_ids);
} else {
$game_ids = 0;
}
@ -1214,6 +1223,14 @@ class PromoteController extends ThinkController
}
}
}
//唯一游戏id转普通游戏id
protected function changeRelationGameidToGameid(&$ids)
{
$rid = M('game', 'tab_')->field('id')->where(["relation_game_id"=>["in",$ids]])->select();
if($rid){
$ids = implode(",",array_column($rid,'id'));
}
}
public function shortCutMenu($p = 1)
{

@ -47,7 +47,14 @@ class TestOrderController extends ThinkController
$timeend = strtotime($_REQUEST['timeend'])+86399;
$map['pay_time'] = array("ELT",$timeend);
}
$order_list = M('test_order', 'tab_')->where($map)->page($page,$row)->order('add_time desc')->select();
$order_list = M('test_order t', 'tab_')
->field("t.*,g.sdk_version")
->join("tab_game g on t.game_id = g.id","left")
->where($map)->page($page,$row)->order('add_time desc')->select();
foreach ($order_list as $k => &$v) {
$v['game_name'] =clearGameNameType($v['game_name']);
$v['sdk_version'] =getGameTypeName($v['sdk_version']);
}
$sum_order_amount = M('test_order', 'tab_')->where($map)->field('sum(order_amount) as sum_order_amount,count(1) as count')->find();
$sum_pay_amount = M('test_order', 'tab_')->where($map)->field('sum(pay_amount) as sum_order_amount')->find();

@ -6,6 +6,13 @@ namespace Admin\Controller;
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
class ToolController extends ThinkController {
public $pay_type = [
0 => ['name' => '支付宝', 'paytag' => 'alipay' ],
1 => ['name' => '微信', 'paytag' => 'wxpay'],
2 => ['name' => '易宝', 'paytag' => 'yeepay'],
3 => ['name' => '双乾', 'paytag' => 'sqpay'],
];
/**
*保存设置
@ -898,6 +905,483 @@ class ToolController extends ThinkController {
}
public function limitPay($page = 1) {
$page = intval(I('get.p', 0));
$page = $page ? $page : 1; //默认显示第一页数据
$row = intval(I('row', 0));
$row = empty($row) ? 10 : $row;//每页条数
$payType = $_REQUEST['pay_type'];
$limit_type = $_REQUEST['limit_type'];
$limit_time_type = $_REQUEST['limit_time_type'];
$map = [];
if (!empty($payType)) {
$map['pay_type'] = $payType;
$parameter['pay_type'] = $payType;
}
if (!empty($limit_type)) {
$map['limit_type'] = $limit_type;
$parameter['limit_type'] = $limit_type;
}
$datas = M('pay_limit_conf', 'tab_')
->where($map)
->order('id desc')
->page($page, $row)
->select();
/* 查询记录总数 */
$count = M('pay_limit_conf', 'tab_')
->where($map)
->count();
foreach ($datas as $key => $data) {
$limit_rule = '';
if (!empty(intval($data['user_total_limit']))) {
$limit_rule .= '玩家全渠道总流水限额'.$data['user_total_limit']."&nbsp&nbsp&nbsp&nbsp";
}
if (!empty(intval($data['total_limit']))) {
$limit_rule .= '全渠道总流水限额'.$data['total_limit']."&nbsp&nbsp&nbsp&nbsp";
}
if (!empty(intval($data['user_one_limit']))) {
$limit_rule .= '玩家单笔限制'.$data['user_one_limit'];
}
if ($limit_rule == '') {
$limit_rule = '暂无规则';
}
if ($data['limit_time_type'] == 'day') {
$data['limit_time_type'] = '每日,';
$remarkStr = '';
}
if ($data['limit_time_type'] == 'week') {
$data['limit_time_type'] = '每周,';
if ($data['limit_time_type_remark'] == 1) $remarkStr = "周一";
if ($data['limit_time_type_remark'] == 2) $remarkStr = "周二";
if ($data['limit_time_type_remark'] == 3) $remarkStr = "周三";
if ($data['limit_time_type_remark'] == 4) $remarkStr = "周四";
if ($data['limit_time_type_remark'] == 5) $remarkStr = "周五";
if ($data['limit_time_type_remark'] == 6) $remarkStr = "周六";
if ($data['limit_time_type_remark'] == 7) $remarkStr = "周七";
}
if ($data['limit_time_type'] == 'month') {
$data['limit_time_type'] = '每月,';
$remarkStr = $data['limit_time_type_remark'].'日';
}
if ($data['limit_time_type'] == 'fix') {
$data['limit_time_type'] = '特殊,';
$remarks = str_split($data['limit_time_type_remark'], 1);
$remarkStr = '';
foreach($remarks as $keyR => $remark) {
if ($keyR == 3 || $keyR == 5){
$remarkStr .= $remark. '-';
}else {
$remarkStr .= $remark;
}
}
}
if ($data['limit_type'] == 'force') {
$datas[$key]['limit_type'] = '强制限制';
}
if ($data['limit_type'] == 'obstacles') {
$datas[$key]['limit_type'] = '支付体验障碍';
}
if ($data['pay_type'] == 'alipay') {
$pay_type = '支付宝';
}
if ($data['pay_type'] == 'wxpay') {
$pay_type = '微信';
}
if ($data['pay_type'] == 'yeepay') {
$pay_type = '易宝';
}
if ($data['pay_type'] == 'sqpay') {
$pay_type = '双乾';
}
$start_timeArr = str_split($data['start_time'], 1);
$startTimeStr = '';
foreach ($start_timeArr as $timeKey => $start_time) {
if ($timeKey == 1 || $timeKey == 3) {
$startTimeStr .= $start_time.':';
}else {
$startTimeStr .= $start_time;
}
}
$end_timeArr = str_split($data['end_time'], 1);
$endTimeStr = '';
foreach ($end_timeArr as $timeKey1 => $end_time) {
if ($timeKey1 == 1 || $timeKey1 == 3) {
$endTimeStr .= $end_time. ':';
}else {
$endTimeStr .= $end_time;
}
}
$datas[$key]['pay_type'] = $pay_type;
$datas[$key]['limit_rule'] = $limit_rule;
$datas[$key]['limit_time'] = $data['limit_time_type'] .$remarkStr.' '.$startTimeStr.'~'.$endTimeStr;
}
//分页
$parameter['p'] = $page;
$parameter['row'] = $row;
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
if (empty($payType)) {
$this->assign('pay_type', " ");
}else {
$this->assign('pay_type', $payType);
}
if (empty($limit_type)) {
$this->assign('limit_type', " ");
}else {
$this->assign('limit_type', $limit_type);
}
$this->assign('datas', $datas);
$this->display();
}
public function addLimitPay() {
if ($_POST) {
$pay_type = $_REQUEST['pay_type'];
$total_limit = empty($_REQUEST['total_limit']) ? 0 : $_REQUEST['total_limit'];
$user_total_limit = empty($_REQUEST['user_total_limit']) ? 0 : $_REQUEST['user_total_limit'];
$user_one_limit = empty($_REQUEST['user_one_limit']) ? 0 : $_REQUEST['user_one_limit'];
$limit_type = $_REQUEST['limit_type'];
$status = $_REQUEST['status'];
$startTime = '';
$endTime = '';
if (empty($pay_type)) {
return $this->error('限制支付渠道不能为空');
}
if (empty(intval($total_limit))&&empty(intval($user_total_limit))&&empty(intval($user_one_limit))) {
return $this->error('限额不能为空');
}
if (!is_numeric($total_limit) || !is_numeric($user_total_limit) || !is_numeric($user_one_limit) || $total_limit < 0 ||$user_total_limit < 0 ||$user_one_limit < 0 ) {
return $this->error('限制金额出错');
}
if (intval($total_limit) > 1000000000000.00 || intval($user_total_limit) > 1000000000000.00 ||intval($user_one_limit) > 1000000000000.00) {
return $this->error('限制金额超出范围');
}
if (empty($limit_type)) {
return $this->error('限制方式不能为空');
}
$paramsName = $status.'_start';
for ($i = 1; $i < 13; $i++) {
$name = $paramsName.$i;
if ($_REQUEST[$name] == '') {
return $this->error('时间选择不能为空');
}else {
if ($i < 7) {
$startTime .= $_REQUEST[$name];
}else {
$endTime .= $_REQUEST[$name];
}
}
$this->checkTimeFormat($i, $startTime, $endTime, $_REQUEST[$name]);
}
$start_timeArr = str_split($startTime, 1);
$startTimeStr = '';
foreach ($start_timeArr as $timeKey => $start_time) {
if ($timeKey == 1 || $timeKey == 3) {
$startTimeStr .= $start_time.':';
}else {
$startTimeStr .= $start_time;
}
}
$st = '2020-03-23'.' '.$startTimeStr;
$startTimeStamp = strtotime($st);
$end_timeArr = str_split($endTime, 1);
$endTimeStr = '';
foreach ($end_timeArr as $timeKey1 => $end_time) {
if ($timeKey1 == 1 || $timeKey1 == 3) {
$endTimeStr .= $end_time.':';
}else {
$endTimeStr .= $end_time;
}
}
$et = '2020-03-23'.' '.$endTimeStr;
$endTimeStamp = strtotime($et);
if ($startTimeStamp >= $endTimeStamp) {
return $this->error('开始时间不能大于结束时间');
}
switch($status) {
case 'daily':
$limit_time_type = 'day';
break;
case 'week':
$limit_time_type = 'week';
if (empty($_REQUEST['week_remark'])) {
return $this->error('每周限制时间未确定');
}else {
$data['limit_time_type_remark'] = $_REQUEST['week_remark'];
}
break;
case 'month':
$limit_time_type = 'month';
if (empty($_REQUEST['month_remark'])) {
return $this->error('每月限制时间未确定');
}else {
$data['limit_time_type_remark'] = $_REQUEST['month_remark'];
}
break;
case 'day':
$limit_time_type = 'fix';
if (empty($_REQUEST['day_remark'])) {
return $this->error('每月限制时间未确定');
}else {
$fixStr = str_replace('-','',$_REQUEST['day_remark']);
$data['limit_time_type_remark'] = $fixStr;
$data['fix_date'] = $fixStr;
}
break;
}
if (!is_numeric($startTime) || !is_numeric($endTime)) {
$this->error('时间格式出错');
}
$data['pay_type'] = $pay_type;
$data['limit_type'] = $limit_type;
$data['limit_time_type'] = $limit_time_type;
$data['start_time'] = $startTime;
$data['end_time'] = $endTime;
$data['total_limit'] = $total_limit;
$data['user_total_limit'] = $user_total_limit;
$data['user_one_limit'] = $user_one_limit;
$data['create_time'] = time();
$res = M('pay_limit_conf', 'tab_')->add($data);
if($res) {
$this->success('新增成功',U('limitPay'));
}
}else {
// $id = $_REQUEST['id'];
// $limitConf = M('pay_limit_conf', 'tab_')->where(['id'=>$id])->find();
// if (empty($limitConf)) {
// return $this->error('未找到该条信息');
// }
// foreach ($limitConf as $key => $conf) {
// }
$monthDay = $this->getMonthDay();
$this->assign('monthday', $monthDay);
$this->display();
}
}
public function editLimitPay() {
if ($_POST) {
$id = $_REQUEST['id'];
$pay_type = $_POST['pay_type'];
$total_limit = $_POST['total_limit'];
$user_total_limit = $_POST['user_total_limit'];
$user_one_limit = $_POST['user_one_limit'];
$limit_type = $_POST['limit_type'];
$status = $_POST['status'];
$startTime = '';
$endTime = '';
if (empty(intval($total_limit))&&empty(intval($user_total_limit))&&empty(intval($user_one_limit))) {
return $this->error('限额不能为空');
}
if (!is_numeric($total_limit) || !is_numeric($user_total_limit) || !is_numeric($user_one_limit) || $total_limit < 0 ||$user_total_limit < 0 ||$user_one_limit < 0 ) {
return $this->error('限额金额出错');
}
if (empty($id)) {
return $this->error('编辑信息出错');
}
if (intval($total_limit) > 1000000000000.00 || intval($user_total_limit) > 1000000000000.00 ||intval($user_one_limit) > 1000000000000.00) {
return $this->error('限制金额超出范围');
}
$confInfo = M('pay_limit_conf', 'tab_')->where(['id'=>$id])->find();
$confInfo['pay_type'] = $pay_type;
$confInfo['total_limit'] = $total_limit;
$confInfo['user_total_limit'] = $user_total_limit;
$confInfo['user_one_limit'] = $user_one_limit;
$confInfo['limit_type'] = $limit_type;
$paramsName = $status.'_start';
for ($i = 1; $i < 13; $i++) {
$name = $paramsName.$i;
if ($_REQUEST[$name] == '') {
return $this->error('时间选择不能为空');
}else {
if ($i < 7) {
$startTime .= $_REQUEST[$name];
}else {
$endTime .= $_REQUEST[$name];
}
}
$this->checkTimeFormat($i, $startTime, $endTime, $_REQUEST[$name]);
}
$st = '2020-03-23'.' '.$startTimeStr;
$startTimeStamp = strtotime($st);
$end_timeArr = str_split($endTime, 1);
$endTimeStr = '';
foreach ($end_timeArr as $timeKey1 => $end_time) {
if ($timeKey1 == 1 || $timeKey1 == 3) {
$endTimeStr .= $end_time.':';
}else {
$endTimeStr .= $end_time;
}
}
$et = '2020-03-23'.' '.$endTimeStr;
$endTimeStamp = strtotime($et);
if ($startTimeStamp >= $endTimeStamp) {
return $this->error('开始时间不能大于结束时间');
}
$confInfo['start_time'] = $startTime;
$confInfo['end_time'] = $endTime;
switch($status) {
case 'daily':
$limit_time_type = 'day';
$confInfo['limit_time_type_remark'] = "";
$confInfo['fix_date'] = '';
break;
case 'week':
$limit_time_type = 'week';
if (empty($_REQUEST['week_remark'])) {
return $this->error('每周限制时间未确定');
}else {
$confInfo['limit_time_type_remark'] = $_REQUEST['week_remark'];
}
$confInfo['fix_date'] = '';
break;
case 'month':
$limit_time_type = 'month';
if (empty($_REQUEST['month_remark'])) {
return $this->error('每月限制时间未确定');
}else {
$confInfo['limit_time_type_remark'] = $_REQUEST['month_remark'];
}
$confInfo['fix_date'] = '';
break;
case 'day':
$limit_time_type = 'fix';
if (empty($_REQUEST['day_remark'])) {
return $this->error('每月限制时间未确定');
}else {
$fixStr = str_replace('-','',$_REQUEST['day_remark']);
$confInfo['limit_time_type_remark'] = $fixStr;
$confInfo['fix_date'] = $fixStr;
}
// $confInfo['limit_time_type_remark'] = $_REQUEST['day_remark'];
break;
}
$confInfo['limit_time_type'] = $limit_time_type;
$update = M('pay_limit_conf', 'tab_')->where(['id'=>$id])->save($confInfo);
if ($update) {
$this->success('编辑成功',U('limitPay'));
}else {
$this->error('未修改资料,请确认');
}
}else {
$id = $_REQUEST['id'];
$data = M('pay_limit_conf', 'tab_')->where(['id'=>$id])->find();
$start_time = $data['start_time'];
$end_time = $data['end_time'];
$monthDay = $this->getMonthDay();
if ($data['limit_time_type'] == 'fix') {
$remarks = str_split($data['limit_time_type_remark'], 1);
$remarkStr = '';
foreach($remarks as $keyR => $remark) {
if ($keyR == 3 || $keyR == 5){
$remarkStr .= $remark. '-';
}else {
$remarkStr .= $remark;
}
}
$data['limit_time_type_remark'] = $remarkStr;
}
$this->assign('monthday', $monthDay);
$this->assign('startTime', $start_time);
$this->assign('endTime', $end_time);
$this->assign('data', $data);
// var_dump($this->pay_type);die();
$this->assign('pay_type', $this->pay_type);
$this->display();
}
}
public function delLimitPay($id) {
$res = M('pay_limit_conf', 'tab_')->where(['id'=>$id])->delete();
if($res) {
$this->success('删除成功',U('limitPay'));
}
}
public function getMonthDay() {
$arr = [];
for ($i = 1;$i < 32; $i++ ) {
$arr[] = $i;
}
return $arr;
}
public function checkTimeFormat($i, $startTime = '' , $endTime = '', $name) {
if ($i == 2) {
if ($startTime < 0 || $startTime > 23) {
return $this->error("时间选择出错");
}
}
if ($i == 3 || $i == 5) {
if ($name < 0 || $name > 5) {
return $this->error("时间选择出错");
}
}
if ($i == 4 || $i == 6) {
if ($name < 0 || $name > 9) {
return $this->error("时间选择出错");
}
}
if ($i == 8) {
if ($endTime < 0 || $endTime > 23) {
return $this->error("时间选择出错");
}
}
if ($i == 9 || $i == 11) {
if ($name < 0 || $name > 5) {
return $this->error("时间选择出错");
}
}
if ($i == 10 || $i == 12) {
if ($name < 0 || $name > 9) {
return $this->error("时间选择出错");
}
}
}
}

@ -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();
}
}
}

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

@ -50,16 +50,7 @@
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Finance/coinDetail','model='.$model['name'].'&row='.I('row'),false)}"
style="">搜索</a>
<if condition="$_GET['all'] neq 1">
<a class="sch-btn" href="{:U('Export/coinDetail',
array(
'game_id'=>$_GET['game_id'],
'game_name'=>$_GET['game_name'],
'pay_way'=>$_GET['pay_way'],
'timestart'=>$_GET['timestart'],
'timeend'=>$_GET['timeend'],
'user_account'=>$_GET['user_account'],
'pay_order_number'=>$_GET['pay_order_number'],
false))}">导出</a>
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}">导出</a>
</if>
</div>
</div>
@ -76,6 +67,7 @@
<th>充值时间</th>
<th >玩家账号</th>
<th >游戏名称</th>
<th >设备名称</th>
<th >游戏区服</th>
<th >角色名称</th>
<th >订单金额</th>
@ -94,6 +86,7 @@
<td >{$data.pay_time}</td>
<td >{$data.user_account}</td>
<td >{$data.game_name}</td>
<td >{$data.sdk_version}</td>
<td >{$data.server_name}</td>
<td >{$data.game_player_name}</td>
<td >{$data.cost}</td>
@ -108,7 +101,7 @@
</tr>
</volist>
<tr>
<td colspan="6" ><span>总计</span></td>
<td colspan="7" ><span>总计</span></td>
<td ><span><if condition="$total_cost neq ''">{$total_cost}<else/>0.00</if></span></td>
<td><if condition="$total_pay_amount neq ''">{$total_pay_amount}<else/>0.00</if></td>
<td colspan="2"> </td>

@ -93,16 +93,7 @@
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Finance/gameStatisticsDetail','model='.$model['name'].'&row='.I('row'),false)}"
style="">搜索</a>
<if condition="$_GET['all'] neq 1">
<a class="sch-btn" href="{:U('Export/gameStatisticsDetail',
array(
'game_id'=>$_GET['game_id'],
'game_name'=>$_GET['game_name'],
'pay_way'=>$_GET['pay_way'],
'timestart'=>$_GET['timestart'],
'timeend'=>$_GET['timeend'],
'user_account'=>$_GET['user_account'],
'pay_order_number'=>$_GET['pay_order_number'],
false))}">导出</a>
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}">导出</a>
</if>
</div>
</div>
@ -123,6 +114,7 @@
<th >玩家账号</th>
<th >游戏名称</th>
<th >设备类型</th>
<th >所属推广员</th>
@ -158,6 +150,7 @@
<td >{$data.pay_time}</td>
<td >{$data.user_account}</td>
<td >{$data.game_name}</td>
<td >{$data.sdk_version}</td>
<td >{$data.promote_account}</td>
<td >{$data.spend_ip}</td>
<td >{$data.server_name}</td>

@ -105,6 +105,7 @@
<th>充值时间</th>
<th >玩家账号</th>
<th >游戏名称</th>
<th >设备名称</th>
<th >游戏区服</th>
<th >角色名称</th>
<th >订单金额</th>
@ -123,6 +124,7 @@
<td >{$data.pay_time}</td>
<td >{$data.user_account}</td>
<td >{$data.game_name}</td>
<td >{$data.sdk_version}</td>
<td >{$data.server_name}</td>
<td >{$data.game_player_name}</td>
<td >{$data.cost}</td>
@ -137,7 +139,7 @@
</tr>
</volist>
<tr>
<td colspan="6" ><span>总计</span></td>
<td colspan="7" ><span>总计</span></td>
<td ><span><if condition="$total_cost neq ''">{$total_cost}<else/>0.00</if></span></td>
<td><if condition="$total_pay_amount neq ''">{$total_pay_amount}<else/>0.00</if></td>
<td colspan="2"> </td>
@ -190,7 +192,7 @@
// console.log(str);
$("#game_name").empty();
$("#game_name").append(str);
// $("#server_id").select2();
$("#game_name").select2();
}
})

@ -180,6 +180,7 @@
<th>团体类型</th>
<th >游戏</th>
<th >设备</th>
<th ><div class="tooltip">游戏现金金额<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
@ -211,6 +212,7 @@
<td >{$data.account}</td>
<td >{$data.company_belong}</td>
<td >{$data.game_name}</td>
<td >{$data.sdk_version}</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_id'=>$data['p_id'],'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,'promote_id'=>$data['p_id'],'game_id'=>$data['game_id'],p=>1,row=>10]))}">
@ -223,7 +225,7 @@
</tr>
</volist>
<tr>
<td colspan="4" ><span>总计</span></td>
<td colspan="5" ><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>

@ -164,6 +164,7 @@
<th >玩家账号</th>
<th >游戏名称</th>
<th >设备名称</th>
<th >所属推广员</th>
@ -199,6 +200,7 @@
<td >{$data.pay_time}</td>
<td >{$data.user_account}</td>
<td >{$data.game_name}</td>
<td >{$data.sdk_version}</td>
<td >{$data.promote_account}</td>
<td >{$data.spend_ip}</td>
<td >{$data.server_name}</td>

@ -105,7 +105,7 @@
<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="0" <?php if ($_POST['promote_id'] == 0):?>selected<?php endif;?>>123</option>
<option value="UC" <?php if ($_POST['promote_id'] == 'UC'):?>selected<?php endif;?>>UC用户</option>
</select>
</div>
@ -238,6 +238,11 @@
<if condition="$data['p_id'] GT 0">
<a href="{:U('FinancePromote/promoteUser',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id']],I('get.'),['p'=>1]))}">渠道查看</a>
</if>
<!-- <a
href="{:U('FinancePromote/gameStatistics',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id'],'promote_type'=>1],I('get.'),['p'=>1]))}">游戏查看</a>
<if condition="$data['p_id'] GT 0">
<a href="{:U('FinancePromote/promoteUser',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id']],I('get.'),['p'=>1]))}">渠道查看</a>
</if> -->
</td>
</tr>
</volist>
@ -438,9 +443,6 @@
dataType: 'json',
success: function (response) {
str = '<option value="">请选择会长</option>';
if(company_id == 0 || company_id ==-1){
str +='<option value="0"' + (promote_id && 0 == promote_id ? 'selected' : '') + '>官方渠道</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>"

@ -124,6 +124,7 @@
<if condition="$_GET['model'] neq 'coin_pay_order'"><th >玩家账号</th></if>
<if condition="$_GET['model'] neq 'coin_pay_order' and $_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><th >游戏名称</th></if>
<if condition="$_GET['model'] neq 'coin_pay_order' and $_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><th >设备名称</th></if>
<th >所属推广员</th>
@ -159,6 +160,7 @@
<td >{$data.pay_time}</td>
<if condition="$_GET['model'] neq 'coin_pay_order'"><td >{$data.user_account}</td></if>
<if condition="$_GET['model'] neq 'coin_pay_order' and $_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><td >{$data.game_name}</td></if>
<if condition="$_GET['model'] neq 'coin_pay_order' and $_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><td >{$data.sdk_version}</td></if>
<td >{$data.promote_account}</td>
<if condition="$_GET['model'] neq 'coin_pay_order' and $_GET['model'] neq 'game_supersign'"><td >{$data.spend_ip}</td></if>
<if condition="$_GET['model'] neq 'coin_pay_order' and $_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><td >{$data.server_name}</td></if>

@ -137,6 +137,7 @@
<tr>
<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>
@ -165,6 +166,7 @@
<volist name="listdata" id="data">
<tr>
<td >{$data.game_name}</td>
<td >{$data.sdk_version}</td>
<td>
<!-- onclick="showWindow({$data.game_id})"-->
{$data['pay_amount']}</td>
@ -179,6 +181,7 @@
<if condition="$_GET['game_id'] eq ''">
<tr>
<td><span>超级签</span></td>
<td></td>
<td ><span><if condition="$superSignData.pay_amount neq ''">{$superSignData['pay_amount']}<else/>0.00</if></span></td>
<td>0.00</td>
<td><span><a href="{:U('PayChannel/testDetail',array_merge(array('model'=>'game_supersign','game_name'=>'超级签'),I('get.'),['p'=>1]))}" style="display:block;"><if condition="$superSignData.test_coin neq ''">{$superSignData.test_coin}<else/>0.00</if></a></span></td>
@ -189,6 +192,7 @@
</tr>
<tr>
<td><span>官网</span></td>
<td></td>
<td >0.00</td>
<td>{$offcialData['pay_amount']}</td>
<td><a href="{:U('PayChannel/testDetail',array_merge(array('model'=>'deposit','game_name'=>'官网'),I('get.'),['p'=>1]))}" style="display:block;"><if condition="$offcialData.test_coin neq ''">{$offcialData.test_coin}<else/>0.00</if></a></td>
@ -199,6 +203,7 @@
</tr>
<tr>
<td><span>推广后台</span></td>
<td></td>
<td ><span>0.00</span></td>
<td>{$spreadData['pay_amount']}</td>
<td>0.00</td>
@ -210,6 +215,7 @@
</if>
<tr>
<td><span>汇总</span></td>
<td></td>
<td ><span><if condition="$sumData.pay_amount neq ''">{$sumData['pay_amount']}<else/>0.00</if></span></td>
<td><span><if condition="$sumData.platform_coin neq ''">{$sumData['platform_coin']}<else/>0.00</if></span></td>
<td>{$sumData['test_coin']}</td>
@ -220,6 +226,7 @@
</tr>
<tr>
<td><span>测试环境内外网平台</span></td>
<td></td>
<td ><span><if condition="$sum_pay_amount.sum_order_amount neq ''">{$sum_pay_amount['sum_order_amount']}<else/>0.00</if></span></td>
<td><span>0.00</span></td>
<td>0.00</td>
@ -231,7 +238,7 @@
</notemtpy>
<tr>
<td><span>充值方式统计</span></td>
<td colspan="5">
<td colspan="6">
<volist name="payTypeData" id="payTypeData" key="index">
<if condition="$key neq '其他支付金额' and $payTypeData neq 0">
{$key}{$payTypeData} &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
@ -242,7 +249,7 @@
</tr>
<tr>
<td><span>支付渠道</span></td>
<td colspan="5">
<td colspan="6">
<volist name="channelData" id="channelData">
{$channelData.pay_way}{$channelData.pay_amount} &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</volist>
@ -250,7 +257,7 @@
</tr>
<tr>
<td><span>支付渠道占比</span></td>
<td colspan="5">
<td colspan="6">
<volist name="channelData2" id="channel">
{$channel.pay_way}:
<php>

@ -124,6 +124,7 @@
<th >充值时间</th>
<if condition="$_GET['model'] neq 'deposit'"><th >游戏名称</th></if>
<if condition="$_GET['model'] neq 'deposit'"><th >设备名称</th></if>
<if condition="$_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><th >游戏区服</th></if>
@ -160,6 +161,7 @@
<td >{$data.user_account}</td>
<td >{$data.pay_time}</td>
<if condition="$_GET['model'] neq 'deposit'"><td >{$data.game_name}</td></if>
<if condition="$_GET['model'] neq 'deposit'"><td >{$data.sdk_version}</td></if>
<if condition="$_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><td >{$data.server_name}</td></if>
<if condition="$_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><td >{$data.game_player_name}</td></if>
<td >{$data.cost}</td>
@ -175,6 +177,7 @@
<td >------</td>
<td >------</td>
<if condition="$_GET['model'] neq 'deposit'"><td >------</td></if>
<if condition="$_GET['model'] neq 'deposit'"><td >------</td></if>
<if condition="$_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><td >------</td></if>
<if condition="$_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><td >------</td></if>
<td >{$sumAllData.cost}</td>

@ -0,0 +1,606 @@
<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="{:U('PayChannelIntention/index')}" 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="4" <if condition="$_GET['pay_status'] eq '4'">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')}');
$('#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'
})
$('#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;
}
var start = $("#timestart").val();
var end = $("#timeend").val();
if(start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
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,615 @@
<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;
}
a {
cursor:pointer;
}
</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;
}
var start = $("#timestart").val();
var end = $("#timeend").val();
if(start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
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>

@ -395,7 +395,7 @@
<i class="label_icon"></i>
<span class="label_text">全选</span></label>
</div>
<ul id="game_list" class="z_clearfix game_list">
<ul id="game_list" class="z_clearfix game_list" style="clear: both;">
</ul>
</div>

@ -124,6 +124,7 @@
<th >充值时间</th>
<if condition="$_GET['model'] neq 'deposit'"><th >游戏名称</th></if>
<if condition="$_GET['model'] neq 'deposit'"><th >设备名称</th></if>
<th >订单金额</th>
@ -158,6 +159,7 @@
<td >{$data.user_account}</td>
<td >{$data.pay_time|date='Y-m-d H:i:s',###}</td>
<td >{$data.game_name}</td>
<td >{$data.sdk_version}</td>
<td >{$data.order_amount}</td>
<td >{$data.pay_amount}</td>
<td >{$data.pay_way|get_pay_way}</td>
@ -173,6 +175,7 @@
<td >------</td>
<td >------</td>
<td >------</td>
<td >------</td>
<td >{$sum_order_amount['sum_order_amount']}</td>
<td >{$sum_pay_amount['sum_order_amount']}</td>
<td >------</td>

@ -0,0 +1,537 @@
<extend name="Public/base"/>
<block name="body">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<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>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">支付限额规则配置</h3>
<p class="description_text">说明:配置支付规则,控制支付渠道</p>
</div>
<div class="tab-content tabcon1711 tabcon17112">
<form action="{:U('addLimitPay')}" method="post" class="form-horizontal form_info_ml">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l noticeinfo">限制支付渠道</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_type">
<option value="alipay" selected>支付宝</option>
<option value="wxpay">微信</option>
<option value="yeepay">易宝支付</option>
<option value="sqpay">双乾支付</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">限制规则</td>
<td class="r table_radio">
<span class="form_select-text">说明:设置限制条件和限制额度</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">全渠道总流水限制</td>
<td class="r table_radio">
<input type="text" class="" name="total_limit" value="{$info.title|default=''}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">玩家全渠道总流水限制</td>
<td class="r table_radio">
<input type="text" class="" name="user_total_limit" value="{$info.title|default=''}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">玩家单笔限制</td>
<td class="r table_radio">
<input type="text" class="" name="user_one_limit" value="{$info.title|default=''}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">限制方式 </td>
<td class="r table_radio">
<span class="form_select">
<select name="limit_type">
<option value="force" selected>强制限制</option>
<option value="obstacles">支付体验障碍</option>
</select>
</span>
<span class="notice-text">说明:强制限制和支付体验障碍</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">限制时间</td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="daily" checked="checked" onclick="changeStatus(1)"/> 每日</label>
<div class="input-list" style="margin-left:20px" id="startDay">
<input type="text" class="" id="day_inp1" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start1" value="{$info.title|default='0'}" placeholder="">
<input type="text" class="" id="day_inp2" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start2" value="{$info.title|default='0'}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" id="day_inp3" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start3" value="{$info.title|default='0'}" placeholder="">
<input type="text" class="" id="day_inp4" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start4" value="{$info.title|default='0'}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" id="day_inp5" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start5" value="{$info.title|default='0'}" placeholder="">
<input type="text" class="" id="day_inp6" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start6" value="{$info.title|default='0'}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px" id="endDay">
<input type="text" class="" id="day_inp7" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start7" value="{$info.title|default='2'}" placeholder="">
<input type="text" class="" id="day_inp8" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start8" value="{$info.title|default='3'}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" id="day_inp9" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start9" value="{$info.title|default='5'}" placeholder="">
<input type="text" class="" id="day_inp10" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start10" value="{$info.title|default='9'}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" id="day_inp11" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start11" value="{$info.title|default='5'}" placeholder="">
<input type="text" class="" id="day_inp12" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start12" value="{$info.title|default='9'}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<span class="notice-text" id="text1">说明:时间格式(24小时制,时间设置范围00:00:00 23:59:59)</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio" >
<span class="form_radio">
<label><input type="radio" name="status" value="week" onclick="changeStatus(2)"/> 每周</label>
<span class="form_select" style="margin-left:5px">
<select name="week_remark">
<option value="1" selected>周一</option>
<option value="2">周二</option>
<option value="3">周三</option>
<option value="4">周四</option>
<option value="5">周五</option>
<option value="6">周六</option>
<option value="7">周天</option>
</select>
</span>
<div class="input-list" style="margin-left:20px;display:none" id="startWeek" >
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start1" id="week_inp1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp2" name="week_start2" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start3" id="week_inp3" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp4" name="week_start4" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp5" name="week_start5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="week_inp6" maxlength="1" name="week_start6" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px;display: none;" id="endWeek">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="week_start7" maxlength="1" id="week_inp7" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp8" name="week_start8" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start9" id="week_inp9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp10" name="week_start10" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="week_start11" maxlength="1" id="week_inp11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="week_start12" maxlength="1" id="week_inp12" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<span class="notice-text" id="text2" style="display:none">说明:时间格式(24小时制,时间设置范围00:00:00 23:59:59)</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="month" onclick="changeStatus(3)"/> 每月</label>
<span class="form_select" style="margin-left:5px">
<select name="month_remark">
<volist name="monthday" id="vo" key='k'>
<option value="{$vo}" selected>{$vo}日</option>
</if>
</volist>
</select>
</span>
<div class="input-list" style="margin-left:20px;display: none;" id="startMonth">
<input type="text" class="" id="month_inp1" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start1" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp2" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start2" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" id="month_inp3" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start3" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp4" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start4" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" id="month_inp5" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp6" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start6" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px;display: none;" id="endMonth">
<input type="text" class="" id="month_inp7" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start7" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp8" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start8" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" id="month_inp9" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start9" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp10" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start10" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" id="month_inp11" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp12" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start12" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<span class="notice-text" id="text3" style="display:none">说明:时间格式(24小时制,时间设置范围00:00:00 23:59:59)</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<label><input type="radio" style="margin-left:1px" name="status" value="day" onclick="changeStatus(4)"/> 特殊</label>
<div class="input-list" style="margin-left:21px">
<input type="text" readonly id="time-start" name="day_remark" class="" value="{$startDate}"
placeholder="充值开始时间"/>
</div>
<div class="input-list" style="margin-left:17px;display: none;" id="startFix">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp1" maxlength="1" name="day_start1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp2" maxlength="1" name="day_start2" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp3" name="day_start3" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp4" maxlength="1" name="day_start4" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="day_start5" id="fix_inp5" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="fix_inp6" name="day_start6" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px;display: none;" id="endFix">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp7" name="day_start7" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp8" maxlength="1" name="day_start8" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp9" maxlength="1" name="day_start9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp10" maxlength="1" name="day_start10" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="fix_inp11" name="day_start11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp12" maxlength="1" name="day_start12" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<span class="notice-text" id="text4" style="display:none">说明:时间格式(24小时制,时间设置范围00:00:00 23:59:59)</span>
</td>
</tr>
</tbody>
</table>
<div class="form-item">
<input type="hidden" name="id" value="{$info.id|default=''}">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">确 定</button>
<button class="submit_btn " onclick="javascript:history.back(-1);return false;">返 回</button>
</div>
</form>
</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="{$m_url}">
</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>
function changeStatus(status) {
if(status == 2) {
document.getElementById('startWeek').style.display = 'block'
document.getElementById('endWeek').style.display = 'block'
document.getElementById('startDay').style.display = 'none'
document.getElementById('endDay').style.display = 'none'
document.getElementById('startFix').style.display = 'none'
document.getElementById('endFix').style.display = 'none'
document.getElementById('startMonth').style.display = 'none'
document.getElementById('endMonth').style.display = 'none'
document.getElementById('text2').style.display = 'block'
document.getElementById('text1').style.display = 'none'
document.getElementById('text3').style.display = 'none'
document.getElementById('text4').style.display = 'none'
document.getElementById('week_inp1').value = 0
document.getElementById('week_inp2').value = 0
document.getElementById('week_inp3').value = 0
document.getElementById('week_inp4').value = 0
document.getElementById('week_inp5').value = 0
document.getElementById('week_inp6').value = 0
document.getElementById('week_inp7').value = 2
document.getElementById('week_inp8').value = 3
document.getElementById('week_inp9').value = 5
document.getElementById('week_inp10').value = 9
document.getElementById('week_inp11').value = 5
document.getElementById('week_inp12').value = 9
for(i=1;i<13;i++) {
var eleday = 'day_inp'+i
document.getElementById(eleday).value = ''
var elemonth = 'month_inp'+i
document.getElementById(elemonth).value = ''
var elefix = 'fix_inp'+i
document.getElementById(elefix).value = ''
}
}
if(status == 1) {
document.getElementById('startWeek').style.display = 'none'
document.getElementById('endWeek').style.display = 'none'
document.getElementById('startDay').style.display = 'block'
document.getElementById('endDay').style.display = 'block'
document.getElementById('startFix').style.display = 'none'
document.getElementById('endFix').style.display = 'none'
document.getElementById('startMonth').style.display = 'none'
document.getElementById('endMonth').style.display = 'none'
document.getElementById('text1').style.display = 'block'
document.getElementById('text2').style.display = 'none'
document.getElementById('text3').style.display = 'none'
document.getElementById('text4').style.display = 'none'
document.getElementById('day_inp1').value = 0
document.getElementById('day_inp2').value = 0
document.getElementById('day_inp3').value = 0
document.getElementById('day_inp4').value = 0
document.getElementById('day_inp5').value = 0
document.getElementById('day_inp6').value = 0
document.getElementById('day_inp7').value = 2
document.getElementById('day_inp8').value = 3
document.getElementById('day_inp9').value = 5
document.getElementById('day_inp10').value = 9
document.getElementById('day_inp11').value = 5
document.getElementById('day_inp12').value = 9
for(i=1;i<13;i++) {
var eleweek = 'week_inp'+i
document.getElementById(eleweek).value = ' '
var elemonth = 'month_inp'+i
document.getElementById(elemonth).value = ' '
var elefix = 'fix_inp'+i
document.getElementById(elefix).value = ' '
}
}
if(status == 3) {
document.getElementById('startWeek').style.display = 'none'
document.getElementById('endWeek').style.display = 'none'
document.getElementById('startDay').style.display = 'none'
document.getElementById('endDay').style.display = 'none'
document.getElementById('startFix').style.display = 'none'
document.getElementById('endFix').style.display = 'none'
document.getElementById('startMonth').style.display = 'block'
document.getElementById('endMonth').style.display = 'block'
document.getElementById('text3').style.display = 'block'
document.getElementById('text1').style.display = 'none'
document.getElementById('text2').style.display = 'none'
document.getElementById('text4').style.display = 'none'
document.getElementById('month_inp1').value = 0
document.getElementById('month_inp2').value = 0
document.getElementById('month_inp3').value = 0
document.getElementById('month_inp4').value = 0
document.getElementById('month_inp5').value = 0
document.getElementById('month_inp6').value = 0
document.getElementById('month_inp7').value = 2
document.getElementById('month_inp8').value = 3
document.getElementById('month_inp9').value = 5
document.getElementById('month_inp10').value = 9
document.getElementById('month_inp11').value = 5
document.getElementById('month_inp12').value = 9
for(i=1;i<13;i++) {
var eleweek = 'week_inp'+i
document.getElementById(eleweek).value = ' '
var eleday = 'day_inp'+i
document.getElementById(eleday).value = ' '
var elefix = 'fix_inp'+i
document.getElementById(elefix).value = ' '
}
}
if(status == 4) {
document.getElementById('text4').style.display = 'block'
document.getElementById('text1').style.display = 'none'
document.getElementById('text3').style.display = 'none'
document.getElementById('text2').style.display = 'none'
document.getElementById('startWeek').style.display = 'none'
document.getElementById('endWeek').style.display = 'none'
document.getElementById('startDay').style.display = 'none'
document.getElementById('endDay').style.display = 'none'
document.getElementById('startFix').style.display = 'block'
document.getElementById('endFix').style.display = 'block'
document.getElementById('startMonth').style.display = 'none'
document.getElementById('endMonth').style.display = 'none'
document.getElementById('fix_inp1').value = 0
document.getElementById('fix_inp2').value = 0
document.getElementById('fix_inp3').value = 0
document.getElementById('fix_inp4').value = 0
document.getElementById('fix_inp5').value = 0
document.getElementById('fix_inp6').value = 0
document.getElementById('fix_inp7').value = 2
document.getElementById('fix_inp8').value = 3
document.getElementById('fix_inp9').value = 5
document.getElementById('fix_inp10').value = 9
document.getElementById('fix_inp11').value = 5
document.getElementById('fix_inp12').value = 9
for(i=1;i<13;i++) {
var eleweek = 'week_inp'+i
document.getElementById(eleweek).value = ' '
var eleday = 'day_inp'+i
document.getElementById(eleday).value = ' '
var elemonth = 'month_inp'+i
document.getElementById(elemonth).value = ' '
}
}
}
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Tool/limitPay')}');
$(function () {
Think.setValue("type", {$info.type|default=0});
Think.setValue("category", {$info.category|default=0});
$("#category").change();
Think.setValue("group", {$info.group|default=0});
})
$("#category").change(function(){
$.ajax({
type:"POST",
dataType:"json",
async:false,
data:{category:$("#category").val()},
url:"{:U('Ajax/getConfigCategory')}",
success:function (data) {
$("#group").empty();
var str = "<option value='0'>不分类</option>";
for(var i in data){
str += "<option value="+i+">"+data[i]+"</option>";
}
$("#group").append(str);
}
})
})
</script>
<script>
$('#time-start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
showMeridian:true,
pickDate:true,
minView: 2,
autoclose: true,
pickTime:true,
todayBtn:true,
minuteStep: 1,//分钟间隔1分钟
}).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:"hh:ii:ss",
language: "zh-CN",
showMeridian:true,
minView:0,
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,447 @@
<extend name="Public/base"/>
<block name="body">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<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>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">支付限额规则配置</h3>
<p class="description_text">说明:配置支付规则,控制支付渠道</p>
</div>
<div class="tab-content tabcon1711 tabcon17112">
<form action="{:U('editLimitPay')}" method="post" class="form-horizontal form_info_ml">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l noticeinfo">限制支付渠道</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_type">
<volist name="pay_type" id="vo" key='k'>
<if condition="$vo[paytag] eq $data[pay_type]">
<option value="{$vo.paytag}" selected>{$vo.name}</option>
<else />
<option value="{$vo.paytag}">{$vo.name}</option>
</if>
</volist>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">限制规则</td>
<td class="r table_radio">
<span class="form_select-text">说明:设置限制条件和限制额度</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">全渠道总流水限制</td>
<td class="r table_radio">
<input type="text" class="" name="total_limit" value="{$data.total_limit}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">玩家全渠道总流水限制</td>
<td class="r table_radio">
<input type="text" class="" name="user_total_limit" value="{$data.user_total_limit}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">玩家单笔限制</td>
<td class="r table_radio">
<input type="text" class="" name="user_one_limit" value="{$data.user_one_limit}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">限制方式 </td>
<td class="r table_radio">
<span class="form_select">
<select name="limit_type">
<option value="force" <eq name="data.limit_type" value="force"> selected </eq>>强制限制</option>
<option value="obstacles" <eq name="data.limit_type" value="obstacles"> selected </eq>>支付体验障碍</option>
</select>
</span>
<span class="notice-text">说明:强制限制和支付体验障碍</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">限制时间</td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="daily" <eq name="data['limit_time_type']" value="day">checked="checked"</eq>> 每日</label>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="day_inp1" name="daily_start1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="day_inp2" name="daily_start2" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start3" id="day_inp3" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="day_inp4" name="daily_start4" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start5" id="day_inp5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="day_inp6" name="daily_start6" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start7" id="day_inp7" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="day_inp8" name="daily_start8" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start9" id="day_inp9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="day_inp10" name="daily_start10" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start11" id="day_inp11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="day_inp12" name="daily_start12" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
</span>
<span class="notice-text">说明:时间格式(24小时制,时间设置范围00:00:00 23:59:59)</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="week" <eq name="data['limit_time_type']" value="week">checked="checked"</eq> /> 每周</label>
<span class="form_select" style="margin-left:5px">
<select name="week_remark">
<option value="1" <eq name="data['limit_time_type_remark']" value="1">selected</eq> >周一</option>
<option value="2" <eq name="data['limit_time_type_remark']" value="2">selected</eq>>周二</option>
<option value="3" <eq name="data['limit_time_type_remark']" value="3">selected</eq>>周三</option>
<option value="4" <eq name="data['limit_time_type_remark']" value="4">selected</eq>>周四</option>
<option value="5" <eq name="data['limit_time_type_remark']" value="5">selected</eq>>周五</option>
<option value="6" <eq name="data['limit_time_type_remark']" value="6">selected</eq>>周六</option>
<option value="7" <eq name="data['limit_time_type_remark']" value="7">selected</eq>>周天</option>
</select>
</span>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" id="week_inp1" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start1">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="week_inp2" maxlength="1" name="week_start2" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp3" name="week_start3" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp4"name="week_start4" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start5" id="week_inp5" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start6" id="week_inp6" value="" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="week_inp7" name="week_start7" maxlength="1" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="week_inp8" maxlength="1" name="week_start8" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp9" name="week_start9" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp10" name="week_start10" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="week_start11" maxlength="1" id="week_inp11" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="week_start12" id="week_inp12" maxlength="1" value="" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="month" <eq name="data['limit_time_type']" value="month">checked="checked"</eq>/> 每月</label>
<span class="form_select" style="margin-left:5px">
<select name="month_remark">
<volist name="monthday" id="vo" key='k'>
<if condition="$vo eq $data[limit_time_type_remark]">
<option value="{$vo}" selected>{$vo}日</option>
<else />
<option value="{$vo}">{$vo}日</option>
</if>
</volist>
</select>
</span>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start1" id="month_inp1" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="month_inp2" name="month_start2" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start3" maxlength="1" id="month_inp3" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="month_inp4" name="month_start4" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="month_inp5" name="month_start5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="month_inp6" maxlength="1" name="month_start6" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start7" maxlength="1" id="month_inp7" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="month_inp8" name="month_start8" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start9" maxlength="1" id="month_inp9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="month_inp10" name="month_start10" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="month_inp11" name="month_start11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="month_inp12" maxlength="1" name="month_start12" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="day" <eq name="data['limit_time_type']" value="fix">checked="checked"</eq>/> 特殊</label>
<div class="input-list" >
<input type="text" readonly id="time-start" name="day_remark" class="" value=""
placeholder="日期"/>
</div>
</span>
<div class="input-list" style="margin-left:17px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="fix_inp1" name="day_start1" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp2" maxlength="1" name="day_start2" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="day_start3" id="fix_inp3" maxlength="1" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp4" maxlength="1" name="day_start4" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp5" name="day_start5" maxlength="1" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp6" maxlength="1" name="day_start6" value="" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="day_start7" maxlength="1" id="fix_inp7" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="fix_inp8" name="day_start8" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="day_start9" id="fix_inp9" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="fix_inp10" name="day_start10" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="day_start11" id="fix_inp11" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="fix_inp12"name="day_start12" value="" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="form-item">
<input type="hidden" name="id" value="{$data.id|default=''}">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">保 存</button>
<button class="submit_btn " onclick="javascript:history.back(-1);return false;">返 回</button>
</div>
</form>
</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="{$m_url}">
</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>
var limit_type = '{$data.limit_time_type}'
var fixdate = '{$data.limit_time_type_remark}'
var starttime = '{$startTime}'
var starttimeArr = starttime.split("");
var endtime = '{$endTime}'
var endtimeArr = endtime.split("")
if (limit_type == 'day') {
document.getElementById('day_inp1').value = starttimeArr[0]
document.getElementById('day_inp2').value = starttimeArr[1]
document.getElementById('day_inp3').value = starttimeArr[2]
document.getElementById('day_inp4').value = starttimeArr[3]
document.getElementById('day_inp5').value = starttimeArr[4]
document.getElementById('day_inp6').value = starttimeArr[5]
document.getElementById('day_inp7').value = endtimeArr[0]
document.getElementById('day_inp8').value = endtimeArr[1]
document.getElementById('day_inp9').value = endtimeArr[2]
document.getElementById('day_inp10').value = endtimeArr[3]
document.getElementById('day_inp11').value = endtimeArr[4]
document.getElementById('day_inp12').value = endtimeArr[5]
}
if (limit_type == 'week') {
document.getElementById('week_inp1').value = starttimeArr[0]
document.getElementById('week_inp2').value = starttimeArr[1]
document.getElementById('week_inp3').value = starttimeArr[2]
document.getElementById('week_inp4').value = starttimeArr[3]
document.getElementById('week_inp5').value = starttimeArr[4]
document.getElementById('week_inp6').value = starttimeArr[5]
document.getElementById('week_inp7').value = endtimeArr[0]
document.getElementById('week_inp8').value = endtimeArr[1]
document.getElementById('week_inp9').value = endtimeArr[2]
document.getElementById('week_inp10').value = endtimeArr[3]
document.getElementById('week_inp11').value = endtimeArr[4]
document.getElementById('week_inp12').value = endtimeArr[5]
}
if (limit_type == 'month') {
document.getElementById('month_inp1').value = starttimeArr[0]
document.getElementById('month_inp2').value = starttimeArr[1]
document.getElementById('month_inp3').value = starttimeArr[2]
document.getElementById('month_inp4').value = starttimeArr[3]
document.getElementById('month_inp5').value = starttimeArr[4]
document.getElementById('month_inp6').value = starttimeArr[5]
document.getElementById('month_inp7').value = endtimeArr[0]
document.getElementById('month_inp8').value = endtimeArr[1]
document.getElementById('month_inp9').value = endtimeArr[2]
document.getElementById('month_inp10').value = endtimeArr[3]
document.getElementById('month_inp11').value = endtimeArr[4]
document.getElementById('month_inp12').value = endtimeArr[5]
}
if (limit_type == 'fix') {
console.log(limit_type)
console.log(fixdate)
document.getElementById('time-start').value = fixdate
document.getElementById('fix_inp1').value = starttimeArr[0]
document.getElementById('fix_inp2').value = starttimeArr[1]
document.getElementById('fix_inp3').value = starttimeArr[2]
document.getElementById('fix_inp4').value = starttimeArr[3]
document.getElementById('fix_inp5').value = starttimeArr[4]
document.getElementById('fix_inp6').value = starttimeArr[5]
document.getElementById('fix_inp7').value = endtimeArr[0]
document.getElementById('fix_inp8').value = endtimeArr[1]
document.getElementById('fix_inp9').value = endtimeArr[2]
document.getElementById('fix_inp10').value = endtimeArr[3]
document.getElementById('fix_inp11').value = endtimeArr[4]
document.getElementById('fix_inp12').value = endtimeArr[5]
}
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Tool/limitPay')}');
$(function () {
Think.setValue("type", {$info.type|default=0});
Think.setValue("category", {$info.category|default=0});
$("#category").change();
Think.setValue("group", {$info.group|default=0});
})
$("#category").change(function(){
$.ajax({
type:"POST",
dataType:"json",
async:false,
data:{category:$("#category").val()},
url:"{:U('Ajax/getConfigCategory')}",
success:function (data) {
$("#group").empty();
var str = "<option value='0'>不分类</option>";
for(var i in data){
str += "<option value="+i+">"+data[i]+"</option>";
}
$("#group").append(str);
}
})
})
</script>
<script>
$('#time-start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
showMeridian:true,
pickDate:true,
minView: 2,
autoclose: true,
pickTime:true,
todayBtn:true,
minuteStep: 1,//分钟间隔1分钟
}).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:"hh:ii:ss",
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,145 @@
<extend name="Public/base"/>
<block name="body">
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">支付限额规则配置</h3>
<p class="description_text">说明:配置支付规则,控制支付渠道</p>
</div>
<div class="cf top_nav_list">
<div class="fl button_list">
<a class="" href="{:U('addLimitPay')}"><span class="button_icon button_icon1"></span>新增规则</a>
<!-- <a class=" list_sort" url="{:U('sort?group='.I('group'),'','')}"><span class="button_icon button_icon18"></span>排序</a> -->
</div>
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list input-list-game search_label_rehab">
<select id="game_type" name="pay_type" class="select_gallery" >
<option value="" <eq name="pay_type" value=" "> selected </eq>>请选择支付渠道</option>
<option value="alipay" <eq name="pay_type" value="alipay"> selected </eq>>支付宝</option>
<option value="wxpay" <eq name="pay_type" value="wxpay"> selected </eq>>微信</option>
<option value="yeepay" <eq name="pay_type" value="yeepay"> selected </eq>>易宝支付</option>
<option value="sqpay" <eq name="pay_type" value="sqpay"> selected </eq>>双乾</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_type" name="limit_type" class="select_gallery" >
<option value="" <eq name="limit_type" value=" "> selected </eq>>请选择限制类型</option>
<option value="force" <eq name="limit_type" value="force"> selected </eq>>强制限制</option>
<option value="obstacles" <eq name="limit_type" value="obstacles"> selected </eq>>障碍类型</option>
</select>
</div>
<div class="sleft">
<!-- <input type="text" name="name" class="search-input" value="{:I('name')}" placeholder="配置名称"> -->
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Tool/limitPay',array('row'=>I('row')))}">搜索</a>
</div>
</div>
</div>
<div class="data_list">
<table>
<thead>
<tr>
<th>限制序号</th>
<th>限制支付渠道</th>
<th>限制规则</th>
<th>限制方式</th>
<th>限制时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<notempty name="datas">
<volist name="datas" id="data">
<tr>
<td>{$data.id}</td>
<td>{$data.pay_type}</td>
<td>{$data.limit_rule}</td>
<td>{$data.limit_type}</td>
<td>{$data.limit_time}</td>
<td>
<a title="编辑" href="{:U('editLimitPay?id='.$data['id'])}">编辑</a>
<a class="confirm ajax-get" title="删除" href="{:U('delLimitPay?id='.$data['id'])}">删除</a>
</td>
</tr>
</volist>
<else/>
<td colspan="6" class="text-center">aOh! 暂时还没有内容!</td>
</notempty>
</tbody>
</table>
<!-- 分页 -->
<div class="page">
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>30,'xlsname'=>'支付限额配置'),I('get.')))}">导出</a>
{$_page}
</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="{$m_url}">
</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">
highlight_subnav('{:U('Tool/limitPay')}');
Think.setValue('row','{:I("row",10)}');
$(function(){
//搜索功能
$("#search").click(function(){
console.log('0000')
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
console.log('vvv',query)
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url;
});
//回车搜索
$(".search-input").keyup(function(e){
if(e.keyCode === 13){
$("#search").click();
return false;
}
});
//点击排序
$('.list_sort').click(function(){
var url = $(this).attr('url');
var ids = $('.ids:checked');
var param = '';
if(ids.length > 0){
var str = new Array();
ids.each(function(){
str.push($(this).val());
});
param = str.join(',');
}
if(url != undefined && url != ''){
window.location.href = url + '/ids/' + param;
}
});
});
</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;">-->
<!--&lt;!&ndash; 高级搜索 &ndash;&gt;-->
<!--<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="开始时间" />-->
<!--&nbsp;-&nbsp;-->
<!--<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>

@ -9,6 +9,7 @@
<if condition="ACTION_NAME eq index and CONTROLLER_NAME eq Index">
<title>{:seo_replace(C('channel_index.seo_title'),'','channel')}_{:C('CH_SET_TITLE')}</title>
<meta name="description" content="首页 登录 欢迎您回来!"/>
<meta name="robots" content="noarchive">
<meta property="og:description" content="首页 登录 欢迎您回来!"/>
<meta property="og:title" content="{:seo_replace(C('channel_index.seo_title'),'','channel')}_{:C('CH_SET_TITLE')}"/>
<meta property="og:image" content="{:get_cover(C('CH_SET_ICO'),'path')}"/>

@ -2,6 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noarchive">
<title>{$meta_title}</title>
<link href="__CSS__/20170831/iconfont.css" rel="stylesheet" type="text/css">
<link href="__CSS__/20170831/select2.min.css" rel="stylesheet" type="text/css" />

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noarchive">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{$meta_title}-个人中心</title>
<link href="__CSS__/20170831/iconfont.css" rel="stylesheet" type="text/css">

@ -2,6 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noarchive">
<title>{$meta_title}-个人中心</title>
<link href="__CSS__/20170831/iconfont.css" rel="stylesheet" type="text/css">
<link href="__CSS__/20170831/select2.min.css" rel="stylesheet" type="text/css" />

@ -1496,3 +1496,37 @@ ALTER TABLE `tab_user`
ADD INDEX `index_device_ip` (`device_number`, `last_login_ip`) USING BTREE ;
ALTER TABLE `tab_user`
ADD COLUMN `is_repeat` tinyint(1) not null default 0 comment '是否重复用户[设备/IP]';
-- 添加支付白名单表与支付渠道意向表 zyx 2020/03/23
CREATE TABLE `tab_user_pay_whitelist` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT 0 COMMENT '用户id',
`user_account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户账号',
`status` tinyint(2) NULL DEFAULT 0 COMMENT '状态 0:7日有效 1:30日有效 2:永久有效',
`update_time` int(11) NULL DEFAULT 0 COMMENT '更新时间',
`create_time` int(11) NULL DEFAULT 0 COMMENT '创建时间',
`time` int(11) NULL DEFAULT 0 COMMENT '有效时间 单位秒 1表示永久有效',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
CREATE TABLE `tab_pay_channel_intention` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT 0 COMMENT '用户id',
`user_account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户账号',
`pay_way` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '1' COMMENT '1:alipay:支付宝,2:wxpay:微信 3:sqshorcut:双乾支付 4:shorcut:易宝支付',
`pay_amount` int(11) NULL DEFAULT 0 COMMENT '支付金额',
`pay_order_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '支付订单号',
`create_time` int(11) NULL DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
ALTER TABLE `tab_pay_channel_intention`
ADD COLUMN `pay_status` tinyint(2) NULL DEFAULT 0 COMMENT '支付状态 0未支付 1已支付' AFTER `create_time`;
ALTER TABLE `tab_pay_channel_intention`
ADD COLUMN `pay_game_status` tinyint(2) NULL DEFAULT 0 COMMENT '支付状态 0未支付 1已支付' AFTER `create_time`;
CREATE TABLE `tab_pay_intention_num` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`num` int(11) NULL DEFAULT 0 COMMENT '支付意愿支付次数',
`pay_order_number` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '支付单号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = INNODB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
Loading…
Cancel
Save