|
@@ -5,23 +5,23 @@
|
|
|
<app-navbar title="合约明细" />
|
|
<app-navbar title="合约明细" />
|
|
|
</template>
|
|
</template>
|
|
|
<Grid :border="false" :column-num="quotes.length ? 2 : 1">
|
|
<Grid :border="false" :column-num="quotes.length ? 2 : 1">
|
|
|
- <GridItem icon="peer-pay" text="划转" :to="{ name: 'wallet-transfer', query: { id: accountid } }" />
|
|
|
|
|
- <GridItem icon="chart-trending-o" text="交易" @click="navigateToContractDetail()" v-if="quotes.length" />
|
|
|
|
|
|
|
+ <GridItem icon="peer-pay" :text="$t('digital.wallet-transfer')" :to="{ name: 'wallet-transfer', query: { id: accountid } }" />
|
|
|
|
|
+ <GridItem icon="chart-trending-o" :text="$t('digital.spot-goods-detail')" @click="navigateToContractDetail()" v-if="quotes.length" />
|
|
|
</Grid>
|
|
</Grid>
|
|
|
<div class="g-detail-table" v-if="accountItem">
|
|
<div class="g-detail-table" v-if="accountItem">
|
|
|
<table cellspacing="0" cellpadding="0">
|
|
<table cellspacing="0" cellpadding="0">
|
|
|
<tbody>
|
|
<tbody>
|
|
|
<tr>
|
|
<tr>
|
|
|
<td>
|
|
<td>
|
|
|
- <span class="text-small">账户权益(USDT)</span>
|
|
|
|
|
|
|
+ <span class="text-small">{{ $t('digital.currencydecimalplace')+`(${currency(accountItem.currencyid)})` }}</span>
|
|
|
<span>{{ accountItem.balance.toFixed(accountItem.currencydecimalplace) }}</span>
|
|
<span>{{ accountItem.balance.toFixed(accountItem.currencydecimalplace) }}</span>
|
|
|
</td>
|
|
</td>
|
|
|
<td>
|
|
<td>
|
|
|
- <span class="text-small">浮动盈亏</span>
|
|
|
|
|
|
|
+ <span class="text-small">{{ $t('account.profitLoss') }}</span>
|
|
|
<span :class="handlePriceColor(accountItem.profitLoss)">{{ accountItem.profitLoss.toFixed(accountItem.currencydecimalplace) }}</span>
|
|
<span :class="handlePriceColor(accountItem.profitLoss)">{{ accountItem.profitLoss.toFixed(accountItem.currencydecimalplace) }}</span>
|
|
|
</td>
|
|
</td>
|
|
|
<td>
|
|
<td>
|
|
|
- <span class="text-small">风险率</span>
|
|
|
|
|
|
|
+ <span class="text-small">{{ $t('account.riskRate') }}</span>
|
|
|
<span :class="accountItem.hazardRatioColor">
|
|
<span :class="accountItem.hazardRatioColor">
|
|
|
{{ parsePercent(accountItem.hazardRatio) }}
|
|
{{ parsePercent(accountItem.hazardRatio) }}
|
|
|
</span>
|
|
</span>
|
|
@@ -29,15 +29,15 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr>
|
|
<tr>
|
|
|
<td>
|
|
<td>
|
|
|
- <span class="text-small">可用(USDT)</span>
|
|
|
|
|
|
|
+ <span class="text-small">{{ $t('mine.availableFunds')+`(${currency(accountItem.currencyid)})` }}</span>
|
|
|
<span>{{ accountItem.avaiableBalance.toFixed(accountItem.currencydecimalplace) }}</span>
|
|
<span>{{ accountItem.avaiableBalance.toFixed(accountItem.currencydecimalplace) }}</span>
|
|
|
</td>
|
|
</td>
|
|
|
<td>
|
|
<td>
|
|
|
- <span class="text-small">占用(USDT)</span>
|
|
|
|
|
|
|
+ <span class="text-small">{{ $t('account.usedMargin')+`(${currency(accountItem.currencyid)})` }}</span>
|
|
|
<span>{{ accountItem.usedmargin.toFixed(accountItem.currencydecimalplace) }}</span>
|
|
<span>{{ accountItem.usedmargin.toFixed(accountItem.currencydecimalplace) }}</span>
|
|
|
</td>
|
|
</td>
|
|
|
<td>
|
|
<td>
|
|
|
- <span class="text-small">冻结(USDT)</span>
|
|
|
|
|
|
|
+ <span class="text-small">{{ $t('account.freeze')+`(${currency(accountItem.currencyid)})` }}</span>
|
|
|
<span>{{ accountItem.freezeMargin.toFixed(accountItem.currencydecimalplace) }}</span>
|
|
<span>{{ accountItem.freezeMargin.toFixed(accountItem.currencydecimalplace) }}</span>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
@@ -45,20 +45,20 @@
|
|
|
</table>
|
|
</table>
|
|
|
</div>
|
|
</div>
|
|
|
<Tabs>
|
|
<Tabs>
|
|
|
- <Tab title="持仓">
|
|
|
|
|
|
|
+ <Tab :title="t('digital.position')">
|
|
|
<contract-position :params="{ accountid }" />
|
|
<contract-position :params="{ accountid }" />
|
|
|
</Tab>
|
|
</Tab>
|
|
|
- <Tab title="委托">
|
|
|
|
|
|
|
+ <Tab :title="t('digital.order')">
|
|
|
<contract-order v-bind="{ accountid }" />
|
|
<contract-order v-bind="{ accountid }" />
|
|
|
</Tab>
|
|
</Tab>
|
|
|
- <Tab title="成交">
|
|
|
|
|
|
|
+ <Tab :title="t('digital.trade')">
|
|
|
<contract-trade v-bind="{ accountid }" />
|
|
<contract-trade v-bind="{ accountid }" />
|
|
|
</Tab>
|
|
</Tab>
|
|
|
- <Tab title="资金明细">
|
|
|
|
|
|
|
+ <Tab :title="t('digital.funds')">
|
|
|
<contract-statement v-bind="{ accountid }" />
|
|
<contract-statement v-bind="{ accountid }" />
|
|
|
</Tab>
|
|
</Tab>
|
|
|
</Tabs>
|
|
</Tabs>
|
|
|
- <ActionSheet v-model:show="showSheet" title="请选择">
|
|
|
|
|
|
|
+ <ActionSheet v-model:show="showSheet" :title="t('common.choice')">
|
|
|
<CellGroup style="min-height: 200px;">
|
|
<CellGroup style="min-height: 200px;">
|
|
|
<template v-for="(item, index) in quotes" :key="index">
|
|
<template v-for="(item, index) in quotes" :key="index">
|
|
|
<Cell :title="item.goodsname" :value="item.goodscode" :border="false" is-link
|
|
<Cell :title="item.goodsname" :value="item.goodscode" :border="false" is-link
|
|
@@ -74,20 +74,27 @@ import { shallowRef, computed } from 'vue'
|
|
|
import { Cell, CellGroup, Tab, Tabs, Grid, GridItem, ActionSheet } from 'vant'
|
|
import { Cell, CellGroup, Tab, Tabs, Grid, GridItem, ActionSheet } from 'vant'
|
|
|
import { handlePriceColor, parsePercent } from '@/filters'
|
|
import { handlePriceColor, parsePercent } from '@/filters'
|
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
|
-import { useAccountStore, useFuturesStore } from '@/stores'
|
|
|
|
|
|
|
+import { i18n, useAccountStore, useFuturesStore } from '@/stores'
|
|
|
import ContractOrder from '../components/order/index.vue'
|
|
import ContractOrder from '../components/order/index.vue'
|
|
|
import ContractTrade from '../components/trade/index.vue'
|
|
import ContractTrade from '../components/trade/index.vue'
|
|
|
import ContractPosition from '../components/position/list/index.vue'
|
|
import ContractPosition from '../components/position/list/index.vue'
|
|
|
import ContractStatement from '../components/statement/index.vue'
|
|
import ContractStatement from '../components/statement/index.vue'
|
|
|
|
|
+import { getGoodsCurrencyItemName } from '@/constants/order'
|
|
|
|
|
|
|
|
const { router, getQueryStringToNumber } = useNavigation()
|
|
const { router, getQueryStringToNumber } = useNavigation()
|
|
|
|
|
|
|
|
|
|
+const { global: { t } } = i18n
|
|
|
|
|
+
|
|
|
const futuresStore = useFuturesStore()
|
|
const futuresStore = useFuturesStore()
|
|
|
const accountStore = useAccountStore()
|
|
const accountStore = useAccountStore()
|
|
|
|
|
|
|
|
const accountid = getQueryStringToNumber('id')
|
|
const accountid = getQueryStringToNumber('id')
|
|
|
const showSheet = shallowRef(false)
|
|
const showSheet = shallowRef(false)
|
|
|
|
|
|
|
|
|
|
+const currency = (id: number) => {
|
|
|
|
|
+ return getGoodsCurrencyItemName(id)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 合约账户
|
|
// 合约账户
|
|
|
const accountItem = computed(() => accountStore.getAccountItem({ accountid }))
|
|
const accountItem = computed(() => accountStore.getAccountItem({ accountid }))
|
|
|
|
|
|