Merge branch 'release' of 47.111.118.107:wmtx/platform into release

master
yulingwei 5 years ago
commit e670dfcf7c

@ -317,6 +317,31 @@ function get_pay_way($id=null)
break;
}
}
/**
* 获取订单类型
*
* @param null $id
* @return string
*/
function get_order_type($id=null)
{
switch ($id) {
case 1:
return "sdk充值订单";
break;
case 2:
return "平台币充值订单";
break;
case 3:
return "超级签充值订单";
break;
default:
return '未知';
break;
}
}
function get_pay_way_map($id) {
if(!isset($id)){

@ -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,297 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<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__/juicer-min.js" type="text/javascript"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0 0 0;
margin: auto;
}
.tabcon1711 table{
width: 480px;
}
table{
margin: auto;
}
.hidebox{
display: none;
}
.r{
width: 300px;
}
.l{
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0 3px 3px #F7F8F9 inset;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
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;
}
</style>
<body>
<div style="display: flex;margin: auto;">
<div class="tab-content tabcon1711" id="firstPartBaseInfo">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">服务器类型:</td>
<td class="r">
<select id="server_type" name="server_type" class="select_gallery">
<option value="1">测试内网</option>
<option value="2">测试外网</option>
</select>
</td>
</tr>
<tr>
<td class="l">订单类型:</td>
<td class="r">
<select id="order_type" name="order_type" class="select_gallery">
<option value="1">sdk充值订单</option>
<option value="2">平台币充值订单</option>
<option value="3">超级签充值订单</option>
<option value="0">未知订单</option>
</select>
</td>
</tr>
<tr>
<td class="l">支付订单号:</td>
<td class="r">
<input type="text" class="txt" name="order_no" id="order_no" value="" placeholder="请输入支付订单号">
</td>
</tr>
<tr>
<td class="l">CP订单号</td>
<td class="r">
<input type="text" class="txt" name="cp_order_no" id="cp_order_no" value="" placeholder="请输入CP订单号">
</td>
</tr>
<tr>
<td class="l">测试账号:</td>
<td class="r">
<input type="text" class="txt" name="user_account" id="user_account" value="" placeholder="请输入测试账号">
</td>
</tr>
<tr>
<td class="l">选择游戏:</td>
<td class="r">
<select id="game_name" name="game_id" class="select_gallery" >
<option value="">游戏名称</option>
</select>
</td>
</tr>
<tr>
<td class="l">订单金额:</td>
<td class="r">
<input type="text" class="txt" name="order_amount" id="order_amount" value="" placeholder="请输入订单金额">
</td>
</tr>
<tr>
<td class="l">实付金额:</td>
<td class="r">
<input type="text" class="txt" name="pay_amount" id="pay_amount" value="" placeholder="请输入实付金额">
</td>
</tr>
<tr>
<td class="l">充值方式:</td>
<td class="r">
<select id="pay_way" name="pay_way" class="select_gallery">
<option value="1">支付宝</option>
<option value="2">微信(扫码)</option>
<option value="3">微信app</option>
<option value="4">威富通</option>
<option value="5">聚宝云</option>
<option value="6">竣付通</option>
<option value="7">金猪</option>
<option value="9">双乾支付-支付宝</option>
<option value="10">双乾支付-银联</option>
<option value="15">双乾支付-快捷</option>
<option value="0">平台币</option>
<option value="-1">绑币</option>
</select>
</td>
</tr>
<tr>
<td class="l">充值时间:</td>
<td class="r">
<input type="text" class="txt" name="pay_time" value="" id="datetimepicker" placeholder="请选择充值时间" readonly>
</td>
</tr>
</tbody>
</table>
<div class="jssearch fl cf search_list" style="width: 100%;text-align: center">
<a class="sch-btn" href="javascript:;" id="jssearch" url="{:U('TestOrder/saveOrder','model='.$model['name'] .'&row='.I('row'),false)}" style="width: 120px">提交保存</a>
</div>
</div>
</div>
<script>
$(function(){
$('#datetimepicker').datetimepicker({
format: 'yyyy-mm-dd hh:ii:ss',
language: "zh-CN",
minView: 2,
endDate:new Date(),
autoclose: true,
pickerPosition: 'bottom-left'
})
EVENT.changeCompany();
EVENT.createStatement();
$("#first_partner_id").change();//默认甲方只能是我们公司
});
function get_game_list()
{
var game_name = "{:I('game_id')}";
$.ajax({
url:"{:U('PayChannel/getGameList')}",
type:"post",
data:{partner_id:$("#partner_id option:selected").val(), sdk_type:$("#sdk_version1 option:selected").val()},
dataType:'json',
success:function(data){
var str = "<option value=''>请选择游戏</option>";
for (var i in data){
str += "<option value='"+data[i].id+"'"+(game_name && data[i].id == game_name?'selected':'')+">"+data[i].game_name+"</option>"
}
// console.log(str);
$("#game_name").empty();
$("#game_name").append(str);
$("#game_name").select2();
}
})
}
get_game_list();
</script>
<script type="text/javascript">
//搜索功能
$("#jssearch").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 = $('table').find('input').serialize();
query += "&" + $('table').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
if (!$('#server_type').val()) {
layer.msg("服务器类型不能为空");
return;
}
if (!$('#order_type').val()) {
layer.msg("订单类型不能为空");
return;
}
if (!$('#order_no').val()) {
layer.msg("支付订单号不能为空");
return;
}
if (!$('#cp_order_no').val()) {
layer.msg("cp订单号不能为空");
return;
}
if (!$('#user_account').val()) {
layer.msg("测试账号不能为空");
return;
}
if (!$('#game_name').val()) {
layer.msg("游戏不能为空");
return;
}
if (!$('#order_amount').val()) {
layer.msg("订单金额不能为空");
return;
}
if (!$('#pay_amount').val()) {
layer.msg("实付不能为空");
return;
}
if (!$('#pay_way').val()) {
layer.msg("支付方式不能为空");
return;
}
if (!$('#datetimepicker').val()) {
layer.msg("充值时间不能为空");
return;
}
$.ajax({
url:url,
type:"post",
dataType:'json',
success:function(data){
console.log(data);
if (data.status == 1) {
window.parent.reload();
} else {
layer.msg("测试订单录入失败");
}
}
})
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
</script>
</body>
</html>

@ -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"/>&nbsp;
</div>
<div class="input-list">
<input type="text" name="user_account" placeholder="请输入测试账号" class="" value="{:I('user_account')}" style="width: 180px"/>&nbsp;
</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…
Cancel
Save