rechargeDet.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <view>
  3. <ujp-navbar title="充值详情"></ujp-navbar>
  4. <view class="rechargeDet-head">
  5. <view class="payPrice" v-if="type==1">
  6. <font>{{detail.payFee.toFixed(2)}}</font><span>元</span>
  7. </view>
  8. <view class="payPrice" v-if="type==2">
  9. <font>{{detail.depositAmount.toFixed(2)}}</font><span>元</span>
  10. </view>
  11. <view class="payPrice" v-if="type==3">
  12. <font>{{detail.depositAmount.toFixed(2)}}</font><span>元</span>
  13. </view>
  14. <p class="oldTextjp2" oldstyle="font-size: 16px;" v-if="type==1">充值金额(元)</p>
  15. <p class="oldTextjp2" oldstyle="font-size: 16px;" v-if="type==2">充电金(元)</p>
  16. <p class="oldTextjp2" oldstyle="font-size: 16px;" v-if="type==3">现金分红(元)</p>
  17. </view>
  18. <view class="rechargeDet-main oldTextjp2" oldstyle="font-size: 18px;" v-if="type==3||type==2">
  19. <view class="rechargeDet-list">
  20. <p>充值时间</p><span>{{detail.createTime}}</span>
  21. </view>
  22. </view>
  23. <view class="rechargeDet-main oldTextjp2" oldstyle="font-size: 18px;" v-if="type==1">
  24. <view class="rechargeDet-list">
  25. <p>充值订单</p><span>{{detail.outOrderNo}}</span>
  26. </view>
  27. <view class="rechargeDet-list">
  28. <p>交易单号</p><span class="transactionClass">{{detail.transactionId}}</span>
  29. </view>
  30. <view class="rechargeDet-list">
  31. <p>充值时间</p><span>{{detail.payTime}}</span>
  32. </view>
  33. <view class="rechargeDet-list">
  34. <p>充值渠道</p><span>{{detail.payNameStr}}</span>
  35. </view>
  36. <view class="rechargeDet-list">
  37. <p>充值金额</p><span>{{detail.payFee.toFixed(2)}}元</span>
  38. </view>
  39. </view>
  40. <view class="rechargeDet-main" v-if="type==1">
  41. <view class="rechargeDet-list oldTextjp2" oldstyle="font-size: 18px;">
  42. <p>状态</p><span>{{detail.payStatusStr}}</span>
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import * as API from '@/apis/index.js'
  49. export default {
  50. data() {
  51. return {
  52. id: '',
  53. detail: {},
  54. elderStatus: false,
  55. }
  56. },
  57. onLoad(op) {
  58. if(op.id) {
  59. this.id = op.id
  60. this.type = op.type
  61. this.getAccountDetail();
  62. }
  63. if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  64. this.elderStatus = true;
  65. } else {
  66. this.elderStatus = false;
  67. }
  68. },
  69. methods: {
  70. getAccountDetail() {
  71. uni.showLoading({
  72. title: "加载中",
  73. mask: true,
  74. })
  75. API.rechargeAmountRecordDetail({
  76. id: this.id,
  77. type: this.type
  78. }).then((res) => {
  79. uni.hideLoading();
  80. this.detail = res.data.recordDetail;
  81. }).catch(error => {
  82. uni.showToast({
  83. title: error,
  84. icon: "none"
  85. })
  86. })
  87. },
  88. }
  89. }
  90. </script>
  91. <style lang="scss" scoped>
  92. .rechargeDet-head{
  93. background-color: #fff;
  94. padding: 24px 0;
  95. display: flex;
  96. flex-direction: column;
  97. align-items: center;
  98. .payPrice{
  99. display: flex;
  100. align-items: flex-end;
  101. justify-content: center;
  102. font{
  103. font-size: 36px;
  104. line-height: 36px;
  105. }
  106. }
  107. p{
  108. color:#999;
  109. margin-top: 4px;
  110. }
  111. }
  112. .rechargeDet-main{
  113. background-color: #fff;
  114. padding-left: 16px;
  115. margin-top: 12px;
  116. .rechargeDet-list{
  117. display: flex;
  118. align-items: center;
  119. justify-content: space-between;
  120. padding: 12px 16px 12px 0;
  121. border-bottom: 1px solid #f7f7f7;
  122. &:last-child{
  123. border-bottom: none;
  124. }
  125. .transactionClass {
  126. width: 70%;
  127. overflow: hidden;
  128. white-space: nowrap;
  129. text-overflow: ellipsis;
  130. text-align: right;
  131. }
  132. }
  133. }
  134. </style>