stat_goods_prange.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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_statgoods}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <div class="fixed-empty"></div>
  13. <form method="get" name="formSearch" id="formSearch">
  14. <div class="ds-search-form">
  15. <dl>
  16. <dd id="searchgc_td"></dd>
  17. <input type="hidden" id="choose_gcid" name="choose_gcid" value="0"/>
  18. <dd>
  19. <select name="search_type" id="search_type" class="querySelect">
  20. <option value="day" {if isset($search_arr.search_type) && $search_arr.search_type == 'day'}selected{/if}>{$Think.lang.search_type_day}</option>
  21. <option value="week" {if isset($search_arr.search_type) && $search_arr.search_type == 'week'}selected{/if}>{$Think.lang.search_type_week}</option>
  22. <option value="month" {if isset($search_arr.search_type) && $search_arr.search_type == 'month'}selected{/if}>{$Think.lang.search_type_month}</option>
  23. </select>
  24. </dd>
  25. <dd id="searchtype_day" style="display:none;">
  26. <input class="txt date" type="text" value="{:date('Y-m-d',$search_arr.day.search_time)}" id="search_time" name="search_time">
  27. </dd>
  28. <dd id="searchtype_week" style="display:none;">
  29. <select name="searchweek_year" class="querySelect">
  30. {foreach name="year_arr" item="v"}
  31. <option value="{$key}" {$search_arr.week.current_year == $key ?'selected':''}>{$v}</option>
  32. {/foreach}
  33. </select>
  34. <select name="searchweek_month" class="querySelect">
  35. {foreach name="month_arr" item="v"}
  36. <option value="{$key}" {$search_arr.week.current_month == $key ?'selected':''}>{$v}</option>
  37. {/foreach}
  38. </select>
  39. <select name="searchweek_week" class="querySelect">
  40. {foreach name="week_arr" item="v"}
  41. <option value="{$v.key}" {$search_arr.week.current_week == $key ?'selected':''}>{$v.val}</option>
  42. {/foreach}
  43. </select>
  44. </dd>
  45. <dd id="searchtype_month" style="display:none;">
  46. <select name="searchmonth_year" class="querySelect">
  47. {foreach name="year_arr" item="v"}
  48. <option value="{$key}" {$search_arr.month.current_year == $key ?'selected':''}>{$v}</option>
  49. {/foreach}
  50. </select>
  51. <select name="searchmonth_month" class="querySelect">
  52. {foreach name="month_arr" item="v"}
  53. <option value="{$key}" {$search_arr.month.current_month == $key ? 'selected':''}>{$v}</option>
  54. {/foreach}
  55. </select>
  56. </dd>
  57. </dl>
  58. <div class="btn_group">
  59. <a href="javascript:void(0);" id="dssubmit" class="btn tooltip">{$Think.lang.ds_query}</a>
  60. <a href="{:url('Statgoods/pricerange')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
  61. </div>
  62. </div>
  63. </form>
  64. <div class="explanation" id="explanation">
  65. <div class="title" id="checkZoom">
  66. <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
  67. <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
  68. </div>
  69. <ul>
  70. <li>{$Think.lang.stat_validorder_explain}</li>
  71. <li>{$Think.lang.statgoods_stat_goods_prange_help1}</li>
  72. <li>{$Think.lang.statgoods_stat_goods_prange_help2}</li>
  73. </ul>
  74. </div>
  75. <table class="ds-default-table">
  76. <thead class="thead">
  77. <tr class="space">
  78. <th colspan="15">{$Think.lang.statgoods_price_distribution}(<a href="{:url('Statgeneral/setting')}" style="font-size:12px; font-weight:normal;">{$Think.lang.statgeneral_setting}</a>)</th>
  79. </tr>
  80. </thead>
  81. <tbody>
  82. <tr>
  83. <td>
  84. {if $pricerange_statjson}
  85. <div id="container_pricerange" class="w100pre close_float" style="height:400px"></div>
  86. {else /}
  87. <div class="w100pre close_float align-center h36 mt10">{$Think.lang.statgeneral_setting_tips}
  88. <a href="{:url('Statgeneral/setting')}" style="font-size:12px; font-weight:normal;">{$Think.lang.statgoods_set_now}</a>
  89. </div>
  90. {/if}
  91. </td>
  92. </tr>
  93. </tbody>
  94. </table>
  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 src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js"></script>
  99. <script>
  100. //展示搜索时间框
  101. function show_searchtime(){
  102. s_type = $("#search_type").val();
  103. $("[id^='searchtype_']").hide();
  104. $("#searchtype_"+s_type).show();
  105. }
  106. $(function () {
  107. //统计数据类型
  108. var s_type = $("#search_type").val();
  109. $('#search_time').datepicker({dateFormat: 'yy-mm-dd'});
  110. show_searchtime();
  111. $("#search_type").change(function(){
  112. show_searchtime();
  113. });
  114. //更新周数组
  115. $("[name='searchweek_month']").change(function(){
  116. var year = $("[name='searchweek_year']").val();
  117. var month = $("[name='searchweek_month']").val();
  118. $("[name='searchweek_week']").html('');
  119. $.getJSON(ADMINSITEURL+'/Common/getweekofmonth.html',{y:year,m:month},function(data){
  120. if(data != null){
  121. for(var i = 0; i < data.length; i++) {
  122. $("[name='searchweek_week']").append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
  123. }
  124. }
  125. });
  126. });
  127. $('#container_pricerange').highcharts({$pricerange_statjson|raw});
  128. $('#dssubmit').click(function(){
  129. $('#formSearch').submit();
  130. });
  131. //商品分类
  132. init_gcselect({$gc_choose_json|raw},{$gc_json|raw});
  133. });
  134. </script>