rank.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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_statindustry}</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 id="searchgc_td"></dd>
  16. <input type="hidden" id="choose_gcid" name="choose_gcid" value="0"/>
  17. <dd>
  18. <select name="search_type" id="search_type" class="querySelect">
  19. <option value="day" {if $Request.get.search_type == 'day'}selected{/if}>{$Think.lang.search_type_day}</option>
  20. <option value="week" {if $Request.get.search_type == 'week'}selected{/if}>{$Think.lang.search_type_week}</option>
  21. <option value="month" {if $Request.get.search_type == 'month'}selected{/if}>{$Think.lang.search_type_month}</option>
  22. </select>
  23. </dd>
  24. <dd id="searchtype_day" style="display:none;">
  25. <input class="txt date" type="text" value="{$search_arr.day.search_time|date='Y-m-d'}" id="search_time" name="search_time">
  26. </dd>
  27. <dd id="searchtype_week" style="display:none;">
  28. <select name="searchweek_year" class="querySelect">
  29. {foreach name="year_arr" item="v"}
  30. <option value="{$key}"{if $search_arr.week.current_year == $key} selected{/if}>{$v}</option>
  31. {/foreach}
  32. </select>
  33. <select name="searchweek_month" class="querySelect">
  34. {foreach name="month_arr" item="v"}
  35. <option value="{$key}" {if $search_arr.week.current_month == $key} selected{/if}>{$v}</option>
  36. {/foreach}
  37. </select>
  38. <select name="searchweek_week" class="querySelect">
  39. {foreach name="week_arr" item="v"}
  40. <option value="{$v.key}" {if $search_arr.week.current_week == $v.key}selected{/if}>{$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}" {if $search_arr.month.current_year == $key}selected{/if}>{$v}</option>
  48. {/foreach}
  49. </select>
  50. <select name="searchmonth_month" class="querySelect">
  51. {foreach name="month_arr" item="v"}
  52. <option value="{$key}" {if $search_arr.month.current_month == $key}selected{/if}>{$v}</option>
  53. {/foreach}
  54. </select>
  55. </dd>
  56. </dl>
  57. <div class="btn_group">
  58. <a href="javascript:document.formSearch.submit();" class="btn tooltip" title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
  59. <a href="{:url('Statindustry/rank')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
  60. </div>
  61. </div>
  62. </form>
  63. <div class="explanation" id="explanation">
  64. <div class="title" id="checkZoom">
  65. <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
  66. <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
  67. </div>
  68. <ul>
  69. <li>{$Think.lang.statindustry_rank_help1}</li>
  70. </ul>
  71. </div>
  72. <table class="ds-default-table">
  73. <thead class="thead">
  74. <tr class="space">
  75. <th>{$Think.lang.statindustry_top_50}</th>
  76. </tr>
  77. </thead>
  78. <tbody>
  79. <tr>
  80. <td>
  81. <div id="container_goods" class="w100pre close_float" style="height:400px"></div>
  82. </td>
  83. </tr>
  84. </tbody>
  85. </table>
  86. <table class="ds-default-table">
  87. <thead>
  88. <tr class="thead sortbar-array">
  89. <th class="align-center w18pre">{$Think.lang.statstore_number}</th>
  90. <th class="align-center">{$Think.lang.ds_goods}</th>
  91. <th class="align-center">{$Think.lang.goodsnum}</th>
  92. </tr>
  93. </thead>
  94. <tbody id="datatable">
  95. {notempty name="goods_list"}
  96. {foreach name="goods_list" item="v"}
  97. <tr class="hover">
  98. <td class="align-center w18pre">{$key+1}</td>
  99. <td class="alignleft"><a href="{:url('home/Goods/index',['goods_id'=>$v.goods_id])}" target="_blank">{$v.goods_name}</a></td>
  100. <td class="align-center">{$v.goodsnum}</td>
  101. </tr>
  102. {/foreach}
  103. {else /}
  104. <tr class="no_data">
  105. <td colspan="11">{$Think.lang.no_record}</td>
  106. </tr>
  107. {/notempty}
  108. </tbody>
  109. </table>
  110. <table class="ds-default-table">
  111. <thead class="thead">
  112. <tr class="space">
  113. <th colspan="15">{$Think.lang.statindustry_top_30}</th>
  114. </tr>
  115. </thead>
  116. <tbody>
  117. <tr>
  118. <td>
  119. <div id="container_store" class="w100pre close_float" style="height:400px"></div>
  120. </td>
  121. </tr>
  122. </tbody>
  123. </table>
  124. <table class="ds-default-table nobdb">
  125. <thead>
  126. <tr class="thead sortbar-array">
  127. <th class="align-center w18pre">{$Think.lang.statstore_number}</th>
  128. <th class="align-center">{$Think.lang.ds_store_name}</th>
  129. <th class="align-center">{$Think.lang.statstore_ordernum}</th>
  130. </tr>
  131. </thead>
  132. <tbody id="datatable">
  133. {notempty name="store_list"}
  134. {foreach name="store_list" item="v"}
  135. <tr class="hover">
  136. <td class="align-center w18pre">{$key+1}</td>
  137. <td class="alignleft">{$v.store_name}</td>
  138. <td class="align-center">{$v.ordernum}</td>
  139. </tr>
  140. {/foreach}
  141. {else }
  142. <tr class="no_data">
  143. <td colspan="11">{$Think.lang.no_record}</td>
  144. </tr>
  145. {/notempty}
  146. </tbody>
  147. </table>
  148. </div>
  149. <script src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js"></script>
  150. <script src="{$Think.PLUGINS_SITE_ROOT}/highcharts/highcharts.js"></script>
  151. <script>
  152. //展示搜索时间框
  153. function show_searchtime(){
  154. s_type = $("#search_type").val();
  155. $("[id^='searchtype_']").hide();
  156. $("#searchtype_"+s_type).show();
  157. }
  158. $(function () {
  159. //统计数据类型
  160. var s_type = $("#search_type").val();
  161. $('#search_time').datepicker({dateFormat: 'yy-mm-dd'});
  162. show_searchtime();
  163. $("#search_type").change(function(){
  164. show_searchtime();
  165. });
  166. //更新周数组
  167. $("[name='searchweek_month']").change(function(){
  168. var year = $("[name='searchweek_year']").val();
  169. var month = $("[name='searchweek_month']").val();
  170. $("[name='searchweek_week']").html('');
  171. $.getJSON("{:url('Common/getweekofmonth')}",{y:year,m:month},function(data){
  172. if(data != null){
  173. for(var i = 0; i < data.length; i++) {
  174. $("[name='searchweek_week']").append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
  175. }
  176. }
  177. });
  178. });
  179. //商品分类
  180. init_gcselect({$gc_choose_json|raw},{$gc_json|raw});
  181. $('#container_goods').highcharts({$goods_statjson|raw});
  182. $('#container_store').highcharts({$store_statjson|raw});
  183. });
  184. </script>