59a433554fe5e3206264dea354aaabcf.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <?php /*a:3:{s:77:"/data/web/mall.valimart.net/app/admin/view/statgoods/stat_goods_hotgoods.html";i:1657785098;s:61:"/data/web/mall.valimart.net/app/admin/view/public/header.html";i:1657785098;s:66:"/data/web/mall.valimart.net/app/admin/view/public/admin_items.html";i:1657785098;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <title><?php echo htmlentities((isset($html_title) && ($html_title !== '')?$html_title:config('ds_config.site_name'))); ?><?php echo htmlentities(lang('system_backend')); ?></title>
  8. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  9. <link rel="stylesheet" href="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/css/admin.css">
  10. <link rel="stylesheet" href="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.css">
  11. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery-2.1.4.min.js"></script>
  12. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.validate.min.js"></script>
  13. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.cookie.js"></script>
  14. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/common.js"></script>
  15. <script src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/admin.js"></script>
  16. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.js"></script>
  17. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
  18. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/perfect-scrollbar.min.js"></script>
  19. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/layer/layer.js"></script>
  20. <script type="text/javascript">
  21. var BASESITEROOT = "<?php echo htmlentities(BASE_SITE_ROOT); ?>";
  22. var ADMINSITEROOT = "<?php echo htmlentities(ADMIN_SITE_ROOT); ?>";
  23. var BASESITEURL = "<?php echo htmlentities(BASE_SITE_URL); ?>";
  24. var HOMESITEURL = "<?php echo htmlentities(HOME_SITE_URL); ?>";
  25. var ADMINSITEURL = "<?php echo htmlentities(ADMIN_SITE_URL); ?>";
  26. </script>
  27. </head>
  28. <body>
  29. <div id="append_parent"></div>
  30. <div id="ajaxwaitid"></div>
  31. <div class="page">
  32. <div class="fixed-bar">
  33. <div class="item-title">
  34. <div class="subject">
  35. <h3><?php echo htmlentities(lang('ds_statgoods')); ?></h3>
  36. <h5></h5>
  37. </div>
  38. <?php if($admin_item): ?>
  39. <ul class="tab-base ds-row">
  40. <?php if(is_array($admin_item) || $admin_item instanceof \think\Collection || $admin_item instanceof \think\Paginator): if( count($admin_item)==0 ) : echo "" ;else: foreach($admin_item as $key=>$item): ?>
  41. <li><a href="<?php echo htmlentities($item['url']); ?>" <?php if($item['name'] == $curitem): ?>class="current"<?php endif; ?>><span><?php echo htmlentities($item['text']); ?></span></a></li>
  42. <?php endforeach; endif; else: echo "" ;endif; ?>
  43. </ul>
  44. <?php endif; ?>
  45. </div>
  46. </div>
  47. <div class="fixed-empty"></div>
  48. <form method="get" name="formSearch" id="formSearch">
  49. <div class="ds-search-form">
  50. <dl>
  51. <dd id="searchgc_td"></dd>
  52. <input type="hidden" id="choose_gcid" name="choose_gcid" value="0"/>
  53. <dd>
  54. <select name="search_type" id="search_type" class="querySelect">
  55. <option value="day" <?php if(isset($search_arr['search_type']) && $search_arr['search_type'] == 'day'): ?>selected<?php endif; ?>><?php echo htmlentities(lang('search_type_day')); ?></option>
  56. <option value="week" <?php if(isset($search_arr['search_type']) && $search_arr['search_type'] == 'week'): ?>selected<?php endif; ?>><?php echo htmlentities(lang('search_type_week')); ?></option>
  57. <option value="month" <?php if(isset($search_arr['search_type']) && $search_arr['search_type'] == 'month'): ?>selected<?php endif; ?>><?php echo htmlentities(lang('search_type_month')); ?></option>
  58. </select>
  59. </dd>
  60. <dd id="searchtype_day" style="display:none;">
  61. <input class="txt date" type="text" value="<?php echo date('Y-m-d',$search_arr['day']['search_time']); ?>" id="search_time" name="search_time">
  62. </dd>
  63. <dd id="searchtype_week" style="display:none;">
  64. <select name="searchweek_year" class="querySelect">
  65. <?php if(is_array($year_arr) || $year_arr instanceof \think\Collection || $year_arr instanceof \think\Paginator): if( count($year_arr)==0 ) : echo "" ;else: foreach($year_arr as $key=>$v): ?>
  66. <option value="<?php echo htmlentities($key); ?>" <?php echo $search_arr['week']['current_year']==$key ? 'selected' : ''; ?>><?php echo htmlentities($v); ?></option>
  67. <?php endforeach; endif; else: echo "" ;endif; ?>
  68. </select>
  69. <select name="searchweek_month" class="querySelect">
  70. <?php if(is_array($month_arr) || $month_arr instanceof \think\Collection || $month_arr instanceof \think\Paginator): if( count($month_arr)==0 ) : echo "" ;else: foreach($month_arr as $key=>$v): ?>
  71. <option value="<?php echo htmlentities($key); ?>" <?php echo $search_arr['week']['current_month']==$key ? 'selected' : ''; ?>><?php echo htmlentities($v); ?></option>
  72. <?php endforeach; endif; else: echo "" ;endif; ?>
  73. </select>
  74. <select name="searchweek_week" class="querySelect">
  75. <?php if(is_array($week_arr) || $week_arr instanceof \think\Collection || $week_arr instanceof \think\Paginator): if( count($week_arr)==0 ) : echo "" ;else: foreach($week_arr as $key=>$v): ?>
  76. <option value="<?php echo htmlentities($v['key']); ?>" <?php echo $search_arr['week']['current_week']==$v['key'] ? 'selected' : ''; ?>><?php echo htmlentities($v['val']); ?></option>
  77. <?php endforeach; endif; else: echo "" ;endif; ?>
  78. </select>
  79. </dd>
  80. <dd id="searchtype_month" style="display:none;">
  81. <select name="searchmonth_year" class="querySelect">
  82. <?php if(is_array($year_arr) || $year_arr instanceof \think\Collection || $year_arr instanceof \think\Paginator): if( count($year_arr)==0 ) : echo "" ;else: foreach($year_arr as $key=>$v): ?>
  83. <option value="<?php echo htmlentities($key); ?>" <?php echo $search_arr['month']['current_year']==$key ? 'selected' : ''; ?>><?php echo htmlentities($v); ?></option>
  84. <?php endforeach; endif; else: echo "" ;endif; ?>
  85. </select>
  86. <select name="searchmonth_month" class="querySelect">
  87. <?php if(is_array($month_arr) || $month_arr instanceof \think\Collection || $month_arr instanceof \think\Paginator): if( count($month_arr)==0 ) : echo "" ;else: foreach($month_arr as $key=>$v): ?>
  88. <option value="<?php echo htmlentities($key); ?>" <?php echo $search_arr['month']['current_month']==$key ? 'selected' : ''; ?>><?php echo htmlentities($v); ?></option>
  89. <?php endforeach; endif; else: echo "" ;endif; ?>
  90. </select>
  91. </dd>
  92. </dl>
  93. <div class="btn_group">
  94. <a href="javascript:void(0);" id="dssubmit" class="btn tooltip"><?php echo htmlentities(lang('ds_query')); ?></a>
  95. <a href="<?php echo url('Statgoods/hotgoods'); ?>" class="btn btn-default" title="<?php echo htmlentities(lang('ds_cancel')); ?>"><?php echo htmlentities(lang('ds_cancel')); ?></a>
  96. </div>
  97. </div>
  98. </form>
  99. <div class="explanation" id="explanation">
  100. <div class="title" id="checkZoom">
  101. <h4 title="<?php echo htmlentities(lang('ds_explanation_tip')); ?>"><?php echo htmlentities(lang('ds_explanation')); ?></h4>
  102. <span id="explanationZoom" title="<?php echo htmlentities(lang('ds_explanation_close')); ?>" class="arrow"></span>
  103. </div>
  104. <ul>
  105. <li><?php echo htmlentities(lang('stat_validorder_explain')); ?></li>
  106. <li><?php echo htmlentities(lang('statgoods_stat_goods_hotgoods_help1')); ?></li>
  107. </ul>
  108. </div>
  109. <div id="stat_tabs" class="w100pre close_float ui-tabs" style="min-height:500px">
  110. <div class="close_float tabmenu">
  111. <ul class="tab pngFix">
  112. <li><a href="#orderamount_div" ds_type="showdata" data-param='{"type":"orderamount"}'><?php echo htmlentities(lang('statstore_orderamount')); ?></a></li>
  113. <li><a href="#goodsnum_div" ds_type="showdata" data-param='{"type":"goodsnum"}'><?php echo htmlentities(lang('statstore_ordernum')); ?></a></li>
  114. </ul>
  115. </div>
  116. <!-- 下单金额 -->
  117. <div id="orderamount_div" class="close_float" style="text-align:center;"></div>
  118. <!-- 下单量 -->
  119. <div id="goodsnum_div" class="close_float" style="text-align:center;"></div>
  120. </div>
  121. </div>
  122. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/highcharts/highcharts.js"></script>
  123. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/statistics.js"></script>
  124. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/mlselection.js"></script>
  125. <script>
  126. //展示搜索时间框
  127. function show_searchtime(){
  128. s_type = $("#search_type").val();
  129. $("[id^='searchtype_']").hide();
  130. $("#searchtype_"+s_type).show();
  131. }
  132. //加载统计数据
  133. function getStatdata(type){
  134. //店铺分类
  135. var choose_gcid = $("#choose_gcid").val();
  136. $('#'+type+'_div').load(ADMINSITEURL+'/Statgoods/hotgoods_list?type='+type+'&choose_gcid='+choose_gcid+'&t=<?php echo htmlentities($searchtime); ?>');
  137. }
  138. $(function () {
  139. //切换登录卡
  140. $('#stat_tabs').tabs();
  141. //统计数据类型
  142. var s_type = $("#search_type").val();
  143. $('#search_time').datepicker({dateFormat: 'yy-mm-dd'});
  144. show_searchtime();
  145. $("#search_type").change(function(){
  146. show_searchtime();
  147. });
  148. //更新周数组
  149. $("[name='searchweek_month']").change(function(){
  150. var year = $("[name='searchweek_year']").val();
  151. var month = $("[name='searchweek_month']").val();
  152. $("[name='searchweek_week']").html('');
  153. $.getJSON(ADMINSITEURL+'/Common/getweekofmonth.html',{y:year,m:month},function(data){
  154. if(data != null){
  155. for(var i = 0; i < data.length; i++) {
  156. $("[name='searchweek_week']").append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
  157. }
  158. }
  159. });
  160. });
  161. $('#dssubmit').click(function(){
  162. $('#formSearch').submit();
  163. });
  164. //商品分类
  165. init_gcselect(<?php echo $gc_choose_json; ?>,<?php echo $gc_json; ?>);
  166. getStatdata('orderamount');
  167. $("[ds_type='showdata']").click(function(){
  168. var data_str = $(this).attr('data-param');
  169. eval('data_str = '+data_str);
  170. getStatdata(data_str.type);
  171. });
  172. });
  173. </script>