withdrawal-progress.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <template>
  2. <u-popup
  3. v-model="popupShow"
  4. mode="center"
  5. border-radius="30"
  6. :mask-close-able="true"
  7. @close="handleClose"
  8. width="86%"
  9. >
  10. <view class="modal-content">
  11. <view class="container-form">
  12. <!-- Header with progress title -->
  13. <view class="icon-wrapper">
  14. <image src="/static/tabbar/home2.png" class="tip-icon"></image>
  15. <text class="tip-text">提现进度</text>
  16. </view>
  17. <!-- Progress steps -->
  18. <view class="progress-steps">
  19. <!-- Step 1: 申请提现 -->
  20. <view class="step-item completed">
  21. <view class="step-icon yuan-icon">
  22. <u-icon name="red-packet" color="#ffffff" size="40"></u-icon>
  23. </view>
  24. <view class="step-label">申请提现</view>
  25. </view>
  26. <!-- Arrow 1 -->
  27. <view class="step-arrow">
  28. <text class="arrow-text">→</text>
  29. </view>
  30. <!-- Step 2: 后台审核 -->
  31. <view
  32. class="step-item"
  33. :class="{ completed: orderInfo.status > 1, current: orderInfo.status == 1 }"
  34. >
  35. <view class="step-icon yuan-icon">
  36. <u-icon name="account" color="#ffffff" size="40"></u-icon>
  37. </view>
  38. <view class="step-label">后台审核</view>
  39. </view>
  40. <!-- Arrow 2 -->
  41. <view class="step-arrow">
  42. <text class="arrow-text">→</text>
  43. </view>
  44. <!-- Step 3: 申请人确认 -->
  45. <view
  46. class="step-item"
  47. :class="{ completed: orderInfo.status > 2, current: orderInfo.status == 2 }"
  48. >
  49. <view class="step-icon yuan-icon">
  50. <u-icon name="checkmark-circle" color="#ffffff" size="40"></u-icon>
  51. </view>
  52. <view class="step-label">申请人确认</view>
  53. </view>
  54. </view>
  55. <!-- Action button - based on status -->
  56. <view class="action-button" @click="handleAction">
  57. <!-- Status 1: 知道了 button -->
  58. <text v-if="orderInfo.status == 1">知道了</text>
  59. <!-- Status 2: 确认立即到账 button -->
  60. <text v-else-if="orderInfo.status == 2">确认立即到账</text>
  61. </view>
  62. </view>
  63. </view>
  64. </u-popup>
  65. </template>
  66. <script>
  67. export default {
  68. name: "WithdrawalProgress",
  69. props: {
  70. orderInfo: {
  71. type: Object,
  72. default: () => ({
  73. status: 1,
  74. orderNo: "",
  75. }),
  76. },
  77. },
  78. data() {
  79. return {
  80. popupShow: false,
  81. };
  82. },
  83. methods: {
  84. // Open modal
  85. openModal() {
  86. this.popupShow = true;
  87. },
  88. // Close modal
  89. handleClose() {
  90. this.popupShow = false;
  91. },
  92. // Handle button action based on status
  93. handleAction() {
  94. if (this.orderInfo.status == 1) {
  95. // For status 1: Close the modal for "知道了" button
  96. this.popupShow = false;
  97. } else if (this.orderInfo.status == 2) {
  98. // For status 2: Emit confirm event for "确认立即到账" button
  99. this.$emit("confirm", this.orderInfo);
  100. }
  101. },
  102. },
  103. };
  104. </script>
  105. <style lang="scss">
  106. .modal-content {
  107. background: linear-gradient(-90deg, #98e05f, #0de3ac);
  108. border-radius: 26rpx;
  109. overflow: hidden;
  110. padding: 16rpx;
  111. .container-form {
  112. background: #effcf3;
  113. border-radius: 26rpx;
  114. padding: 30rpx;
  115. padding-bottom: 40rpx;
  116. display: flex;
  117. flex-direction: column;
  118. align-items: center;
  119. }
  120. }
  121. .icon-wrapper {
  122. display: flex;
  123. align-items: center;
  124. justify-content: center;
  125. margin-bottom: 60rpx;
  126. .tip-icon {
  127. width: 48rpx;
  128. height: 48rpx;
  129. margin-right: 10rpx;
  130. }
  131. .tip-text {
  132. font-family: Source Han Sans CN;
  133. font-weight: bold;
  134. font-size: 36rpx;
  135. color: #37c148;
  136. }
  137. }
  138. .progress-steps {
  139. display: flex;
  140. align-items: center;
  141. justify-content: space-between;
  142. width: 100%;
  143. margin-bottom: 50rpx;
  144. padding: 0 20rpx;
  145. .step-item {
  146. display: flex;
  147. flex-direction: column;
  148. align-items: center;
  149. position: relative;
  150. width: 27%;
  151. .step-icon {
  152. width: 80rpx;
  153. height: 80rpx;
  154. border-radius: 50%;
  155. background-color: #cccccc;
  156. display: flex;
  157. align-items: center;
  158. justify-content: center;
  159. font-size: 32rpx;
  160. color: #ffffff;
  161. margin-bottom: 20rpx;
  162. transition: all 0.3s ease;
  163. &.yuan-icon {
  164. font-size: 40rpx;
  165. font-weight: bold;
  166. }
  167. .icon-text {
  168. font-size: 36rpx;
  169. font-weight: 500;
  170. color: #ffffff;
  171. }
  172. }
  173. .step-label {
  174. font-size: 26rpx;
  175. color: #999999;
  176. text-align: center;
  177. transition: all 0.3s ease;
  178. }
  179. &.completed {
  180. .step-icon {
  181. background-color: #37c148;
  182. }
  183. .step-label {
  184. color: #37c148;
  185. font-weight: 500;
  186. }
  187. }
  188. // &.current {
  189. // .step-icon {
  190. // background-color: #37c148;
  191. // box-shadow: 0 0 10rpx rgba(55, 193, 72, 0.5);
  192. // transform: scale(1.05);
  193. // }
  194. // .step-label {
  195. // color: #37c148;
  196. // font-weight: bold;
  197. // transform: scale(1.05);
  198. // }
  199. // }
  200. }
  201. .step-arrow {
  202. width: 12.5%;
  203. display: flex;
  204. align-items: center;
  205. justify-content: center;
  206. .arrow-text {
  207. font-size: 36rpx;
  208. color: #dddddd;
  209. }
  210. }
  211. }
  212. .action-button {
  213. width: 90%;
  214. height: 90rpx;
  215. background-color: #37c148;
  216. border-radius: 45rpx;
  217. display: flex;
  218. align-items: center;
  219. justify-content: center;
  220. margin-top: 20rpx;
  221. box-shadow: 0 6rpx 10rpx rgba(55, 193, 72, 0.2);
  222. transition: all 0.2s ease;
  223. &:active {
  224. transform: scale(0.98);
  225. opacity: 0.9;
  226. }
  227. text {
  228. color: #fff;
  229. font-size: 32rpx;
  230. font-weight: 500;
  231. }
  232. }
  233. </style>