修改结构
parent
17a7045036
commit
1a0175e583
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace Base\Service;
|
||||
|
||||
use Base\Facade\Request;
|
||||
|
||||
class AgentService {
|
||||
|
||||
public function addRecord($params)
|
||||
{
|
||||
$data = M('agent', 'tab_')->create($params);
|
||||
if(!$data){
|
||||
return $this->getError();
|
||||
}
|
||||
$status = M('agent', 'tab_')->add($data);
|
||||
if ($status) {
|
||||
$id = M()->getLastInsID();
|
||||
return $id;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
namespace Base\Service;
|
||||
|
||||
class PromoteCoinTransferLogService {
|
||||
|
||||
public static $targetTypes = [
|
||||
1 => '推广员',
|
||||
2 => '玩家',
|
||||
3 => '管理员',
|
||||
];
|
||||
|
||||
public function addRecord($params)
|
||||
{
|
||||
$data = $this->createRecord($params);
|
||||
$status = M('promote_coin_transfer_log', 'tab_')->add($data);
|
||||
if ($status) {
|
||||
$id = M()->getLastInsID();
|
||||
return $id;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public function getTargetTypeText($targetType, $targetLevel)
|
||||
{
|
||||
if ($targetType == 1) {
|
||||
return PromoteService::$levels[$targetLevel] ?? '未知';
|
||||
} else {
|
||||
return self::$targetTypes[$targetType] ?? '未知';
|
||||
}
|
||||
}
|
||||
|
||||
public function createRecord($params)
|
||||
{
|
||||
$sn = '';
|
||||
if (isset($params['sn'])) {
|
||||
$sn = $params['sn'];
|
||||
} else {
|
||||
$sn = date('YmdHis').strtoupper(substr(md5(json_encode($params) . 'PromoteCoinTransferLog' . rand(0, 99999)), 8, 16));
|
||||
}
|
||||
$data = [];
|
||||
$data['sn'] = $sn;
|
||||
$data['promote_id'] = $params['promote_id'];
|
||||
$data['target_type'] = $params['target_type'];
|
||||
$data['target_level'] = $params['target_level'];
|
||||
$data['target_id'] = $params['target_id'];
|
||||
$data['game_id'] = $params['game_id'];
|
||||
$data['num'] = $params['num'];
|
||||
$data['status'] = 1;
|
||||
$data['create_time'] = time();
|
||||
$data['remark'] = isset($params['remark']) ? $params['remark'] : '';
|
||||
$data['description'] = isset($params['description']) ? $params['description'] : '';
|
||||
return $data;
|
||||
}
|
||||
}
|
@ -0,0 +1,281 @@
|
||||
<extend name="Public/promote_base"/>
|
||||
<block name="css">
|
||||
<link rel="stylesheet" href="__CSS__/20170831/select2.min.css" type="text/css"/>
|
||||
<link href="__CSS__/20180207/data.css" rel="stylesheet">
|
||||
<link href="__CSS__/20180207/game.css" rel="stylesheet">
|
||||
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
|
||||
<link href="__CSS__/game_detailed.css" rel="stylesheet">
|
||||
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
|
||||
|
||||
<style type="text/css">
|
||||
.trunk-list {
|
||||
position: relative;
|
||||
min-height: 66vh;
|
||||
}
|
||||
|
||||
.pagenation {
|
||||
text-align: center;
|
||||
line-height: 5vh;
|
||||
}
|
||||
|
||||
.lwx_dialog_prompt .layui-layer-content {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.lwx_dialog_title {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.launch_platform_prompt .layui-layer-input, .lwx_dialog_input, .lwx_dialog_select, .lwx_dialog_textarea {
|
||||
display: block;
|
||||
width: 220px;
|
||||
height: 32px;
|
||||
margin: 0 auto;
|
||||
line-height: 32px;
|
||||
padding: 0 5px;
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 1px 1px 5px rgba(0, 0, 0, .1) inset;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.lwx_dialog_select {
|
||||
width: 272px;
|
||||
}
|
||||
|
||||
.lwx_dialog_textarea {
|
||||
height: 64px;
|
||||
width: 260px;
|
||||
margin-top: 10px;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.lwx_dialog_input {
|
||||
width: 260px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.launch_platform_prompt .layui-layer-btn, .lwx_dialog_prompt .layui-layer-btn {
|
||||
text-align: center;
|
||||
padding-bottom: 25px;
|
||||
}
|
||||
|
||||
.launch_platform_prompt .layui-layer-btn .layui-layer-btn0, .lwx_dialog_prompt .layui-layer-btn .layui-layer-btn0 {
|
||||
width: 81%;
|
||||
line-height: 32px;
|
||||
height: 32px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.lwx_dialog_notice {
|
||||
position: absolute;
|
||||
bottom: 6px;
|
||||
left: 20px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.lwx_dialog_prompt .select2-container, .select2-container--default .select2-selection--single {
|
||||
width: 272px !important;
|
||||
}
|
||||
|
||||
.applycbtn {
|
||||
display: block;
|
||||
color: #50B370;
|
||||
}
|
||||
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.trunk-content {
|
||||
margin: 0 2%;
|
||||
}
|
||||
|
||||
.pic-prev:hover, .pic-next:hover {
|
||||
background-color: #4ac5c3;
|
||||
}
|
||||
|
||||
.add-disable {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.trunk-search .form-group {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
</block>
|
||||
|
||||
<block name="body">
|
||||
<div class="page-list normal_list apply-index-list jssearch">
|
||||
<div style="position: absolute;margin: .6% 2% 0 2%;margin-top: -30px;color: #6a7082;">
|
||||
<span class="back-btn" style="cursor: pointer;"><i class="iconfont iconreply"></i> 返回</span>
|
||||
</div>
|
||||
<div class="trunk-title">
|
||||
<div class="location">
|
||||
<div class="location-container">当前位置:<span>平台币管理></span><span>我的平台币></span><span>交易明细</span></div>
|
||||
</div>
|
||||
<img src="__IMG__/20180207/icon_jilu.png"><span class="title_main">交易明细</span>
|
||||
</div>
|
||||
<div class="trunk-content article">
|
||||
<div class="trunk-search clearfix">
|
||||
<!-- <form action="{:U('PromoteCoin/coinRecord',array('game_id'=>I('get.game_id')))}" method="post" enctype="multipart/form-data"-->
|
||||
<!-- class="marg_top20">-->
|
||||
<div class="form-group normal_space fr">
|
||||
<input type="submit" class="submit" id='submit' url="{:U('PromoteCoin/coinDetails',array('model'=>$model['name'],'game_id'=>I('get.game_id')),false)}"
|
||||
value="查询">
|
||||
</div>
|
||||
<div class="form-group normal_space fr">
|
||||
<label>充值时间:</label>
|
||||
<div class="select-time">
|
||||
<input type="text" id="start_time" class="txt" name="start_time" placeholder="" value="{:I('start_time')}" >
|
||||
</div>
|
||||
<label class="form-title select-title zhi_color"> 至 </label>
|
||||
<div class="select-time">
|
||||
<input type="text" id="end_time" class="txt" name="end_time" placeholder="" value="{:I('end_time')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group normal_space fr">
|
||||
<label>对手账号类型:</label>
|
||||
<select id="handle_type" name="handle_type" class="reselect select_gallery" style="min-width:200px;width: 175px;">
|
||||
<option value="">全部</option>
|
||||
<volist name="targetTypeLevels" id="vo" key="k">
|
||||
<option value="{$k}" title="{$vo}">{$vo}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group normal_space fr">
|
||||
<label>操作方式:</label>
|
||||
<select id="sub_type" name="sub_type" class="reselect select_gallery" style="min-width:200px;width: 175px;">
|
||||
<option value="">全部</option>
|
||||
<volist name="subTypes" id="vo" key="k">
|
||||
<option value="{$k}" title="{$vo}">{$vo}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group normal_space fr">
|
||||
<label>操作类型:</label>
|
||||
<select id="type" name="type" class="reselect select_gallery" style="min-width:200px;width: 175px;">
|
||||
<option value="">全部</option>
|
||||
<volist name="types" id="vo" key="k">
|
||||
<option value="{$k}" title="{$vo}">{$vo}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<!-- </form>-->
|
||||
</div>
|
||||
<div class="trunk-list">
|
||||
<div class="div_bgtab">
|
||||
<table class="table normal_table zwm_tab">
|
||||
<tr class="odd <if condition='get_parent_id(PID) eq 0'>pid</if> zwm_tr">
|
||||
<th>流水号</th>
|
||||
<th>操作类型</th>
|
||||
<th>操作方式</th>
|
||||
<th>对手账号类型</th>
|
||||
<th>平台币数量</th>
|
||||
<th>平台币余额</th>
|
||||
<th>交易说明</th>
|
||||
<th>交易时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
<empty name="records">
|
||||
<tr>
|
||||
<td colspan="9" style="text-align: center;height: 45vh;">
|
||||
<img src="__IMG__/20180207/icon_wushujv2.png"/>
|
||||
<p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
|
||||
</td>
|
||||
</tr>
|
||||
<else/>
|
||||
<volist name="records" id="record">
|
||||
<tr>
|
||||
<td>{$record.sn}</td>
|
||||
<td>{$record.type_text}</td>
|
||||
<td>{$record.sub_type_text}</td>
|
||||
<td>{$record.target_type_text}</td>
|
||||
<td>{$record.coin}</td>
|
||||
<td>{$record.balance_coin}</td>
|
||||
<td>{$record.description}</td>
|
||||
<td>{$record.create_time}</td>
|
||||
<td>
|
||||
<a href="{:U('coinDetail',array('id'=>$record['id']))}" style="text-decoration: underline;color: #3A97FF;">查看明细</a>
|
||||
</td>
|
||||
</tr>
|
||||
</volist>
|
||||
</empty>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pagenation clearfix">
|
||||
{$pagination}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
<block name="script">
|
||||
<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>
|
||||
<script src="__STATIC__/zeroclipboard/jquery.zclip.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
|
||||
<script>
|
||||
setValue('type', {$Think.request.type |default = '""'});
|
||||
setValue('sub_type', {$Think.request.sub_type |default = '""'});
|
||||
setValue('handle_type', {$Think.request.handle_type |default = '""'});
|
||||
setValue('row', '{:I("row",10)}');
|
||||
|
||||
var date="{$setDate}";
|
||||
$('#start_time').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language:"zh-CN",
|
||||
minView:2,
|
||||
autoclose:true,
|
||||
scrollMonth:false,
|
||||
scrollTime:false,
|
||||
scrollInput:false,
|
||||
endDate:date
|
||||
});
|
||||
|
||||
$('#end_time').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language:"zh-CN",
|
||||
minView:2,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left',
|
||||
scrollMonth:false,
|
||||
scrollTime:false,
|
||||
scrollInput:false,
|
||||
endDate:date
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".select_gallery").select2();
|
||||
|
||||
$('.back-btn').on('click', function () {
|
||||
history.back(-1);
|
||||
});
|
||||
|
||||
$('#submit').click(function () {
|
||||
var sdate = $('#start_time').val();
|
||||
var edate = $('#end_time').val();
|
||||
if (Date.parse(sdate) > Date.parse(edate)) {
|
||||
layer.msg('开始时间必须小于等于结束时间');
|
||||
return false;
|
||||
}
|
||||
var url = $(this).attr('url');
|
||||
console.log(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;
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,159 @@
|
||||
<extend name="Public/promote_base"/>
|
||||
<block name="css">
|
||||
<link href="__CSS__/20180207/data.css" rel="stylesheet">
|
||||
<link href="__CSS__/20180207/platform.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
@media screen and (max-width: 1480px) {
|
||||
.form-group .submit{width: 55px;}
|
||||
}
|
||||
|
||||
</style>
|
||||
</block>
|
||||
|
||||
<block name="body">
|
||||
<div class="page-search normal_list promoteCoin-record-search">
|
||||
<div class="trunk-title">
|
||||
<div class="location">
|
||||
<div class="location-container">当前位置:<span>平台币></span><span>转账记录</span></div>
|
||||
</div>
|
||||
<img src="__IMG__/20180207/icon_jilu.png"><span class="title_main">转账记录</span>
|
||||
</div>
|
||||
<div class="trunk-content article">
|
||||
<div class="trunk-search clearfix">
|
||||
<form action="{:U('PromoteCoin/record', array('row'=>I('get.row')))}" method="post" class="clearfix">
|
||||
<div class="form-group fl normal_space">
|
||||
<a href="{:U('PromoteCoin/shift')}" class="submit" style="line-height: 36px; text-align: center;">转账</a>
|
||||
</div>
|
||||
<div class="form-group normal_space fr">
|
||||
<input type="submit" class="submit" value="查询">
|
||||
</div>
|
||||
<div class="form-group fr normal_space">
|
||||
<label class="form-title select-title">订单号:</label>
|
||||
<input type="text" name="sn" class="txt normal_txt" id="uid" placeholder="订单号" value="{:I('sn')}">
|
||||
</div>
|
||||
<div class="form-group fr normal_space">
|
||||
<label class="form-title select-title">收款账号:</label>
|
||||
<input type="text" name="account" class="txt normal_txt" id="uid" placeholder="收款账号" value="{:I('account')}">
|
||||
</div>
|
||||
<div class="form-group normal_space fr">
|
||||
<label class="form-title select-title">转账时间:</label>
|
||||
<div class="select-time">
|
||||
<input type="text" id="sdate" class="txt" name="time_start" value="{:I('time_start')}" placeholder="开始时间">
|
||||
</div>
|
||||
<label class="form-title select-title"> — </label>
|
||||
<div class="select-time">
|
||||
<input type="text" id="edate" class="txt" name="time_end" value="{:I('time_end')}" placeholder="结束时间">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group normal_space fr">
|
||||
|
||||
</div>
|
||||
<!-- <div class="form-group fr normal_space">
|
||||
<label class="form-title select-title">账号类型:</label>
|
||||
<select name="handle_type" class="reselect select_gallery" style="min-width:170px;">
|
||||
<option value="">全部</option>
|
||||
<option value="1" <if condition="I('handle_type') === '1'">selected</if>>玩家转账</option>
|
||||
<option value="2" <if condition="I('handle_type') === '2'">selected</if>>推广员转账</option>
|
||||
<option value="3" <if condition="I('handle_type') === '3'">selected</if>>组长转账</option>
|
||||
</select>
|
||||
</div> -->
|
||||
<div class="form-group fr">
|
||||
<label class="form-title select-title">游戏:</label>
|
||||
<select name="game_id" class="reselect select_gallery" style="min-width:170px;">
|
||||
<option value="-1">全部</option>
|
||||
<option value="0" <if condition="I('game_id') === '0'">selected</if>>所有游戏</option>
|
||||
<volist name="games" id="vo">
|
||||
<option value="{$vo.id}" <if condition="I('game_id') === $vo['id']">selected</if>>{$vo.game_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="trunk-list list_normal">
|
||||
<table class="table normal_table">
|
||||
<tr>
|
||||
<th>订单号</th>
|
||||
<th>收款方帐号</th>
|
||||
<th>适用游戏</th>
|
||||
<th>目标帐号类型</th>
|
||||
<th>转账数量</th>
|
||||
<th>交易说明</th>
|
||||
<th>交易时间</th>
|
||||
<th>交易状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
<empty name="records">
|
||||
<tr><td colspan="9" style="text-align: center;height: 38vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td></tr>
|
||||
<else />
|
||||
<volist name="records" id="vo">
|
||||
<tr>
|
||||
<td>{$vo.sn}</td>
|
||||
<td>{$vo.target_account}</td>
|
||||
<td>{$vo.game_name}</td>
|
||||
<td>{$vo.target_type_text}</td>
|
||||
<td>{$vo.num}</td>
|
||||
<td>{$vo.description}</td>
|
||||
<td>{$vo.create_time}</td>
|
||||
<td>{$vo.status_text}</td>
|
||||
<td><a href="{:U('detail', ['id' => $vo['id']])}">查看详情</a></td>
|
||||
</tr>
|
||||
</volist>
|
||||
</empty>
|
||||
</table>
|
||||
|
||||
<div class="pagenation clearfix">
|
||||
<?php if ($loginer['level'] !== 4) :?>
|
||||
<a id="sch-btn" href="{:U('download/coinrecord_data_export',array_merge(['promote_type'=>'xxx'],I('post.')))}" class="ajax-get" >导出</a>
|
||||
<?php endif ;?>
|
||||
{$pagination}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</block>
|
||||
<block name="script">
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/p_jquery.datetimepicker.css">
|
||||
<script type="text/javascript" src="__JS__/jquery.datetimepicker.js"></script>
|
||||
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
setValue('promote_id',{$Think.request.promote_id|default="''"});
|
||||
setValue('row','{:I("get.row",10)}');
|
||||
highlight_subnav('{:U('shift')}');
|
||||
$().ready(function(){
|
||||
highlight_subnav('{:U('Charge/agent_pay_list')}');
|
||||
$('#sdate').datetimepicker({
|
||||
lang:'ch',
|
||||
format:'Y-m-d',
|
||||
formatDate:'Y-m-d',
|
||||
scrollMonth:false,
|
||||
scrollTime:false,
|
||||
scrollInput:false,
|
||||
timepicker:false
|
||||
});
|
||||
|
||||
$(".select_gallery").select2();
|
||||
|
||||
$('#edate').datetimepicker({
|
||||
lang:'ch',
|
||||
format:'Y-m-d',
|
||||
formatDate:'Y-m-d',
|
||||
scrollMonth:false,
|
||||
scrollTime:false,
|
||||
scrollInput:false,
|
||||
timepicker:false
|
||||
});
|
||||
|
||||
$(".submit").click(function(){
|
||||
var sdate =$('#sdate').val();
|
||||
var edate =$('#edate').val();
|
||||
if(Date.parse(sdate) > Date.parse(edate)){
|
||||
layer.msg('开始时间必须小于等于结束时间');
|
||||
return false;
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
</block>
|
Loading…
Reference in New Issue