Handy_Cao 1 年之前
父节点
当前提交
0ec9bd6eb9
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. 9 3
      src/packages/mobile/views/pricing/trade/v2/Index.vue

+ 9 - 3
src/packages/mobile/views/pricing/trade/v2/Index.vue

@@ -117,10 +117,16 @@ const buyOrSell = getQueryStringToNumber('buyOrSell')
 const buildType = getQueryStringToNumber('buildType')
 const buildType = getQueryStringToNumber('buildType')
 const orderQty = getQueryStringToNumber('orderQty')
 const orderQty = getQueryStringToNumber('orderQty')
 const quote = shallowRef<Model.GoodsQuote>()
 const quote = shallowRef<Model.GoodsQuote>()
+
+const decimalplace = computed(() => {
+    const { decimalplace = 0.0 } = futuresStore.getGoodsQuote(goodsCode.value).value ?? {}
+    return decimalplace
+}) 
 // 小数位以及步进值
 // 小数位以及步进值
-const { decimalplace = 0.0 } = quote.value ?? {}
-const quoteminunit = quote.value?.quoteminunit ?? 1.0
-const decimalvalue = Math.pow(10.0, -decimalplace)*(quoteminunit == 0 ? 1 : quoteminunit)
+const decimalvalue = computed(() => {
+    const { quoteminunit = 1.0, decimalplace = 0.0 } = futuresStore.getGoodsQuote(goodsCode.value).value ?? {}
+    return Math.pow(10.0, -decimalplace)*(quoteminunit == 0 ? 1 : quoteminunit)
+}) 
 const isTrademode16 = computed(() => quote.value?.trademode === 16)
 const isTrademode16 = computed(() => quote.value?.trademode === 16)
 const { getSystemParamValue } = useUserStore()
 const { getSystemParamValue } = useUserStore()
 const system_1012 = getSystemParamValue('1012') ?? '1'
 const system_1012 = getSystemParamValue('1012') ?? '1'