You've already forked qlg.tsgz.moe
							
							Init Repo
This commit is contained in:
		
							
								
								
									
										101
									
								
								hyhproject/admin/view/reports/stat_new_user.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										101
									
								
								hyhproject/admin/view/reports/stat_new_user.html
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,101 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/js/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__STATIC__/plugins/echarts/echarts.min.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/reports/stat_new_user.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
<input type="text" id="startDate" name="startDate" class="laydate-icon ipt" maxLength="20" value='{$startDate}' placeholder='开始日期'/>
 | 
			
		||||
至
 | 
			
		||||
<input type="text" id="endDate" name="endDate" class="laydate-icon ipt" maxLength="20" value='{$endDate}' placeholder='结束日期'/>
 | 
			
		||||
<button class="btn btn-primary" onclick='javascript:loadStat()'><i class='fa fa-search'></i>查询</button>  
 | 
			
		||||
</div>
 | 
			
		||||
<div id="main" style='float:left;width:75%;height:90%;'>
 | 
			
		||||
</div>
 | 
			
		||||
<div id="content"  style='float:left;width:25%;height:90%;position: relative;margin-top: 200px;'>
 | 
			
		||||
	<table>
 | 
			
		||||
		<tr><th width='150'>会员增长数量<font color='red'>*</font>:<span id="groupNum"></span></th><td></td></tr>
 | 
			
		||||
    	<tr><th width='150'>会员增长率<font color='red'>*</font>:<span id="groupRate"></span></th><td></td></tr>
 | 
			
		||||
    </table>
 | 
			
		||||
</table>
 | 
			
		||||
</div>
 | 
			
		||||
<!-- <div class='wst-grid' style='float:left;width:15%;height:90%;position: relative;margin-top:200px;'>
 | 
			
		||||
 <div id="mmg" class="mmg"></div>
 | 
			
		||||
 <div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div> -->
 | 
			
		||||
<!-- <script>
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'会员增长数量', name:'loginName', width: 120,sortable:true},
 | 
			
		||||
            {title:'真实姓名', name:'trueName' ,width:60,sortable:true},
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (h-85),cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/reports/statNewUserPage')
 | 
			
		||||
    });   
 | 
			
		||||
}
 | 
			
		||||
$(function(){initGrid();})
 | 
			
		||||
</script> -->
 | 
			
		||||
<script>
 | 
			
		||||
	function loadStat(){
 | 
			
		||||
    var loading = WST.msg('正在查询数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/reports/statNewUser'),WST.getParams('.ipt'),function(data,textStatus){
 | 
			
		||||
	    layer.close(loading);
 | 
			
		||||
	    var json = WST.toAdminJson(data);
 | 
			
		||||
 | 
			
		||||
	    if(json.status=='1'){
 | 
			
		||||
	    	$("#groupNum").text(JSON.stringify(json.groupNum));
 | 
			
		||||
	    	var num = 5.9758966564164646;  
 | 
			
		||||
	    	var a=JSON.stringify(json.groupRate);
 | 
			
		||||
	    	if(a.length >=3){  
 | 
			
		||||
	            a =  (Number(num.toFixed(2))+0.01);  
 | 
			
		||||
	        }
 | 
			
		||||
	    	$("#groupRate").text(a);
 | 
			
		||||
			var option = {
 | 
			
		||||
			    tooltip: {
 | 
			
		||||
			        trigger: 'axis'
 | 
			
		||||
			    },
 | 
			
		||||
			    legend: {
 | 
			
		||||
			        data:['会员','店铺']
 | 
			
		||||
			    },
 | 
			
		||||
			    toolbox: {
 | 
			
		||||
			        show : true,
 | 
			
		||||
			        feature : {
 | 
			
		||||
			            mark : {show: true},
 | 
			
		||||
			            dataView : {show: false, readOnly: false},
 | 
			
		||||
			            magicType : {show: true, type: ['line', 'bar']},
 | 
			
		||||
			            restore : {show: true},
 | 
			
		||||
			            saveAsImage : {show: true}
 | 
			
		||||
			        }
 | 
			
		||||
			    },
 | 
			
		||||
			    xAxis: {
 | 
			
		||||
			        type: 'category',
 | 
			
		||||
			        boundaryGap: false,
 | 
			
		||||
			        data: json.data.days
 | 
			
		||||
			    },
 | 
			
		||||
			    yAxis: {
 | 
			
		||||
			        type: 'value'
 | 
			
		||||
			    },
 | 
			
		||||
			    series: [
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'会员',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            data:json.data.u0
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'店铺',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            data:json.data.u1
 | 
			
		||||
			        }
 | 
			
		||||
			    ]
 | 
			
		||||
			};
 | 
			
		||||
           
 | 
			
		||||
			myChart.setOption(option);
 | 
			
		||||
	    }
 | 
			
		||||
	});  
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										15
									
								
								hyhproject/admin/view/reports/stat_new_user.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								hyhproject/admin/view/reports/stat_new_user.js
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
var myChart;
 | 
			
		||||
