Quellcode durchsuchen

修改资金信息表头

huangbin vor 4 Jahren
Ursprung
Commit
460e8cede0

+ 1 - 1
src/views/order/funding_information/components/funding_information_funding_summary/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 资金汇总 -->
   <section>
-    <a-table :columns="tableColumns"
+    <a-table :columns="tableColumns()"
              class="srcollYTable expandLeftTable"
              :scroll="{ x: '100%', y: '190px' }"
              :pagination="false"

+ 116 - 85
src/views/order/funding_information/components/funding_information_funding_summary/setup.ts

@@ -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[]>) => {