| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602 |
- {extend name="layout/content"/} {block name="header"}
- <link rel="stylesheet" href="__STATIC__/css/admin/bootstrap.min.css">
- <link rel="stylesheet" href="__STATIC__/css/admin/bootstrap-table.css?v={$Think.STATIC_VERSION}">
- <link rel="stylesheet" href="__STATIC__/css/FuzzySearch.css?v={$Think.STATIC_VERSION}">
- <title>充值记录管理</title>
- <style>
- label {
- padding-top: 10px;
- margin-left: 10px;
- }
- .x-so {
- text-align: unset;
- margin-bottom: 20px;
- }
- section {
- margin-top: 10px;
- display: flex;
- }
- .layui-input {
- margin-right: 5px;
- }
- .set_width {
- margin-right: 5px;
- }
- .hide {
- display: none;
- }
- .glyphicon-plus:before {
- content: "\002b";
- font-size: 12px;
- font-weight: 900;
- width: 100%;
- display: inline-block;
- }
- .glyphicon-minus:before {
- content: "\2212";
- font-size: 12px;
- font-weight: 900;
- width: 100%;
- display: inline-block;
- }
- .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th {
- padding: 8px;
- line-height: 1.42857143;
- vertical-align: middle !important;
- border-top: 1px solid #ddd;
- }
- table td,
- table th {
- text-align: center;
- }
- .detail-view td,
- .detail-view th {
- text-align: left;
- }
- .badge-default{
- color: #333;
- background-color: #fff;
- }
- .badge-success{
- background-color: #449d44;
- }
- .badge-danger{
- background-color: #d9534f;
- }
- :hover .noLine{
- text-decoration-line: none;
- }
- .layui-inline{
- margin-top: 10px;
- }
- </style>
- {/block} {block name="content"}
- <div class="x-body">
- <form class="layui-form" method="GET" action="{:url('index')}">
- <div class="layui-inline">
- <div class="layui-input-inline">
- <input class="layui-input" placeholder="开始时间" name="start" id="start" readonly='readonly' value="{$start}" autocomplete="off">
- </div>
- <span>-</span>
- <div class="layui-input-inline">
- <input class="layui-input" placeholder="结束时间" name="end" id="end" readonly='readonly' value="{$end}" autocomplete="off">
- </div>
- </div>
- <div class="layui-inline">
- <label>游戏:</label>
- <div class="layui-input-inline FuzzySearch_Container">
- <div>
- <input type="hidden" id='J_gameid' name="gameid" value="{$Request.get.gameid}" />
- </div>
- </div>
- </div>
- <div class="layui-inline">
- <label>区服名称:</label>
- <div class="layui-input-inline">
- <input class="layui-input" placeholder="区服名称" name="servername" value="{$Request.get.servername}">
- </div>
- </div>
- <div class="layui-inline">
- <label>充值状态:</label>
- <div class="layui-input-inline">
- <select name="status">
- <option value="">选择支付状态</option>
- <option value="0" {if condition="$Request.get.status eq '0' " }selected="selected" {/if}>待支付</option>
- <option value="1" {if condition="$Request.get.status eq 1 " }selected="selected" {/if}>支付成功</option>
- <option value="2" {if condition="$Request.get.status eq 2 " }selected="selected" {/if}>支付失败</option>
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <label>发货状态:</label>
- <div class="layui-input-inline">
- <select name="cp_status">
- <option value="">选择发货状态</option>
- <option value="0" {if condition="$Request.get.cp_status eq '0' " }selected="selected" {/if}>发货失败/未发货</option>
- <option value="1" {if condition="$Request.get.cp_status eq 1 " }selected="selected" {/if}>发货成功</option>
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <label>支付方式:</label>
- <div class="layui-input-inline">
- <select name="paytype">
- <option value="">选择支付方式</option>
- {volist name="new_pay_type" id="pvo"}
- <option value="{$key}" {if condition="$Request.get.paytype eq $key" }selected="selected" {/if}>{$pvo}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline">
- <input class="layui-input" placeholder="订单号" id="orderid" name="orderid" value="{$Request.get.orderid}">
- </div>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline">
- <input class="layui-input" placeholder="玩家账号" name="username" value="{$Request.get.username}">
- </div>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline FuzzySearch_Container">
- <div>
- <input type="hidden" id='J_channelid' placeholder="请输入推广员账号" name="channel_id" value="{$channel_id}" />
- </div>
- </div>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline FuzzySearch_Container">
- <div>
- <input type="hidden" id='J_parent_channel_id' placeholder="请输入公会账号" name="parent_channel_id" value="{$Request.get.parent_channel_id}" />
- </div>
- </div>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline">
- <select name="bplus_channel_id" lay-filter="level" value="{:input('request.bplus_channel_id')}">
- <option value="">请选择商务</option>
- {volist name="uniom" id="vo"}
- <option value="{$vo.id}" {if condition="input('request.bplus_channel_id') eq $vo.id" }selected="selected" {/if} >{$vo.name}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <button class="layui-btn" type="submit" id="J_search_submit">查询</button>
- <a href="{:url()}" class="layui-btn layui-btn-primary">重置</a>
- <a class="layui-btn" href="javascript:void(0);" onclick="reportDownload(0);">下载报表</a>
- <!-- <a class="layui-btn" href="javascript:void(0);" onclick="reportDownload(1);">下载报表(高级)</a>-->
- </div>
- <!--
- <p style="margin-top:10px;">
- <span style="color: red">*</span><a class="noLine" style="color: #666"> 单次查询日期的最长跨度为31天</a>
- </p>
- -->
- <!-- data-toolbar="#toolbar" -->
- <table data-toggle="table" data-detail-view="true" data-detail-formatter="detailFormatter" class="table">
- <thead>
- <tr>
- <!-- 1-5 -->
- <th>订单号</th>
- <th>游戏名称</th>
- <th>账号</th>
- <th>区服名称</th>
- <th>充值金额</th>
- <!-- 6-10 -->
- <th>支付金额</th>
- <th>平台币支付</th>
- <th>专属平台币支付</th>
- <th>代金券</th>
- <th>第三方支付</th>
- <!-- 11-15 -->
- <th>支付方式</th>
- <th>支付状态</th>
- <th>发货状态</th>
- <th>推广员账号</th>
- <th>子会长</th>
- <!-- 16-20 -->
- <th>商务账号</th>
- <th>公会账号</th>
- <th>角色名</th>
- <th class="hide">区服ID</th>
- <th>区服名</th>
- <!-- 21-25 -->
- <th class="hide">注册时间</th>
- <th class="hide">角色ID</th>
- <th class="hide">等级</th>
- <th class="hide">商品名</th>
- <th class="hide">关联代金券id</th>
- <!-- 26-28 -->
- <th class="hide">订单ID</th>
- <th>充值时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody id="viewer_wrap">
- {empty name="list"}
- {else/} {volist name="list" id="vo"}
- <tr>
- <!-- 1-5 -->
- <td>{$vo.orderid}</td>
- <td>{$vo.game_name}</td>
- <!-- <td id="J_td_{$vo.id}"><a href="javascript:void(0);" onclick="showUsername({$vo.userid},{$vo.gameid},{$vo.id})" style="text-decoration: underline;">{:stringObfuscation($vo.username)}</a></td> -->
- <td>{$vo.username}</td>
- <td>{$vo.servername}</td>
- <td><i class="fa fa-cny"></i>{$vo.amount}</td>
- <!-- 6-10 -->
- <td><i class="fa fa-cny"></i>{$vo.pay_amount}</td>
- <td><i class="fa fa-cny"></i>{$vo.real_coin}</td>
- <td><i class="fa fa-cny"></i>{$vo.real_ptb}</td>
- <td><i class="fa fa-cny"></i>{$vo.coupon_amount}</td>
- <td><i class="fa fa-cny"></i>{$vo.real_amount}</td>
- <!-- 11-15 -->
- <td><sup>{:config('paytype.'.$vo.paytype)}</sup></td>
- <td>
- {switch name="vo.status"} {case value="0"}
- <span class="badge badge-default">待支付</span>
- {/case} {case value="1"}
- <span class="badge badge-success">成功</span>
- {/case} {case value="2"}
- <span class="badge badge-info">已取消</span>
- {/case} {/switch}
- </td>
- <td class="type{$vo.orderid}">
- {if condition="$vo.cp_status eq 1"}
- <span class="badge badge-default">发货成功</span>
- {elseif condition="$vo.cp_status neq 1"}
- {if condition="$vo.status eq 1"}
- <span class="badge badge-danger">发货失败</span>
- {else/}
- <span class="badge badge-danger">未发货</span>
- {/if}
- {/if}
- </td>
- <td>{$vo.channel_name}</td>
- <td>{$vo.second_channel}</td>
- <!-- 16-20 -->
- <td>{$vo.top_channel}</td>
- <td>{$vo.union_name}</td>
- <td>{$vo.rolename}</td>
- <td>{$vo.serverid}</td>
- <td>{$vo.servername}</td>
- <td>{$vo.reg_time}</td>
- <!-- 21-25 -->
- <td>{$vo.roleid}</td>
- <td>{$vo.rolelevel}</td>
- <td>{$vo.productname}</td>
- <td>{$vo.id}</td>
- <td>{$vo.coupon_member_id}</td>
- <!-- 26-27 -->
- <td>{$vo.pay_time}</td>
- <td>
- <button type="button" title="查看" class="layui-btn layui-btn-normal J_show_attach" data-orderid="{$vo.orderid}" data-attach="{$vo.attach}">附加信息</button>
- {if condition="$vo.status eq 1"}
- {empty name="vo.cp_status"}
- <button type="button" title="查看" class="layui-btn layui-btn-normal reCallback" data-orderid="{$vo.orderid}">补单</button>
- {/empty}
- {/if}
- </td>
- </tr>
- {/volist} {/empty}
- </tbody>
- </table>
- <div class="pager-container" style="margin-top:10px;">
- <span>
- 充值完成总金额:{$totalAmount}元,{$list->total()}条记录; 今日充值:{$todayTotalAmount}元 ; 昨日充值:{$lastDayTotalAmount}元
- </span>
- {$page}
- <div class="layui-inline" style="margin:0;margin-left:10px;width:80px;">
- <input type="text" style="height: 30px;" class="layui-input" placeholder="跳转至" name="page" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
- </div>
- </div>
- </form>
- </div>
- {/block}
- {block name="footer"}
- <script type="text/javascript" src="__STATIC__/js/admin/bootstrap-table.js?v={$Think.STATIC_VERSION}"></script>
- <script type="text/javascript" src="__STATIC__/js/FuzzySearch.js?v={$Think.STATIC_VERSION}"></script>
- <script>
- $(document).ready(function () {
- $("#J_gameid").FuzzySearch({
- inputID : 'J_gameid',
- title : '请输入游戏名称',
- data :{:json_encode($game_list)},
- searchBtn :'J_search_submit',
- });
- $("#J_channelid").FuzzySearch({
- inputID : 'J_channelid',
- title : '请输入推广员账号',
- searchBtn :'J_search_submit',
- ajaxUrl : '{:url("Pay/ajaxGetNoComplexChannel")}',
- });
- $("#J_parent_channel_id").FuzzySearch({
- inputID : 'J_parent_channel_id',
- title : '请选择公会账号',
- //searchBtn :'J_search_submit',
- ajaxUrl : '{:url("Pay/ajaxGetNoComplexChannel")}',
- });
- layui.use(['form', 'laydate'], function () {
- var laydate = layui.laydate;
- var form = layui.form;
- var starttime = laydate.render({
- elem: '#start',
- type: 'date',
- format: 'yyyy-MM-dd',
- done: function (value, dates) {
- endtime.config.min = {
- year: dates.year,
- month: dates.month - 1, //关键
- date: dates.date,
- hours: 0,
- minutes: 0,
- seconds: 0
- };
- }
- });
- var endtime = laydate.render({
- elem: '#end',
- type: 'date',
- format: 'yyyy-MM-dd',
- done: function (value, dates) {
- starttime.config.max = {
- year: dates.year,
- month: dates.month - 1, //关键
- date: dates.date,
- hours: 0,
- minutes: 0,
- seconds: 0
- }
- }
- });
- /**
- * 查看附加信息按钮点击事件
- */
- $('table tbody tr td').on('click', ".J_show_attach",function () {
- var orderid = $(this).data('orderid');
- $.ajax({
- type: "post",
- data: {'orderid':orderid},
- url: "{:url('showAttach')}",
- dataType: "json",
- timeOut: 10,
- success: function (msg) {
- if(msg.code) {
- var attach = msg.msg;
- var html = '<div>';
- html += attach;
- html += '</div>';
- layer.open({
- type: 1,
- title: '合作方订单号',
- skin: 'layui-layer-rim',
- area: ['420px', '240px'], //宽高
- content: html,
- });
- if (window.top !== window.self) {
- window.parent.$('html, body').animate({
- scrollTop: 0
- }, 'slow');
- }
- }else{
- layer.alert(msg.msg, {icon: 5});
- }
- },
- error: function () {
- layer.alert('网络错误,请刷新页面重试!', {icon: 2});
- }
- });
- });
- /*
- 一键发货
- */
- $('table tbody tr td').on('click', ".reCallback",function (e) {
- var self = this;
- var orderid = $(this).data('orderid');
- $.ajax({
- type: "post",
- data: {'orderid':orderid},
- url: "{:url('reCallback')}",
- dataType: "json",
- timeOut: 10,
- success: function (msg) {
- if(msg.code) {
- layer.alert(msg.msg);
- $('.type'+orderid).html('<span class="badge badge-default">发货成功</span>');
- self.remove();
- }else{
- layer.alert(msg.msg, {icon: 5});
- }
- },
- error: function () {
- layer.alert('网络错误,请刷新页面重试!', {icon: 2});
- }
- });
- });
- });
- });
- /**
- * 下载
- */
- function reportDownload(is_show)
- {
- var start_time = $('#start').val();
- var end_time = $('#end').val();
- /*
- if (!end_time || !start_time) {
- layer.msg('请选择开始时间和结束时间');
- return;
- }
- */
- /*
- if ((CompareDate(start_time, end_time)) > 7) {
- layer.msg('请选择7天以内的时间范围');
- return;
- }*/
- $.ajax({
- type: "post",
- url: "{:url('download')}",
- async: false,
- data: $('.layui-form').serialize()+'&is_show='+is_show+'&is_haiwei=0&gh=1',
- dataType: 'json',
- timeout: 5000,
- success: function (data) {
- if (data['code']) {
- layer.alert(data['msg']);
- } else {
- layer.alert(data['msg']);
- }
- },
- error: function () {
- layer.alert('网络错误,请重试');
- },
- });
- }
- var $table = $("table");
- $table.bootstrapTable({
- formatNoMatches: function () {
- return "暂无数据";
- }
- });
- function detailFormatter(index, row) {
- var html = [];
- var obj = {
- 0: "订单号",
- 1: "游戏名称",
- 2: "账号",
- 3: "区分名称",
- 4: "充值金额",
- 5: "支付金额",
- 6: "平台币支付",
- 7: "专属平台币支付",
- 8: "代金券",
- 9: "第三方支付",
- 10: "支付方式",
- 11: "支付状态",
- 12: "发货状态",
- 13: "推广员账号",
- 14: "子会长",
- 15: "会长账号",
- 16: "角色名",
- 17: "商务账号",
- 18: "区服ID",
- 19: "注册时间",
- 20: "角色ID",
- 21: "等级",
- 22: "商品名",
- 23: "关联代金券id",
- 24: "订单ID",
- 25: "充值时间",
- }
- $.each(row, function (key, value) {
- if (key == 0 || (key >= 16 && key <= 24)) {
- html.push('<p><b>' + obj[key] + ':</b> ' + value + '</p>');
- } else {
- html.push('<p class="hide"><b>' + obj[key] + ':</b> ' + value + '</p>');
- }
- });
- return html.join('');
- }
- //显示全部姓名
- function showUsername(userid,game_id,id)
- {
- $.ajax({
- type: "post",
- data: {'userid':userid,'game_id':game_id},
- url: "{:url('showUsername')}",
- dataType: "json",
- timeOut: 10,
- success: function (result) {
- if(result.code) {
- $('#J_td_'+id).html(result.data);
- }else{
- layer.alert(result.msg, {icon: 5});
- }
- },
- error: function () {
- layer.alert('网络错误,请刷新页面重试!', {icon: 2});
- }
- });
- }
- </script>
- {/block}
|