|
|
@@ -3,7 +3,7 @@
|
|
|
<app-table :data="tableList" v-model:columns="tableColumns" :loading="loading">
|
|
|
<!-- 操作类型 -->
|
|
|
<template #operatetypename="{ row }">
|
|
|
- {{ operatetypename(row) }}
|
|
|
+ {{ getEnumName(row) }}
|
|
|
</template>
|
|
|
<!-- 委托时间 -->
|
|
|
<template #createtime="{ value }">
|
|
|
@@ -18,39 +18,33 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef } from 'vue'
|
|
|
import { formatDate } from '@/filters'
|
|
|
+import { getAccountBusinessCodeName } from '@/constants/bank'
|
|
|
+import { getOperateTypeName } from '@/constants/order'
|
|
|
import { useLocalPagination } from '@/hooks/pagination'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { queryAmountLog } from '@/services/api/bank'
|
|
|
import { i18n } from "@/stores";
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
|
|
|
+const { t } = i18n.global
|
|
|
+
|
|
|
const { tableList, showLoadMore, initTableData, loadMore } = useLocalPagination<Model.AmountLogRsp>(30)
|
|
|
|
|
|
const { loading } = useRequest(queryAmountLog, {
|
|
|
onSuccess: (res) => initTableData(res.data)
|
|
|
})
|
|
|
|
|
|
-const { t } = i18n.global
|
|
|
-
|
|
|
-const operatetypename = ((row: Model.AmountLogRsp) => {
|
|
|
- switch (i18n.global.locale) {
|
|
|
- case "zh-CN":
|
|
|
- return row.operatetypename
|
|
|
- case "zh-TW":
|
|
|
- return row.operatetypename_tw
|
|
|
- case "en-US":
|
|
|
- return row.operatetypenameen
|
|
|
- case "vi":
|
|
|
- return row.operatetypenamevi
|
|
|
- default:
|
|
|
- return row.operatetypenameth
|
|
|
- }
|
|
|
-})
|
|
|
-
|
|
|
const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
{ field: 'accountid', label: 'banksign.capital.accountid' },
|
|
|
{ field: 'operatetypename', label: 'banksign.capital.operatetypename' },
|
|
|
{ field: 'amount', label: 'banksign.capital.amount' },
|
|
|
{ field: 'createtime', label: 'banksign.capital.createtime' }
|
|
|
])
|
|
|
+
|
|
|
+const getEnumName = (item: Model.AmountLogRsp) => {
|
|
|
+ if (item.changetypeenumcode === 'accountBusinessCode') {
|
|
|
+ return getAccountBusinessCodeName(item.changetypeenumvalue)
|
|
|
+ }
|
|
|
+ return getOperateTypeName(item.changetypeenumvalue)
|
|
|
+}
|
|
|
</script>
|