2 Incheckningar ea4253b5a2 ... 5e7415acf8

Upphovsman SHA1 Meddelande Datum
  li.shaoyi 5e7415acf8 Merge branch 'v20' of http://192.168.31.240:3000/MTP2.0_New/MTP20_WEB_GLOBAL into v20 2 veckor sedan
  li.shaoyi 1ccd1769ac update 2 veckor sedan

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

@@ -7,8 +7,7 @@
             </template>
             <Form ref="formRef" class="g-form__container" @submit="onCloseSumit">
                 <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')"
                         :value="getBuyOrSellName(selectedRow.buyorsell, 1)" />
                     <Cell
@@ -119,7 +118,7 @@ const formData = reactive<Partial<Proto.HolderTPSLSetReq>>({
 
 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 { decimalplace = 0, buyslpoint, buytppoint, sellslpoint, selltppoint } = quote.value ?? {}
@@ -212,8 +211,9 @@ const closed = (isRefresh = false) => {
 }
 
 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.SLPrice = Decimal(slPrice).toNumber()