coupon.blade.php 5.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. <div class="all">
  10. <div id="app">
  11. <panel >
  12. <statistics-card-title>
  13. 数据情况
  14. </statistics-card-title>
  15. <ul class="statistics-overall">
  16. <li>
  17. <statistics-card colorful count-color="#28b183" background="{!! resource_get('plugins/shop-statistics/assets/images/statistics_card_4.png') !!}" :border="false" title="已赠送优惠券" tip="累计已赠送优惠券总数" :count="overall.givenCoupon">
  18. </statistics-card>
  19. </li>
  20. <li>
  21. <statistics-card colorful count-color="#f26163" background="{!! resource_get('plugins/shop-statistics/assets/images/statistics_card_1.png') !!}" :border="false" title="已领取优惠券" tip="累计领券中心领取优惠券总数" :count="overall.receiveCoupon">
  22. </statistics-card>
  23. </li>
  24. <li>
  25. <statistics-card colorful count-color="#36c3a7" background="{!! resource_get('plugins/shop-statistics/assets/images/statistics_card_5.png') !!}" :border="false" title="已使用优惠券" tip="累计已使用优惠券总数" :count="overall.usedCoupon">
  26. </statistics-card>
  27. </li>
  28. <li>
  29. <statistics-card colorful count-color="#43bae0" background="{!! resource_get('plugins/shop-statistics/assets/images/statistics_card_3.png') !!}" :border="false" title="已过期优惠券" tip="累计已过期优惠券总数" :count="overall.expiredCoupon">
  30. </statistics-card>
  31. </li>
  32. </ul>
  33. </panel>
  34. <panel>
  35. <el-row :gutter="20">
  36. <el-col :span="4">
  37. <statistics-card :title="dataItem.title" :tip="dataItem.tip" :count="dataItem.count" v-for="dataItem in couponStatistics.data" :key="dataItem.key" style="margin-bottom:15px;" :decimals="dataItem.decimals">
  38. </statistics-card>
  39. </el-col>
  40. <el-col :span="20">
  41. <panel-form inline style="text-align:right;">
  42. <el-form-item>
  43. <el-date-picker type="date" v-model="couponStatistics.dataTime" @change="getCouponStatisticsData"></el-date-picker>
  44. </el-form-item>
  45. </panel-form>
  46. <div ref="couponChart" style="margin-top:20px;width:100%;height:575px;"></div>
  47. </el-col>
  48. </el-row>
  49. </panel>
  50. <panel id="couponRankPanel">
  51. <statistics-card-title>
  52. 领取优惠券排行
  53. <el-tooltip class="item" effect="dark" content="领券中心领取优惠券数量排名" placement="top">
  54. <i class="el-icon-info"></i>
  55. </el-tooltip>
  56. </statistics-card-title>
  57. <el-table :data="couponRank.data">
  58. <el-table-column width="100px" label="排名">
  59. <template slot-scope="scope">
  60. <div class="member-rank" plain mini :data-rank="scope.row.rank" round mini>[[ scope.row.rank ]]</div>
  61. </template>
  62. </el-table-column>
  63. <el-table-column width="200px" label="优惠券id" prop="id"></el-table-column>
  64. <el-table-column label="优惠券名称" prop="name"></el-table-column>
  65. <el-table-column width="100px" label="已领取数量" prop="receiveCoupon"></el-table-column>
  66. </el-table>
  67. <el-row style="margin-top:20px;">
  68. <el-col align="right">
  69. <el-pagination :total="couponRank.pagination.total" :page-size="couponRank.pagination.limit" :current-page="couponRank.pagination.pages" @current-change="getCouponRankData"></el-pagination>
  70. </el-col>
  71. </el-row>
  72. </panel>
  73. </div>
  74. </div>
  75. <script>
  76. const GetCouponOverallDataUrl = "{!! yzWebFullUrl('plugin.shop-statistics.backend.coupon.get-coupon-statistic') !!}"; //* 获取优惠券整体统计信息
  77. const GetCouponStatisticsDataUrl = "{!! yzWebFullUrl('plugin.shop-statistics.backend.coupon.search-coupon-statistic') !!}"; //* 获取优惠券统计数据
  78. const GetCouponRankDataUrl = "{!! yzWebFullUrl('plugin.shop-statistics.backend.coupon.search-coupon-ranking') !!}"; //* 获取优惠券排行榜数据
  79. </script>
  80. <script src="{{resource_get('plugins/shop-statistics/assets/js/components.js')}}"></script>
  81. <script src="{{resource_get('plugins/shop-statistics/assets/js/coupon.js')}}?timestamp={{ time() }}"></script>
  82. <script src="{{resource_get('plugins/shop-statistics/assets/js/common.js')}}"></script>
  83. @endsection