569ae0c1150b543e78362ff9a0184ab7.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <?php /*a:3:{s:72:"/data/web/mall.valimart.net/app/admin/view/statgoods/stat_goodssale.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>
  52. <select name="search_type" id="search_type" class="querySelect">
  53. <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>
  54. <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>
  55. <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>
  56. </select>
  57. </dd>
  58. <dd id="searchtype_day" style="display:none;">
  59. <input class="txt date" type="text" value="<?php echo date('Y-m-d',$search_arr['day']['search_time']); ?>" id="search_time" name="search_time">
  60. </dd>
  61. <dd id="searchtype_week" style="display:none;">
  62. <select name="searchweek_year" class="querySelect">
  63. <?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): ?>
  64. <option value="<?php echo htmlentities($key); ?>" <?php echo $search_arr['week']['current_year']==$key ? 'selected' : ''; ?>><?php echo htmlentities($v); ?></option>
  65. <?php endforeach; endif; else: echo "" ;endif; ?>
  66. </select>
  67. <select name="searchweek_month" class="querySelect">
  68. <?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): ?>
  69. <option value="<?php echo htmlentities($key); ?>" <?php echo $search_arr['week']['current_month']==$key ? 'selected' : ''; ?>><?php echo htmlentities($v); ?></option>
  70. <?php endforeach; endif; else: echo "" ;endif; ?>
  71. </select>
  72. <select name="searchweek_week" class="querySelect">
  73. <?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): ?>
  74. <option value="<?php echo htmlentities($v['key']); ?>" <?php echo $search_arr['week']['current_week']==$key ? 'selected' : ''; ?>><?php echo htmlentities($v['val']); ?></option>
  75. <?php endforeach; endif; else: echo "" ;endif; ?>
  76. </select>
  77. </dd>
  78. <dd id="searchtype_month" style="display:none;">
  79. <select name="searchmonth_year" class="querySelect">
  80. <?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): ?>
  81. <option value="<?php echo htmlentities($key); ?>" <?php echo $search_arr['month']['current_year']==$key ? 'selected' : ''; ?>><?php echo htmlentities($v); ?></option>
  82. <?php endforeach; endif; else: echo "" ;endif; ?>
  83. </select>
  84. <select name="searchmonth_month" class="querySelect">
  85. <?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): ?>
  86. <option value="<?php echo htmlentities($key); ?>" <?php echo $search_arr['month']['current_month']==$key ? 'selected' : ''; ?>><?php echo htmlentities($v); ?></option>
  87. <?php endforeach; endif; else: echo "" ;endif; ?>
  88. </select>
  89. </dd>
  90. <dd><?php echo htmlentities(lang('ds_goods')); ?><input class="txt-long" type="text" name="goods_name" value="<?php echo htmlentities(app('request')->param('goods_name')); ?>" /></dd>
  91. <dd><?php echo htmlentities(lang('ds_store_name')); ?><input class="txt-long" type="text" name="store_name" value="<?php echo htmlentities(app('request')->param('store_name')); ?>" /></dd>
  92. <dt><?php echo htmlentities(lang('ds_class')); ?></dt>
  93. <dd id="searchgc_td"></dd>
  94. <input type="hidden" id="choose_gcid" name="choose_gcid" value="0"/>
  95. <input type="hidden" id="exporttype" name="exporttype" value="">
  96. </dl>
  97. <div class="btn_group">
  98. <a href="javascript:void(0);" id="dssubmit" class="btn tooltip"><?php echo htmlentities(lang('ds_query')); ?></a>
  99. <a href="<?php echo url('Statgoods/goods_sale'); ?>" class="btn btn-default" title="<?php echo htmlentities(lang('ds_cancel')); ?>"><?php echo htmlentities(lang('ds_cancel')); ?></a>
  100. </div>
  101. </div>
  102. </form>
  103. <div class="explanation" id="explanation">
  104. <div class="title" id="checkZoom">
  105. <h4 title="<?php echo htmlentities(lang('ds_explanation_tip')); ?>"><?php echo htmlentities(lang('ds_explanation')); ?></h4>
  106. <span id="explanationZoom" title="<?php echo htmlentities(lang('ds_explanation_close')); ?>" class="arrow"></span>
  107. </div>
  108. <ul>
  109. <li><?php echo htmlentities(lang('stat_validorder_explain')); ?></li>
  110. <li><?php echo htmlentities(lang('statgoods_stat_goodssale_help1')); ?></li>
  111. <li><?php echo htmlentities(lang('statgoods_stat_goodssale_help2')); ?></li>
  112. </ul>
  113. </div>
  114. <div id="container" class="w100pre close_float">
  115. <div style="text-align:right;">
  116. <a class="btn btn-mini" href="javascript:void(0);" id="export_btn"><?php echo htmlentities(lang('ds_export')); ?>Excel</a>
  117. </div>
  118. </div>
  119. <table class="ds-default-table">
  120. <thead>
  121. <tr class="thead sortbar-array" >
  122. <th class="align-center"><?php echo htmlentities(lang('ds_goods')); ?></th>
  123. <th class="align-center"><?php echo htmlentities(lang('goods_commonid')); ?></th>
  124. <th class="align-center"><?php echo htmlentities(lang('ds_store_name')); ?></th>
  125. <th class="align-center">
  126. <a ds_type="orderitem" data-param='{"orderby":"goodsnum"}' class="{!$orderby || $orderby=='goodsnum desc' ?'selected desc':''}<?php echo $orderby=='goodsnum asc' ? 'selected asc' : ''; ?>"><?php echo htmlentities(lang('goodsnum')); ?><i></i></a>
  127. </th>
  128. <th class="align-center">
  129. <a ds_type="orderitem" data-param='{"orderby":"ordernum"}' class="<?php echo $orderby=='selected desc' ? 'selected desc' : ''; ?> <?php echo $orderby=='ordernum asc' ? 'selected asc' : ''; ?>"><?php echo htmlentities(lang('statstore_ordernum')); ?><i></i></a>
  130. </th>
  131. <th class="align-center">
  132. <a ds_type="orderitem" data-param='{"orderby":"goodsamount"}' class="<?php echo $orderby=='goodsamount desc' ? 'selected desc' : ''; ?><?php echo $orderby=='goodsamount asc' ? 'selected asc' : ''; ?>"><?php echo htmlentities(lang('statstore_orderamount')); ?><i></i></a>
  133. </th>
  134. </tr>
  135. </thead>
  136. <tbody id="datatable">
  137. <?php if(!(empty($goods_list) || (($goods_list instanceof \think\Collection || $goods_list instanceof \think\Paginator ) && $goods_list->isEmpty()))): if(is_array($goods_list) || $goods_list instanceof \think\Collection || $goods_list instanceof \think\Paginator): if( count($goods_list)==0 ) : echo "" ;else: foreach($goods_list as $key=>$v): ?>
  138. <tr class="hover">
  139. <td class="align-left">
  140. <a href="<?php echo url('home/Goods/index',['goods_id'=>$v['goods_id']]); ?>" target="_blank"><?php echo htmlentities($v['goods_name']); ?></a>
  141. </td>
  142. <td class="align-center"><?php echo htmlentities($v['goods_commonid']); ?></td>
  143. <td class="align-center"><?php echo htmlentities($v['store_name']); ?></td>
  144. <td class="align-center"><?php echo htmlentities($v['goodsnum']); ?></td>
  145. <td class="align-center"><?php echo htmlentities($v['ordernum']); ?></td>
  146. <td class="align-center"><?php echo htmlentities($v['goodsamount']); ?></td>
  147. </tr>
  148. <?php endforeach; endif; else: echo "" ;endif; else: ?>
  149. <tr class="no_data">
  150. <td colspan="15"><?php echo htmlentities(lang('ds_no_record')); ?></td>
  151. </tr>
  152. <?php endif; ?>
  153. </tbody>
  154. </table>
  155. <?php echo $show_page; ?>
  156. </div>
  157. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/highcharts/highcharts.js"></script>
  158. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/statistics.js"></script>
  159. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/mlselection.js"></script>
  160. <script>
  161. //展示搜索时间框
  162. function show_searchtime(){
  163. s_type = $("#search_type").val();
  164. $("[id^='searchtype_']").hide();
  165. $("#searchtype_"+s_type).show();
  166. }
  167. $(function () {
  168. //统计数据类型
  169. var s_type = $("#search_type").val();
  170. $('#search_time').datepicker({dateFormat: 'yy-mm-dd'});
  171. show_searchtime();
  172. $("#search_type").change(function(){
  173. show_searchtime();
  174. });
  175. //更新周数组
  176. $("[name='searchweek_month']").change(function(){
  177. var year = $("[name='searchweek_year']").val();
  178. var month = $("[name='searchweek_month']").val();
  179. $("[name='searchweek_week']").html('');
  180. $.getJSON(ADMINSITEURL+'/Common/getweekofmonth.html',{y:year,m:month},function(data){
  181. if(data != null){
  182. for(var i = 0; i < data.length; i++) {
  183. $("[name='searchweek_week']").append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
  184. }
  185. }
  186. });
  187. });
  188. $('#dssubmit').click(function(){
  189. $("#exporttype").val('');
  190. $("#orderby").val('');
  191. $('#formSearch').submit();
  192. });
  193. //导出图表
  194. $("#export_btn").click(function(){
  195. $("#exporttype").val('excel');
  196. $('#formSearch').submit();
  197. });
  198. //排序
  199. $("[ds_type='orderitem']").click(function(){
  200. $("#exporttype").val('');
  201. var data_str = $(this).attr('data-param');
  202. eval( "data_str = "+data_str);
  203. if($(this).hasClass('desc')){
  204. $("#orderby").val(data_str.orderby + ' asc');
  205. } else {
  206. $("#orderby").val(data_str.orderby + ' desc');
  207. }
  208. $('#formSearch').submit();
  209. });
  210. //商品分类
  211. init_gcselect(<?php echo $gc_choose_json; ?>,<?php echo $gc_json; ?>);
  212. /* AJAX选择品牌 */
  213. $("#ajax_brand").brandinit();
  214. });
  215. </script>