index.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <template>
  2. <view class="pagebox">
  3. <!-- #ifdef MP || APP-PLUS -->
  4. <NavBar titleText="销售额统计" :iconColor="iconColor" :textColor="iconColor" :isScrolling="isScrolling" showBack></NavBar>
  5. <!-- #endif -->
  6. <view class="headerBg">
  7. <view :style="{ height: `${getHeight.barTop}px` }"></view>
  8. <view :style="{ height: `${getHeight.barHeight}px` }"></view>
  9. <view class="inner"></view>
  10. </view>
  11. <view class="order-index" ref="container">
  12. <view class="header">
  13. <view class="">销售额(元)</view>
  14. <view class="money">{{ after_price }}</view>
  15. <view class="info">
  16. 环比增长:{{ increase_time_status == 1 ? '' : '-' }}{{ growth_rate }}%
  17. <text :class="['iconfont', increase_time_status == 1 ? 'icon-xiangshang1' : 'icon-xiangxia2','info-icon']"></text>
  18. </view>
  19. <view class="picker">
  20. <picker mode="selector" :range="array" @change="bindPickerChange">
  21. <view>{{ array[index] }}<text class="iconfont icon-xiangxia"></text></view>
  22. </picker>
  23. </view>
  24. </view>
  25. <view class="wrapper">
  26. <view class="list acea-row">
  27. <view class="item">
  28. <view class="num">{{ after_number }}</view>
  29. <view>订单数量</view>
  30. </view>
  31. <view class="item">
  32. <view class="num">{{ refund_number }}</view>
  33. <view>已退款</view>
  34. </view>
  35. <view class="item">
  36. <view class="num">{{ visits_number }}</view>
  37. <view>访客数量</view>
  38. </view>
  39. </view>
  40. </view>
  41. <div class="chart">
  42. <view class="title">
  43. 销量趋势
  44. </view>
  45. <uCharts></uCharts>
  46. </div>
  47. <view class="public-wrapper">
  48. <view class="title">
  49. 详细数据
  50. </view>
  51. <view class="nav acea-row row-between-wrapper">
  52. <view class="data">日期</view>
  53. <view class="browse">订单数</view>
  54. <view class="turnover">销售额(元)</view>
  55. <view class="visit">退款(元)</view>
  56. </view>
  57. <view class="conter">
  58. <view class="item acea-row row-between-wrapper" v-for="(item, index) in 3" :key="index">
  59. <view class="data">4.1</view>
  60. <view class="browse">36</view>
  61. <view class="turnover">3456.78</view>
  62. <view class="visit">0.00</view>
  63. </view>
  64. </view>
  65. </view>
  66. <Loading :loaded="loaded" :loading="loading"></Loading>
  67. </view>
  68. <view class="safe-area-inset-bottom"></view>
  69. </view>
  70. </template>
  71. <script>
  72. const app = getApp();
  73. import Loading from '../components/Loading/index.vue'
  74. import uCharts from '../components/uCharts/order_ucharts.vue'
  75. // #ifdef MP || APP-PLUS
  76. import NavBar from '../components/NavBar.vue';
  77. // #endif
  78. export default {
  79. name: 'adminOrder',
  80. components: {
  81. uCharts,
  82. Loading,
  83. // #ifdef MP ||APP-PLUS
  84. NavBar,
  85. // #endif
  86. },
  87. data() {
  88. return {
  89. theme: app.globalData.theme,
  90. iconColor: '#FFFFFF',
  91. isScrolling: false,
  92. getHeight: this.$util.getWXStatusHeight(),
  93. census: {},
  94. list: [],
  95. where: {
  96. page: 1,
  97. limit: 15
  98. },
  99. loaded: false,
  100. loading: false,
  101. after_price: '8,903,785.00', // 销售额
  102. after_number: 199, // 订单数
  103. refund_number: '978.97', // 已退款
  104. visits_number: '2,197', // 访客数量
  105. growth_rate: 0, // 增长率
  106. increase_time: 0, // 较昨日同比增长
  107. increase_time_status: 1, // 1 增长 2 减少
  108. cWidth: '',
  109. cHeight: '',
  110. pixelRatio: 1,
  111. textarea: '',
  112. index: 4,
  113. array: ['今日', '昨日', '本周','上周','本月','上月','今年','去年'],
  114. arrays: [1, 7, 30],
  115. }
  116. },
  117. methods:{
  118. bindPickerChange: function(e) {
  119. this.index = e.detail.value
  120. },
  121. }
  122. }
  123. </script>
  124. <style lang="scss" scoped>
  125. .pagebox {
  126. position: relative;
  127. overflow: hidden;
  128. }
  129. .safe-area-inset-bottom {
  130. height: 0;
  131. height: constant(safe-area-inset-bottom);
  132. height: env(safe-area-inset-bottom);
  133. }
  134. .headerBg {
  135. position: absolute;
  136. top: 0;
  137. left: -25%;
  138. width: 150%;
  139. border-bottom-right-radius: 100%;
  140. border-bottom-left-radius: 100%;
  141. background: linear-gradient(270deg, #01ABF8 0%, #2A7EFB 100%);
  142. .inner {
  143. height: 356rpx;
  144. }
  145. }
  146. /*订单首页*/
  147. .order-index {
  148. position: relative;
  149. padding: 0 20rpx;
  150. }
  151. .order-index .header {
  152. position: relative;
  153. padding: 24rpx 0 40rpx 20rpx;
  154. font-size: 28rpx;
  155. line-height: 40rpx;
  156. color: #FFFFFF;
  157. .picker {
  158. position: absolute;
  159. top: 24rpx;
  160. right: 0;
  161. height: 48rpx;
  162. padding: 0 20rpx;
  163. border-radius: 24rpx;
  164. background: rgba(255, 255, 255, 0.3);
  165. text-align: center;
  166. font-size: 24rpx;
  167. line-height: 48rpx;
  168. color: #FFFFFF;
  169. .iconfont {
  170. margin-left: 10rpx;
  171. font-size: 24rpx;
  172. }
  173. }
  174. }
  175. .order-index .header .money {
  176. margin-top: 26rpx;
  177. font-family: SemiBold;
  178. font-size: 50rpx;
  179. line-height: 80rpx;
  180. }
  181. .order-index .header .info {
  182. margin-top: 30rpx;
  183. position: relative;
  184. .iconfont {
  185. margin-left: 6rpx;
  186. font-size: 12rpx;
  187. position: absolute;
  188. top: 0;
  189. }
  190. }
  191. .order-index .wrapper {
  192. background-color: #fff;
  193. border-radius: 24rpx;
  194. }
  195. .order-index .wrapper .list .item {
  196. flex: 1;
  197. padding: 36rpx 0 26rpx;
  198. text-align: center;
  199. font-size: 24rpx;
  200. line-height: 34rpx;
  201. color: #999;
  202. }
  203. .order-index .wrapper .list .item .num {
  204. margin-bottom: 8rpx;
  205. font-family: SemiBold;
  206. font-size: 36rpx;
  207. color: #333;
  208. font-weight: 600;
  209. }
  210. .public-wrapper .title {
  211. font-weight: 500;
  212. font-size: 30rpx;
  213. line-height: 42rpx;
  214. color: #333333;
  215. padding: 32rpx 0 40rpx 24rpx;
  216. }
  217. .public-wrapper {
  218. background-color: #fff;
  219. border-radius: 24rpx;
  220. margin-top: 20rpx;
  221. }
  222. .public-wrapper .nav {
  223. padding: 0 40rpx;
  224. line-height: 34rpx;
  225. font-size: 24rpx;
  226. color: #999;
  227. }
  228. .public-wrapper .data {
  229. flex: 1;
  230. text-align: left;
  231. }
  232. .public-wrapper .browse {
  233. flex: 1;
  234. // text-align: center;
  235. }
  236. .public-wrapper .turnover {
  237. flex: 1;
  238. // text-align: center;
  239. }
  240. .public-wrapper .visit {
  241. flex: 1;
  242. text-align: right;
  243. }
  244. .public-wrapper .conter {
  245. padding: 0 40rpx;
  246. }
  247. .public-wrapper .conter .item {
  248. border-bottom: 1px solid #F1F1F1;
  249. height: 74rpx;
  250. font-size: 24rpx;
  251. }
  252. .chart {
  253. border-radius: 24rpx;
  254. margin-top: 20rpx;
  255. background: #FFFFFF;
  256. .title {
  257. padding: 32rpx 0 16rpx 24rpx;
  258. font-weight: 500;
  259. font-size: 30rpx;
  260. line-height: 42rpx;
  261. color: #333333;
  262. }
  263. .chart-title {
  264. padding: 40rpx 0 6rpx 42rpx;
  265. font-size: 22rpx;
  266. line-height: 26rpx;
  267. color: #999999;
  268. }
  269. .charts {
  270. width: 100%;
  271. height: 514rpx;
  272. }
  273. }
  274. .cover-view {
  275. position: fixed;
  276. top: 0;
  277. right: 0;
  278. bottom: 0;
  279. left: 0;
  280. }
  281. </style>