goods.blade.php 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <script src="{{static_url('js/echarts.js')}}" type="text/javascript"></script>
  2. @extends('layouts.base')
  3. @section('title', '商品数据统计')
  4. <script src="{{resource_get('plugins/shop-statistics/assets/js/echarts.min.js')}}"></script>
  5. @section('content')
  6. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}" />
  7. <link rel="stylesheet" href="{{resource_get('plugins/shop-statistics/assets/css/common.css')}}">
  8. <link rel="stylesheet" href="{{resource_get('plugins/shop-statistics/assets/css/statistics.css')}}">
  9. <style>
  10. .member-rank-row {
  11. margin: 20px 0 15px;
  12. padding-bottom:19px;
  13. border-bottom: 1px solid #e6e9f0;
  14. }
  15. /* .member-rank-row .el-col:nth-child(2),
  16. .member-rank-row .el-col:nth-child(3) {
  17. padding-bottom: 7px;
  18. border-bottom: 1px solid #eee;
  19. } */
  20. </style>
  21. <div class="all">
  22. <div id="app">
  23. <panel>
  24. <statistics-card-title>数据情况</statistics-card-title>
  25. <ul class="statistics-overall">
  26. <li>
  27. <statistics-card colorful :border="false" title="在架商品数" tip="当前时间在架商品的数量" :count="overall.goods_count" count-color="#fba04b" background="{!! resource_get('plugins/shop-statistics/assets/images/statistics_card_7.png') !!}">
  28. </statistics-card>
  29. </li>
  30. <li>
  31. <statistics-card colorful :border="false" title="累计商品成交件数" tip="累计支付成功的商品件数总和" :count="overall.pay_goods_count" count-color="#43bae0" background="{!! resource_get('plugins/shop-statistics/assets/images/statistics_card_8.png') !!}">
  32. </statistics-card>
  33. </li>
  34. <li>
  35. <statistics-card colorful :border="false" title="累计商品下单件数" tip="累计下单的商品件数的总和" :count="overall.order_goods_count" count-color="#28b183" background="{!! resource_get('plugins/shop-statistics/assets/images/statistics_card_4.png') !!}">
  36. </statistics-card>
  37. </li>
  38. </ul>
  39. </panel>
  40. <panel>
  41. <el-row :gutter="20">
  42. <el-col :span="4">
  43. <statistics-card :title="statisticsItem.title" :tip="statisticsItem.tip" :count="statisticsItem.count" v-for="(statisticsItem,itemIndex) in goodsStatistics" :key="itemIndex" style="margin-bottom:15px;">
  44. </statistics-card>
  45. </el-col>
  46. <el-col :span="20">
  47. <panel-form inline style="text-align: right;">
  48. <statistics-time-range @changed="goodsTimeRangeChanged"></statistics-time-range>
  49. </panel-form>
  50. <div ref="goodsChart" style="margin-top:20px;width:100%;height:500px;"></div>
  51. </el-col>
  52. </el-row>
  53. </panel>
  54. <el-row id="goodsRankList" type="flex" style="flex-wrap:wrap;row-gap:20px;margin-top:20px;font-size:16px;">
  55. <el-col :span="8">
  56. <panel>
  57. <statistics-card-title>
  58. 商品销售金额排名
  59. <el-tooltip class="item" effect="dark" content="商品支付金额排名,不剔除退款金额" placement="top">
  60. <i class="el-icon-info"></i>
  61. </el-tooltip>
  62. </statistics-card-title>
  63. <el-row class="member-rank-row" type="flex" align="middle" :gutter="10" v-for="(dataItem,itemIndex) in goodsSaleAmountRank" :key="dataItem.goods_id">
  64. <el-col :span="3">
  65. <div class="member-rank" round mini :data-rank="itemIndex+1">[[ itemIndex+1 ]]</div>
  66. </el-col>
  67. <el-col :span="16">
  68. <div class="ellipsis1">[[ dataItem.title ]]</div>
  69. </el-col>
  70. <el-col :span="5" style="text-align: center;color:#f56b05;font-size:16px;">[[ dataItem.goods_price_total ]]</el-col>
  71. </el-row>
  72. <el-row>
  73. <el-col align="center">
  74. <a href="{!! yzWebFullUrl('plugin.shop-statistics.backend.goods.goods-sales-amount-show') !!}">
  75. <el-button v-show="goodsSaleAmountRank.length>0" round type="primary">
  76. 查看更多
  77. </el-button>
  78. </a>
  79. </el-col>
  80. </el-row>
  81. </panel>
  82. </el-col>
  83. <el-col :span="8">
  84. <panel>
  85. <statistics-card-title>
  86. 商品销售排名
  87. <el-tooltip class="item" effect="dark" content="商品销售排名" placement="top">
  88. <i class="el-icon-info"></i>
  89. </el-tooltip>
  90. </statistics-card-title>
  91. <el-row class="member-rank-row" type="flex" align="middle" :gutter="10" v-for="(dataItem,itemIndex) in goodsSaleRank" :key="dataItem.goods_id">
  92. <el-col :span="3">
  93. <div class="member-rank" round mini :data-rank="itemIndex+1">[[ itemIndex+1 ]]</div>
  94. </el-col>
  95. <el-col :span="16">
  96. <div class="ellipsis1">[[ dataItem.title ]]</div>
  97. </el-col>
  98. <el-col :span="5" style="text-align: center;color:#e42a18;font-size:16px;">[[ dataItem.real_sales ]]</el-col>
  99. </el-row>
  100. <el-row>
  101. <el-col align="center">
  102. <a href="{!! yzWebFullUrl('plugin.shop-statistics.backend.goods.goods-sales-show') !!}">
  103. <el-button v-show="goodsSaleRank.length>0" round type="primary">
  104. 查看更多
  105. </el-button>
  106. </a>
  107. </el-col>
  108. </el-row>
  109. </panel>
  110. </el-col>
  111. <el-col :span="8">
  112. <panel>
  113. <statistics-card-title>
  114. 分类销售排名
  115. <el-tooltip class="item" effect="dark" content="分类销量排名" placement="top">
  116. <i class="el-icon-info"></i>
  117. </el-tooltip>
  118. </statistics-card-title>
  119. <el-row class="member-rank-row" type="flex" align="middle" :gutter="10" v-for="(dataItem,itemIndex) in categorySaleRank" :key="dataItem.id">
  120. <el-col :span="3">
  121. <div class="member-rank" round mini :data-rank="itemIndex+1">[[ itemIndex+1 ]]</div>
  122. </el-col>
  123. <el-col :span="16">
  124. <div class="ellipsis1">[[ dataItem.name ]]</div>
  125. </el-col>
  126. <el-col :span="5" style="text-align: center;color:#f59c00;font-size:16px;">[[ dataItem.sales ]]</el-col>
  127. </el-row>
  128. <el-row>
  129. <el-col align="center">
  130. <a href="{!! yzWebFullUrl('plugin.shop-statistics.backend.goods.category-sales-show') !!}">
  131. <el-button v-show="categorySaleRank.length>0" round type="primary">
  132. 查看更多
  133. </el-button>
  134. </a>
  135. </el-col>
  136. </el-row>
  137. </panel>
  138. </el-col>
  139. </el-row>
  140. </div>
  141. </div>
  142. <script>
  143. const GetGoodsOverallData = "{!! yzWebFullUrl('plugin.shop-statistics.backend.goods.get-goods-statistic') !!}"; //* 获取商品整体统计数据
  144. const GetGoodsStatisticsDataUrl = "{!! yzWebFullUrl('plugin.shop-statistics.backend.goods.search-goods-statistic') !!}"; //* 获取商品统计图数据
  145. </script>
  146. <script src="{{resource_get('plugins/shop-statistics/assets/js/components.js')}}"></script>
  147. <script src="{{resource_get('plugins/shop-statistics/assets/js/goods.js')}}?t={{ time() }}"></script>
  148. <script src="{{resource_get('plugins/shop-statistics/assets/js/common.js')}}"></script>
  149. @endsection