IncrementRecord.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <view class="container">
  3. <view class="TotalRevenue">
  4. <view class="amountText">
  5. 总充值 &nbsp;(元) &nbsp;:&nbsp; {{ acountNumbers['总充值'] }}
  6. </view>
  7. </view>
  8. <view class="MakeMoneyRecordsList">
  9. <scroll-view scroll-y="true" class="scrollY" @scrolltolower="getMore">
  10. <view v-for="(item, index) in dataList" :key="index" class="listItem">
  11. <view class="itemIcon" style="background: #FF380C;">
  12. <image class="Iconimg" src="../../../../static/images/user/zhichu.png"></image>
  13. </view>
  14. <text class="txt2">{{ item.number }}<text class="texts">({{ statusData[item.status] }})</text></text>
  15. <!-- <text class="txt2">{{ item.number }}<text class="">({{ statusData[item.status] }})</text></text> -->
  16. <view class="itemDetails">
  17. <text class="txt1">代金卷{{ item.typeStrName }}</text>
  18. <text class="txt3">{{ item.typeStrName }} ID : {{ item.id }}</text>
  19. <text class="txt3">{{ item.createTime }}</text>
  20. </view>
  21. </view>
  22. </scroll-view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import { getAllVoucherOrderApi } from '../../../../api/anotherTFInterface'
  28. export default {
  29. name: 'IncrementRecord',
  30. props: {
  31. condition: {
  32. type: [Number, String],
  33. default: 5
  34. },
  35. acountNumbers: {
  36. type: Object,
  37. default: {
  38. '总支出': 0,
  39. '总收入': 0
  40. }
  41. }
  42. },
  43. data() {
  44. return {
  45. queryList: {
  46. page: 1,
  47. pageSize: 20,
  48. type: 1,
  49. status: ''
  50. },
  51. statusData: ['未付款', '取消', '已付款', '未发放', '已发放', '支付失败'], // 状态(0未付款,1取消2已付款3代金券未发放4代金券已发放,5支付失败)
  52. dataList: []
  53. }
  54. },
  55. watch: {
  56. condition(newVlaue, oldVlaue) {
  57. this.dataList = []
  58. this.queryList.page = 1
  59. this.queryList.pageSize = 20
  60. this.getListData()
  61. }
  62. },
  63. created() {
  64. this.getListData()
  65. },
  66. methods: {
  67. getListData() {
  68. getAllVoucherOrderApi({
  69. ...this.queryList,
  70. condition: this.condition
  71. }).then((res) => {
  72. if (res.data.records.length <= 0) {
  73. uni.showToast({
  74. title: '没有更多了',
  75. icon: 'none'
  76. })
  77. }
  78. for (let index = 0; index < res.data.records.length; index++) {
  79. this.dataList.push(res.data.records[index])
  80. }
  81. // this.dataList = res.data.records;
  82. // console.log(res);
  83. })
  84. .catch((err) => {
  85. console.log(err)
  86. })
  87. // getAllVoucherOrderApi({
  88. // ...this.queryList,
  89. // condition: this.condition
  90. // }).then(res => {
  91. // if (res.data.records.length <= 0) {
  92. // uni.showToast({
  93. // title: '没有更多了',
  94. // icon: 'none'
  95. // });
  96. // }
  97. // for (let index = 0; index < res.data.records.length; index++) {
  98. // this.dataList.push(res.data.records[index])
  99. // }
  100. // // this.dataList = res.data.records;
  101. // // console.log(res);
  102. // }).catch(err => {
  103. // console.log(err);
  104. // })
  105. },
  106. getMore() {
  107. this.queryList.page++
  108. this.getListData()
  109. }
  110. }
  111. }
  112. </script>
  113. <style lang="scss" scoped>
  114. .texts {
  115. margin-left: 10rpx;
  116. font-size: 28rpx;
  117. letter-spacing: 2rpx;
  118. color: #878899c9;
  119. }
  120. .TotalRevenue {
  121. width: 100%;
  122. box-sizing: border-box;
  123. padding-bottom: 10rpx;
  124. /* height: 38rpx; */
  125. .amountText {
  126. /* display: flex;
  127. align-items: center; */
  128. margin: 20rpx 0rpx;
  129. font-family: 思源黑体;
  130. font-size: 32rpx;
  131. font-weight: normal;
  132. line-height: 32rpx;
  133. font-feature-settings: "kern" on;
  134. color: #222229;
  135. }
  136. }
  137. .scrollY {
  138. height: 100%;
  139. }
  140. .container {
  141. box-sizing: border-box;
  142. padding-bottom: 216rpx;
  143. }
  144. .MakeMoneyRecordsList {
  145. height: 59vh;
  146. overflow: hidden auto;
  147. .listItem {
  148. margin-top: 50rpx;
  149. /* margin: 50rpx 0rpx; */
  150. width: 100%;
  151. height: 120rpx;
  152. display: flex;
  153. font-family: 思源黑体;
  154. position: relative;
  155. .itemIcon {
  156. display: flex;
  157. align-items: center;
  158. justify-content: center;
  159. width: 68rpx;
  160. height: 68rpx;
  161. border-radius: 8rpx;
  162. background: #49CE8B;
  163. .Iconimg {
  164. width: 50rpx;
  165. height: 50rpx;
  166. }
  167. }
  168. .txt2 {
  169. position: absolute;
  170. right: 20rpx;
  171. top: 30rpx;
  172. font-family: 思源黑体;
  173. font-size: 42rpx;
  174. line-height: 5rpx;
  175. color: #222229;
  176. }
  177. .itemDetails {
  178. margin-left: 20rpx;
  179. display: flex;
  180. flex-direction: column;
  181. font-size: 24rpx;
  182. .txt1 {
  183. font-size: 28rpx;
  184. font-weight: normal;
  185. line-height: 32rpx;
  186. color: #222229;
  187. }
  188. .txt3 {
  189. margin-top: 10rpx;
  190. font-size: 24rpx;
  191. font-weight: normal;
  192. line-height: 32rpx;
  193. color: #888889;
  194. }
  195. }
  196. }
  197. }
  198. </style>