withdrawalDetails.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <template>
  2. <view class="cash">
  3. <view class="top"></view>
  4. <view class="head">
  5. <span class="cuIcon-back" @click="back"></span>
  6. <view class="case"> 提现详情 </view>
  7. </view>
  8. <view class="cash-card">
  9. <view class="cash-header">
  10. <view class="img">
  11. <image :src="`/static/finance/status/${reviewIcon}.png`" mode="aspectFit"></image>
  12. </view>
  13. <view class="amount">-¥{{ cashInfo.applyAmount }}</view>
  14. <view class="title">{{ cashInfo.statusName }}</view>
  15. </view>
  16. <view class="cash-info">
  17. <view class="info">
  18. <view class="label">申请时间</view>
  19. <view class="value">{{ cashInfo.applyTime }}</view>
  20. </view>
  21. <view class="info">
  22. <view class="label">申请人</view>
  23. <view class="value">{{ cashInfo.applicantName }}</view>
  24. </view>
  25. <view class="info">
  26. <view class="label">审批时间</view>
  27. <view class="value">{{ cashInfo.auditTime }}</view>
  28. </view>
  29. <view class="info">
  30. <view class="label">审批人</view>
  31. <view class="value">{{ cashInfo.auditByName }}</view>
  32. </view>
  33. <view class="info">
  34. <view class="label">订单号</view>
  35. <view class="value">{{ cashInfo.withdrawNo }}</view>
  36. </view>
  37. <view v-if="cashInfo.invoiceImgs && cashInfo.invoiceImgs.length" class="info">
  38. <view class="label">发票</view>
  39. <view class="value view-btn" @click="openInvoicePopup">查看</view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import api from '@/api/account';
  47. export default {
  48. name: 'cashDetails',
  49. data() {
  50. return {
  51. bizId: '',
  52. cashInfo: {},
  53. showInvoicePopup: false,
  54. reviewIcon: '',
  55. };
  56. },
  57. onLoad(options) {
  58. if (options.id) {
  59. this.bizId = options.id;
  60. }
  61. },
  62. onShow() {
  63. this.getCashDetails(this.bizId);
  64. },
  65. methods: {
  66. getCashDetails(bizId) {
  67. api.getWithdrawalDetails(bizId).then((res) => {
  68. if (res.data.code === 200) {
  69. this.cashInfo = res.data.result;
  70. switch (this.cashInfo.statusName) {
  71. case '提现成功':
  72. this.reviewIcon = 'success';
  73. break;
  74. case '提现失败':
  75. this.reviewIcon = 'fail';
  76. break;
  77. case '审核中':
  78. this.reviewIcon = 'processing';
  79. break;
  80. }
  81. }
  82. });
  83. },
  84. back() {
  85. uni.navigateBack();
  86. },
  87. openInvoicePopup() {
  88. uni.previewImage({
  89. urls: this.cashInfo.invoiceImgs,
  90. current: this.cashInfo.invoiceImgs[0],
  91. });
  92. },
  93. },
  94. };
  95. </script>
  96. <style lang="scss" scoped>
  97. .cash {
  98. background: #f8f8f8;
  99. min-height: 100vh;
  100. font-weight: 500;
  101. /*#ifdef APP-PLUS*/
  102. .top {
  103. width: 100%;
  104. height: var(--status-bar-height);
  105. background: #fff;
  106. }
  107. /*#endif*/
  108. .head {
  109. width: 100%;
  110. height: 112rpx;
  111. padding: 20rpx;
  112. display: flex;
  113. align-items: center;
  114. background: #fff;
  115. position: relative;
  116. border-bottom: 1rpx solid #eeeeee;
  117. .cuIcon-back {
  118. font-size: 40rpx;
  119. margin-right: 40rpx;
  120. }
  121. .case {
  122. position: absolute;
  123. left: 50%;
  124. transform: translateX(-50%);
  125. font-weight: 500;
  126. font-size: 38rpx;
  127. color: #333333;
  128. }
  129. }
  130. .cash-card {
  131. border-radius: 10rpx;
  132. overflow: hidden;
  133. padding: 50rpx 32rpx 0;
  134. background: #fff;
  135. }
  136. }
  137. .cash-header {
  138. display: flex;
  139. flex-direction: column;
  140. justify-content: center;
  141. align-items: center;
  142. background-color: #ffffff;
  143. image {
  144. width: 88rpx;
  145. height: 88rpx;
  146. }
  147. .amount {
  148. font-size: 60rpx;
  149. color: #1f1f1f;
  150. margin: 30rpx 0 20rpx;
  151. }
  152. .title {
  153. font-weight: 400;
  154. font-size: 28rpx;
  155. color: #666666;
  156. margin-bottom: 40rpx;
  157. }
  158. }
  159. .cash-info {
  160. background-color: #fff;
  161. padding: 0 30rpx;
  162. }
  163. .info {
  164. display: flex;
  165. justify-content: space-between;
  166. align-items: center;
  167. padding-bottom: 30rpx;
  168. font-size: 30rpx;
  169. .label {
  170. display: flex;
  171. align-items: center;
  172. font-weight: 400;
  173. color: #666666;
  174. line-height: 30rpx;
  175. }
  176. .value {
  177. font-family: Source Han Sans SC;
  178. font-weight: 500;
  179. font-size: 30rpx;
  180. color: #333333;
  181. }
  182. .view-btn {
  183. color: #449aff;
  184. }
  185. }
  186. </style>