www.lightcourse.com/app/admin/view/statmember/stat_memberanalyze.html

250 lines
10 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{include file="public/header" /}
<div class="page">
<div class="fixed-bar">
<div class="item-title">
<div class="subject">
<h3>会员统计</h3>
<h5></h5>
</div>
{include file="public/admin_items" /}
</div>
</div>
<form method="get" name="formSearch" id="formSearch">
<div class="ds-search-form">
<dl>
<dd>
<select name="search_type" id="search_type" class="querySelect">
<option value="day" {if isset($search_arr.search_type) && $search_arr.search_type == 'day'}selected{/if}>按照天统计</option>
<option value="week" {if isset($search_arr.search_type) && $search_arr.search_type == 'week'}selected{/if}>按照周统计</option>
<option value="month" {if isset($search_arr.search_type) && $search_arr.search_type == 'month'}selected{/if}>按照月统计</option>
</select>
</dd>
<dd id="searchtype_day" style="display:none;">
<input class="txt date" type="text" value="{:date('Y-m-d',$search_arr.day.search_time)}" id="search_time" name="search_time">
</dd>
<dd id="searchtype_week" style="display:none;">
<select name="searchweek_year" class="querySelect">
{foreach name="year_arr" item="v"}
<option value="{$key}" {$search_arr.week.current_year== $key ? 'selected': ''}>{$v}</option>
{/foreach}
</select>
<select name="searchweek_month" class="querySelect">
{foreach name="month_arr" item="v"}
<option value="{$key}" {$search_arr.week.current_month== $key ? 'selected':''}>{$v}</option>
{/foreach}
</select>
<select name="searchweek_week" class="querySelect">
{foreach name="week_arr" item="v"}
<option value="{$v.key}"
{$search_arr.week.current_week==
$v['key'] ? 'selected' :''}>{$v.val}</option>
{/foreach}
</select>
</dd>
<dd id="searchtype_month" style="display:none;">
<select name="searchmonth_year" class="querySelect">
{foreach name="year_arr" item="v"}
<option value="{$key}" {$search_arr.month.current_year== $key?'selected':''}>{$v}</option>
{/foreach}
</select>
<select name="searchmonth_month" class="querySelect">
{foreach name="month_arr" item="v"}
<option value="{$key}" {$search_arr.month.current_month== $key?'selected':''}>{$v}</option>
{/foreach}
</select>
</dd>
</dl>
<dl>
<dt></dt>
<dd></dd>
</dl>
<div class="btn_group">
<a href="javascript:void(0);" id="dssubmit" class="btn" title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
<a href="{:url('Statmember/analyze')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
</div>
</div>
</form>
<div class="explanation" id="explanation">
<div class="title" id="checkZoom">
<h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
<span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
</div>
<ul>
<li>{$Think.lang.stat_validorder_explain}</li>
<li>列表一及统计图展示了时间段内会员有效订单的订单数量、下单商品数量和订单总金额的前15名会员</li>
<li>列表二展示了时间段内所有会员有效订单的订单数量、下单商品数量和订单总金额统计数据并可以点击列表上方的“导出Excel”将列表数据导出为Excel文件</li>
</ul>
</div>
<div id="stat_tabs" class="w100pre close_float ui-tabs" style="min-height:500px">
<div class="close_float tabmenu">
<ul class="tab pngFix">
<li><a href="#ordernum_div">下单量</a></li>
<li><a href="#goodsnum_div">下单商品件数</a></li>
<li><a href="#orderamount_div">下单金额</a></li>
</ul>
</div>
<!-- 下单量 -->
<div id="ordernum_div" class="close_float">
<div class="w40pre floatleft">
<table class="ds-default-table">
<thead>
<tr class="thead">
<th class="align-center">序号</th>
<th class="align-center">会员名称</th>
<th class="align-center">下单量</th>
</tr>
</thead>
<tbody id="datatable">
{notempty name="ordernum_listtop15"}
{foreach name="ordernum_listtop15" item="v"}
<tr class="hover">
<td class="align-center">{$key+1}</td>
<td class="align-center">{$v.statm_membername}</td>
<td class="align-center">{$v.ordernum}</td>
</tr>
{/foreach}
{else /}
<tr class="no_data">
<td colspan="11">{$Think.lang.no_record}</td>
</tr>
{/notempty}
</tbody>
</table>
</div>
<div id="container_ordernum" class="w50pre floatleft"></div>
<div id="list_ordernum" class="close_float" style="padding-top:10px;"></div>
</div>
<!-- 下单商品件数 -->
<div id="goodsnum_div">
<div class="w40pre floatleft">
<table class="ds-default-table">
<thead>
<tr class="thead">
<th class="align-center">序号</th>
<th class="align-center">会员名称</th>
<th class="align-center">商品件数</th>
</tr>
</thead>
<tbody id="datatable">
{notempty name="goodsnum_listtop15"}
{foreach name="goodsnum_listtop15" item="v"}
<tr class="hover">
<td class="align-center">{$key+1}</td>
<td class="align-center">{$v.statm_membername}</td>
<td class="align-center">{$v.goodsnum}</td>
</tr>
{/foreach}
{else /}
<tr class="no_data">
<td colspan="11">{$Think.lang.no_record}</td>
</tr>
{/notempty}
</tbody>
</table>
</div>
<div id="container_goodsnum" class="w50pre floatleft"></div>
<div id="list_goodsnum" class="close_float" style="padding-top:10px;"></div>
</div>
<!-- 下单金额 -->
<div id="orderamount_div">
<div class="w40pre floatleft">
<table class="ds-default-table">
<thead>
<tr class="thead">
<th class="align-center">序号</th>
<th class="align-center">会员名称</th>
<th class="align-center">下单金额</th>
</tr>
</thead>
<tbody id="datatable">
{notempty name="orderamount_listtop15"}
{foreach name="orderamount_listtop15" item="v"}
<tr class="hover">
<td class="align-center">{$key+1}</td>
<td class="align-center">{$v.statm_membername}</td>
<td class="align-center">{$v.orderamount}</td>
</tr>
{/foreach}
{else /}
<tr class="no_data">
<td colspan="11">{$Think.lang.no_record}</td>
</tr>
{/notempty}
</tbody>
</table>
</div>
<div id="container_orderamount" class="w50pre floatleft"></div>
<div id="list_orderamount" class="close_float" style="padding-top:10px;"></div>
</div>
</div>
</div>
<script src="{$Think.PLUGINS_SITE_ROOT}/highcharts/highcharts.js"></script>
<script src="{$Think.PLUGINS_SITE_ROOT}/statistics.js"></script>
<script src="{$Think.PLUGINS_SITE_ROOT}/jquery.ajaxContent.pack.js"></script>
<script>
//切换登录卡
$(function() {
$('#stat_tabs').tabs();
});
//展示搜索时间框
function show_searchtime(){
s_type = $("#search_type").val();
$("[id^='searchtype_']").hide();
$("#searchtype_"+s_type).show();
}
$(function () {
//统计数据类型
var s_type = $("#search_type").val();
$('#search_time').datepicker({dateFormat: 'yy-mm-dd'});
show_searchtime();
$("#search_type").change(function(){
show_searchtime();
});
//更新周数组
$("[name='searchweek_month']").change(function(){
var year = $("[name='searchweek_year']").val();
var month = $("[name='searchweek_month']").val();
$("[name='searchweek_week']").html('');
$.getJSON(ADMINSITEURL+'/Common/getweekofmonth.html',{y:year,m:month},function(data){
if(data != null){
for(var i = 0; i < data.length; i++) {
$("[name='searchweek_week']").append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
}
}
});
});
$('#container_ordernum').highcharts({$statordernum_json|raw});
$('#container_goodsnum').highcharts({$statgoodsnum_json|raw});
$('#container_orderamount').highcharts({$statorderamount_json|raw});
//加载详细列表
$("#list_ordernum").load("{:url('Statmember/analyzeinfo',['type'=>'ordernum','t'=>$searchtime])}");
$("#list_orderamount").load("{:url('Statmember/analyzeinfo',['type'=>'orderamount','t'=>$searchtime])}");
$("#list_goodsnum").load("{:url('Statmember/analyzeinfo',['type'=>'goodsnum','t'=>$searchtime])}");
$('#dssubmit').click(function(){
$('#formSearch').submit();
});
//导出图表
$("#export_btn").click(function(){
var item = $("#export_type");
var type = $(item).val();
if(type == 'excel'){
export_xls(item.attr('data-url').replace('.html',''));
}
});
});
</script>