<?php /*a:3:{s:80:"D:\phpstudy_pro\WWW\www.ceshi.com\application\admin\view\deal\user_recharge.html";i:1642571926;s:66:"D:\phpstudy_pro\WWW\www.ceshi.com\application\admin\view\main.html";i:1637064002;s:87:"D:\phpstudy_pro\WWW\www.ceshi.com\application\admin\view\deal\user_recharge_search.html";i:1641744290;}*/ ?>
<div class="layui-card layui-bg-gray"><style>        .layui-tab-card>.layui-tab-title .layui-this {
            background-color: #fff;
        }
    </style><?php if(!(empty($title) || (($title instanceof \think\Collection || $title instanceof \think\Paginator ) && $title->isEmpty()))): ?><div class="layui-card-header layui-anim layui-anim-fadein notselect"><span class="layui-icon layui-icon-next font-s10 color-desc margin-right-5"></span><?php echo htmlentities((isset($title) && ($title !== '')?$title:'')); ?><div class="pull-right"></div></div><?php endif; ?><div class="layui-card-body layui-anim layui-anim-upbit"><div class="think-box-shadow"><fieldset><legend>条件搜索</legend><form class="layui-form layui-form-pane form-search" action="<?php echo request()->url(); ?>" onsubmit="return false" method="get" autocomplete="off"><div class="layui-form-item layui-inline"><label class="layui-form-label">状态</label><div class="layui-input-inline"><select name="status"><option value="">全部</option><option value="1"<?php if($status==1): ?> selected<?php endif; ?>>未支付</option><option value="2"<?php if($status==2): ?> selected<?php endif; ?>>充值成功</option><option value="3"<?php if($status==3): ?> selected<?php endif; ?>>充值失败</option></select></div></div><div class="layui-form-item layui-inline"><label class="layui-form-label">是否确认</label><div class="layui-input-inline"><select name="status2"><option value="99">全部</option><option value="0"<?php if($status2==0): ?> selected<?php endif; ?>>未确认</option><option value="1"<?php if($status2==1): ?> selected<?php endif; ?>>已确认</option></select></div></div><div class="layui-form-item layui-inline"><label class="layui-form-label">渠道</label><div class="layui-input-inline"><select name="recharge_type"><option value="-">全部</option><?php foreach($pay_list as $k=>$v): ?><option value="<?php echo htmlentities($v); ?>"<?php if(app('request')->get('recharge_type')==$v): ?> selected<?php endif; ?>><?php echo htmlentities($v); ?></option><?php endforeach; ?></select></div></div><div class="layui-form-item layui-inline"><label class="layui-form-label">一级代理</label><div class="layui-input-inline"><select name="agent_id"><option value="0">全部</option><?php foreach($agent_list as $k=>$v): ?><option value="<?php echo htmlentities($k); ?>"<?php if($agent_id==$k): ?> selected<?php endif; ?>><?php echo htmlentities($v); ?></option><?php endforeach; ?></select></div></div><div class="layui-form-item layui-inline"><label class="layui-form-label">二级代理</label><div class="layui-input-inline"><select name="agent_service_id"><option value="0">全部</option><?php foreach($agent_service_list as $k=>$v): ?><option value="<?php echo htmlentities($k); ?>"<?php if($agent_service_id==$k): ?> selected<?php endif; ?>><?php echo htmlentities($v); ?></option><?php endforeach; ?></select></div></div><div class="layui-form-item layui-inline"><label class="layui-form-label">订单号</label><div class="layui-input-inline"><input name="oid" value="<?php echo htmlentities((app('request')->get('oid') ?: '')); ?>" placeholder="请输入订单号" class="layui-input"></div></div><div class="layui-form-item layui-inline"><label class="layui-form-label">用户名称</label><div class="layui-input-inline"><input name="username" value="<?php echo htmlentities((app('request')->get('username') ?: '')); ?>" placeholder="请输入用户名称" class="layui-input"></div></div><div class="layui-form-item layui-inline"><label class="layui-form-label">手机号码</label><div class="layui-input-inline"><input name="tel" value="<?php echo htmlentities((app('request')->get('tel') ?: '')); ?>" placeholder="请输入手机号码" class="layui-input"></div></div><div class="layui-form-item layui-inline"><label class="layui-form-label">添加时间</label><div class="layui-input-inline"><input data-date-range name="addtime" value="<?php echo htmlentities((app('request')->get('addtime') ?: '')); ?>" placeholder="请选择添加时间" class="layui-input"></div></div><div class="layui-form-item layui-inline"><button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button></div></form></fieldset><script>form.render()</script><fieldset><legend>数据小记</legend><div class="row"><div class="col-12">
                第三方累计充值：<?php echo config("currency"); ?><?php echo htmlentities($rechargeAmount); ?>，
                第三方手续费：<?php echo config("currency"); ?><?php echo htmlentities($rechargePayCom); ?>，
                第三方成功收款：<?php echo htmlentities($rechargeCount); ?>笔，
                第三方充值成功人数：<?php echo htmlentities($rechargeUserCount); ?>人
            </div></div></fieldset><table class="layui-table margin-top-15" lay-skin="line"><?php if(!(empty($list) || (($list instanceof \think\Collection || $list instanceof \think\Paginator ) && $list->isEmpty()))): ?><thead><tr><th class='text-left nowrap'>订单号</th><th class='text-left nowrap'>用户</th><th class='text-left nowrap'>一级代理/二级代理</th><th class='text-left nowrap'>充值金额/手续费</th><th class='text-left nowrap'>支付方式</th><th class='text-left nowrap'>类型</th><th class='text-left nowrap'>申请/处理时间</th><th class='text-left nowrap'>用户确认/交易流水号</th><th class='text-left nowrap'>第三方下发</th><th class='text-left nowrap'>操作</th></tr></thead><?php endif; ?><tbody><?php foreach($list as $key=>$vo): ?><tr><td class='text-left nowrap'><?php echo htmlentities($vo['id']); ?></td><td class='text-left nowrap'><?php echo htmlentities($vo['username']); ?><br><?php echo htmlentities($vo['tel']); ?></td><td class='text-left nowrap'><?php if(!empty($agent_list[$vo['agent_id']])): ?><?php echo htmlentities($agent_list[$vo['agent_id']]); else: ?>
                ---
                <?php endif; ?><br><?php if(!empty($agent_service_list[$vo['agent_service_id']])): ?><?php echo htmlentities($agent_service_list[$vo['agent_service_id']]); else: ?>
                ---
                <?php endif; ?></td><td class='text-left nowrap'><?php echo htmlentities($vo['num']); if($vo['pay_name']=='bit'): ?>(U: <?php echo htmlentities($vo['num2']); ?>)<?php endif; ?><br><?php echo bcmul($vo['pay_com'] , $vo['num'],2); ?>(<?php echo htmlentities($vo['pay_com']*100); ?>%)
            </td><td class='text-left nowrap'><?php echo htmlentities((isset($vo['pay_name']) && ($vo['pay_name'] !== '')?$vo['pay_name']:"-")); ?></td><td class='text-left nowrap'><?php if($vo['is_vip']): ?><button class="layui-btn layui-btn-xs layui-btn layui-btn-warm">会员升级</button><?php else: ?><button class="layui-btn layui-btn-xs layui-btn layui-btn-danger">会员充值</button><?php endif; ?></td><td class='text-left nowrap'><?php echo htmlentities(format_datetime($vo['addtime'])); ?><br><?php echo htmlentities((format_datetime($vo['endtime']) ?: '-')); ?></td><td class='text-left nowrap'><?php switch($vo['status2']): case "0": ?>未确认<?php break; case "1": ?><a class="layui-btn layui-btn-normal layui-btn-xs btn-success">已确认</a><br><?php echo htmlentities($vo['pay_return']); break; ?><?php endswitch; ?></td><td class='text-left'><?php switch($vo['pay_status']): case "0": ?>等待付款<?php break; case "1": ?><a class="layui-btn layui-btn-xs">付款成功</a><?php break; case "2": ?><a class="layui-btn layui-btn-xs layui-btn-danger">付款失败</a><?php break; ?><?php endswitch; if($vo['pay_status']==2): ?><br><?php echo htmlentities($vo['pay_return']); ?><?php endif; ?></td><td class='text-left nowrap'><?php switch($vo['status']): case "0": ?>待付款<?php break; case "1": if(auth("edit_recharge")): ?><a data-csrf="<?php echo systoken('edit_recharge'); ?>" class="layui-btn layui-btn-xs layui-btn" data-action="<?php echo url('edit_recharge',['status'=>2,'id'=>$vo['id']]); ?>" data-value="id#<?php echo htmlentities($vo['id']); ?>;status#2" >通过</a><a data-csrf="<?php echo systoken('edit_recharge'); ?>" class="layui-btn layui-btn-xs layui-btn-warm" data-action="<?php echo url('edit_recharge',['status'=>3,'id'=>$vo['id']]); ?>" data-value="id#<?php echo htmlentities($vo['id']); ?>;status#3" >驳回</a><?php else: ?>
                            待付款
                        <?php endif; break; case "2": ?><a class="layui-btn layui-btn-xs">审核通过</a><?php break; case "3": ?><a class="layui-btn layui-btn-xs layui-btn-danger">审核驳回</a><?php break; ?><?php endswitch; ?></td></tr><?php endforeach; ?></tbody></table><?php if(empty($list) || (($list instanceof \think\Collection || $list instanceof \think\Paginator ) && $list->isEmpty())): ?><span class="notdata">没有记录哦</span><?php else: ?><?php echo (isset($pagehtml) && ($pagehtml !== '')?$pagehtml:''); ?><?php endif; ?></div></div></div><script>//    layui.use('element', function(){
//        var element = layui.element;
//
//        element.tabAdd('demo', {
//            title: '选项卡的标题'
//            ,content: '选项卡的内容' //支持传入html
//            ,id: '选项卡标题的lay-id属性值'
//        });
//
//        //获取hash来切换选项卡，假设当前地址的hash为lay-id对应的值
//        var layid = location.hash.replace(/^#test1=/, '');
//        element.tabChange('test1', layid); //假设当前地址为：http://a.com#test1=222，那么选项卡会自动切换到“发送消息”这一项
//
//        //监听Tab切换，以改变地址hash值
//        element.on('tab(test1)', function(){
//            location.hash = ''+ this.getAttribute('lay-id');
//        });
//    });

</script>