OrderWithdrawalDetails.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view>
  3. <view style="margin: 10upx 0;text-align: right;">
  4. <tui-button
  5. type="blue" width="220rpx" height="60rpx" margin="0 30upx 0 0"
  6. style="display: inline-block;border-radius: 30rpx;" @click="$refs.dateTimeWithdrawalDetails && $refs.dateTimeWithdrawalDetails.show()"
  7. >
  8. 选择时间段
  9. </tui-button>
  10. <tui-calendar
  11. ref="dateTimeWithdrawalDetails" :type="2" is-fixed
  12. :max-date="new Date(Date.now()).toLocaleString().substring(0, 10).replaceAll('/', '-')"
  13. @change="handleWithdrawalDetailsCalendar"
  14. ></tui-calendar>
  15. </view>
  16. <view style="padding: 20upx;">
  17. <view v-if="withdrawalList && withdrawalList.length">
  18. <view v-for="(item, index) in withdrawalList" :key="index">
  19. <view style="display: flex;justify-content: space-between;align-items: center;font-size: 26upx;color: #999999;">
  20. <view>提现到:{{ item.bankName || '未知' }}({{ item.bankCard.slice(-4) }})</view>
  21. <view>
  22. 状态:
  23. <text>
  24. <text v-if="item.state === 0">待审核</text>
  25. <text v-else-if="item.state === 1">通过</text>
  26. <text v-else-if="item.state === 2">拒绝</text>
  27. <text v-else>--</text>
  28. </text>
  29. </view>
  30. </view>
  31. <view style="display: flex;justify-content: space-between;align-items: flex-end;margin-top: 12upx;">
  32. <view>
  33. 金额:
  34. <text style="color: #ff0e0e;font-weight: bold;">{{ item.withdrawalMoney || '--' }}</text>
  35. </view>
  36. <view style="font-size: 26upx;color: #999999;">{{ item.applyTime || '--' }}</view>
  37. </view>
  38. </view>
  39. </view>
  40. <view style="padding-bottom: 45upx;">
  41. <LoadingMore :status="isLoading ? 'loading' : ''"></LoadingMore>
  42. <view v-if="!isLoading && !withdrawalList.length">
  43. <tui-no-data :fixed="false" style="padding-top: 60upx;">暂无提现数据</tui-no-data>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import { getShopWithdrawalDetailsApi } from '../../../../api/anotherTFInterface'
  51. export default {
  52. name: 'OrderWithdrawalDetails',
  53. props: {},
  54. data() {
  55. return {
  56. queryInfo: {
  57. startTime: '',
  58. endTime: ''
  59. },
  60. isLoading: false,
  61. withdrawalList: []
  62. }
  63. },
  64. created() {
  65. // console.log(this.$refs)
  66. // this.getShopWithdrawalDetails()
  67. },
  68. methods: {
  69. getShopWithdrawalDetails() {
  70. this.isLoading = true
  71. getShopWithdrawalDetailsApi({ ...this.queryInfo })
  72. .then((res) => {
  73. this.withdrawalList = res.data
  74. this.isLoading = false
  75. })
  76. .catch(() => {
  77. this.isLoading = false
  78. })
  79. },
  80. handleWithdrawalDetailsCalendar(e) {
  81. console.log(e)
  82. if (e.startDate === e.endDate) return this.$showToast('不能选择同一天')
  83. this.queryInfo.startTime = e.startDate
  84. this.queryInfo.endTime = e.endDate
  85. this.getShopWithdrawalDetails()
  86. }
  87. }
  88. }
  89. </script>
  90. <style lang="less" scoped></style>