|
@@ -2,6 +2,34 @@
|
|
|
<template>
|
|
<template>
|
|
|
<app-table :data="accountList" v-model:columns="tableColumns" :row-key="rowKey" :expand-row-keys="expandKeys"
|
|
<app-table :data="accountList" v-model:columns="tableColumns" :row-key="rowKey" :expand-row-keys="expandKeys"
|
|
|
@row-click="rowClick">
|
|
@row-click="rowClick">
|
|
|
|
|
+ <!-- 余额 -->
|
|
|
|
|
+ <template #currentbalance>
|
|
|
|
|
+ {{ accountInfo.currentbalance?.toFixed(2) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 净值 -->
|
|
|
|
|
+ <template #balance>
|
|
|
|
|
+ {{ accountInfo.balance?.toFixed(2) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 持仓市值 -->
|
|
|
|
|
+ <template #curamount>
|
|
|
|
|
+ {{ accountInfo.curamount?.toFixed(2) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 占用资金 -->
|
|
|
|
|
+ <template #oriusedmargin>
|
|
|
|
|
+ {{ accountInfo.oriusedmargin?.toFixed(2) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 可用资金 -->
|
|
|
|
|
+ <template #avaiableMoney>
|
|
|
|
|
+ {{ avaiableMoney.toFixed(2) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 冻结资金 -->
|
|
|
|
|
+ <template #freezeMargin>
|
|
|
|
|
+ {{ freezeMargin.toFixed(2) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 状态 -->
|
|
|
|
|
+ <template #tradestatus="{ value }">
|
|
|
|
|
+ {{ getTradeStatusName(value) }}
|
|
|
|
|
+ </template>
|
|
|
<!-- 展开行 -->
|
|
<!-- 展开行 -->
|
|
|
<template #expand="{ row }">
|
|
<template #expand="{ row }">
|
|
|
<app-auth-operation v-bind="{ code, options: { selectedRow: row } }" />
|
|
<app-auth-operation v-bind="{ code, options: { selectedRow: row } }" />
|
|
@@ -15,6 +43,7 @@ import { useAccountStore } from '@/stores'
|
|
|
import { useComposeTable } from '@pc/components/base/table'
|
|
import { useComposeTable } from '@pc/components/base/table'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
|
|
import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
|
|
|
|
|
+import { getTradeStatusName } from '@/constants/order'
|
|
|
|
|
|
|
|
defineProps({
|
|
defineProps({
|
|
|
code: String
|
|
code: String
|
|
@@ -23,15 +52,16 @@ defineProps({
|
|
|
const accountStore = useAccountStore()
|
|
const accountStore = useAccountStore()
|
|
|
const { accountList } = accountStore.$toRefs()
|
|
const { accountList } = accountStore.$toRefs()
|
|
|
const { rowKey, expandKeys, rowClick } = useComposeTable<Model.TaAccountsRsp>({ rowKey: 'accountid' })
|
|
const { rowKey, expandKeys, rowClick } = useComposeTable<Model.TaAccountsRsp>({ rowKey: 'accountid' })
|
|
|
|
|
+const { accountInfo, freezeMargin, avaiableMoney } = accountStore.$toRefs()
|
|
|
|
|
|
|
|
const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
{ prop: 'accountid', label: '资金账号' },
|
|
{ prop: 'accountid', label: '资金账号' },
|
|
|
- { prop: 'unknown', label: '净值' },
|
|
|
|
|
- { prop: 'unknown', label: '持仓市值' },
|
|
|
|
|
- { prop: 'unknown', label: '余额' },
|
|
|
|
|
- { prop: 'unknown', label: '可用资金' },
|
|
|
|
|
- { prop: 'unknown', label: '冻结资金' },
|
|
|
|
|
- { prop: 'unknown', label: '占用资金' },
|
|
|
|
|
|
|
+ { prop: 'balance', label: '净值' },
|
|
|
|
|
+ { prop: 'curamount', label: '持仓市值' },
|
|
|
|
|
+ { prop: 'currentbalance', label: '余额' },
|
|
|
|
|
+ { prop: 'avaiableMoney', label: '可用资金' },
|
|
|
|
|
+ { prop: 'freezeMargin', label: '冻结资金' },
|
|
|
|
|
+ { prop: 'oriusedmargin', label: '占用资金' },
|
|
|
{ prop: 'tradestatus', label: '状态' },
|
|
{ prop: 'tradestatus', label: '状态' },
|
|
|
])
|
|
])
|
|
|
</script>
|
|
</script>
|