|
|
@@ -1,3 +1,4 @@
|
|
|
+import { isOemByEnum, OemType } from '@/common/config/projectName';
|
|
|
import { hasSystemParam } from '@/hooks/system';
|
|
|
import { useHolderprice, useProfitloss } from '@/services/bus/holdPosition';
|
|
|
import { getMarketTradePropertyByGoodsId } from '@/services/bus/market';
|
|
|
@@ -5,98 +6,128 @@ import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
|
|
|
import { Taaccount } from '@/services/go/TaAccount/interface';
|
|
|
import { Ref } from 'vue';
|
|
|
|
|
|
-export const tableColumns = [
|
|
|
- {
|
|
|
- key: '0th',
|
|
|
- dataIndex: 'accountid',
|
|
|
- title: '资金账号',
|
|
|
- align: 'center',
|
|
|
- slots: {
|
|
|
- customRender: 'accountid',
|
|
|
+export const tableColumns = () => {
|
|
|
+ let result = [
|
|
|
+ {
|
|
|
+ key: '0th',
|
|
|
+ dataIndex: 'accountid',
|
|
|
+ title: '资金账号',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'accountid',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
},
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- key: '1th',
|
|
|
- dataIndex: 'netWorth',
|
|
|
- title: '净值',
|
|
|
- align: 'center',
|
|
|
- slots: {
|
|
|
- customRender: 'netWorth',
|
|
|
+ {
|
|
|
+ key: '1th',
|
|
|
+ dataIndex: 'netWorth',
|
|
|
+ title: '净值',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'netWorth',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
},
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- key: '2th',
|
|
|
- dataIndex: 'balance',
|
|
|
- title: '可用资金',
|
|
|
- align: 'center',
|
|
|
- slots: {
|
|
|
- customRender: 'balance',
|
|
|
+ {
|
|
|
+ key: 'curamount',
|
|
|
+ dataIndex: 'curamount',
|
|
|
+ title: '持仓市值',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'curamount',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
},
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- key: '3th',
|
|
|
- dataIndex: 'usedmargin',
|
|
|
- title: '占用资金',
|
|
|
- align: 'center',
|
|
|
- slots: {
|
|
|
- customRender: 'usedmargin',
|
|
|
+ {
|
|
|
+ key: 'remainamount',
|
|
|
+ dataIndex: 'remainamount',
|
|
|
+ title: '融资额',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'remainamount',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
},
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- key: '4th',
|
|
|
- dataIndex: 'freezemargin',
|
|
|
- title: '冻结资金',
|
|
|
- align: 'center',
|
|
|
- slots: {
|
|
|
- customRender: 'freezemargin',
|
|
|
+ {
|
|
|
+ key: '51th',
|
|
|
+ dataIndex: 'currentbalance',
|
|
|
+ title: '余额',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'currentbalance',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
},
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- key: '5th',
|
|
|
- dataIndex: 'closepl',
|
|
|
- title: '浮动盈亏',
|
|
|
- align: 'center',
|
|
|
- slots: {
|
|
|
- customRender: 'closepl',
|
|
|
+ {
|
|
|
+ key: '2th',
|
|
|
+ dataIndex: 'balance',
|
|
|
+ title: '可用资金',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'balance',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
},
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- key: '51th',
|
|
|
- dataIndex: 'currentbalance',
|
|
|
- title: '余额',
|
|
|
- align: 'center',
|
|
|
- slots: {
|
|
|
- customRender: 'currentbalance',
|
|
|
+ {
|
|
|
+ key: '4th',
|
|
|
+ dataIndex: 'freezemargin',
|
|
|
+ title: '冻结资金',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'freezemargin',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
},
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- key: '6th',
|
|
|
- dataIndex: 'usedmargin',
|
|
|
- title: '风险率',
|
|
|
- align: 'center',
|
|
|
- slots: {
|
|
|
- customRender: 'accountname',
|
|
|
- },
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- key: '7th',
|
|
|
- dataIndex: 'tradestatus',
|
|
|
- title: '状态',
|
|
|
- align: 'center',
|
|
|
- slots: {
|
|
|
- customRender: 'tradestatus',
|
|
|
- },
|
|
|
- width: 120,
|
|
|
- },
|
|
|
-];
|
|
|
+
|
|
|
+ ]
|
|
|
+ if (isOemByEnum(OemType.tian_jing_mai_dun)) {
|
|
|
+ const temp = [
|
|
|
+ {
|
|
|
+ key: '3th',
|
|
|
+ dataIndex: 'usedmargin',
|
|
|
+ title: '占用资金',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'usedmargin',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '5th',
|
|
|
+ dataIndex: 'closepl',
|
|
|
+ title: '浮动盈亏',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'closepl',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '6th',
|
|
|
+ dataIndex: 'usedmargin',
|
|
|
+ title: '风险率',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'accountname',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '7th',
|
|
|
+ dataIndex: 'tradestatus',
|
|
|
+ title: '状态',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'tradestatus',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ }
|
|
|
+
|
|
|
+ ];
|
|
|
+ result = [...result, ...temp]
|
|
|
+ }
|
|
|
+ return result
|
|
|
+}
|
|
|
|
|
|
|
|
|
export const useHazardRates = (positions: Ref<QueryTradePositionRsp[]>) => {
|