index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <view class="fee-statistics-page">
  3. <NavBar title="费用统计" bgColor="#ffffff" color="#000"></NavBar>
  4. <!-- 顶部背景 -->
  5. <view class="header-bg">
  6. <view class="total-title">总服务费 (元)</view>
  7. <view class="total-amount">500.00</view>
  8. <view class="date-picker-wrap">
  9. <picker mode="date" fields="day" @change="onDateChange">
  10. <view class="date-range">
  11. <text>2026/02/25 - 2026/03/27</text>
  12. <uni-icons type="bottom" size="14" color="#fff"></uni-icons>
  13. </view>
  14. </picker>
  15. </view>
  16. </view>
  17. <!-- 统计卡片 -->
  18. <view class="stats-card">
  19. <view class="stats-item">
  20. <text class="stats-value">3</text>
  21. <text class="stats-label">单数</text>
  22. </view>
  23. <view class="stats-divider"></view>
  24. <view class="stats-item">
  25. <text class="stats-value">280.00</text>
  26. <text class="stats-label">最高单笔</text>
  27. </view>
  28. <view class="stats-divider"></view>
  29. <view class="stats-item">
  30. <text class="stats-value">166.67</text>
  31. <text class="stats-label">平均单笔</text>
  32. </view>
  33. </view>
  34. <!-- 订单明细 -->
  35. <view class="detail-section">
  36. <view class="section-header">
  37. <view class="header-line"></view>
  38. <text class="header-text">订单明细</text>
  39. </view>
  40. <view class="detail-list">
  41. <view class="detail-item" v-for="(item, index) in orderDetails" :key="index">
  42. <view class="detail-info">
  43. <view class="detail-title">{{ item.title }}</view>
  44. <view class="detail-time">{{ item.time }}</view>
  45. </view>
  46. <view class="detail-amount-wrap">
  47. <view class="detail-amount">+{{ item.amount }}</view>
  48. <view class="detail-no">{{ item.orderNo }}</view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script setup>
  56. import { ref } from 'vue'
  57. import NavBar from '@/components/nav-bar/index.vue'
  58. const orderDetails = ref([
  59. { title: '宠物寄养(1天)', time: '2026-03-19 09:00', amount: '100.00', orderNo: 'ORD20260319011' },
  60. { title: '狗狗全套美容', time: '2026-03-17 10:30', amount: '280.00', orderNo: 'ORD20260317022' },
  61. { title: '猫咪洗澡护肤', time: '2026-03-15 14:00', amount: '120.00', orderNo: 'ORD20260315001' }
  62. ])
  63. const onDateChange = (e) => {
  64. console.log('date change', e.detail.value)
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .fee-statistics-page {
  69. min-height: 100vh;
  70. background-color: #f8f9fb;
  71. }
  72. .header-bg {
  73. background: linear-gradient(180deg, #ff7b00 0%, #ff9500 100%);
  74. padding: 60rpx 40rpx 140rpx;
  75. text-align: center;
  76. color: #fff;
  77. }
  78. .total-title {
  79. font-size: 28rpx;
  80. opacity: 0.9;
  81. margin-bottom: 20rpx;
  82. }
  83. .total-amount {
  84. font-size: 80rpx;
  85. font-weight: 900;
  86. margin-bottom: 40rpx;
  87. }
  88. .date-picker-wrap {
  89. display: inline-block;
  90. }
  91. .date-range {
  92. background: rgba(255, 255, 255, 0.2);
  93. padding: 12rpx 32rpx;
  94. border-radius: 40rpx;
  95. font-size: 24rpx;
  96. display: flex;
  97. align-items: center;
  98. gap: 8rpx;
  99. }
  100. .stats-card {
  101. background: #fff;
  102. margin: -80rpx 32rpx 40rpx;
  103. padding: 40rpx 0;
  104. border-radius: 32rpx;
  105. display: flex;
  106. align-items: center;
  107. box-shadow: 0 12rpx 32rpx rgba(0, 0, 0, 0.05);
  108. position: relative;
  109. z-index: 2;
  110. }
  111. .stats-item {
  112. flex: 1;
  113. text-align: center;
  114. display: flex;
  115. flex-direction: column;
  116. gap: 12rpx;
  117. }
  118. .stats-value {
  119. font-size: 36rpx;
  120. font-weight: 800;
  121. color: #1a1a1a;
  122. }
  123. .stats-label {
  124. font-size: 22rpx;
  125. color: #999;
  126. }
  127. .stats-divider {
  128. width: 2rpx;
  129. height: 60rpx;
  130. background: #f0f0f0;
  131. }
  132. .detail-section {
  133. padding: 0 32rpx;
  134. }
  135. .section-header {
  136. display: flex;
  137. align-items: center;
  138. gap: 12rpx;
  139. margin-bottom: 24rpx;
  140. }
  141. .header-line {
  142. width: 8rpx;
  143. height: 32rpx;
  144. background: #ff7b00;
  145. border-radius: 4rpx;
  146. }
  147. .header-text {
  148. font-size: 32rpx;
  149. font-weight: bold;
  150. color: #333;
  151. }
  152. .detail-list {
  153. display: flex;
  154. flex-direction: column;
  155. gap: 20rpx;
  156. }
  157. .detail-item {
  158. background: #fff;
  159. padding: 32rpx;
  160. border-radius: 24rpx;
  161. display: flex;
  162. justify-content: space-between;
  163. align-items: center;
  164. }
  165. .detail-info {
  166. display: flex;
  167. flex-direction: column;
  168. gap: 12rpx;
  169. }
  170. .detail-title {
  171. font-size: 28rpx;
  172. font-weight: bold;
  173. color: #333;
  174. }
  175. .detail-time {
  176. font-size: 24rpx;
  177. color: #999;
  178. }
  179. .detail-amount-wrap {
  180. text-align: right;
  181. display: flex;
  182. flex-direction: column;
  183. gap: 8rpx;
  184. }
  185. .detail-amount {
  186. font-size: 32rpx;
  187. font-weight: bold;
  188. color: #ff5252;
  189. }
  190. .detail-no {
  191. font-size: 22rpx;
  192. color: #ccc;
  193. }
  194. </style>