stat_buying.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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.area_instructions1}</li>
  6. <li>{$Think.lang.stat_buying_instructions2}</li>
  7. <li>{$Think.lang.stat_buying_instructions3}</li>
  8. </ul>
  9. </div>
  10. <form method="get" target="_self">
  11. <table class="search-form">
  12. <tr>
  13. <td class="tr">
  14. <div class="fr">
  15. <input type="submit" class="submit" value="{$Think.lang.ds_common_search}" />
  16. </div>
  17. <div class="fr">
  18. <div class="fl" style="margin-right:3px;">
  19. <select name="search_type" id="search_type" class="querySelect">
  20. <option value="day" {$Request.param.search_type == 'day'?'selected':''}>{$Think.lang.day_statistics}</option>
  21. <option value="week" {$Request.param.search_type == 'week'?'selected':''}>{$Think.lang.weekly_statistics}</option>
  22. <option value="month" {$Request.param.search_type == 'month'?'selected':''}>{$Think.lang.monthly_statistics}</option>
  23. </select>
  24. </div>
  25. <div id="searchtype_day" style="display:none;" class="fl">
  26. <input type="text" class="text w70" name="search_time" id="search_time" value="{:date('Y-m-d',$search_arr.day.search_time)}" />
  27. <label class="add-on"><i class="iconfont">&#xe8d6;</i></label>
  28. </div>
  29. <div id="searchtype_week" style="display:none;" class="fl">
  30. <select name="searchweek_year" class="querySelect">
  31. {foreach name="year_arr" item="v"}
  32. <option value="{$key}" {$search_arr.week.current_year == $key ?'selected':''}>{$v}</option>
  33. {/foreach}
  34. </select>
  35. <select name="searchweek_month" class="querySelect">
  36. {foreach name="month_arr" item="v"}
  37. <option value="{$key}" {$search_arr.week.current_month == $key ?'selected':''}>{$v}</option>
  38. {/foreach}
  39. </select>
  40. <select name="searchweek_week" class="querySelect">
  41. {foreach name="week_arr" item="v"}
  42. <option value="{$v.key}" {$search_arr.week.current_week == $v.key ?'selected':''}>{$v.val}</option>
  43. {/foreach}
  44. </select>
  45. </div>
  46. <div id="searchtype_month" style="display:none;" class="fl">
  47. <select name="searchmonth_year" class="querySelect">
  48. {foreach name="year_arr" item="v"}
  49. <option value="{$key}" {$search_arr.month.current_year == $key ?'selected':''}>{$v}</option>
  50. {/foreach}
  51. </select>
  52. <select name="searchmonth_month" class="querySelect">
  53. {foreach name="month_arr" item="v"}
  54. <option value="{$key}" {$search_arr.month.current_month == $key ?'selected':''}>{$v}</option>
  55. {/foreach}
  56. </select>
  57. </div>
  58. </div>
  59. </td>
  60. </tr>
  61. </table>
  62. </form>
  63. <div class="alert alert-info">
  64. <strong>{$Think.lang.passenger_unit_price_distribution}</strong>(<a href="{:url('Statisticsgeneral/orderprange')}" target="_blank">{$Think.lang.set_price_range}</a>)
  65. </div>
  66. <table class="dssc-default-table">
  67. <tbody>
  68. <tr id="row_0">
  69. <td class="tl">
  70. {if $guestprice_statjson}
  71. <div id="container_guestprice"></div>
  72. {else /}
  73. <div class="tc h50 mt10">{$Think.lang.before_looking_at_distribution}<a href="{:url('Statisticsgeneral/orderprange')}" target="_blank">{$Think.lang.set_up_immediately}</a></div>
  74. {/if}
  75. </td>
  76. </tr>
  77. </tbody>
  78. </table>
  79. <div class="alert alert-info"><strong>{$Think.lang.purchase_time_distribution}</strong></div>
  80. <table class="dssc-default-table">
  81. <tbody>
  82. <tr id="row_0">
  83. <td class="tl">
  84. <div id="container_hour"></div>
  85. </td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. <script src="{$Think.PLUGINS_SITE_ROOT}/highcharts/highcharts.js"></script>
  90. <script type="text/javascript">
  91. //展示搜索时间框
  92. function show_searchtime(){
  93. s_type = $("#search_type").val();
  94. $("[id^='searchtype_']").hide();
  95. $("#searchtype_"+s_type).show();
  96. }
  97. $(function(){
  98. //统计数据类型
  99. var s_type = $("#search_type").val();
  100. $('#search_time').datepicker({dateFormat: 'yy-mm-dd'});
  101. show_searchtime();
  102. $("#search_type").change(function(){
  103. show_searchtime();
  104. });
  105. //更新周数组
  106. $("[name='searchweek_month']").change(function(){
  107. var year = $("[name='searchweek_year']").val();
  108. var month = $("[name='searchweek_month']").val();
  109. $("[name='searchweek_week']").html('');
  110. $.getJSON(HOMESITEURL+'/Index/getweekofmonth.html',{y:year,m:month},function(data){
  111. if(data != null){
  112. for(var i = 0; i < data.length; i++) {
  113. $("[name='searchweek_week']").append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
  114. }
  115. }
  116. });
  117. });
  118. {if $guestprice_statjson}
  119. $('#container_guestprice').highcharts({$guestprice_statjson|raw});
  120. {/if}
  121. $('#container_hour').highcharts({$hour_statjson|raw});
  122. });
  123. </script>
  124. {/block}