|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<!-- 商品订单 - 合约汇总 -->
|
|
|
<section>
|
|
|
- <a-table :columns="columns"
|
|
|
+ <a-table :columns="tabColumns"
|
|
|
class="srcollYTable expandLeftTable"
|
|
|
:scroll="{ x: '100%', y: '190px' }"
|
|
|
:pagination="false"
|
|
|
@@ -32,13 +32,16 @@
|
|
|
<a>{{ text ? text : 0 }}</a>
|
|
|
</template>
|
|
|
<!-- 持仓金额 -->
|
|
|
- <template #holderprice="{ record }">
|
|
|
+ <!-- <template #holderprice="{ record }">
|
|
|
<a>{{ useHolderprice(record) }}</a>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
<!-- 持仓盈亏 -->
|
|
|
<template #profitloss="{ record }">
|
|
|
<span>{{ record.averageprice ? useProfitloss(record) : '--' }}</span>
|
|
|
</template>
|
|
|
+ <template #buyorsell="{ record }">
|
|
|
+ <span>{{ getBuyOrSellName(record.buyorsell) }}</span>
|
|
|
+ </template>
|
|
|
</a-table>
|
|
|
<component :is="componentId"
|
|
|
v-if="componentId"
|
|
|
@@ -60,10 +63,124 @@ import { expandIcon } from '@/common/setup/table/clolumn';
|
|
|
import { handleComposeOrderTable } from '@/common/setup/table/compose';
|
|
|
import { ComposeOrderTableParam } from '@/common/setup/table/interface';
|
|
|
import { handleSubcriteQuote } from '@/common/setup/table/tableQuote';
|
|
|
-import { findGoodsTradeModeById, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
|
|
|
+import { findGoodsTradeModeById, getQuoteDayInfoByCodeFindPrice, getQutoGoodsByTradeMode } from '@/services/bus/goods';
|
|
|
import { useHolderprice, useProfitloss } from '@/services/bus/holdPosition';
|
|
|
import { queryTradePosition } from '@/services/go/ermcp/order';
|
|
|
import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
|
|
|
+import { getBuyOrSellName, getChannelBuildName } from '@/common/constants/enumsName';
|
|
|
+
|
|
|
+const tabColumns = [
|
|
|
+ {
|
|
|
+ key: '10th',
|
|
|
+ dataIndex: 'goodsname',
|
|
|
+ title: '订单合约',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'goodsname',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '7th',
|
|
|
+ dataIndex: 'buyorsell',
|
|
|
+ title: '方向',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'buyorsell',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '8th',
|
|
|
+ dataIndex: 'curpositionqty',
|
|
|
+ title: '持有数量',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'curpositionqty',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '9th',
|
|
|
+ dataIndex: 'enableqty',
|
|
|
+ title: '可用数量',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'enableqty',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '0th',
|
|
|
+ dataIndex: 'frozenqty',
|
|
|
+ title: '冻结数量',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'frozenqty',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '1th',
|
|
|
+ dataIndex: 'averageprice',
|
|
|
+ title: '均价',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'averageprice',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '2th',
|
|
|
+ dataIndex: 'lastprice',
|
|
|
+ title: '现价',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'lastprice',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '3th',
|
|
|
+ dataIndex: 'curholderamount',
|
|
|
+ title: '持仓金额',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'curholderamount',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '4th',
|
|
|
+ dataIndex: 'usedmargin',
|
|
|
+ title: '占用保证金',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'usedmargin',
|
|
|
+ },
|
|
|
+ width: 130,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '5th',
|
|
|
+ dataIndex: 'marketamount',
|
|
|
+ title: '市值',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'marketamount',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '6th',
|
|
|
+ dataIndex: 'profitloss',
|
|
|
+ title: '浮动盈亏',
|
|
|
+ align: 'center',
|
|
|
+ slots: {
|
|
|
+ customRender: 'profitloss',
|
|
|
+ },
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+];
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: enumOrderComponents.commodity_contract_summary,
|
|
|
@@ -80,9 +197,18 @@ export default defineComponent({
|
|
|
const { subscribeAction } = handleSubcriteQuote();
|
|
|
// 交割商品
|
|
|
handleDeliveryRelation();
|
|
|
+
|
|
|
+ // 挂牌点选商品
|
|
|
+ // const { deliverGoods, getQuoteList, goodsList, } = handleDeliveryRelation([1, 3]);
|
|
|
+ // // 参考行情商品
|
|
|
+ // const goodsList = getQutoGoodsByTradeMode(TradeMode.quote99);
|
|
|
// 获取列表数据
|
|
|
const queryTableAction = () => {
|
|
|
queryTable(queryTradePosition).then((res) => {
|
|
|
+ const result: string[] = []
|
|
|
+ res.forEach(el => {
|
|
|
+
|
|
|
+ })
|
|
|
const goodsList = res.map((el) => {
|
|
|
return el.goodscode;
|
|
|
});
|
|
|
@@ -120,6 +246,8 @@ export default defineComponent({
|
|
|
useHolderprice,
|
|
|
useProfitloss,
|
|
|
handleBtnList,
|
|
|
+ tabColumns,
|
|
|
+ getBuyOrSellName,
|
|
|
};
|
|
|
},
|
|
|
});
|