|
@@ -21,16 +21,21 @@
|
|
|
<div class="g-order-list__titlebar">
|
|
<div class="g-order-list__titlebar">
|
|
|
<div class="left">
|
|
<div class="left">
|
|
|
<h4 :class="item.tHDetailEx.buyOrSell === BuyOrSell.Buy ? 'g-price-up' : 'g-price-down'">
|
|
<h4 :class="item.tHDetailEx.buyOrSell === BuyOrSell.Buy ? 'g-price-up' : 'g-price-down'">
|
|
|
- {{ item.tHDetailEx.buyOrSell === BuyOrSell.Buy ? $t('enum.BuyOrSell.Buy') : $t('enum.BuyOrSell.Sell') }}{{':'}}
|
|
|
|
|
|
|
+ {{ item.tHDetailEx.buyOrSell === BuyOrSell.Buy ? $t('enum.BuyOrSell.Buy') :
|
|
|
|
|
+ $t('enum.BuyOrSell.Sell') }}{{ ':' }}
|
|
|
{{ item.goodsCode + '/' + item.goodsName }}
|
|
{{ item.goodsCode + '/' + item.goodsName }}
|
|
|
{{ formatDecimal(item.tHDetailEx.holderPrice, item.decimalPlace) }}
|
|
{{ formatDecimal(item.tHDetailEx.holderPrice, item.decimalPlace) }}
|
|
|
</h4>
|
|
</h4>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="right" v-if="riskType === 1">
|
|
<div class="right" v-if="riskType === 1">
|
|
|
<span
|
|
<span
|
|
|
- :class="item.tHDetailEx.depositRate <= item.tHDetailEx.promptDepositRate ? 'g-price-up' : ''">
|
|
|
|
|
|
|
+ :class="{ 'g-price-up': item.tHDetailEx.depositRate <= item.tHDetailEx.promptDepositRate }"
|
|
|
|
|
+ v-if="item.tHDetailEx.payedDeposit">
|
|
|
{{ parsePercent(item.tHDetailEx.depositRate) }}
|
|
{{ parsePercent(item.tHDetailEx.depositRate) }}
|
|
|
</span>
|
|
</span>
|
|
|
|
|
+ <span v-else>
|
|
|
|
|
+ {{ handleNumberValue() }}
|
|
|
|
|
+ </span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="g-order-list__content">
|
|
<div class="g-order-list__content">
|
|
@@ -81,8 +86,9 @@
|
|
|
v-if="riskType === 1 && item.tHDetailEx.holderQty">补充</Button>
|
|
v-if="riskType === 1 && item.tHDetailEx.holderQty">补充</Button>
|
|
|
<template v-if="enableqty(item)">
|
|
<template v-if="enableqty(item)">
|
|
|
<Button size="small" @click="showComponent('delivery', item)" round>{{
|
|
<Button size="small" @click="showComponent('delivery', item)" round>{{
|
|
|
- getTagName(item.tHDetailEx.buyOrSell) }}</Button>
|
|
|
|
|
- <Button v-if="canClose(item)" size="small" @click="showComponent('closeholder', item)" round>终止</Button>
|
|
|
|
|
|
|
+ getTagName(item.tHDetailEx.buyOrSell) }}</Button>
|
|
|
|
|
+ <Button v-if="canClose(item)" size="small" @click="showComponent('closeholder', item)"
|
|
|
|
|
+ round>终止</Button>
|
|
|
</template>
|
|
</template>
|
|
|
<Button size="small" @click="showComponent('detail', item)" round>详情</Button>
|
|
<Button size="small" @click="showComponent('detail', item)" round>详情</Button>
|
|
|
</div>
|
|
</div>
|
|
@@ -97,7 +103,7 @@
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { onMounted, shallowRef, defineAsyncComponent, computed } from 'vue'
|
|
import { onMounted, shallowRef, defineAsyncComponent, computed } from 'vue'
|
|
|
import { BuyOrSell } from '@/constants/order'
|
|
import { BuyOrSell } from '@/constants/order'
|
|
|
-import { formatDecimal, parsePercent, handlePriceColor } from '@/filters'
|
|
|
|
|
|
|
+import { formatDecimal, parsePercent, handlePriceColor, handleNumberValue } from '@/filters'
|
|
|
import { getGoodsUnitName } from '@/constants/unit'
|
|
import { getGoodsUnitName } from '@/constants/unit'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { Button, Tabs, Tab } from 'vant'
|
|
import { Button, Tabs, Tab } from 'vant'
|
|
@@ -105,7 +111,6 @@ import { useFuturesStore, useGlobalStore, useSBYJOrderStore } from '@/stores'
|
|
|
import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
|
|
import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { queryUserTradeSettings } from '@/services/api/order'
|
|
import { queryUserTradeSettings } from '@/services/api/order'
|
|
|
-import { i18n } from '@/stores'
|
|
|
|
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
const componentMap = new Map<string, unknown>([
|
|
|
['detail', defineAsyncComponent(() => import('../detail/index.vue'))], // 详情
|
|
['detail', defineAsyncComponent(() => import('../detail/index.vue'))], // 详情
|
|
@@ -118,7 +123,6 @@ const active = shallowRef(0)
|
|
|
|
|
|
|
|
const globalStore = useGlobalStore()
|
|
const globalStore = useGlobalStore()
|
|
|
const riskType = globalStore.getSystemInfo('riskType') // 风控类型
|
|
const riskType = globalStore.getSystemInfo('riskType') // 风控类型
|
|
|
-const { global: { t } } = i18n
|
|
|
|
|
|
|
|
|
|
const { getSBYJMyOrders, $toRefs } = useSBYJOrderStore()
|
|
const { getSBYJMyOrders, $toRefs } = useSBYJOrderStore()
|
|
|
const { getGoods } = useFuturesStore()
|
|
const { getGoods } = useFuturesStore()
|