index.vue 3.7 KB

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