123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
- <title><?php echo $shoname; ?></title>
- <link rel="shortcut icon" href="" />
-
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
- <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
- <!--[if lt IE 9]>
- <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
- <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
- <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
- <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
-
- <script src="/layuiadmin/lib/extend/echarts.min.js"></script>
- <script type="text/javascript">
- window.sysinfo = {
- <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '{$_W['uniacid']}',<?php } ?>
- <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
- <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
- <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
- 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
- 'siteroot': '{$_W['siteroot']}',
- 'siteurl': '{$_W['siteurl']}',
- 'attachurl': '{$_W['attachurl']}',
- 'attachurl_local': '{$_W['attachurl_local']}',
- 'attachurl_remote': '{$_W['attachurl_remote']}',
- 'module': {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
- 'cookie': {'pre': ''},
- 'account': {:json_encode($_W['account'])},
- };
- </script>
-
- <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
- <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
- <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
- <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
- <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
- <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
- <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
- <link href="/static/css/snailfish.css" rel="stylesheet">
- <style>
- tbody tr td{
- position: relative;
- }
- tbody tr .icow-weibiaoti--{
- visibility: hidden;
- display: inline-block;
- color: #fff;
- height:18px;
- width:18px;
- background: #e0e0e0;
- text-align: center;
- line-height: 18px;
- vertical-align: middle;
- }
- tbody tr:hover .icow-weibiaoti--{
- visibility: visible;
- }
- tbody tr .icow-weibiaoti--.hidden{
- visibility: hidden !important;
- }
- .full .icow-weibiaoti--{
- margin-left:10px;
- }
- .full>span{
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- vertical-align: middle;
- align-items: center;
- }
- tbody tr .label{
- margin: 5px 0;
- }
- .goods_attribute a{
- cursor: pointer;
- }
- .newgoodsflag{
- width: 22px;height: 16px;
- background-color: #ff0000;
- color: #fff;
- text-align: center;
- position: absolute;
- bottom: 70px;
- left: 57px;
- font-size: 12px;
- }
- .a{cursor: pointer;}
- .img-40 {
- width: 40px;
- height: 40px;
- }
- .daterangepicker select.ampmselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect{
- width:auto!important;
- }
-
- .div-inline{
- display:inline-block;
- text-align:left;
- height:94px;
- width:260px;
- margin-top: 15px;
- margin-left: 15px;
- margin-right: 35px;
- padding: 20px 0;
- box-sizing:border-box;
- border-width:1px;
- border-style:solid;
- border-color:rgba(121, 121, 121, 1);
- border-radius:0px;
- box-shadow:none;
- }
- .div-inline2{
- display:inline-block;
- text-align:center;
- height:25px;
- width:370px;
-
- }
- .span{
- margin-left: 20px;
- }
-
- .b{
- margin-left: 20px;
- display: block;
- text-align: left;
- font-weight: lighter;
- font-size: 27px;
- color: #128ff2;
- }
- .div-chart{
- display:inline-block;
- margin-top: 15px;
- margin-left: 15px;
- margin-right: 35px;
- left:0px;
- top:0px;
- width:1515px;
- height:413px;
- border-width:1px;
- border-style:solid;
- background:inherit;
- background-color:rgba(255, 255, 255, 1);
- box-sizing:border-box;
- border-color:rgba(121, 121, 121, 1);
- border-radius:0px;
-
- }
-
-
- .div-box{
- display:inline-block;
- margin-top: 15px;
- margin-left: 15px;
- margin-right: 35px;
- left:0px;
- top:0px;
- width:730px;
- height:517px;
- background:inherit;
- background-color:rgba(255, 255, 255, 1);
- box-sizing:border-box;
- border-color:rgba(121, 121, 121, 1);
- border-radius:0px;
- }
-
- .div-upper{
- width:730px;
- height:30px;
- border-width:1px;
- border-style:solid;
-
- }
- .div-lower{
-
- width:730px;
- height:487px;
- border-width:1px;
- border-style:solid;
- border-style:none solid solid solid;
-
- }
-
- .div-table1{
- display:inline-block;
- text-align:center;
- height:20px;
- }
-
- .div-table2{
- font-weight: normal;
- display:inline-block;
- text-align:center;
- height:46px;
- }
-
- .layadmin-backlog .layadmin-backlog-body {
- display: block;
- padding: 10px 15px;
- background-color: #f8f8f8;
- color: #999;
- border-radius: 2px;
- transition: all .3s;
- -webkit-transition: all .3s;
- }
- .layadmin-backlog-body h3 {
- padding-bottom: 12px;
- font-size: 14px;
- padding-top: 10px;
- color: #000;;
- }
- .layadmin-backlog-body p cite {
- font-style: normal;
- font-size: 30px;
- font-weight: 300;
- color: #009688;
- }
- .layui-carousel{background-color:#fff;}
- .h12{height:12px;clear:both;}
- .layui-col-xs25{width:20%;float:left;}
-
- .row-panel {
- margin-bottom: 24px;
- margin-top:10px;
- }
- .mypanel {
- position: relative;
- background-color: #fff;
- padding: 0 20px;
- box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.05);
- }
- .mypanel-heading {
- font-size: 15px;
- font-weight: 600;
- border-bottom: 1px solid #f0f0f0;
- height: 48px;
- line-height: 48px;
- width:100%;
- }
- .ht15{color:#000;font-weight:bold;font-size:15px;}
- .chat-box {
- width: 100%;
- height: 192px;
- }
- .mypanel-body{
- width:100%;
- margin-top:10px;
- height: 413px;
- }
- .hs th{color:#000;}
- </style>
- </head>
- <body layadmin-themealias="default">
- <table id="demo" lay-filter="test"></table>
- <div class="layui-fluid">
- <div class="layui-card">
- <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">营业数据
- </div>
-
- <div class="layui-card-body" style="padding:15px;">
-
- <div class="layui-row layui-carousel layadmin-backlog">
- <span class="mypanel-heading">今日数据</span>
- <ul class=" layui-col-space12 layui-col-md12 layui-this">
- <li class="layui-col-xs25">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3>下单金额(元)</h3>
- <p><cite>{$sum_money}</cite></p>
- </a>
- </li>
-
- <li class="layui-col-xs25">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3>下单会员数</h3>
- <p><cite>{$sum_member}</cite></p>
- </a>
- </li>
- <li class="layui-col-xs25">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3>下单量</h3>
- <p><cite>{$sum_order}</cite></p>
- </a>
- </li>
- <li class="layui-col-xs25">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3>下单商品数</h3>
- <p><cite>{$sum_goods}</cite></p>
- </a>
- </li>
- <li class="layui-col-xs25">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3>平均价格</h3>
- <p><cite>{$ave_money}</cite></p>
- </a>
- </li>
- </ul>
- <div class="h12"></div>
- <ul class=" layui-col-space12 layui-col-md12 layui-this">
- <li class="layui-col-xs25">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3>新增会员</h3>
- <p><cite>{$add_member}</cite></p>
- </a>
- </li>
- <li class="layui-col-xs25">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3>会员总数</h3>
- <p><cite>{$member_num}</cite></p>
- </a>
- </li>
- <li class="layui-col-xs25">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3>新增供货商</h3>
- <p><cite>{$add_supplier}</cite></p>
- </a>
- </li>
- <li class="layui-col-xs25">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3>新增团长</h3>
- <p><cite>{$add_head}</cite></p>
- </a>
- </li>
- <li class="layui-col-xs25">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3>新增商品</h3>
- <p><cite>{$add_goods}</cite></p>
- </a>
- </li>
- </ul>
- </div>
-
- <div class="layui-row layui-carousel layadmin-backlog">
- <?php
-
- $today_sales = json_encode($today_sales);
- $yesterday_sales = json_encode($yesterday_sales);
- ?>
- <div class="row-panel">
- <div class="mypanel-heading">今日交易走势(下单金额)</div>
- <div class="mypanel-body">
- <div class="chat-box" id="main" style="-webkit-tap-highlight-color: transparent; user-select: none; position: relative;width:100%;height: 413px;">
-
- </div>
- </div>
- </div>
- </div>
-
-
- <div class="layui-row layui-carousel layadmin-backlog">
-
- <div class="layui-col-sm6" style="margin-right:10px;">
- <div class="layui-card-header ht15">7日内团长销量top10</div>
- <table class="layui-table layuiadmin-page-table hs" lay-skin="line">
- <thead>
- <tr>
- <th style="color:#000;">名次</th>
- <th style="color:#000;">社区店名称</th>
- <th style="color:#000;">团长</th>
- <th style="color:#000;">订单数量</th>
- <th style="color:#000;">有效订单金额(元)</th>
- </tr>
- </thead>
- <tbody>
- <?php $i=1; foreach($sale_list as $k => $s){ ?>
- <?php
- if( $i>10 ) break;
- ?>
- <tr>
- <td><?php echo $i; ?></td>
- <td>{$s["community_name"]}</td>
- <td>{$s["head_name"]}</td>
- <td>{$s["count"]}</td>
- <td>{$s["sale_money"]}</td>
- </tr>
- <?php $i++; } ?>
- </tbody>
- </table>
- </div>
-
- <div class="layui-col-sm5 ">
- <div class="layui-card-header ht15">7日内商品销量top10</div>
- <table class="layui-table layuiadmin-page-table hs" lay-skin="line">
- <thead>
- <tr>
- <th style="color:#000;">名次</th>
- <th style="color:#000;">商品ID</th>
- <th style="color:#000;">商品名称</th>
- <th style="color:#000;">销量</th>
- </tr>
- </thead>
- <tbody>
-
- <?php $i=1; foreach($goods_statistic as $k => $g){ ?>
- <?php
- if( $i > 10 ) break;
- ?>
- <tr>
- <td><?php echo $i; ?></td>
- <td>{$g["goods_id"]}</td>
- <td>{$g["name"]}</td>
- <td>{$g["quantity"]}</td>
- </tr>
- <?php $i++; } ?>
- </tbody>
- </table>
- </div>
- </div>
-
- </div>
- </div>
- </div>
- <script src="/layuiadmin/layui/layui.js"></script>
- <script>
- layui.config({
- base: '/layuiadmin/' //静态资源所在路径
- }).extend({
- index: 'lib/index' //主入口模块
- }).use('index');
- </script>
- <script>
- //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
- var layer = layui.layer;
- var $;
- layui.use(['jquery', 'layer','form'], function(){
- $ = layui.$;
- var form = layui.form;
-
-
- $('.deldom').click(function(){
- var s_url = $(this).attr('data-href');
- layer.confirm($(this).attr('data-confirm'), function(index){
-
- $.ajax({
- url:s_url,
- type:'post',
- dataType:'json',
- success:function(info){
- $('#ajaxModal').removeClass('in');
- $('.modal-backdrop').removeClass('in');
- if(info.status == 0)
- {
-
- layer.msg(info.result.message,{icon: 1,time: 2000});
-
- }else if(info.status == 1){
- var go_url = location.href;
- if( info.result.hasOwnProperty("url") )
- {
- go_url = info.result.url;
- }
-
- layer.msg('操作成功',{time: 1000,
- end:function(){
- location.href = info.result.url;
- }
- });
- }
- }
- })
- },function(){
- console.log(232323);
- $('#ajaxModal').removeClass('in');
- $('.modal-backdrop').removeClass('in');
- });
- return false;
- })
-
- $('.btn-operation').click(function(){
- var ids_arr = [];
- var obj = $(this);
- var s_toggle = $(this).attr('data-toggle');
- var s_url = $(this).attr('data-href');
-
-
- $("input[name=item_checkbox]").each(function() {
-
- if( $(this).prop('checked') )
- {
- ids_arr.push( $(this).val() );
- }
- })
- if(ids_arr.length < 1)
- {
- layer.msg('请选择要操作的内容');
- }else{
- var can_sub = true;
- if( s_toggle == 'batch-remove' )
- {
- can_sub = false;
-
- layer.confirm($(obj).attr('data-confirm'), function(index){
- $.ajax({
- url:s_url,
- type:'post',
- dataType:'json',
- data:{ids:ids_arr},
- success:function(info){
-
- if(info.status == 0)
- {
- layer.msg(info.result.message,{icon: 1,time: 2000});
- }else if(info.status == 1){
- var go_url = location.href;
- if( info.result.hasOwnProperty("url") )
- {
- go_url = info.result.url;
- }
-
- layer.msg('操作成功',{time: 1000,
- end:function(){
- location.href = info.result.url;
- }
- });
- }
- }
- })
- });
- }else{
- $.ajax({
- url:s_url,
- type:'post',
- dataType:'json',
- data:{ids:ids_arr},
- success:function(info){
-
- if(info.status == 0)
- {
- layer.msg(info.result.message,{icon: 1,time: 2000});
- }else if(info.status == 1){
- var go_url = location.href;
- if( info.result.hasOwnProperty("url") )
- {
- go_url = info.result.url;
- }
-
- layer.msg('操作成功',{time: 1000,
- end:function(){
- location.href = info.result.url;
- }
- });
- }
- }
- })
- }
- }
- })
- form.on('switch(restwsitch)', function(data){
-
- var s_url = $(this).attr('data-href')
-
- var rest = 1;
- if(data.elem.checked)
- {
- rest = 1;
- }else{
- rest = 0;
- }
-
- $.ajax({
- url:s_url,
- type:'post',
- dataType:'json',
- data:{rest:rest},
- success:function(info){
-
- if(info.status == 0)
- {
- layer.msg(info.result.message,{icon: 1,time: 2000});
- }else if(info.status == 1){
- var go_url = location.href;
- if( info.result.hasOwnProperty("url") )
- {
- go_url = info.result.url;
- }
-
- layer.msg('操作成功',{time: 1000,
- end:function(){
- location.href = info.result.url;
- }
- });
- }
- }
- })
- });
- form.on('switch(enablewsitch)', function(data){
-
- var s_url = $(this).attr('data-href')
-
- var enable = 1;
- if(data.elem.checked)
- {
- enable = 1;
- }else{
- enable = 0;
- }
-
- $.ajax({
- url:s_url,
- type:'post',
- dataType:'json',
- data:{enable:enable},
- success:function(info){
-
- if(info.status == 0)
- {
- layer.msg(info.result.message,{icon: 1,time: 2000});
- }else if(info.status == 1){
- var go_url = location.href;
- if( info.result.hasOwnProperty("url") )
- {
- go_url = info.result.url;
- }
-
- layer.msg('操作成功',{time: 1000,
- end:function(){
- location.href = info.result.url;
- }
- });
- }
- }
- })
- });
-
- form.on('switch(statewsitch)', function(data){
-
- var s_url = $(this).attr('data-href')
-
- var state = 1;
- if(data.elem.checked)
- {
- state = 1;
- }else{
- state = 0;
- }
-
- $.ajax({
- url:s_url,
- type:'post',
- dataType:'json',
- data:{state:state},
- success:function(info){
-
- if(info.status == 0)
- {
- layer.msg(info.result.message,{icon: 1,time: 2000});
- }else if(info.status == 1){
- var go_url = location.href;
- if( info.result.hasOwnProperty("url") )
- {
- go_url = info.result.url;
- }
-
- layer.msg('操作成功',{time: 1000,
- end:function(){
- location.href = info.result.url;
- }
- });
- }
- }
- })
- });
- form.on('checkbox(checkboxall)', function(data){
-
- if(data.elem.checked)
- {
- $("input[name=item_checkbox]").each(function() {
- $(this).prop("checked", true);
- });
- $("input[name=checkall]").each(function() {
- $(this).prop("checked", true);
- });
-
- }else{
- $("input[name=item_checkbox]").each(function() {
- $(this).prop("checked", false);
- });
- $("input[name=checkall]").each(function() {
- $(this).prop("checked", false);
- });
- }
-
- form.render('checkbox');
- });
-
- //监听提交
- form.on('submit(formDemo)', function(data){
-
- $.ajax({
- url: data.form.action,
- type: data.form.method,
- data: data.field,
- dataType:'json',
- success: function (info) {
-
- if(info.status == 0)
- {
- layer.msg(info.result.message,{icon: 1,time: 2000});
- }else if(info.status == 1){
- var go_url = location.href;
- if( info.result.hasOwnProperty("url") )
- {
- go_url = info.result.url;
- }
-
- layer.msg('操作成功',{time: 1000,
- end:function(){
- location.href = info.result.url;
- }
- });
- }
- }
- });
-
- return false;
- });
- })
- </script>
- <script>
- var ajax_url = "";
- $(function(){
- $("[data-toggle='ajaxModal']").click(function () {
- var s_url = $(this).attr('data-href');
- ajax_url = s_url;
- console.log(23);
- $.ajax({
- url:s_url,
- type:"get",
- success:function(shtml){
- $('#ajaxModal').html(shtml);
- $("#ajaxModal").modal();
- }
- })
- });
- $(document).delegate(".modal-footer .btn-primary","click",function(){
- var s_data = $('#ajaxModal form').serialize();
- $.ajax({
- url:ajax_url,
- type:'post',
- dataType:'json',
- data:s_data,
- success:function(info){
- if(info.status == 0)
- {
- layer.msg(info.result.message,{icon: 1,time: 2000});
- }else if(info.status == 1){
- var go_url = location.href;
- if( info.result.hasOwnProperty("url") )
- {
- go_url = info.result.url;
- }
-
- layer.msg('操作成功',{time: 1000,
- end:function(){
- location.href = info.result.url;
- }
- });
- }
- }
- })
- return false;
- })
-
-
- })
- </script>
- <div id="ajaxModal" class="modal fade" style="display: none;">
- </div>
- <script>
- //没有选中时间段不能导出
- $(function () {
- $('.btn-submit').click(function () {
- var e = $(this).data('export');
- if(e==1 ){
- if($('#keyword').val() !='' ){
- $('#export').val(1);
- $('#search').submit();
- }else if($('#searchtime').val()!=''){
- $('#export').val(1);
- $('#search').submit();
- }else{
- $('#export').val(1);
- $('#search').submit();
- return;
- }
- }else{
- $('#export').val(0);
- $('#search').submit();
- }
- })
- })
- </script>
- <script type="text/javascript">
- // 基于准备好的dom,初始化echarts实例
- var myChart = echarts.init(document.getElementById('main'));
- // 指定图表的配置项和数据
- var option = {
- backgroundColor: '#fff',
- title: {
- text: ''
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: ['昨天', '今天']
- },
- toolbox: {
- show : true,
- feature : {
- mark : {show: true},
- dataView : {show: true, readOnly: false},
- magicType : {show: true, type: ['line', 'bar']},
- restore : {show: true},
- saveAsImage : {show: true}
- }
- },
-
- calculable: true,
-
- xAxis: {
- type : 'category',
- boundaryGap : false,
- data: ["0-1","1-2","2-3","3-4","4-5","5-6","6-7","7-8","8-9","9-10","10-11","11-12","12-13","13-14","14-15","15-16","16-17","17-18","18-19","19-20","20-21","21-22","22-23","23-24"]
- },
- yAxis: {},
- series: [{
- name: '昨天',
- type: 'line',
- data: <?php echo $yesterday_sales; ?>
- },{
- name: '今天',
- type: 'line',
- color:['blue'],
- data: <?php echo $today_sales; ?>
- }]
- };
- // 使用刚指定的配置项和数据显示图表。
- myChart.setOption(option);
- </script>
- </body>
- </html>
|