index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <view class="order-statistics">
  3. <!-- 顶部统计卡片 -->
  4. <view class="overview-card">
  5. <view class="overview-grid">
  6. <view class="grid-item">
  7. <text class="item-label">今日订单</text>
  8. <text class="item-value">1361</text>
  9. </view>
  10. <view class="grid-item">
  11. <text class="item-label">昨日订单</text>
  12. <text class="item-value">1361</text>
  13. </view>
  14. <view class="grid-item">
  15. <text class="item-label">本月订单</text>
  16. <text class="item-value">2.77<text class="unit">万</text></text>
  17. </view>
  18. </view>
  19. </view>
  20. <!-- 订单状态网格 -->
  21. <view class="status-grid">
  22. <view v-for="(item, index) in statusList" :key="index" class="status-item"
  23. @tap="navigateToDetail(item.path)">
  24. <view class="status-content">
  25. <text class="status-label">{{ item.label }}</text>
  26. <view class="status-value-wrap">
  27. <text class="status-value">{{ item.value }}</text>
  28. <u-icon name="arrow-right" color="#999" size="14"></u-icon>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <!-- 底部操作项 -->
  34. <view class="bottom-actions">
  35. <u-cell-group :border="false">
  36. <u-cell title="收货统计" isLink @click="navigateToDetail('/pages/statistics/receive')"></u-cell>
  37. <u-cell title="全部订单" isLink @click="navigateToDetail('/pages/order/stat/all')" :border="false"></u-cell>
  38. </u-cell-group>
  39. </view>
  40. </view>
  41. </template>
  42. <script setup>
  43. import PageScroll from '@/components/pageScroll/index.vue'
  44. import {
  45. ref
  46. } from 'vue'
  47. // 订单状态数据
  48. const statusList = ref([{
  49. label: '待初审',
  50. value: '1361',
  51. path: '/pages/order/stat/pending-review'
  52. },
  53. {
  54. label: '待拣件',
  55. value: '1361',
  56. path: '/pages/order/stat/pending-pick'
  57. },
  58. {
  59. label: '已拣件待签收',
  60. value: '1361',
  61. path: '/pages/order/stat/pending-sign'
  62. },
  63. {
  64. label: '待确认收货',
  65. value: '1361',
  66. path: '/pages/order/stat/pending-confirm'
  67. },
  68. {
  69. label: '已到货待审核',
  70. value: '1361',
  71. path: '/pages/order/stat/pending-audit'
  72. },
  73. {
  74. label: '待付款',
  75. value: '1361',
  76. path: '/pages/order/stat/pending-payment'
  77. }
  78. ])
  79. // 页面跳转
  80. const navigateToDetail = (path) => {
  81. uni.navigateTo({
  82. url: path
  83. })
  84. }
  85. </script>
  86. <style>
  87. page {
  88. background: #F5F6FA;
  89. }
  90. </style>
  91. <style lang="scss" scoped>
  92. .order-statistics {
  93. padding: 20rpx;
  94. .overview-card {
  95. background: #FFFFFF;
  96. border-radius: 16rpx;
  97. padding: 30rpx 20rpx;
  98. margin-bottom: 20rpx;
  99. .overview-grid {
  100. display: flex;
  101. justify-content: space-between;
  102. .grid-item {
  103. flex: 1;
  104. text-align: center;
  105. position: relative;
  106. &:not(:last-child)::after {
  107. content: '';
  108. position: absolute;
  109. right: 0;
  110. top: 50%;
  111. transform: translateY(-50%);
  112. height: 60%;
  113. width: 2rpx;
  114. background: #EEEEEE;
  115. }
  116. .item-label {
  117. font-size: 32rpx;
  118. color: #666666;
  119. margin-bottom: 12rpx;
  120. display: block;
  121. }
  122. .item-value {
  123. font-size: 44rpx;
  124. color: #333333;
  125. font-weight: 500;
  126. .unit {
  127. font-size: 24rpx;
  128. margin-left: 4rpx;
  129. }
  130. }
  131. }
  132. }
  133. }
  134. :deep(.u-cell) {
  135. .u-cell__body {
  136. padding: 15px;
  137. }
  138. }
  139. .status-grid {
  140. display: grid;
  141. grid-template-columns: repeat(3, 1fr);
  142. gap: 20rpx;
  143. margin-bottom: 20rpx;
  144. .status-item {
  145. background: #FFFFFF;
  146. border-radius: 16rpx;
  147. padding: 24rpx 12rpx;
  148. .status-content {
  149. .status-label {
  150. font-size: 32rpx;
  151. color: #666666;
  152. margin-bottom: 16rpx;
  153. display: block;
  154. }
  155. .status-value-wrap {
  156. display: flex;
  157. align-items: center;
  158. justify-content: space-between;
  159. .status-value {
  160. font-size: 44rpx;
  161. color: #333333;
  162. font-weight: 500;
  163. }
  164. }
  165. }
  166. &:active {
  167. opacity: 0.8;
  168. }
  169. }
  170. }
  171. .bottom-actions {
  172. background: #FFFFFF;
  173. border-radius: 16rpx;
  174. overflow: hidden;
  175. }
  176. }
  177. </style>