stat_memberanalyze.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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" 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}"
  39. {$search_arr.week.current_week==
  40. $v['key'] ? 'selected' :''}>{$v.val}</option>
  41. {/foreach}
  42. </select>
  43. </dd>
  44. <dd id="searchtype_month" style="display:none;">
  45. <select name="searchmonth_year" class="querySelect">
  46. {foreach name="year_arr" item="v"}
  47. <option value="{$key}" {$search_arr.month.current_year== $key?'selected':''}>{$v}</option>
  48. {/foreach}
  49. </select>
  50. <select name="searchmonth_month" class="querySelect">
  51. {foreach name="month_arr" item="v"}
  52. <option value="{$key}" {$search_arr.month.current_month== $key?'selected':''}>{$v}</option>
  53. {/foreach}
  54. </select>
  55. </dd>
  56. </dl>
  57. <dl>
  58. <dt></dt>
  59. <dd></dd>
  60. </dl>
  61. <div class="btn_group">
  62. <a href="javascript:void(0);" id="dssubmit" class="btn" title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
  63. <a href="{:url('Statmember/analyze')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
  64. </div>
  65. </div>
  66. </form>
  67. <div class="explanation" id="explanation">
  68. <div class="title" id="checkZoom">
  69. <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
  70. <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
  71. </div>
  72. <ul>
  73. <li>{$Think.lang.stat_validorder_explain}</li>
  74. <li>{$Think.lang.statstore_stat_memberanalyze_help1}</li>
  75. <li>{$Think.lang.statstore_stat_memberanalyze_help2}</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="#ordernum_div">{$Think.lang.statstore_ordernum}</a></li>
  82. <li><a href="#goodsnum_div">{$Think.lang.goodsnum}</a></li>
  83. <li><a href="#orderamount_div">{$Think.lang.statstore_orderamount}</a></li>
  84. </ul>
  85. </div>
  86. <!-- 下单量 -->
  87. <div id="ordernum_div" class="close_float">
  88. <div class="w40pre floatleft">
  89. <table class="ds-default-table">
  90. <thead>
  91. <tr class="thead">
  92. <th class="align-center">{$Think.lang.statstore_number}</th>
  93. <th class="align-center">{$Think.lang.ds_member_name}</th>
  94. <th class="align-center">{$Think.lang.statstore_ordernum}</th>
  95. </tr>
  96. </thead>
  97. <tbody id="datatable">
  98. {notempty name="ordernum_listtop15"}
  99. {foreach name="ordernum_listtop15" item="v"}
  100. <tr class="hover">
  101. <td class="align-center">{$key+1}</td>
  102. <td class="align-center">{$v.statm_membername}</td>
  103. <td class="align-center">{$v.ordernum}</td>
  104. </tr>
  105. {/foreach}
  106. {else /}
  107. <tr class="no_data">
  108. <td colspan="11">{$Think.lang.no_record}</td>
  109. </tr>
  110. {/notempty}
  111. </tbody>
  112. </table>
  113. </div>
  114. <div id="container_ordernum" class="w50pre floatleft"></div>
  115. <div id="list_ordernum" class="close_float" style="padding-top:10px;"></div>
  116. </div>
  117. <!-- 下单商品件数 -->
  118. <div id="goodsnum_div">
  119. <div class="w40pre floatleft">
  120. <table class="ds-default-table">
  121. <thead>
  122. <tr class="thead">
  123. <th class="align-center">{$Think.lang.statstore_number}</th>
  124. <th class="align-center">{$Think.lang.ds_member_name}</th>
  125. <th class="align-center">{$Think.lang.goodsnum}</th>
  126. </tr>
  127. </thead>
  128. <tbody id="datatable">
  129. {notempty name="goodsnum_listtop15"}
  130. {foreach name="goodsnum_listtop15" item="v"}
  131. <tr class="hover">
  132. <td class="align-center">{$key+1}</td>
  133. <td class="align-center">{$v.statm_membername}</td>
  134. <td class="align-center">{$v.goodsnum}</td>
  135. </tr>
  136. {/foreach}
  137. {else /}
  138. <tr class="no_data">
  139. <td colspan="11">{$Think.lang.no_record}</td>
  140. </tr>
  141. {/notempty}
  142. </tbody>
  143. </table>
  144. </div>
  145. <div id="container_goodsnum" class="w50pre floatleft"></div>
  146. <div id="list_goodsnum" class="close_float" style="padding-top:10px;"></div>
  147. </div>
  148. <!-- 下单金额 -->
  149. <div id="orderamount_div">
  150. <div class="w40pre floatleft">
  151. <table class="ds-default-table">
  152. <thead>
  153. <tr class="thead">
  154. <th class="align-center">{$Think.lang.statstore_number}</th>
  155. <th class="align-center">{$Think.lang.ds_member_name}</th>
  156. <th class="align-center">{$Think.lang.statstore_orderamount}</th>
  157. </tr>
  158. </thead>
  159. <tbody id="datatable">
  160. {notempty name="orderamount_listtop15"}
  161. {foreach name="orderamount_listtop15" item="v"}
  162. <tr class="hover">
  163. <td class="align-center">{$key+1}</td>
  164. <td class="align-center">{$v.statm_membername}</td>
  165. <td class="align-center">{$v.orderamount}</td>
  166. </tr>
  167. {/foreach}
  168. {else /}
  169. <tr class="no_data">
  170. <td colspan="11">{$Think.lang.no_record}</td>
  171. </tr>
  172. {/notempty}
  173. </tbody>
  174. </table>
  175. </div>
  176. <div id="container_orderamount" class="w50pre floatleft"></div>
  177. <div id="list_orderamount" class="close_float" style="padding-top:10px;"></div>
  178. </div>
  179. </div>
  180. </div>
  181. <script src="{$Think.PLUGINS_SITE_ROOT}/highcharts/highcharts.js"></script>
  182. <script src="{$Think.PLUGINS_SITE_ROOT}/statistics.js"></script>
  183. <script src="{$Think.PLUGINS_SITE_ROOT}/jquery.ajaxContent.pack.js"></script>
  184. <script>
  185. //切换登录卡
  186. $(function() {
  187. $('#stat_tabs').tabs();
  188. });
  189. //展示搜索时间框
  190. function show_searchtime(){
  191. s_type = $("#search_type").val();
  192. $("[id^='searchtype_']").hide();
  193. $("#searchtype_"+s_type).show();
  194. }
  195. $(function () {
  196. //统计数据类型
  197. var s_type = $("#search_type").val();
  198. $('#search_time').datepicker({dateFormat: 'yy-mm-dd'});
  199. show_searchtime();
  200. $("#search_type").change(function(){
  201. show_searchtime();
  202. });
  203. //更新周数组
  204. $("[name='searchweek_month']").change(function(){
  205. var year = $("[name='searchweek_year']").val();
  206. var month = $("[name='searchweek_month']").val();
  207. $("[name='searchweek_week']").html('');
  208. $.getJSON(ADMINSITEURL+'/Common/getweekofmonth.html',{y:year,m:month},function(data){
  209. if(data != null){
  210. for(var i = 0; i < data.length; i++) {
  211. $("[name='searchweek_week']").append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
  212. }
  213. }
  214. });
  215. });
  216. $('#container_ordernum').highcharts({$statordernum_json|raw});
  217. $('#container_goodsnum').highcharts({$statgoodsnum_json|raw});
  218. $('#container_orderamount').highcharts({$statorderamount_json|raw});
  219. //加载详细列表
  220. $("#list_ordernum").load("{:url('Statmember/analyzeinfo',['type'=>'ordernum','t'=>$searchtime])}");
  221. $("#list_orderamount").load("{:url('Statmember/analyzeinfo',['type'=>'orderamount','t'=>$searchtime])}");
  222. $("#list_goodsnum").load("{:url('Statmember/analyzeinfo',['type'=>'goodsnum','t'=>$searchtime])}");
  223. $('#dssubmit').click(function(){
  224. $('#formSearch').submit();
  225. });
  226. //导出图表
  227. $("#export_btn").click(function(){
  228. var item = $("#export_type");
  229. var type = $(item).val();
  230. if(type == 'excel'){
  231. download_excel(item);
  232. }
  233. });
  234. });
  235. </script>