|
|
@@ -105,13 +105,17 @@ import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
|
|
|
const { getQueryString, getQueryStringToNumber } = useNavigation()
|
|
|
const { global: { t } } = i18n
|
|
|
+const futuresStore = useFuturesStore()
|
|
|
+const goodsList = computed(() => {
|
|
|
+ return futuresStore.getGoodsListByTradeMode(10)
|
|
|
+})
|
|
|
|
|
|
-const goodsCode = shallowRef(getQueryString('goodscode') ?? '')
|
|
|
-const goodsid = shallowRef(getQueryStringToNumber('goodsid'))
|
|
|
+// 如果为空默认显示第一个商品
|
|
|
+const goodsCode = shallowRef(getQueryString('goodscode') ?? goodsList.value[0].goodscode)
|
|
|
+const goodsid = shallowRef(getQueryStringToNumber('goodsid') ?? goodsList.value[0].goodsid)
|
|
|
const buyOrSell = getQueryStringToNumber('buyOrSell')
|
|
|
const buildType = getQueryStringToNumber('buildType')
|
|
|
const orderQty = getQueryStringToNumber('orderQty')
|
|
|
-const futuresStore = useFuturesStore()
|
|
|
const quote = shallowRef<Model.GoodsQuote>()
|
|
|
// 小数位以及步进值
|
|
|
const { decimalplace = 0.0 } = quote.value ?? {}
|
|
|
@@ -140,10 +144,6 @@ const fromTrade = true
|
|
|
// 持仓汇总
|
|
|
const position = shallowRef<Model.TradePositionRsp[]>([])
|
|
|
|
|
|
-const goodsList = computed(() => {
|
|
|
- return futuresStore.getGoodsListByTradeMode(10)
|
|
|
-})
|
|
|
-
|
|
|
const onConfirm = (() => {
|
|
|
selectedRow.value = undefined
|
|
|
quote.value = futuresStore.getGoodsQuote(goodsCode.value).value
|