Merge branch 'release' of 47.111.118.107:wmtx/platform into release
commit
e670dfcf7c
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
use Org\Util\Date;
|
||||
use Sdk\Controller\AgeController;
|
||||
use User\Api\MemberApi as MemberApi;
|
||||
use Org\WeixinSDK\Weixin;
|
||||
|
||||
class TestOrderController extends ThinkController
|
||||
{
|
||||
public function lists($p = 0) {
|
||||
$page = intval($p);
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
$arraypage = $page;
|
||||
|
||||
if (isset($_REQUEST['row'])) {
|
||||
$row = $_REQUEST['row'];
|
||||
} else {
|
||||
$row = 10;
|
||||
}
|
||||
|
||||
$map['1'] = "1";
|
||||
if (!empty($_REQUEST['server_type'])) {
|
||||
$map['server_type'] = $_REQUEST['server_type'];
|
||||
}
|
||||
if (!empty($_REQUEST['order_type'])) {
|
||||
$map['order_type'] = $_REQUEST['order_type'];
|
||||
}
|
||||
if (!empty($_REQUEST['order_no'])) {
|
||||
$map['order_no'] = $_REQUEST['order_no'];
|
||||
}
|
||||
if (!empty($_REQUEST['user_account'])) {
|
||||
$map['user_account'] = $_REQUEST['user_account'];
|
||||
}
|
||||
if (!empty($_REQUEST['pay_way'])) {
|
||||
$map['pay_way'] = $_REQUEST['pay_way'];
|
||||
}
|
||||
if(!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])){
|
||||
$timestart = strtotime($_REQUEST['timestart']);
|
||||
$timeend = strtotime($_REQUEST['timeend'])+86399;
|
||||
$map['pay_time'] = array("between",array($timestart,$timeend));
|
||||
}else if(!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) {
|
||||
$timestart = strtotime($_REQUEST['timestart']);
|
||||
$map['pay_time'] = array("EGT",$timestart);
|
||||
}else if (!empty($_REQUEST['timeend']) && empty($_REQUEST['timestart'])) {
|
||||
$timeend = strtotime($_REQUEST['timeend'])+86399;
|
||||
$map['pay_time'] = array("ELT",$timeend);
|
||||
}
|
||||
$order_list = M('test_order', 'tab_')->where($map)->select();
|
||||
$sum_order_amount = M('test_order', 'tab_')->where($map)->field('sum(order_amount) as sum_order_amount')->find();
|
||||
$sum_pay_amount = M('test_order', 'tab_')->where($map)->field('sum(pay_amount) as sum_order_amount')->find();
|
||||
$this->assign('datas', $order_list);
|
||||
$this->assign('sum_order_amount', $sum_order_amount);
|
||||
$this->assign('sum_pay_amount', $sum_pay_amount);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function addOrder(){
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function saveOrder() {
|
||||
|
||||
$data = $_GET;
|
||||
|
||||
// dump($data);die();
|
||||
$data['add_time'] = time();
|
||||
$data['pay_time'] = strtotime($data['pay_time']);
|
||||
$data['game_name'] = get_gamename($data['game_id']);
|
||||
|
||||
$isSuccess = M('test_order','tab_')->add($data);
|
||||
|
||||
if ($isSuccess) {
|
||||
$this->ajaxReturn(['status'=>1]);
|
||||
} else {
|
||||
$this->ajaxReturn(['status'=>0]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,281 @@
|
||||
<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;}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
|
||||
<h3 class="page_title">{$_REQUEST['game_name']}测试统计</h3>
|
||||
<p class="description_text"></p>
|
||||
</div>
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list">
|
||||
<!--游戏类型搜索END-->
|
||||
|
||||
<div class="input-list input-list-server search_label_rehab">
|
||||
<select id="server_type" name="server_type" class="select_gallery" style="width:120px;">
|
||||
<option value="">选择服务器类型</option>
|
||||
<option value="1" <if condition="$_GET['server_type'] eq '1'">selected</if>>测试内网</option>
|
||||
<option value="2" <if condition="$_GET['server_type'] eq '2'">selected</if>>测试外网</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-server search_label_rehab">
|
||||
<select id="order_type" name="order_type" class="select_gallery" style="width:120px;">
|
||||
<option value="">选择订单类型</option>
|
||||
<option value="1" <if condition="$_GET['order_type'] eq '1'">selected</if>>sdk充值订单</option>
|
||||
<option value="2" <if condition="$_GET['order_type'] eq '2'">selected</if>>平台币充值订单</option>
|
||||
<option value="3" <if condition="$_GET['order_type'] eq '3'">selected</if>>超级签充值订单</option>
|
||||
<option value="0" <if condition="$_GET['order_type'] eq '0'">selected</if>>未知</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" name="order_no" placeholder="请输入支付订单号" class="" value="{:I('order_no')}" style="width: 180px"/>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" name="user_account" placeholder="请输入测试账号" class="" value="{:I('user_account')}" style="width: 180px"/>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" id="time-start" name="timestart" class="" value="{:I('timestart')}" placeholder="开始时间" autocomplete="off"/>
|
||||
-
|
||||
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
||||
<input type="text" id="time-end" name="timeend" class="" value="{:I('timeend')}" placeholder="结束时间" autocomplete="off"/>
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-list input-list-server search_label_rehab">
|
||||
<select id="pay_way" name="pay_way" class="select_gallery" style="width:120px;">
|
||||
<option value="">请选择支付渠道</option>
|
||||
<option value="1" <if condition="$_GET['pay_way'] eq '1'">selected</if>>支付宝</option>
|
||||
<option value="2" <if condition="$_GET['pay_way'] eq '2'">selected</if>>微信(扫码)</option>
|
||||
<option value="3" <if condition="$_GET['pay_way'] eq '3'">selected</if>>微信app</option>
|
||||
<option value="4" <if condition="$_GET['pay_way'] eq '4'">selected</if>>威富通</option>
|
||||
<option value="5" <if condition="$_GET['pay_way'] eq '5'">selected</if>>聚宝云</option>
|
||||
<option value="6" <if condition="$_GET['pay_way'] eq '6'">selected</if>>竣付通</option>
|
||||
<option value="7" <if condition="$_GET['pay_way'] eq '7'">selected</if>>金猪</option>
|
||||
<option value="9" <if condition="$_GET['pay_way'] eq '9'">selected</if>>双乾支付-支付宝</option>
|
||||
<option value="10" <if condition="$_GET['pay_way'] eq '10'">selected</if>>双乾支付-银联</option>
|
||||
<option value="15" <if condition="$_GET['pay_way'] eq '15'">selected</if>>双乾支付-快捷</option>
|
||||
<option value="0" <if condition="$_GET['pay_way'] eq '0'">selected</if>>平台币</option>
|
||||
<option value="-1" <if condition="$_GET['pay_way'] eq '-1'">selected</if>>绑币</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search" url="{:U('TestOrder/lists','model='.$model['name'].'&row='.I('row'),false)}" style="">搜索</a>
|
||||
|
||||
<!--<if condition="$_GET['all'] neq 1">
|
||||
<a class="sch-btn" href="{:U('PayChannel/export_testDetail',
|
||||
array_merge(array('xlsname'=>'测试游戏订单查看导出'),I('get.')))}">导出</a>
|
||||
</if>-->
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="upstream" style="width: 80px">订单录入</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th >服务器类型</th>
|
||||
|
||||
<th >订单类型</th>
|
||||
|
||||
<th >支付订单号</th>
|
||||
|
||||
<if condition="$_GET['model'] neq 'game_supersign'"><th>cp订单号</th></if>
|
||||
|
||||
<th >测试账号</th>
|
||||
|
||||
<th >充值时间</th>
|
||||
|
||||
<if condition="$_GET['model'] neq 'deposit'"><th >游戏名称</th></if>
|
||||
|
||||
<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($datas)">
|
||||
<tr>
|
||||
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
</if>
|
||||
<notemtpy name = "datas">
|
||||
<volist name="datas" id="data">
|
||||
<tr>
|
||||
<td ><if condition="data['order_type'] eq '1'">测试内网<else/>测试外网</if></td>
|
||||
<td >{$data.order_type|get_order_type}</td>
|
||||
<td >{$data.order_no}</td>
|
||||
<td >{$data.cp_order_no}</td>
|
||||
<td >{$data.user_account}</td>
|
||||
<td >{$data.pay_time|date='Y-m-d H:i:s',###}</td>
|
||||
<td >{$data.game_name}</td>
|
||||
<td >{$data.order_amount}</td>
|
||||
<td >{$data.pay_amount}</td>
|
||||
<td >{$data.pay_way|get_pay_way}</td>
|
||||
<td >{$data.add_time|date='Y-m-d H:i:s',###}</td>
|
||||
</tr>
|
||||
</volist>
|
||||
<tr>
|
||||
<td >总计</td>
|
||||
<td >------</td>
|
||||
<td >------</td>
|
||||
<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>
|
||||
<td >------</td>
|
||||
</tr>
|
||||
</notemtpy>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
|
||||
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
||||
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
|
||||
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
|
||||
<script type="text/javascript">
|
||||
$(".select_gallery").select2();
|
||||
$(function(){
|
||||
|
||||
$('.page a').click(function () {
|
||||
var href = $(this).attr('href');
|
||||
$(this).removeAttr('href');
|
||||
window.location.replace(href)
|
||||
console.log(href)
|
||||
});
|
||||
|
||||
$('#time-start').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
showMeridian:true,
|
||||
pickDate:true,
|
||||
minView: 2,
|
||||
autoclose: true,
|
||||
pickTime:true,
|
||||
todayBtn:true,
|
||||
}).on('change',function(ev){
|
||||
var val = new Date($.trim($(this).val())).getTime();
|
||||
var end = new Date($.trim($('#time-end').val())).getTime();
|
||||
if (val>end) {
|
||||
layer.msg('开始时间大于结束时间!');$(this).val('');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#time-end").datetimepicker({
|
||||
format:"yyyy-mm-dd",
|
||||
language: "zh-CN",
|
||||
showMeridian:true,
|
||||
minView:2,
|
||||
autoclose:true,
|
||||
todayBtn:true,
|
||||
}).on('change',function(ev){
|
||||
var val = new Date($.trim($(this).val())).getTime();
|
||||
var start = new Date($.trim($('#time-start').val())).getTime();
|
||||
if (val<start) {
|
||||
layer.msg('开始时间大于结束时间!');$(this).val('');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
//搜索功能
|
||||
$("#search").click(function(){
|
||||
var starttime = $.trim($('#time-start').val());
|
||||
var endtime = $.trim($('#time-end').val());
|
||||
|
||||
if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}
|
||||
|
||||
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.jssearch').find('input').serialize();
|
||||
query += "&" + $('.jssearch').find('select').serialize();
|
||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
||||
query = query.replace(/^&/g,'');
|
||||
if( url.indexOf('?')>0 ){
|
||||
url += '&' + query;
|
||||
}else{
|
||||
url += '?' + query;
|
||||
}
|
||||
window.location.replace(url);
|
||||
});
|
||||
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
$("#upstream").click(function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "测试订单录入",
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['500px', '600px'],
|
||||
content:'/admin.php?s=/TestOrder/addOrder/'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</block>
|
Loading…
Reference in New Issue