From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/views/pay/wallet/transaction/WalletTransactionList.vue |   79 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 79 insertions(+), 0 deletions(-)

diff --git a/src/views/pay/wallet/transaction/WalletTransactionList.vue b/src/views/pay/wallet/transaction/WalletTransactionList.vue
new file mode 100644
index 0000000..49c5d97
--- /dev/null
+++ b/src/views/pay/wallet/transaction/WalletTransactionList.vue
@@ -0,0 +1,79 @@
+<template>
+  <ContentWrap>
+    <el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
+      <el-table-column align="center" label="缂栧彿" prop="id" />
+      <el-table-column align="center" label="閽卞寘缂栧彿" prop="walletId" />
+      <el-table-column align="center" label="鍏宠仈涓氬姟鏍囬" prop="title" />
+      <el-table-column align="center" label="浜ゆ槗閲戦" prop="price">
+        <template #default="{ row }"> {{ fenToYuan(row.price) }} 鍏�</template>
+      </el-table-column>
+      <el-table-column align="center" label="閽卞寘浣欓" prop="balance">
+        <template #default="{ row }"> {{ fenToYuan(row.balance) }} 鍏�</template>
+      </el-table-column>
+      <el-table-column
+        :formatter="dateFormatter"
+        align="center"
+        label="浜ゆ槗鏃堕棿"
+        prop="createTime"
+        width="180px"
+      />
+    </el-table>
+    <!-- 鍒嗛〉 -->
+    <Pagination
+      v-model:limit="queryParams.pageSize"
+      v-model:page="queryParams.pageNo"
+      :total="total"
+      @pagination="getList"
+    />
+  </ContentWrap>
+</template>
+
+<script lang="ts" setup>
+import { dateFormatter } from '@/utils/formatTime'
+import * as WalletTransactionApi from '@/api/pay/wallet/transaction'
+import * as WalletApi from '@/api/pay/wallet/balance'
+import { fenToYuan } from '@/utils'
+
+defineOptions({ name: 'WalletTransactionList' })
+const props = defineProps({
+  walletId: {
+    type: Number,
+    required: false
+  },
+  userId: {
+    type: Number,
+    required: false
+  }
+})
+
+const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑
+const total = ref(0) // 鍒楄〃鐨勬�婚〉鏁�
+const queryParams = reactive({
+  pageNo: 1,
+  pageSize: 10,
+  walletId: null
+})
+const list = ref([]) // 鍒楄〃鐨勬暟鎹�
+/** 鏌ヨ鍒楄〃 */
+const getList = async () => {
+  loading.value = true
+  try {
+    if (props.userId) {
+      const wallet = await WalletApi.getWallet({ userId: props.userId })
+      queryParams.walletId = wallet.id as any
+    } else {
+      queryParams.walletId = props.walletId as any
+    }
+    const data = await WalletTransactionApi.getWalletTransactionPage(queryParams)
+    list.value = data.list
+    total.value = data.total
+  } finally {
+    loading.value = false
+  }
+}
+/** 鍒濆鍖� **/
+onMounted(() => {
+  getList()
+})
+</script>
+<style lang="scss" scoped></style>

--
Gitblit v1.8.0