withdraw-list.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <template>
  2. <cwg-page-wrapper>
  3. <view class="bank-transaction-page">
  4. <view class="filters-container" :style="{ top: statusBarHeight + 53 + 'px' }">
  5. <view class="filter-item">
  6. <text class="filter-label">{{ t('card.Form.f45') }}</text>
  7. <cwg-filter-select v-model="statusFilterIndex" :options="statusOptions" />
  8. </view>
  9. <view class="filter-item">
  10. <text class="filter-label">{{ t('card.Form.f43') }}</text>
  11. <cwg-filter-picker v-model="dateFilter"></cwg-filter-picker>
  12. </view>
  13. <view class="reset-btn" @click="resetFilters">
  14. <uni-icons type="loop" size="16" color="#2563eb" />
  15. </view>
  16. </view>
  17. <view class="content">
  18. <WithdrawList ref="globalListRef" :cardNumber="cardNumber" :payoutCurrency="payoutCurrency"
  19. :statusIndex="statusFilterIndex" :dateFilter="dateFilter" />
  20. </view>
  21. </view>
  22. </cwg-page-wrapper>
  23. </template>
  24. <script setup lang="ts">
  25. import { ref, computed, watch } from 'vue';
  26. import { onLoad } from '@dcloudio/uni-app';
  27. import { useI18n } from 'vue-i18n';
  28. import useGlobalStore from '@/stores/use-global-store';
  29. import WithdrawList from './components/WithdrawList.vue';
  30. import { withdrawStatus } from '@/utils/dataMap';
  31. const globalStore = useGlobalStore()
  32. const statusBarHeight = computed(() => globalStore.statusBarHeight);
  33. const { t } = useI18n();
  34. const cardNumber = ref('');
  35. onLoad((options) => {
  36. cardNumber.value = options.cardNumber || '';
  37. });
  38. const statusOptions = computed(() => {
  39. return withdrawStatus
  40. });
  41. const payoutCurrency = ref();
  42. const statusFilterIndex = ref(-1);
  43. const dateFilter = ref([]);
  44. const resetFilters = () => {
  45. payoutCurrency.value = '';
  46. statusFilterIndex.value = -1;
  47. dateFilter.value = [];
  48. };
  49. </script>
  50. <style scoped lang="scss">
  51. @import "@/uni.scss";
  52. .page-wrapper {
  53. padding: 0;
  54. border: 0;
  55. }
  56. .bank-transaction-page {
  57. // background-color: #f9fafb;
  58. }
  59. .wallet-header {
  60. background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  61. }
  62. /* Header */
  63. .header {
  64. background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  65. padding: px2rpx(16);
  66. padding-bottom: px2rpx(20);
  67. }
  68. .header-content {
  69. display: flex;
  70. flex-direction: column;
  71. gap: px2rpx(16);
  72. }
  73. .header-title {
  74. display: flex;
  75. align-items: center;
  76. gap: px2rpx(8);
  77. }
  78. .title-text {
  79. color: #ffffff;
  80. font-size: px2rpx(20);
  81. }
  82. .stats-container {
  83. display: flex;
  84. gap: px2rpx(12);
  85. }
  86. .stat-card {
  87. flex: 1;
  88. background-color: rgba(255, 255, 255, 0.15);
  89. backdrop-filter: blur(px2rpx(10));
  90. border-radius: px2rpx(12);
  91. padding: px2rpx(12);
  92. }
  93. .stat-header {
  94. display: flex;
  95. align-items: center;
  96. gap: px2rpx(6);
  97. margin-bottom: px2rpx(8);
  98. }
  99. .icons {
  100. width: px2rpx(20);
  101. height: px2rpx(20);
  102. }
  103. .stat-label {
  104. font-size: px2rpx(12);
  105. color: rgba(255, 255, 255, 0.9);
  106. }
  107. .stat-value {
  108. font-size: px2rpx(20);
  109. color: #ffffff;
  110. display: block;
  111. margin-bottom: px2rpx(4);
  112. }
  113. .stat-count {
  114. font-size: px2rpx(11);
  115. color: rgba(255, 255, 255, 0.8);
  116. }
  117. /* Tabs */
  118. .tabs-container {
  119. background-color: #ffffff;
  120. display: flex;
  121. border-bottom: 1px solid #e5e7eb;
  122. position: sticky;
  123. top: 0;
  124. z-index: 10;
  125. }
  126. .tab-item {
  127. flex: 1;
  128. display: flex;
  129. align-items: center;
  130. justify-content: center;
  131. gap: px2rpx(6);
  132. padding: px2rpx(16);
  133. position: relative;
  134. transition: all 0.3s;
  135. }
  136. .tab-text {
  137. font-size: px2rpx(15);
  138. color: #9ca3af;
  139. transition: color 0.3s;
  140. }
  141. .tab-text-active {
  142. color: #2563eb;
  143. }
  144. .tab-indicator {
  145. position: absolute;
  146. bottom: 0;
  147. left: 0;
  148. right: 0;
  149. height: px2rpx(3);
  150. background-color: #2563eb;
  151. border-radius: px2rpx(3) px2rpx(3) 0 0;
  152. }
  153. /* Content */
  154. .content {
  155. padding: 0;
  156. }
  157. .filters-container {
  158. display: flex;
  159. align-items: center;
  160. gap: px2rpx(8);
  161. padding: px2rpx(12) px2rpx(16);
  162. background-color: #ffffff;
  163. position: sticky;
  164. top: 0;
  165. z-index: 10;
  166. // overflow-x: auto;
  167. -webkit-overflow-scrolling: touch;
  168. }
  169. .filter-item {
  170. display: flex;
  171. align-items: center;
  172. gap: px2rpx(4);
  173. flex-shrink: 0;
  174. min-width: 0;
  175. }
  176. .filter-label {
  177. font-size: px2rpx(12);
  178. color: #6b7280;
  179. white-space: nowrap;
  180. flex-shrink: 0;
  181. }
  182. .filter-picker {
  183. background-color: #ffffff;
  184. border: 1px solid #e5e7eb;
  185. border-radius: px2rpx(8);
  186. padding: px2rpx(6) px2rpx(8);
  187. display: flex;
  188. align-items: center;
  189. min-width: px2rpx(60);
  190. max-width: px2rpx(120);
  191. flex-shrink: 1;
  192. }
  193. .picker-value {
  194. display: flex;
  195. align-items: center;
  196. gap: px2rpx(4);
  197. width: 100%;
  198. min-width: 0;
  199. }
  200. .picker-text {
  201. flex: 1;
  202. min-width: 0;
  203. font-size: px2rpx(12);
  204. color: #111827;
  205. overflow: hidden;
  206. text-overflow: ellipsis;
  207. white-space: nowrap;
  208. }
  209. .picker-icon {
  210. flex-shrink: 0;
  211. width: px2rpx(14);
  212. height: px2rpx(14);
  213. }
  214. .reset-btn {
  215. background-color: #ffffff;
  216. border: 1px solid #e5e7eb;
  217. border-radius: px2rpx(8);
  218. padding: px2rpx(6) px2rpx(10);
  219. display: flex;
  220. align-items: center;
  221. justify-content: center;
  222. flex-shrink: 0;
  223. min-width: px2rpx(36);
  224. }
  225. </style>