$(function(){
 | 
			
		||||
	var h = WST.pageHeight();
 | 
			
		||||
	$('#main').height(h-50);
 | 
			
		||||
	var laydate = layui.laydate;
 | 
			
		||||
	laydate.render({
 | 
			
		||||
	    elem: '#startDate'
 | 
			
		||||
	});
 | 
			
		||||
	laydate.render({
 | 
			
		||||
	    elem: '#endDate'
 | 
			
		||||
	});
 | 
			
		||||
    myChart = echarts.init(document.getElementById('main'));
 | 
			
		||||
    loadStat();
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										20
									
								
								hyhproject/admin/view/reports/stat_orders.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										20
									
								
								hyhproject/admin/view/reports/stat_orders.html
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__STATIC__/plugins/echarts/echarts.min.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/reports/stat_orders.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
<input type="text" id="startDate" name="startDate" class="laydate-icon ipt" maxLength="20" value='{$startDate}' placeholder='开始日期'/>
 | 
			
		||||
至
 | 
			
		||||
<input type="text" id="endDate" name="endDate" class="laydate-icon ipt" maxLength="20" value='{$endDate}' placeholder='结束日期'/>
 | 
			
		||||
支付方式:
 | 
			
		||||
<select id='payType' class='ipt'>
 | 
			
		||||
	<option value='-1'>全部</option>
 | 
			
		||||
	<option value='0'>货到付款</option>
 | 
			
		||||
	<option value='1'>在线支付</option>
 | 
			
		||||
</select>
 | 
			
		||||
<button class="btn btn-primary" onclick='javascript:loadStat()'><i class='fa fa-search'></i>查询</button>  
 | 
			
		||||
</div>
 | 
			
		||||
<div id="main" style='width:100%;height:99%;'></div>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										127
									
								
								hyhproject/admin/view/reports/stat_orders.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										127
									
								
								hyhproject/admin/view/reports/stat_orders.js
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,127 @@
 | 
			
		||||
$(function(){
 | 
			
		||||
	var h = WST.pageHeight();
 | 
			
		||||
	$('#main').height(h-50);
 | 
			
		||||
	var laydate = layui.laydate;
 | 
			
		||||
	laydate.render({
 | 
			
		||||
	    elem: '#startDate'
 | 
			
		||||
	});
 | 
			
		||||
	laydate.render({
 | 
			
		||||
	    elem: '#endDate'
 | 
			
		||||
	});
 | 
			
		||||
    loadStat();
 | 
			
		||||
});
 | 
			
		||||
function loadStat(){
 | 
			
		||||
    var loading = WST.msg('正在查询数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/reports/statOrders'),WST.getParams('.ipt'),function(data,textStatus){
 | 
			
		||||
	    layer.close(loading);
 | 
			
		||||
	    var json = WST.toAdminJson(data);
 | 
			
		||||
	    var myChart = echarts.init(document.getElementById('main'));
 | 
			
		||||
	    myChart.clear();
 | 
			
		||||
	    if(json.status=='1' && json.data){
 | 
			
		||||
			var option = {
 | 
			
		||||
			    tooltip : {
 | 
			
		||||
			        trigger: 'axis'
 | 
			
		||||
			    },
 | 
			
		||||
			    toolbox: {
 | 
			
		||||
			        show : true,
 | 
			
		||||
			        y: 'top',
 | 
			
		||||
			        feature : {
 | 
			
		||||
			            mark : {show: true},
 | 
			
		||||
			            dataView : {show: false, readOnly: false},
 | 
			
		||||
			            magicType : {show: true, type: ['line', 'bar', 'tiled']},
 | 
			
		||||
			            restore : {show: true},
 | 
			
		||||
			            saveAsImage : {show: true}
 | 
			
		||||
			        }
 | 
			
		||||
			    },
 | 
			
		||||
			    calculable : true,
 | 
			
		||||
			    legend: {
 | 
			
		||||
			        data:['电脑端','微信端','触屏端','安卓端','苹果端']
 | 
			
		||||
			    },
 | 
			
		||||
			    xAxis : [
 | 
			
		||||
			        {
 | 
			
		||||
			            type : 'category',
 | 
			
		||||
			            splitLine : {show : false},
 | 
			
		||||
			            data : json.data.days
 | 
			
		||||
			        }
 | 
			
		||||
			    ],
 | 
			
		||||
			    yAxis : [
 | 
			
		||||
			        {
 | 
			
		||||
			            type : 'value',
 | 
			
		||||
			            position: 'right'
 | 
			
		||||
			        }
 | 
			
		||||
			    ],
 | 
			
		||||
			    series : [
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'电脑端',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            tooltip : {trigger: 'item'},
 | 
			
		||||
			            stack: '来源',
 | 
			
		||||
			            data:json.data['p0']
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'微信端',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            tooltip : {trigger: 'item'},
 | 
			
		||||
			            stack: '来源',
 | 
			
		||||
			            data:json.data['p1']
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'触屏端',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            tooltip : {trigger: 'item'},
 | 
			
		||||
			            stack: '来源',
 | 
			
		||||
			            data:json.data['p2']
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'安卓端',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            tooltip : {trigger: 'item'},
 | 
			
		||||
			            stack: '来源',
 | 
			
		||||
			            data:json.data['p3']
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'苹果端',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            tooltip : {trigger: 'item'},
 | 
			
		||||
			            stack: '来源',
 | 
			
		||||
			            data:json.data['p3']
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'销售额',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            data:json.data['total']
 | 
			
		||||
			        },
 | 
			
		||||
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'销售来源细分',
 | 
			
		||||
			            type:'pie',
 | 
			
		||||
			            tooltip : {
 | 
			
		||||
			                trigger: 'item',
 | 
			
		||||
			                formatter: '{a} <br/>{b} : {c} ({d}%)'
 | 
			
		||||
			            },
 | 
			
		||||
			            center: [160,130],
 | 
			
		||||
			            radius : [0, 50],
 | 
			
		||||
			            itemStyle : {
 | 
			
		||||
			                normal : {
 | 
			
		||||
			                    labelLine : {
 | 
			
		||||
			                        length : 20
 | 
			
		||||
			                    }
 | 
			
		||||
			                }
 | 
			
		||||
			            },
 | 
			
		||||
			            data:[
 | 
			
		||||
			                {value:json.data.map.p0, name:'电脑端'},
 | 
			
		||||
			                {value:json.data.map.p1, name:'微信端'},
 | 
			
		||||
			                {value:json.data.map.p2, name:'触屏端'},
 | 
			
		||||
			                {value:json.data.map.p3, name:'安卓端'},
 | 
			
		||||
			                {value:json.data.map.p4, name:'苹果端'}
 | 
			
		||||
			            ]
 | 
			
		||||
			        }
 | 
			
		||||
			    ]
 | 
			
		||||
			};       
 | 
			
		||||
			myChart.setOption(option);
 | 
			
		||||
	    }else{
 | 
			
		||||
	    	WST.msg('没有查询到记录');
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	});  
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										22
									
								
								hyhproject/admin/view/reports/stat_sales.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								hyhproject/admin/view/reports/stat_sales.html
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__STATIC__/plugins/echarts/echarts.min.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/reports/stat_sales.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
<input type="text" id="startDate" name="startDate" class="laydate-icon ipt" maxLength="20" value='{$startDate}' placeholder='开始日期'/>
 | 
			
		||||
至
 | 
			
		||||
<input type="text" id="endDate" name="endDate" class="laydate-icon ipt" maxLength="20" value='{$endDate}' placeholder='结束日期'/>
 | 
			
		||||
<div class='f-left tbr-m'>
 | 
			
		||||
支付方式:
 | 
			
		||||
<select id='payType' class='ipt'>
 | 
			
		||||
	<option value='-1'>全部</option>
 | 
			
		||||
	<option value='0'>货到付款</option>
 | 
			
		||||
	<option value='1'>在线支付</option>
 | 
			
		||||
</select>
 | 
			
		||||
</div>
 | 
			
		||||
<button class="btn btn-primary" onclick='javascript:loadStat()'><i class='fa fa-search'></i>查询</button>  
 | 
			
		||||
</div>
 | 
			
		||||
<div id="main" style='width:100%;height:99%;'></div>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										126
									
								
								hyhproject/admin/view/reports/stat_sales.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										126
									
								
								hyhproject/admin/view/reports/stat_sales.js
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,126 @@
 | 
			
		||||
$(function(){
 | 
			
		||||
	var h = WST.pageHeight();
 | 
			
		||||
	$('#main').height(h-50);
 | 
			
		||||
	var laydate = layui.laydate;
 | 
			
		||||
	laydate.render({
 | 
			
		||||
	    elem: '#startDate'
 | 
			
		||||
	});
 | 
			
		||||
	laydate.render({
 | 
			
		||||
	    elem: '#endDate'
 | 
			
		||||
	});
 | 
			
		||||
    loadStat();
 | 
			
		||||
});
 | 
			
		||||
function loadStat(){
 | 
			
		||||
    var loading = WST.msg('正在查询数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/reports/statSales'),WST.getParams('.ipt'),function(data,textStatus){
 | 
			
		||||
	    layer.close(loading);
 | 
			
		||||
	    var json = WST.toAdminJson(data);
 | 
			
		||||
	    var myChart = echarts.init(document.getElementById('main'));
 | 
			
		||||
	    myChart.clear();
 | 
			
		||||
	    if(json.status=='1' && json.data){
 | 
			
		||||
			var option = {
 | 
			
		||||
			    tooltip : {
 | 
			
		||||
			        trigger: 'axis'
 | 
			
		||||
			    },
 | 
			
		||||
			    toolbox: {
 | 
			
		||||
			        show : true,
 | 
			
		||||
			        y: 'top',
 | 
			
		||||
			        feature : {
 | 
			
		||||
			            mark : {show: true},
 | 
			
		||||
			            dataView : {show: false, readOnly: false},
 | 
			
		||||
			            magicType : {show: true, type: ['line', 'bar', 'tiled']},
 | 
			
		||||
			            restore : {show: true},
 | 
			
		||||
			            saveAsImage : {show: true}
 | 
			
		||||
			        }
 | 
			
		||||
			    },
 | 
			
		||||
			    calculable : true,
 | 
			
		||||
			    legend: {
 | 
			
		||||
			        data:['电脑端','微信端','触屏端','安卓端','苹果端']
 | 
			
		||||
			    },
 | 
			
		||||
			    xAxis : [
 | 
			
		||||
			        {
 | 
			
		||||
			            type : 'category',
 | 
			
		||||
			            splitLine : {show : false},
 | 
			
		||||
			            data : json.data.days
 | 
			
		||||
			        }
 | 
			
		||||
			    ],
 | 
			
		||||
			    yAxis : [
 | 
			
		||||
			        {
 | 
			
		||||
			            type : 'value',
 | 
			
		||||
			            position: 'right'
 | 
			
		||||
			        }
 | 
			
		||||
			    ],
 | 
			
		||||
			    series : [
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'电脑端',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            tooltip : {trigger: 'item'},
 | 
			
		||||
			            stack: '来源',
 | 
			
		||||
			            data:json.data['p0']
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'微信端',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            tooltip : {trigger: 'item'},
 | 
			
		||||
			            stack: '来源',
 | 
			
		||||
			            data:json.data['p1']
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'触屏端',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            tooltip : {trigger: 'item'},
 | 
			
		||||
			            stack: '来源',
 | 
			
		||||
			            data:json.data['p2']
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'安卓端',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            tooltip : {trigger: 'item'},
 | 
			
		||||
			            stack: '来源',
 | 
			
		||||
			            data:json.data['p3']
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'苹果端',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            tooltip : {trigger: 'item'},
 | 
			
		||||
			            stack: '来源',
 | 
			
		||||
			            data:json.data['p4']
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'销售额',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            data:json.data['total']
 | 
			
		||||
			        },
 | 
			
		||||
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'销售来源细分',
 | 
			
		||||
			            type:'pie',
 | 
			
		||||
			            tooltip : {
 | 
			
		||||
			                trigger: 'item',
 | 
			
		||||
			                formatter: '{a} <br/>{b} : {c} ({d}%)'
 | 
			
		||||
			            },
 | 
			
		||||
			            center: [160,130],
 | 
			
		||||
			            radius : [0, 50],
 | 
			
		||||
			            itemStyle : {
 | 
			
		||||
			                normal : {
 | 
			
		||||
			                    labelLine : {
 | 
			
		||||
			                        length : 20
 | 
			
		||||
			                    }
 | 
			
		||||
			                }
 | 
			
		||||
			            },
 | 
			
		||||
			            data:[
 | 
			
		||||
			                {value:json.data.map.p0, name:'电脑端'},
 | 
			
		||||
			                {value:json.data.map.p1, name:'微信端'},
 | 
			
		||||
			                {value:json.data.map.p2, name:'触屏端'},
 | 
			
		||||
			                {value:json.data.map.p3, name:'安卓端'},
 | 
			
		||||
			                {value:json.data.map.p4, name:'苹果端'}
 | 
			
		||||
			            ]
 | 
			
		||||
			        }
 | 
			
		||||
			    ]
 | 
			
		||||
			};
 | 
			
		||||
			myChart.setOption(option);
 | 
			
		||||
	    }else{
 | 
			
		||||
	    	WST.msg('没有查询到记录');
 | 
			
		||||
	    }
 | 
			
		||||
	});  
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										14
									
								
								hyhproject/admin/view/reports/stat_user_login.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								hyhproject/admin/view/reports/stat_user_login.html
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__STATIC__/plugins/echarts/echarts.min.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/reports/stat_user_login.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
<input type="text" placeholder='开始日期' id="startDate" name="startDate" class="laydate-icon ipt" maxLength="20" value='{$startDate}'/>
 | 
			
		||||
