451 lines
18 KiB
PHP
451 lines
18 KiB
PHP
@extends('merchant.layouts.base')
|
||
@section('add_css')
|
||
|
||
@endsection
|
||
@section('content')
|
||
|
||
<div class="layui-row layui-col-space15">
|
||
<div class="layui-col-md3">
|
||
<a lay-href="{{ admin_merchant_url('Order','index',['pay_status'=>1]) }}" lay-text="我的订单">
|
||
<div class="grid-demo grid-demo-bg1 layui-bg-green"><i class="alicon icon-qianbaodaishou"></i>
|
||
<i class="g-name">交易金额</i>
|
||
<span class="g-title"><i class="number">{{ $wallets['trans_money']?$wallets['trans_money']:'0.00' }}</i><br><i class="text">交易统计</i></span>
|
||
</div>
|
||
</a>
|
||
</div>
|
||
<div class="layui-col-md3">
|
||
<a lay-href="{{ admin_merchant_url('Order','index',['pay_status'=>1]) }}" lay-text="我的订单">
|
||
<div class="grid-demo grid-demo-bg1 layui-bg-cyan"><i class="alicon icon-qianbaodaishou"></i>
|
||
<i class="g-name">结算总额</i>
|
||
<span class="g-title"><i class="number">{{ $wallets['total_money']?$wallets['total_money']:'0.00' }}</i><br><i class="text">交易统计</i></span>
|
||
</div>
|
||
</a>
|
||
</div>
|
||
<div class="layui-col-md3">
|
||
<a href="javascript:void(0)" lay-text="我的订单">
|
||
<div class="grid-demo grid-demo-bg1 layui-bg-blue"><i class="alicon icon-qianbaodaishou"></i>
|
||
<i class="g-name">今日结算总额</i>
|
||
<span class="g-title"><i class="number">{{ $today_money ?? '0.00' }}</i><br><i class="text"> </i></span>
|
||
</div>
|
||
</a>
|
||
</div>
|
||
<div class="layui-col-md3">
|
||
<a href="javascript:void(0)" lay-text="我的订单">
|
||
<div class="grid-demo grid-demo-bg1 layui-bg-red"><i class="alicon icon-qianbaodaishou"></i>
|
||
<i class="g-name">昨日结算总额</i>
|
||
<span class="g-title"><i class="number">{{ $yesterday ?? '0.00' }}</i><br><i class="text"> </i></span>
|
||
</div>
|
||
</a>
|
||
</div>
|
||
<div class="layui-col-md3">
|
||
<a href="javascript:void(0)" lay-text="我的订单">
|
||
<div class="grid-demo grid-demo-bg1 layui-bg-cyan"><i class="alicon icon-qianbaodaishou"></i>
|
||
<i class="g-name">昨日冻结金额</i>
|
||
<span class="g-title"><i class="number">{{ $dong_money }}</i><br><i class="text"> </i></span>
|
||
</div>
|
||
</a>
|
||
</div>
|
||
<div class="layui-col-md3">
|
||
<a lay-href="{{ admin_merchant_url('DrawMoney','create') }}" lay-text="申请提现">
|
||
<div class="grid-demo grid-demo-bg1 layui-bg-blue" style=""><i class="alicon icon-qianbaokeyong"></i>
|
||
<i class="g-name">账号余额</i>
|
||
<span class="g-title"><i class="number">{{ $wallets['money']?$wallets['money']:'0.00' }}</i><br><i class="text">立即提现</i></span>
|
||
</div>
|
||
</a>
|
||
</div>
|
||
<div class="layui-col-md3">
|
||
<a href="javascript:void(0)">
|
||
<div class="grid-demo" style="background-color: #5FB878;"><i class="alicon icon-jiaoyiguanli"></i>
|
||
<i class="g-name">交易笔数</i>
|
||
<span class="g-title"><i class="number">{{ $wallets['trans_ok_number']?$wallets['trans_ok_number']:'0' }}</i><br><i class="text">交易记录</i></span>
|
||
</div>
|
||
</a>
|
||
</div>
|
||
|
||
<div class="layui-col-md3">
|
||
<a href="javascript:void(0)">
|
||
<div class="grid-demo layui-bg-cyan" style=""><i class="alicon icon-shibai"></i>
|
||
<i class="g-name">成功提现总额</i>
|
||
<span class="g-title"><i class="number" id="">{{ $draw_money ?? 0 }}</i><br></span>
|
||
</div>
|
||
</a>
|
||
</div>
|
||
</div>
|
||
<div class="m-t-20 layui-row layui-col-space15">
|
||
<div class="layui-col-md6">
|
||
<div class="layui-card">
|
||
<div class="layui-card-header">系统公告</div>
|
||
<div class="layui-card-body">
|
||
<div class="table-responsive">
|
||
<table class="layui-table" lay-skin="line">
|
||
<colgroup>
|
||
<col width="">
|
||
<col width="200">
|
||
|
||
</colgroup>
|
||
<thead>
|
||
<tr>
|
||
<th>公告名称</th>
|
||
<th>时间</th>
|
||
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@if(count($notice)>0)
|
||
@foreach ($notice as $v)
|
||
<tr>
|
||
<td><a href="javascript:void(0)" data-w="650px;" data-title="{{ $v->name }}" data-h="700px" data-btn="关闭" layadmin-event="openLayer" data-url="{{ admin_merchant_url('Home','show',['type'=>'showNotice','id'=>$v->id]) }}">{{ $v->name }}</a> </td>
|
||
<td>{{ $v->created_at }}</td>
|
||
|
||
</tr>
|
||
@endforeach
|
||
@else
|
||
<tr>
|
||
<td colspan="2">暂无公告</td>
|
||
</tr>
|
||
@endif
|
||
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md6">
|
||
<div class="layui-card">
|
||
<div class="layui-card-header">登陆记录</div>
|
||
<div class="layui-card-body layui-text">
|
||
<div class="table-responsive">
|
||
<table class="layui-table">
|
||
<colgroup>
|
||
<col width="160">
|
||
<col>
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td>最后一次登陆时间</td>
|
||
<td>
|
||
{{ merchant('last_time') }}
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>登录次数</td>
|
||
<td>
|
||
{{ merchant('last_number') }}
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>登录IP</td>
|
||
<td>
|
||
{{ merchant('ip') }}
|
||
</td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md12">
|
||
<div class="layui-card">
|
||
<div class="layui-card-header">提现记录</div>
|
||
<div class="layui-card-body">
|
||
<div class="table-responsive">
|
||
<table class="layui-table" lay-skin="line">
|
||
|
||
<thead>
|
||
<tr>
|
||
<th>提现时间</th>
|
||
<th>提现金额</th>
|
||
<th>到账金额</th>
|
||
<th>提现手续费</th>
|
||
<th>收款人</th>
|
||
<th>处理状态</th>
|
||
|
||
</tr>
|
||
</thead>
|
||
<tbody id="draw_money_list">
|
||
|
||
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md12">
|
||
<div class="layui-card">
|
||
<div class="layui-card-header">资金变动</div>
|
||
<div class="layui-card-body">
|
||
<div class="table-responsive">
|
||
<table class="layui-table" lay-skin="line">
|
||
<colgroup>
|
||
<col width="">
|
||
<col width="200">
|
||
|
||
</colgroup>
|
||
<thead>
|
||
<tr>
|
||
<th>变动时间</th>
|
||
<th>变动前金额</th>
|
||
<th>变动金额</th>
|
||
<th>现在余额</th>
|
||
<th>说明</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="money_log_list">
|
||
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{{--<div class="layui-col-md12">--}}
|
||
{{--<div class="layui-card">--}}
|
||
{{--<div class="layui-card-header">数据概览</div>--}}
|
||
{{--<div class="layui-card-body">--}}
|
||
|
||
{{--<div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-index-dataview2">--}}
|
||
{{--<div carousel-item id="LAY-index-dataview2">--}}
|
||
{{--<div><i class="layui-icon layui-icon-loading1 layadmin-loading"></i></div>--}}
|
||
{{--<div></div>--}}
|
||
{{--<div></div>--}}
|
||
{{--</div>--}}
|
||
{{--</div>--}}
|
||
|
||
{{--</div>--}}
|
||
{{--</div>--}}
|
||
|
||
{{--</div>--}}
|
||
|
||
</div>
|
||
|
||
|
||
|
||
@endsection
|
||
@section('add_js')
|
||
|
||
<script>
|
||
|
||
//数据概览
|
||
layui.use(['index', 'console','custorm','carousel', 'echarts'], function () {
|
||
var $ = layui.$
|
||
, carousel = layui.carousel
|
||
, echarts = layui.echarts;
|
||
|
||
|
||
var draw_list_url="{{ admin_merchant_url('Api','index',['type'=>'draw_money_list','top']) }}";
|
||
var moneylog_list_url="{{ admin_merchant_url('Api','index',['type'=>'money_log_list','top']) }}";
|
||
|
||
ajaxDonig(draw_list_url,'#draw_money_list',{},'draw');
|
||
|
||
ajaxDonig(moneylog_list_url,'#money_log_list',{},'moneylog');
|
||
|
||
merchant_order_fail_update();
|
||
|
||
function ajaxDonig(url, obj, where, type) {
|
||
where = where || {};
|
||
console.log(where);
|
||
$.ajax({
|
||
url: url,
|
||
type: 'get',
|
||
data: where,
|
||
success: function (res) {
|
||
console.log(res);
|
||
if (res.error == 0) {
|
||
|
||
tableHtml(res.data, obj, type)
|
||
|
||
}
|
||
}
|
||
|
||
});
|
||
}
|
||
|
||
function tableHtml(data, obj, type) {
|
||
var html_str = '';
|
||
if (!data) {
|
||
return false;
|
||
}
|
||
var tdspan=6;
|
||
switch (type) {
|
||
case 'draw':
|
||
|
||
|
||
for (var i in data) {
|
||
html_str += ' <tr>' +
|
||
'<td>' + data[i]['created_at'] + '</td> ' +
|
||
'<td>' + data[i]['draw_money'] + '</td> ' +
|
||
'<td>' + data[i]['money'] + '</td>' +
|
||
'<td>' + data[i]['fee_money'] + '</td>' +
|
||
'<td>' + data[i]['bank_realname'] + '</td>' +
|
||
'<td>' + data[i]['status_name'] + '</td>' +
|
||
'</tr>';
|
||
}
|
||
|
||
|
||
break;
|
||
case 'moneylog':
|
||
tdspan=5;
|
||
for (var i in data) {
|
||
html_str += ' <tr>' +
|
||
'<td>' + data[i]['created_at'] + '</td> ' +
|
||
'<td>' + data[i]['before_money'] + '</td> ' +
|
||
'<td>' + data[i]['after_money'] + '</td>' +
|
||
'<td>' + data[i]['money'] + '</td>' +
|
||
'<td>' + data[i]['mark'] + '</td>' +
|
||
|
||
'</tr>';
|
||
}
|
||
break;
|
||
}
|
||
if(data.length<=0)
|
||
{
|
||
html_str+='<tr><td colspan="'+tdspan+'">暂无记录</td></tr>';
|
||
}
|
||
$(obj).empty().append(html_str);
|
||
}
|
||
|
||
var echartsApp = [], options = [
|
||
//今日流量趋势
|
||
{
|
||
title: {
|
||
text: '今日流量趋势',
|
||
x: 'center',
|
||
textStyle: {
|
||
fontSize: 14
|
||
}
|
||
},
|
||
tooltip: {
|
||
trigger: 'axis'
|
||
},
|
||
legend: {
|
||
data: ['', '']
|
||
},
|
||
xAxis: [{
|
||
type: 'category',
|
||
boundaryGap: false,
|
||
data: ['06:00', '06:30', '07:00', '07:30', '08:00', '08:30', '09:00', '09:30', '10:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30', '18:00', '18:30', '19:00', '19:30', '20:00', '20:30', '21:00', '21:30', '22:00', '22:30', '23:00', '23:30']
|
||
}],
|
||
yAxis: [{
|
||
type: 'value'
|
||
}],
|
||
series: [{
|
||
name: 'PV',
|
||
type: 'line',
|
||
smooth: true,
|
||
itemStyle: {normal: {areaStyle: {type: 'default'}}},
|
||
data: [111, 222, 333, 444, 555, 666, 3333, 33333, 55555, 66666, 33333, 3333, 6666, 11888, 26666, 38888, 56666, 42222, 39999, 28888, 17777, 9666, 6555, 5555, 3333, 2222, 3111, 6999, 5888, 2777, 1666, 999, 888, 777]
|
||
}, {
|
||
name: 'UV',
|
||
type: 'line',
|
||
smooth: true,
|
||
itemStyle: {normal: {areaStyle: {type: 'default'}}},
|
||
data: [11, 22, 33, 44, 55, 66, 333, 3333, 5555, 12666, 3333, 333, 666, 1188, 2666, 3888, 6666, 4222, 3999, 2888, 1777, 966, 655, 555, 333, 222, 311, 699, 588, 277, 166, 99, 88, 77]
|
||
}]
|
||
},
|
||
|
||
//访客浏览器分布
|
||
{
|
||
title: {
|
||
text: '访客浏览器分布',
|
||
x: 'center',
|
||
textStyle: {
|
||
fontSize: 14
|
||
}
|
||
},
|
||
tooltip: {
|
||
trigger: 'item',
|
||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||
},
|
||
legend: {
|
||
orient: 'vertical',
|
||
x: 'left',
|
||
data: ['Chrome', 'Firefox', 'IE 8.0', 'Safari', '其它浏览器']
|
||
},
|
||
series: [{
|
||
name: '访问来源',
|
||
type: 'pie',
|
||
radius: '55%',
|
||
center: ['50%', '50%'],
|
||
data: [
|
||
{value: 9052, name: 'Chrome'},
|
||
{value: 1610, name: 'Firefox'},
|
||
{value: 3200, name: 'IE 8.0'},
|
||
{value: 535, name: 'Safari'},
|
||
{value: 1700, name: '其它浏览器'}
|
||
]
|
||
}]
|
||
},
|
||
|
||
//新增的用户量
|
||
{
|
||
title: {
|
||
text: '最近一周新增的用户量',
|
||
x: 'center',
|
||
textStyle: {
|
||
fontSize: 14
|
||
}
|
||
},
|
||
tooltip: { //提示框
|
||
trigger: 'axis',
|
||
formatter: "{b}<br>新增用户:{c}"
|
||
},
|
||
xAxis: [{ //X轴
|
||
type: 'category',
|
||
data: ['11-07', '11-08', '11-09', '11-10', '11-11', '11-12', '11-13']
|
||
}],
|
||
yAxis: [{ //Y轴
|
||
type: 'value'
|
||
}],
|
||
series: [{ //内容
|
||
type: 'line',
|
||
data: [200, 300, 400, 610, 150, 270, 380],
|
||
}]
|
||
}
|
||
]
|
||
, elemDataView = $('#LAY-index-dataview2').children('div')
|
||
, renderDataView = function (index) {
|
||
echartsApp[index] = echarts.init(elemDataView[index], layui.echartsTheme);
|
||
echartsApp[index].setOption(options[index]);
|
||
window.onresize = echartsApp[index].resize;
|
||
};
|
||
|
||
|
||
//没找到DOM,终止执行
|
||
if (!elemDataView[0]) return;
|
||
|
||
|
||
renderDataView(0);
|
||
|
||
//监听数据概览轮播
|
||
var carouselIndex = 0;
|
||
carousel.on('change(LAY-index-dataview2)', function (obj) {
|
||
renderDataView(carouselIndex = obj.index);
|
||
});
|
||
|
||
//监听侧边伸缩
|
||
layui.admin.on('side', function () {
|
||
setTimeout(function () {
|
||
renderDataView(carouselIndex);
|
||
}, 300);
|
||
});
|
||
|
||
//监听路由
|
||
layui.admin.on('hash(tab)', function () {
|
||
layui.router().path.join('') || renderDataView(carouselIndex);
|
||
});
|
||
});
|
||
</script>
|
||
@endsection |