推拿小程序前端代码仓库
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.

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