推拿小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

161 lines
3.3 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <view class="page">
  3. <!-- 导航栏 -->
  4. <navbar title="提现记录" leftClick @leftClick="$utils.navigateBack" color="#fff" />
  5. <view class="tools">
  6. <uv-datetime-picker
  7. ref="datetimePicker"
  8. v-model="selectedTime"
  9. mode="year-month"
  10. confirmColor="#84A73F"
  11. @confirm="onTimeChange"
  12. ></uv-datetime-picker>
  13. <button plain class="flex btn" @click="openTimePicker">
  14. <text>{{ displaySelectedTime }}</text>
  15. <image class="btn-icon" src="../static/runningWater/icon-arrow.png" mode="widthFix"></image>
  16. </button>
  17. </view>
  18. <view class="card list">
  19. <template v-if="list.length">
  20. <view class="flex list-item"
  21. v-for="(item, index) in list"
  22. :key="index"
  23. >
  24. <image class="list-item-icon" src="../static/runningWater/icon-commission.png" mode="widthFix"></image>
  25. <view class="list-item-info">
  26. <view class="highlight">佣金提现</view>
  27. <view>{{ item.createTime }}</view>
  28. </view>
  29. <view class="list-item-value">{{ `-${item.money}` }}</view>
  30. </view>
  31. </template>
  32. <template v-else>
  33. <uv-empty mode="history" textSize="28rpx" iconSize="100rpx" />
  34. </template>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import mixinsList from "@/mixins/list.js"
  40. export default {
  41. mixins: [mixinsList],
  42. data() {
  43. return {
  44. selectedTime: new Date(),
  45. x: ['+', '-', '-', '+'],
  46. mixinsListApi: "getWaterPageList",
  47. beforeDate: new Date(), //开始日期
  48. afterDate: new Date(), //结束日期
  49. totalMoney : 0,
  50. totalWithdraw : 0,
  51. }
  52. },
  53. computed: {
  54. displaySelectedTime() {
  55. return this.$dayjs(this.selectedTime).format("YYYY年M月")
  56. }
  57. },
  58. methods: {
  59. //打开日历
  60. openCalendars() {
  61. if (this?.$refs?.calendars) {
  62. this.$refs.calendars.open();
  63. }
  64. },
  65. // 选择了日期
  66. handleSelectCalendars(day) {
  67. console.log(day);
  68. // let beforeDate = this.getYearMonth(day?.range?.before)
  69. // let afterDate = this.getYearMonth(day?.range?.after)
  70. // this.beforeYear = beforeDate.year;
  71. // this.beforeMonth = beforeDate.month;
  72. // this.afterYear = afterDate.year;
  73. // this.afterMonth = afterDate.month;
  74. },
  75. getDataThen(list, total, result){
  76. this.totalMoney = result.totalMoney
  77. this.totalWithdraw = result.totalWithdraw
  78. this.list = result.page.records
  79. this.total = result.page.total
  80. },
  81. openTimePicker() {
  82. this.$refs.datetimePicker.open();
  83. },
  84. onTimeChange(e) {
  85. // todo
  86. console.log('--onTimeChange', e)
  87. },
  88. }
  89. }
  90. </script>
  91. <style lang="scss" scoped>
  92. .page {
  93. background-color: $uni-bg-color;
  94. min-height: 100vh;
  95. /deep/ .nav-bar__view {
  96. background-image: linear-gradient(#84A73F, #D8FF8F);
  97. }
  98. }
  99. .tools {
  100. background-color: $uni-fg-color;
  101. padding: 25rpx 42rpx;
  102. .btn {
  103. display: inline-block;
  104. border: none;
  105. color: #000000;
  106. font-size: 28rpx;
  107. line-height: 40rpx;
  108. &-icon {
  109. width: 28rpx;
  110. height: 28rpx;
  111. margin-left: 12rpx;
  112. }
  113. }
  114. }
  115. .list {
  116. margin: 9rpx 13rpx;
  117. padding: 31rpx 20rpx;
  118. &-item {
  119. padding-bottom: 19rpx;
  120. border-bottom: 1rpx solid #E0E0E0;
  121. margin-bottom: 20rpx;
  122. font-size: 28rpx;
  123. &-icon {
  124. width: 56rpx;
  125. height: auto;
  126. margin-right: 10rpx;
  127. }
  128. &-info {
  129. flex: 1;
  130. color: #949494;
  131. .highlight {
  132. color: #333333;
  133. }
  134. }
  135. &-value {
  136. color: #FF2A2A;
  137. }
  138. }
  139. }
  140. </style>