至
 | 
			
		||||
<input type="text" placeholder='结束日期' id="endDate" name="endDate" class="laydate-icon ipt" maxLength="20" value='{$endDate}'/>
 | 
			
		||||
<button class="btn btn-primary" onclick='javascript:loadStat()'><i class='fa fa-search'></i>查询</button>  
 | 
			
		||||
</div>
 | 
			
		||||
<div id="main" style='width:100%;height:99%;'></div>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										63
									
								
								hyhproject/admin/view/reports/stat_user_login.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										63
									
								
								hyhproject/admin/view/reports/stat_user_login.js
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,63 @@
 | 
			
		||||
$(function(){
 | 
			
		||||
	var h = WST.pageHeight();
 | 
			
		||||
	$('#main').height(h-50);
 | 
			
		||||
	var laydate = layui.laydate;
 | 
			
		||||
	laydate.render({
 | 
			
		||||
	    elem: '#startDate'
 | 
			
		||||
	});
 | 
			
		||||
	laydate.render({
 | 
			
		||||
	    elem: '#endDate'
 | 
			
		||||
	});
 | 
			
		||||
    loadStat();
 | 
			
		||||
});
 | 
			
		||||
function loadStat(){
 | 
			
		||||
    var loading = WST.msg('正在查询数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/reports/statUserLogin'),WST.getParams('.ipt'),function(data,textStatus){
 | 
			
		||||
	    layer.close(loading);
 | 
			
		||||
	    var json = WST.toAdminJson(data);
 | 
			
		||||
	    var myChart = echarts.init(document.getElementById('main'));
 | 
			
		||||
	    myChart.clear();
 | 
			
		||||
	    if(json.status=='1'){
 | 
			
		||||
			var option = {
 | 
			
		||||
			    tooltip: {
 | 
			
		||||
			        trigger: 'axis'
 | 
			
		||||
			    },
 | 
			
		||||
			    legend: {
 | 
			
		||||
			        data:['会员','店铺']
 | 
			
		||||
			    },
 | 
			
		||||
			    toolbox: {
 | 
			
		||||
			        show : true,
 | 
			
		||||
			        feature : {
 | 
			
		||||
			            mark : {show: true},
 | 
			
		||||
			            dataView : {show: false, readOnly: false},
 | 
			
		||||
			            magicType : {show: true, type: ['line', 'bar']},
 | 
			
		||||
			            restore : {show: true},
 | 
			
		||||
			            saveAsImage : {show: true}
 | 
			
		||||
			        }
 | 
			
		||||
			    },
 | 
			
		||||
			    xAxis: {
 | 
			
		||||
			        type: 'category',
 | 
			
		||||
			        boundaryGap: false,
 | 
			
		||||
			        data: json.data.days
 | 
			
		||||
			    },
 | 
			
		||||
			    yAxis: {
 | 
			
		||||
			        type: 'value'
 | 
			
		||||
			    },
 | 
			
		||||
			    series: [
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'会员',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            data:json.data.u0
 | 
			
		||||
			        },
 | 
			
		||||
			        {
 | 
			
		||||
			            name:'店铺',
 | 
			
		||||
			            type:'line',
 | 
			
		||||
			            data:json.data.u1
 | 
			
		||||
			        }
 | 
			
		||||
			    ]
 | 
			
		||||
			};
 | 
			
		||||
                    
 | 
			
		||||
			myChart.setOption(option);
 | 
			
		||||
	    }
 | 
			
		||||
	});  
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										41
									
								
								hyhproject/admin/view/reports/top_sale_goods.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										41
									
								
								hyhproject/admin/view/reports/top_sale_goods.html
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__ADMIN__/js/mmgrid/mmGrid.css?v={$v}" />
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/js/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/reports/top_sale_goods.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
    <select id="cat_0" class='ipt pgoodsCats' level="0" onchange="WST.ITGoodsCats({id:'cat_0',val:this.value,isRequire:false,className:'pgoodsCats'});">
 | 
			
		||||
        <option value="">-所属分类-</option>
 | 
			
		||||
        {volist name=":WSTGoodsCats(0)" id="vo"}
 | 
			
		||||
        <option value="{$vo['catId']}">{$vo['catName']}</option>
 | 
			
		||||
        {/volist}
 | 
			
		||||
    </select>
 | 
			
		||||
    <input type="text" name="shopName"  placeholder='店铺名称' id="shopName" class='ipt'/>
 | 
			
		||||
