stat_memberarea.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <div class="subject">
  6. <h3>{$Think.lang.ds_statmember}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <form method="get" action="" name="formSearch" id="formSearch">
  13. <div class="ds-search-form">
  14. <dl>
  15. <dd>
  16. <select name="search_type" id="search_type" class="querySelect">
  17. <option value="day" {if isset($search_arr.search_type) && $search_arr.search_type == 'day'}selected{/if}>{$Think.lang.search_type_day}</option>
  18. <option value="week" {if isset($search_arr.search_type) && $search_arr.search_type == 'week'}selected{/if}>{$Think.lang.search_type_week}</option>
  19. <option value="month" {if isset($search_arr.search_type) && $search_arr.search_type == 'month'}selected{/if}>{$Think.lang.search_type_month}</option>
  20. </select>
  21. </dd>
  22. <dd id="searchtype_day" style="display:none;">
  23. <input class="txt date" type="text" value="{:date('Y-m-d',$search_arr.day.search_time)}" id="search_time" name="search_time">
  24. </dd>
  25. <dd id="searchtype_week" style="display:none;">
  26. <select name="searchweek_year" class="querySelect">
  27. {foreach name="year_arr" item="v"}
  28. <option value="{$key}" {$search_arr.week.current_year== $key ? 'selected': ''}>{$v}</option>
  29. {/foreach}
  30. </select>
  31. <select name="searchweek_month" class="querySelect">
  32. {foreach name="month_arr" item="v"}
  33. <option value="{$key}" {$search_arr.week.current_month== $key ? 'selected':''}>{$v}</option>
  34. {/foreach}
  35. </select>
  36. <select name="searchweek_week" class="querySelect">
  37. {foreach name="week_arr" item="v"}
  38. <option value="{$v.key}"{$search_arr.week.current_week== $v['key'] ? 'selected' :''}>{$v.val}</option>
  39. {/foreach}
  40. </select>
  41. </dd>
  42. <dd id="searchtype_month" style="display:none;">
  43. <select name="searchmonth_year" class="querySelect">
  44. {foreach name="year_arr" item="v"}
  45. <option value="{$key}" {$search_arr.month.current_year== $key?'selected':''}>{$v}</option>
  46. {/foreach}
  47. </select>
  48. <select name="searchmonth_month" class="querySelect">
  49. {foreach name="month_arr" item="v"}
  50. <option value="{$key}" {$search_arr.month.current_month== $key?'selected':''}>{$v}</option>
  51. {/foreach}
  52. </select>
  53. </dd>
  54. </dl>
  55. <dl>
  56. <dt>{$Think.lang.ds_member_name}</dt>
  57. <dd><input type="text" name="membername" value="{$Request.param.membername}"/></dd>
  58. </dl>
  59. <div class="btn_group">
  60. <input type='text' style='display:none' name='t' value='{$searchtime}'>
  61. <a href="javascript:void(0);" id="dssubmit" class="btn tooltip" title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
  62. <a href="{:url('Statmember/area')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
  63. </div>
  64. </div>
  65. </form>
  66. <div class="explanation" id="explanation">
  67. <div class="title" id="checkZoom">
  68. <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
  69. <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
  70. </div>
  71. <ul>
  72. <li>{$Think.lang.stat_validorder_explain}</li>
  73. <li>{$Think.lang.statstore_stat_memberarea_help1}</li>
  74. <li>{$Think.lang.statstore_stat_memberarea_help2}</li>
  75. <li>{$Think.lang.statstore_stat_memberarea_help3}</li>
  76. </ul>
  77. </div>
  78. <div id="stat_tabs" class="w100pre close_float ui-tabs" style="min-height:500px">
  79. <div class="close_float tabmenu">
  80. <ul class="tab pngFix">
  81. <li><a href="#membernum_div" ds_type="showmap" data-param='{"type":"membernum"}'>{$Think.lang.membernum}</a></li>
  82. <li><a href="#ordernum_div" ds_type="showmap" data-param='{"type":"ordernum"}'>{$Think.lang.statstore_ordernum}</a></li>
  83. <li><a href="#orderamount_div" ds_type="showmap" data-param='{"type":"orderamount"}'>{$Think.lang.statstore_orderamount}</a></li>
  84. </ul>
  85. </div>
  86. <!-- 下单会员数 -->
  87. <div id="membernum_div" class="close_float" style="text-align:center;"></div>
  88. <!-- 下单量 -->
  89. <div id="ordernum_div" class="close_float" style="text-align:center;"></div>
  90. <!-- 下单金额 -->
  91. <div id="orderamount_div" class="close_float" style="text-align:center;"></div>
  92. </div>
  93. <!-- 统计列表 -->
  94. <div id="statlist" class="w100pre close_float" style="text-align:right;"></div>
  95. </div>
  96. <script src="{$Think.PLUGINS_SITE_ROOT}/highcharts/highcharts.js"></script>
  97. <script src="{$Think.PLUGINS_SITE_ROOT}/statistics.js"></script>
  98. <script>
  99. //展示搜索时间框
  100. function show_searchtime(){
  101. s_type = $("#search_type").val();
  102. $("[id^='searchtype_']").hide();
  103. $("#searchtype_"+s_type).show();
  104. }
  105. $(function () {
  106. //切换登录卡
  107. $('#stat_tabs').tabs();
  108. //统计数据类型
  109. var s_type = $("#search_type").val();
  110. $('#search_time').datepicker({dateFormat: 'yy-mm-dd'});
  111. show_searchtime();
  112. $("#search_type").change(function(){
  113. show_searchtime();
  114. });
  115. //更新周数组
  116. $("[name='searchweek_month']").change(function(){
  117. var year = $("[name='searchweek_year']").val();
  118. var month = $("[name='searchweek_month']").val();
  119. $("[name='searchweek_week']").html('');
  120. $.getJSON(ADMINSITEURL+'/Common/getweekofmonth',{y:year,m:month},function(data){
  121. if(data != null){
  122. for(var i = 0; i < data.length; i++) {
  123. $("[name='searchweek_week']").append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
  124. }
  125. }
  126. });
  127. });
  128. $('#dssubmit').click(function(){
  129. $('#formSearch').submit();
  130. });
  131. //加载统计地图
  132. getStatMap('membernum');
  133. $("[ds_type='showmap']").click(function(){
  134. var data_str = $(this).attr('data-param');
  135. eval('data_str = '+data_str);
  136. getStatMap(data_str.type);
  137. });
  138. //加载统计列表
  139. $('#statlist').load(ADMINSITEURL+'/Statmember/area_list?t={$searchtime}');
  140. });
  141. //加载统计地图
  142. function getStatMap(type){
  143. $('#'+type+'_div').load(ADMINSITEURL+'/Statmember/area_map?type='+type+'&t={$searchtime}');
  144. }
  145. </script>