li.shaoyi 1 місяць тому
батько
коміт
4cd61927a7

+ 3 - 2
src/packages/digital/views/contract/components/order/history/index.vue

@@ -10,7 +10,8 @@
                     </th>
                     <th>
                         <span :class="item.buyorsell ? 'g-price-down' : 'g-price-up'">
-                            {{ getBuyOrSellName(item.buyorsell, 1) }}
+                            {{ getBuildTypeName(item.buildtype) }}
+                            {{ getBuyOrSellName(item.buyorsell) }}
                         </span>
                     </th>
                 </tr>
@@ -42,7 +43,7 @@
 <script lang="ts" setup>
 import { PropType, shallowRef } from 'vue'
 import { formatDate, formatDecimal } from '@/filters'
-import { getBuyOrSellName, getWRTradeOrderStatusName, getGoodsCurrencyItemName } from '@/constants/order'
+import { getBuyOrSellName, getBuildTypeName, getWRTradeOrderStatusName, getGoodsCurrencyItemName } from '@/constants/order'
 import { useRequest } from '@/hooks/request'
 import { queryHisTradeOrderDetail } from '@/services/api/order'
 import { useFuturesStore } from '@/stores'

+ 3 - 2
src/packages/digital/views/contract/components/order/list/index.vue

@@ -10,7 +10,8 @@
                     </th>
                     <th>
                         <span :class="item.buyorsell ? 'g-price-down' : 'g-price-up'">
-                            {{ getBuyOrSellName(item.buyorsell, 1) }}
+                            {{ getBuildTypeName(item.buildtype) }}
+                            {{ getBuyOrSellName(item.buyorsell) }}
                         </span>
                     </th>
                 </tr>
@@ -52,7 +53,7 @@
 import { PropType, shallowRef, defineAsyncComponent } from 'vue'
 import { Button } from 'vant'
 import { formatDate, formatDecimal } from '@/filters'
-import { getBuyOrSellName, getWRTradeOrderStatusName, getGoodsCurrencyItemName } from '@/constants/order'
+import { getBuyOrSellName,getBuildTypeName, getWRTradeOrderStatusName, getGoodsCurrencyItemName } from '@/constants/order'
 import { useRequest } from '@/hooks/request'
 import { useComponent } from '@/hooks/component'
 import { queryTradeOrderDetail } from '@/services/api/order'

+ 6 - 5
src/packages/digital/views/contract/components/position/detail/close/index.vue

@@ -10,17 +10,18 @@
                     <Cell title="持仓单号" :value="selectedItem.tradeid" />
                     <Cell title="代码/名称" :value="`${selectedItem.goodscode}/${selectedItem.goodsname}`" />
                     <Cell title="持仓方向" :value="getBuyOrSellName(selectedItem.buyorsell)" />
-                    <Cell title="持仓价格(USDT)" :value="selectedItem.holderprice.toFixed(selectedItem.decimalplace)" />
-                    <Cell title="持仓量" :value="selectedItem.holderqty" />
-                    <Cell title="冻结量" :value="selectedItem.freezeqty" />
-                    <Cell title="行情价格" :value="floatingPL.lastPrice">
+                    <Cell :title="`持仓价格(${selectedItem.currencyname})`"
+                        :value="selectedItem.holderprice.toFixed(selectedItem.decimalplace)" />
+                    <Cell :title="`持仓量(${selectedItem.goodscode})`" :value="selectedItem.holderqty" />
+                    <Cell :title="`冻结量(${selectedItem.goodscode})`" :value="selectedItem.freezeqty" />
+                    <Cell :title="`行情价格(${selectedItem.currencyname})`" :value="floatingPL.lastPrice">
                         <template #value>
                             <span :class="floatingPL.lastPriceClass">
                                 {{ floatingPL.lastPrice.toFixed(selectedItem.decimalplace) }}
                             </span>
                         </template>
                     </Cell>
-                    <Cell title="浮动盈亏">
+                    <Cell :title="`浮动盈亏(${selectedItem.currencyname})`">
                         <template #value>
                             <span :class="floatingPL.profitLossClass">
                                 {{ floatingPL.profitLoss.toFixed(selectedItem.decimalplace) }}

+ 1 - 0
src/packages/digital/views/contract/components/position/detail/index.vue

@@ -106,6 +106,7 @@ const { componentRef, componentId, openComponent, closeComponent } = useComponen
 
 const { dataList, loading, run } = useRequest(queryTradeHolderDetail, {
     defaultParams: {
+        accids: props.selectedRow.accountid.toString(),
         goodsid: props.selectedRow.goodsid,
         buyorsell: props.selectedRow.buyorsell
     }

+ 9 - 8
src/packages/digital/views/contract/components/position/list/close/index.vue

@@ -8,18 +8,19 @@
             <Form ref="formRef" class="g-form__container" @submit="onCloseSumit">
                 <CellGroup title="持仓信息" inset>
                     <Cell title="代码/名称" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
-                    <Cell title="持仓方向" :value="getBuyOrSellName(selectedRow.buyorsell, 1)" />
-                    <Cell title="持仓价格(USDT)" :value="selectedRow.averageprice" />
-                    <Cell title="持仓量" :value="selectedRow.positionqty" />
-                    <Cell title="冻结量" :value="selectedRow.frozenqty" />
-                    <Cell title="行情价格">
+                    <Cell title="持仓方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
+                    <Cell :title="`持仓价格(${getGoodsCurrencyItemName(selectedRow.currencyid)})`"
+                        :value="selectedRow.averageprice" />
+                    <Cell :title="`持仓量(${selectedRow.goodscode})`" :value="selectedRow.positionqty" />
+                    <Cell :title="`冻结量(${selectedRow.goodscode})`" :value="selectedRow.frozenqty" />
+                    <Cell :title="`行情价格(${getGoodsCurrencyItemName(selectedRow.currencyid)})`">
                         <template #value>
                             <span :class="selectedRow.lastPriceClass">
                                 {{ selectedRow.lastPrice.toFixed(selectedRow.decimalplace) }}
                             </span>
                         </template>
                     </Cell>
-                    <Cell title="浮动盈亏">
+                    <Cell :title="`浮动盈亏(${getGoodsCurrencyItemName(selectedRow.currencyid)})`">
                         <template #value>
                             <span :class="selectedRow.profitLossClass">
                                 {{ selectedRow.profitLoss.toFixed(selectedRow.decimalplace) }}
@@ -58,7 +59,7 @@
 import { shallowRef, PropType, onMounted, computed } from 'vue'
 import { CellGroup, Cell, Button, FieldRule, Form, Field, FormInstance } from 'vant'
 import { dialog, fullloading } from '@/utils/vant'
-import { getBuyOrSellName, BuyOrSell, getPricemode2List } from '@/constants/order'
+import { getBuyOrSellName, getGoodsCurrencyItemName, BuyOrSell, getPricemode2List } from '@/constants/order'
 import { useOrder } from '@/business/trade'
 import { useFuturesStore, i18n, useUserStore } from '@/stores'
 import { EBuildType, EDelistingType, EOrderOperateType, EListingSelectType, EPriceMode, EValidType } from '@/constants/client'
@@ -119,7 +120,7 @@ const onCloseSumit = () => {
         formData.DelistingType = EDelistingType.DELISTINGTYPE_PRICE
         formData.BuildType = EBuildType.BUILDTYPE_CLOSE
         formData.TimevalidType = EValidType.VALIDTYPE_DR
-        formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_HOLDER_CLOSE
+        formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
         const param112 = userStore.getSystemParamValue('112')
         formData.MarketMaxSub = Number(param112) || 100