recharge-log.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <ax-body>
  3. <view class="body app-hide-scrollbar">
  4. <view v-if="logs.data.length" class="list">
  5. <view v-for="(item, index) in logs.data" :key="index" class="item">
  6. <view class="title">
  7. <view class="name">{{ item.params.levelName }}</view>
  8. <view class="state" :style="{ backgroundColor: item.orderStatus == 2 ? '' : '#FF5D50' }">
  9. {{ getStatusTips(item.orderStatus) }}</view>
  10. </view>
  11. <view class="cell">
  12. <view>订单编号:{{ item.orderNo }}</view>
  13. <view>购券时间:{{ item.createTime }}</view>
  14. <view>实付金额:{{ item.orderMoney }}元</view>
  15. <view class="backTaxAmount" v-if="item.backTaxAmount && item.backTax === 0">
  16. <view class="">超充金额:{{ item.backTaxAmount }}元</view>
  17. <view>|</view>
  18. <view class="check-backTaxAmount" @click="topage_order(item)">查看超充订单</view>
  19. </view>
  20. <view v-if="item.ZTBackMoney">返回智停端补缴金额:{{ item.ZTBackMoney }}</view>
  21. <view v-if="item.backTaxAmount && item.backTax === 0">可抵扣余量:{{ item.orderMoney -
  22. item.backTaxAmount }}元
  23. </view>
  24. <view v-if="item.orderStatus != 2">退款时间:{{ item.refundTime }}</view>
  25. <view v-if="item.orderStatus != 2">退款金额:{{ item.refundMoney }}元</view>
  26. </view>
  27. </view>
  28. <view v-if="logs.total > logs.data.length" @click="loadData(true)" class="loadmore">
  29. <text>点击加载更多数据</text>
  30. </view>
  31. </view>
  32. <view v-else class="nothing">
  33. <image src="@/static/img/empty.svg" mode="widthFix" class="icon"></image>
  34. <view>暂无可展示数据</view>
  35. </view>
  36. </view>
  37. </ax-body>
  38. </template>
  39. <script>
  40. export default {
  41. onLoad() {
  42. this.loadData();
  43. },
  44. data() {
  45. return {
  46. logs: {
  47. total: 0,
  48. data: [],
  49. },
  50. search_data: {
  51. pageNum: 1,
  52. pageSize: 10
  53. }
  54. }
  55. },
  56. methods: {
  57. getStatusTips(status) {
  58. if (status == 2) {
  59. return "已到账"
  60. } else if (status == 4) {
  61. return "已退款"
  62. } else if (status == 5) {
  63. return "退款中"
  64. } else if (status == 3) {
  65. return "已取消"
  66. } else if (status == 1) {
  67. return "待支付"
  68. }
  69. },
  70. loadData(append) {
  71. const currentPage = this.search_data.pageNum;
  72. if (append) {
  73. this.search_data.pageNum++;
  74. } else {
  75. this.search_data.pageNum = 1;
  76. }
  77. this.$api.base("post", "/applet/v1/order/getTicketRecords", this.search_data, {})
  78. .then(res => {
  79. if (!append || currentPage + 1 === this.search_data.pageNum) {
  80. if (append) {
  81. this.logs.data = this.logs.data.concat(res.data.records);
  82. } else {
  83. this.logs.total = res.data.total;
  84. this.logs.data = res.data.records;
  85. }
  86. }
  87. })
  88. .catch(error => {
  89. if (append) {
  90. this.search_data.pageNum = currentPage;
  91. }
  92. console.error('获取充值记录失败:', error);
  93. });
  94. },
  95. topage_order(item) {
  96. this.$app.url.goto('/subPackages/order/order-detail/order-detail?orderId=' + item.chargeOrderId);
  97. }
  98. }
  99. }
  100. </script>
  101. <style scoped>
  102. @import url("recharge-log.css");
  103. </style>