index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <view class="destroy">
  3. <search></search>
  4. <view class="allComputer">
  5. <h2>核销统计</h2>
  6. <view class="all_box">
  7. <view>
  8. <h2 class="price">¥1234.99</h2>
  9. <p>订单金额</p>
  10. </view>
  11. <view>
  12. <h2 class="price">¥2356.99</h2>
  13. <p>商品金额</p>
  14. </view>
  15. <view>
  16. <h2 class="price">¥5467.99</h2>
  17. <p>已付金额</p>
  18. </view>
  19. <view>
  20. <h2 class="price">¥3451.99</h2>
  21. <p>抵扣金额</p>
  22. </view>
  23. <view>
  24. <h2 class="price">¥12.99</h2>
  25. <p>抵扣积分</p>
  26. </view>
  27. <view>
  28. <h2 class="price">¥783.99</h2>
  29. <p>退款金额</p>
  30. </view>
  31. </view>
  32. </view>
  33. <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltolower="lower">
  34. <view class="li" v-for="(item,index) in list">
  35. <view class="h2_box">
  36. <h2>13602712680</h2><img src="@/static/images/moreHorizontal@2x.png" alt=""
  37. @click="activeId = item.id">
  38. </view>
  39. <p>核销时间:2023-12-23 12:23</p>
  40. <p>退款金额:¥90.00</p>
  41. <view class="footer">
  42. <view>订单金额:<text class="money">¥3214.59</text></view>
  43. <view>抵扣金额:<text class="integer">343545</text></view>
  44. <text>详情</text>
  45. </view>
  46. <u-transition :show="item.id == activeId">
  47. <moreShow @moreShowActive="moreShowActive"></moreShow>
  48. </u-transition>
  49. </view>
  50. </scroll-view>
  51. </view>
  52. </template>
  53. <script>
  54. import moreShow from "@/pagesA/components/more_show/index.vue"
  55. import search from "@/pagesA/components/search/index.vue"
  56. export default {
  57. components: {
  58. search,
  59. moreShow
  60. },
  61. data() {
  62. return {
  63. list: [{
  64. id: 1
  65. }, {
  66. id: 2
  67. }, {
  68. id: 3
  69. }, {
  70. id: 4
  71. }, {
  72. id: 5
  73. }, {
  74. id: 6
  75. }, {
  76. id: 7
  77. }],
  78. scrollTop: 0,
  79. activeId: 0, //当前展开ID
  80. };
  81. },
  82. methods: {
  83. moreShowActive(int) {
  84. console.log(this.activeId, int)
  85. this.activeId = 0 //完成操作置空
  86. },
  87. //触底
  88. lower: function(e) {
  89. console.log(e)
  90. },
  91. }
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. .destroy {
  96. background-color: #f7f7f7;
  97. }
  98. .allComputer {
  99. background-color: #fff;
  100. height: 384rpx;
  101. padding: 40rpx 32rpx;
  102. margin-bottom: 16rpx;
  103. display: flex;
  104. flex-direction: column;
  105. &>h2 {
  106. margin-bottom: 24rpx;
  107. }
  108. &>.all_box {
  109. flex: 1;
  110. background: #F9F9F9;
  111. border-radius: 24rpx;
  112. display: flex;
  113. align-items: center;
  114. flex-wrap: wrap;
  115. &>view {
  116. width: 33%;
  117. flex-shrink: 0;
  118. border-right: 1rpx solid #e9e9e9;
  119. display: flex;
  120. flex-direction: column;
  121. align-items: center;
  122. &>.price {
  123. font-size: 28rpx;
  124. font-weight: bold;
  125. color: #333333;
  126. margin-bottom: 12rpx;
  127. }
  128. &>p {
  129. font-size: 24rpx;
  130. font-weight: 400;
  131. color: #767A80;
  132. }
  133. &:nth-of-type(3) {
  134. border-right: none;
  135. }
  136. &:last-child {
  137. border-right: none;
  138. }
  139. }
  140. }
  141. }
  142. .scroll-Y {
  143. background-color: #fff;
  144. height: calc(100vh - 500rpx);
  145. .li {
  146. border-bottom: 2rpx solid #e9e9e9;
  147. padding: 40rpx 32rpx;
  148. position: relative;
  149. .h2_box {
  150. display: flex;
  151. align-items: center;
  152. justify-content: space-between;
  153. margin-bottom: 24rpx;
  154. h2 {
  155. font-size: 32rpx;
  156. font-weight: 500;
  157. color: #222222;
  158. }
  159. img {
  160. width: 40rpx;
  161. height: 40rpx;
  162. }
  163. }
  164. p {
  165. font-size: 24rpx;
  166. font-weight: 400;
  167. color: #767A80;
  168. padding-bottom: 12rpx;
  169. }
  170. .footer {
  171. margin-top: 20rpx;
  172. display: flex;
  173. align-items: center;
  174. // justify-content: space-between;
  175. &>text {
  176. color: #0098ED;
  177. font-size: 22rpx;
  178. }
  179. &>view {
  180. flex: 1;
  181. flex-shrink: 0;
  182. margin-right: 20rpx;
  183. background: #F9F9F9;
  184. border-radius: 8rpx;
  185. padding: 20rpx;
  186. font-size: 24rpx;
  187. font-weight: 400;
  188. color: #767A80;
  189. &>.money {
  190. font-size: 28rpx;
  191. font-weight: bold;
  192. color: #EB5757;
  193. }
  194. &>.integer {
  195. font-size: 28rpx;
  196. font-weight: bold;
  197. color: #F57737;
  198. }
  199. }
  200. }
  201. }
  202. }
  203. </style>