You've already forked qlg.tsgz.moe
							
							
		
			
				
	
	
		
			101 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			101 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
{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} |