<input type="text" name="goodsName"  placeholder='商品名称' id="goodsName" class='ipt'/>
 | 
			
		||||
<input type="text" id="startDate" name="startDate" class="laydate-icon ipt" maxLength="20" value='{$startDate}' placeholder='开始日期'/>
 | 
			
		||||
至
 | 
			
		||||
<input type="text" id="endDate" name="endDate" class="laydate-icon ipt" maxLength="20" value='{$endDate}' placeholder='结束日期'/>
 | 
			
		||||
<button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class='fa fa-search'></i>查询</button>  
 | 
			
		||||
<button class="btn btn-primary f-right btn-fixtop" onclick='javascript:toExport(0)'><i class="fa fa-sign-in"></i>导出</button>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
function toExport(){
 | 
			
		||||
    var params = {};
 | 
			
		||||
    params = WST.getParams('.ipt');
 | 
			
		||||
    params.goodsCatIdPath = WST.ITGetAllGoodsCatVals('cat_0','pgoodsCats').join('_');
 | 
			
		||||
    var box = WST.confirm({content:"您确定要导出订单吗?",yes:function(){
 | 
			
		||||
        layer.close(box);
 | 
			
		||||
        location.href=WST.U('admin/reports/toExportGoods',params);
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
$(function(){initSaleGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										47
									
								
								hyhproject/admin/view/reports/top_sale_goods.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										47
									
								
								hyhproject/admin/view/reports/top_sale_goods.js
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,47 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initSaleGrid(){
 | 
			
		||||
    var laydate = layui.laydate;
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#startDate'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#endDate'
 | 
			
		||||
    });
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:' ', name:'goodsName', width: 30, renderer: function(val,item,rowIndex){
 | 
			
		||||
            	var thumb = item['goodsImg'];
 | 
			
		||||
	        	// thumb = thumb.replace('.','_thumb.');
 | 
			
		||||
                thumb = thumb+'?x-oss-process=image/resize,w_60,h_60';
 | 
			
		||||
                return "<span class='weixin'><a target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId'])+"'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:60px;width:60px;' src='"+WST.conf.IMGURL+"/"+thumb
 | 
			
		||||
            	+"'><span class='imged' ><img  style='height:180px;width:180px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'></span></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'商品名称', name:'goodsName', width: 150},
 | 
			
		||||
            {title:'商品编号', name:'goodsSn', width: 80},
 | 
			
		||||
            {title:'所属店铺', name:'shopName', width: 150},
 | 
			
		||||
            {title:'订单总数', name:'orderNum', width: 80},
 | 
			
		||||
            {title:'浏览总数', name:'pageNum', width: 80},
 | 
			
		||||
            {title:'销量总数', name:'goodsNum' , width: 20},
 | 
			
		||||
            {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
                h += "<a class='btn btn-blue' target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId'])+"'><i class='fa fa-search'></i>查看</a> ";
 | 
			
		||||
                return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true,indexColWidth:50,  cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/reports/topSaleGoodsByPage',WST.getParams('.ipt')), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
	var params = WST.getParams('.ipt');
 | 
			
		||||
    params.goodsCatIdPath = WST.ITGetAllGoodsCatVals('cat_0','pgoodsCats').join('_');
 | 
			
		||||
    params.page = 1;
 | 
			
		||||
	mmg.load(params);
 | 
			
		||||
}
 | 
			
		||||
function toolTip(){
 | 
			
		||||
    WST.toolTip();
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										33
									
								
								hyhproject/admin/view/reports/top_sale_shop.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										33
									
								
								hyhproject/admin/view/reports/top_sale_shop.html
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__ADMIN__/js/mmgrid/mmGrid.css?v={$v}" />
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/js/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/reports/top_sale_shop.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
<input type="text" name="shopName"  placeholder='店铺名称' id="shopName" class='ipt'/>
 | 
			
		||||
<input type="text" id="startDate" name="startDate" class="laydate-icon ipt" maxLength="20" value='{$startDate}' placeholder='开始日期'/>
 | 
			
		||||
至
 | 
			
		||||
<input type="text" id="endDate" name="endDate" class="laydate-icon ipt" maxLength="20" value='{$endDate}' placeholder='结束日期'/>
 | 
			
		||||
<button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class='fa fa-search'></i>查询</button> 
 | 
			
		||||
<button class="btn btn-primary f-right btn-fixtop" onclick='javascript:toExport(0)'><i class="fa fa-sign-in"></i>导出</button>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
	function toExport(){
 | 
			
		||||
    var params = {};
 | 
			
		||||
    params = WST.getParams('.ipt');
 | 
			
		||||
    var box = WST.confirm({content:"您确定要导出订单吗?",yes:function(){
 | 
			
		||||
        layer.close(box);
 | 
			
		||||
        location.href=WST.U('admin/reports/toExportShop',params);
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
$(function(){initSaleGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										46
									
								
								hyhproject/admin/view/reports/top_sale_shop.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										46
									
								
								hyhproject/admin/view/reports/top_sale_shop.js
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,46 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initSaleGrid(){
 | 
			
		||||
    var laydate = layui.laydate;
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#startDate'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#endDate'
 | 
			
		||||
});
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:' ', name:'shopImg', width: 30, renderer:function(val,item,rowIndex){
 | 
			
		||||
                return "<span class='weixin'><a target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId'])+"'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:60px;width:60px;' src='"+WST.conf.IMGURL+"/"+item['shopImg']
 | 
			
		||||
            	+"'><span class='imged' ><img  style='height:180px;width:180px;' src='"+WST.conf.IMGURL+"/"+item['shopImg']+"'></span></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'店铺ID', name:'shopId', width: 30},
 | 
			
		||||
            {title:'店铺', name:'shopName', width: 130},
 | 
			
		||||
            {title:'结算所得ECT', name:'ectNum', width: 130,renderer:function(val,item,rowIndex){
 | 
			
		||||
                if(item['ectNum']==null){
 | 
			
		||||
                    return "0.00000";
 | 
			
		||||
                }else{
 | 
			
		||||
                    return item['ectNum'];
 | 
			
		||||
                }
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'销售额', name:'totalMoney', width: 130, renderer:function(val,item,rowIndex){return '¥'+val;}},
 | 
			
		||||
            {title:'在线支付总金额', name:'onLinePayMoney', width: 130, renderer:function(val,item,rowIndex){return '¥'+val;}},
 | 
			
		||||
            {title:'在线支付实际收入', name:'onLinePayTrueMoney', width: 130, renderer:function(val,item,rowIndex){return '¥'+val;}},
 | 
			
		||||
            {title:'货到付款实际收入', name:'offLinePayMoney', width: 130, renderer:function(val,item,rowIndex){return '¥'+val;}},
 | 
			
		||||
            {title:'订单数', name:'orderNum', width: 50},
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:50, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/reports/topShopSalesByPage',WST.getParams('.ipt')), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
	var params = WST.getParams('.ipt');
 | 
			
		||||
    params.page = 1;
 | 
			
		||||
	mmg.load(params);
 | 
			
		||||
}
 | 
			
		||||
function toolTip(){
 | 
			
		||||
    WST.toolTip();
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user