|
@@ -7,8 +7,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<Form ref="formRef" class="g-form__container" @submit="onCloseSumit">
|
|
<Form ref="formRef" class="g-form__container" @submit="onCloseSumit">
|
|
|
<CellGroup :title="t('position.goods.subtitle')" inset>
|
|
<CellGroup :title="t('position.goods.subtitle')" inset>
|
|
|
- <Cell :title="t('digital.goodscode')"
|
|
|
|
|
- :value="`${selectedRow.goodscode}/${goodsname}`" />
|
|
|
|
|
|
|
+ <Cell :title="t('digital.goodscode')" :value="`${selectedRow.goodscode}/${goodsname}`" />
|
|
|
<Cell :title="t('position.transfer.buyorsell')"
|
|
<Cell :title="t('position.transfer.buyorsell')"
|
|
|
:value="getBuyOrSellName(selectedRow.buyorsell, 1)" />
|
|
:value="getBuyOrSellName(selectedRow.buyorsell, 1)" />
|
|
|
<Cell
|
|
<Cell
|
|
@@ -119,7 +118,7 @@ const formData = reactive<Partial<Proto.HolderTPSLSetReq>>({
|
|
|
|
|
|
|
|
const quote = computed(() => futuresStore.getQuoteItem({ goodsid: props.selectedRow.goodsid }))
|
|
const quote = computed(() => futuresStore.getQuoteItem({ goodsid: props.selectedRow.goodsid }))
|
|
|
|
|
|
|
|
-const goodsname = computed (() => futuresStore.getI18nGoodsName(props.selectedRow.goodscode))
|
|
|
|
|
|
|
+const goodsname = computed(() => futuresStore.getI18nGoodsName(props.selectedRow.goodscode))
|
|
|
|
|
|
|
|
const pricePoints = computed(() => {
|
|
const pricePoints = computed(() => {
|
|
|
const { decimalplace = 0, buyslpoint, buytppoint, sellslpoint, selltppoint } = quote.value ?? {}
|
|
const { decimalplace = 0, buyslpoint, buytppoint, sellslpoint, selltppoint } = quote.value ?? {}
|
|
@@ -212,8 +211,9 @@ const closed = (isRefresh = false) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
- const tpPrice = props.selectedRow.tpsl_tpprice || pricePoints.value.takeProfit
|
|
|
|
|
- const slPrice = props.selectedRow.tpsl_slprice || pricePoints.value.stopLoss
|
|
|
|
|
|
|
+ const { tpsl_tpprice, tpsl_slprice } = props.selectedRow
|
|
|
|
|
+ const tpPrice = tpsl_tpprice || Number(tpsl_tpprice) || pricePoints.value.takeProfit
|
|
|
|
|
+ const slPrice = tpsl_slprice || Number(tpsl_slprice) || pricePoints.value.stopLoss
|
|
|
|
|
|
|
|
formData.TPPrice = Decimal(tpPrice).toNumber()
|
|
formData.TPPrice = Decimal(tpPrice).toNumber()
|
|
|
formData.SLPrice = Decimal(slPrice).toNumber()
|
|
formData.SLPrice = Decimal(slPrice).toNumber()
|