www.lightcourse.com/app/admin/view/statmarketing/marketing_group.html

123 lines
5.5 KiB
HTML
Raw Normal View History

2022-10-24 02:38:36 +00:00
{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>
<div class="fixed-empty"></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>
<div class="btn_group">
<input type='text' style='display:none' name='t' value='{$searchtime}'>
<a href="javascript:void(0);" id="dssubmit" class="btn tooltip" >{$Think.lang.ds_query}</a>
<a href="{:url('Statmarketing/group')}" 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>列表一为时间段内进行中的抢购活动,并可以点击每条抢购活动查看其详细信息</li>
<li>列表二为时间段内抢购活动生成的有效订单记录点击每列旁边的箭头对列表进行排序默认按照“下单商品数”降序排列并可以点击列表上方的“导出Excel”将列表数据导出为Excel文件</li>
</ul>
</div>
<div id="glist" class="w100pre close_float"></div>
<div id="statlist" class="w100pre close_float" style="margin-top:20px;"></div>
</div>
<script src="{$Think.PLUGINS_SITE_ROOT}/highcharts/highcharts.js"></script>
<script src="{$Think.PLUGINS_SITE_ROOT}/statistics.js"></script>
<script>
//展示搜索时间框
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',{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>');
}
}
});
});
//加载统计列表
$('#glist').load(ADMINSITEURL+'/Statmarketing/grouplist.html?t={$searchtime}');
$('#statlist').load(ADMINSITEURL+'/Statmarketing/groupgoods.html?t={$searchtime}');
$('#dssubmit').click(function(){
$('#formSearch').submit();
});
});
</script>