hotgoods.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. {extend name="default/base/base_seller" /}
  2. {block name="seller_main"}
  3. <div class="alert mt10" style="clear:both;">
  4. <ul class="mt5">
  5. <li>{$Think.lang.statistical_information1}</li>
  6. <li>{$Think.lang.hotgoods_information2}</li>
  7. </ul>
  8. </div>
  9. <form method="get" target="_self">
  10. <table class="search-form">
  11. <tr>
  12. <td class="tr">
  13. <div class="fr">
  14. <input type="submit" class="submit" value="{$Think.lang.ds_common_search}" />
  15. </div>
  16. <div class="fr">
  17. <div class="fl" style="margin-right:3px;">
  18. <select name="search_type" id="search_type" class="querySelect">
  19. <option value="day" {$Request.param.search_type == 'day'?'selected':''}>{$Think.lang.day_statistics}</option>
  20. <option value="week" {$Request.param.search_type == 'week'?'selected':''}>{$Think.lang.weekly_statistics}</option>
  21. <option value="month" {$Request.param.search_type == 'month'?'selected':''}>{$Think.lang.monthly_statistics}</option>
  22. </select>
  23. </div>
  24. <div id="searchtype_day" style="display:none;" class="fl">
  25. <input type="text" class="text w70" name="search_time" id="search_time" value="{:date('Y-m-d',$search_arr.day.search_time)}" />
  26. <label class="add-on">
  27. <i class="iconfont">&#xe8d6;</i>
  28. </label>
  29. </div>
  30. <div id="searchtype_week" style="display:none;" class="fl">
  31. <select name="searchweek_year" class="querySelect">
  32. {foreach name="year_arr" item="v"}
  33. <option value="{$key}" {$search_arr.week.current_year == $key ?'selected':''}>{$v}</option>
  34. {/foreach}
  35. </select>
  36. <select name="searchweek_month" class="querySelect">
  37. {foreach name="month_arr" item="v"}
  38. <option value="{$key}" {$search_arr.week.current_month == $key ?'selected':''}>{$v}</option>
  39. {/foreach}
  40. </select>
  41. <select name="searchweek_week" class="querySelect">
  42. {foreach name="week_arr" item="v"}
  43. <option value="{$v.key}" {$search_arr.week.current_week == $v.key ?'selected':''}>{$v.val}</option>
  44. {/foreach}
  45. </select>
  46. </div>
  47. <div id="searchtype_month" style="display:none;" class="fl">
  48. <select name="searchmonth_year" class="querySelect">
  49. {foreach name="year_arr" item="v"}
  50. <option value="{$key}" {$search_arr.month.current_year == $key ?'selected':''}>{$v}</option>
  51. {/foreach}
  52. </select>
  53. <select name="searchmonth_month" class="querySelect">
  54. {foreach name="month_arr" item="v"}
  55. <option value="{$key}" {$search_arr.month.current_month == $key ?'selected':''}>{$v}</option>
  56. {/foreach}
  57. </select>
  58. </div>
  59. </div>
  60. </td>
  61. </tr>
  62. </table>
  63. </form>
  64. <div id="stat_tabs" class="ui-tabs" style="min-height:500px;padding-top:10px;">
  65. <div class="tabmenu">
  66. <ul class="tab pngFix">
  67. <li><a href="#orderamount_div" ds_type="showdata" data-param='{"type":"orderamount"}'>{$Think.lang.place_order_amount}</a></li>
  68. <li><a href="#goodsnum_div" ds_type="showdata" data-param='{"type":"goodsnum"}'>{$Think.lang.order_quantity}</a></li>
  69. </ul>
  70. </div>
  71. <!-- 下单金额 -->
  72. <div id="orderamount_div">
  73. <div id="container_ordergamount"></div>
  74. <div>
  75. <table class="dssc-default-table">
  76. <thead>
  77. <tr class="sortbar-array">
  78. <th class="w90">{$Think.lang.serial_number}</th>
  79. <th>{$Think.lang.commodity_name}</th>
  80. <th>{$Think.lang.place_order_amount}</th>
  81. </tr>
  82. </thead>
  83. <tbody>
  84. {notempty name="statlist.orderamount"}
  85. {foreach name="statlist.orderamount" item="v"}
  86. <tr class="bd-line">
  87. <td>{$key+1}</td>
  88. <td class="tl">
  89. <span class="over_hidden w400 h20">
  90. <a href="{:url('Goods/index',['goods_id'=>$v.goods_id])}" target="_blank">{$v.goods_name}</a>
  91. </span>
  92. </td>
  93. <td>{$v.orderamount}</td>
  94. </tr>
  95. {/foreach}
  96. {else /}
  97. <tr>
  98. <td colspan="20" class="norecord">
  99. <div class="warning-option">
  100. <i class="iconfont">&#xe64c;</i>
  101. <span>{$Think.lang.no_record}</span>
  102. </div>
  103. </td>
  104. </tr>
  105. {/notempty}
  106. </tbody>
  107. </table>
  108. </div>
  109. </div>
  110. <!-- 下单商品数 -->
  111. <div id="goodsnum_div">
  112. <div id="container_goodsnum" style="width:930px;"></div>
  113. <div>
  114. <table class="dssc-default-table">
  115. <thead>
  116. <tr class="sortbar-array">
  117. <th class="w90">{$Think.lang.serial_number}</th>
  118. <th>{$Think.lang.commodity_name}</th>
  119. <th>{$Think.lang.order_quantity}</th>
  120. </tr>
  121. </thead>
  122. <tbody>
  123. {notempty name="statlist.goodsnum"}
  124. {foreach name="statlist.goodsnum" item="v"}
  125. <tr class="bd-line">
  126. <td>{$key+1}</td>
  127. <td class="tl">
  128. <span class="over_hidden w400 h20">
  129. <a href="{:url('Goods/index',['goods_id'=>$v.goods_id])}" target="_blank">{$v.goods_name}</a>
  130. </span>
  131. </td>
  132. <td>{$v.goodsnum}</td>
  133. </tr>
  134. {/foreach}
  135. {else /}
  136. <tr>
  137. <td colspan="20" class="norecord">
  138. <div class="warning-option"><i class="iconfont">&#xe64c;</i>
  139. <span>{$Think.lang.no_record}</span>
  140. </div>
  141. </td>
  142. </tr>
  143. {/notempty}
  144. </tbody>
  145. </table>
  146. </div>
  147. </div>
  148. </div>
  149. <script src="{$Think.PLUGINS_SITE_ROOT}/highcharts/highcharts.js"></script>
  150. <script type="text/javascript">
  151. //展示搜索时间框
  152. function show_searchtime(){
  153. s_type = $("#search_type").val();
  154. $("[id^='searchtype_']").hide();
  155. $("#searchtype_"+s_type).show();
  156. }
  157. $(function(){
  158. //切换登录卡
  159. $('#stat_tabs').tabs();
  160. //统计数据类型
  161. var s_type = $("#search_type").val();
  162. $('#search_time').datepicker({dateFormat: 'yy-mm-dd'});
  163. show_searchtime();
  164. $("#search_type").change(function(){
  165. show_searchtime();
  166. });
  167. //更新周数组
  168. $("[name='searchweek_month']").change(function(){
  169. var year = $("[name='searchweek_year']").val();
  170. var month = $("[name='searchweek_month']").val();
  171. $("[name='searchweek_week']").html('');
  172. $.getJSON(HOMESITEURL+'/Index/getweekofmonth.html',{y:year,m:month},function(data){
  173. if(data != null){
  174. for(var i = 0; i < data.length; i++) {
  175. $("[name='searchweek_week']").append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
  176. }
  177. }
  178. });
  179. });
  180. $('#container_goodsnum').highcharts({$stat_json.goodsnum|raw});
  181. $('#container_ordergamount').highcharts({$stat_json.orderamount|raw});
  182. });
  183. </script>
  184. {/block}