|
|
@@ -144,14 +144,14 @@
|
|
|
</template>
|
|
|
</Tabs>
|
|
|
<template #footer>
|
|
|
- <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ goodsCode, goodsid }"
|
|
|
+ <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ goodsCode, goodsid, selectedRow }"
|
|
|
@closed="closeComponent" v-if="componentId" />
|
|
|
</template>
|
|
|
</app-view>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { useFuturesStore, usePositionStore, useUserStore, i18n } from '@/stores'
|
|
|
+import { useFuturesStore, useUserStore, i18n } from '@/stores'
|
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
|
import { shallowRef, onMounted, computed, defineAsyncComponent } from 'vue'
|
|
|
import { Form, Field, Button, FieldRule, FormInstance, Radio, RadioGroup, CellGroup, Icon, Tab, Tabs } from 'vant'
|
|
|
@@ -159,7 +159,7 @@ import { useOrder } from '@/business/trade'
|
|
|
import { BuyOrSell, getBuyOrSellList, BuildType, getPricemode2List, PriceMode } from '@/constants/order'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
|
-import { formatDecimal, handleNumberValue, handleRequestBigNumber } from '@/filters'
|
|
|
+import { formatDecimal, handleNumberValue } from '@/filters'
|
|
|
// import service from '@/services'
|
|
|
import Stepper from '@mobile/components/base/stepper/index.vue'
|
|
|
import eventBus from '@/services/bus'
|
|
|
@@ -180,11 +180,13 @@ const quoteminunit = quote.value?.quoteminunit ?? 1.0
|
|
|
const decimalvalue = Math.pow(10.0, -decimalplace)*(quoteminunit == 0 ? 1 : quoteminunit)
|
|
|
const isTrademode16 = computed(() => quote.value?.trademode === 16)
|
|
|
|
|
|
+const selectedRow = shallowRef<Model.SBYJMyOrderRsp>()
|
|
|
+
|
|
|
const { getSystemParamValue } = useUserStore()
|
|
|
const system_1012 = getSystemParamValue('1012') ?? '1'
|
|
|
|
|
|
// const accountStore = useAccountStore()
|
|
|
-const positionStore = usePositionStore()
|
|
|
+// const positionStore = usePositionStore()
|
|
|
|
|
|
const { formData, formSubmit } = useOrder()
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
@@ -201,9 +203,14 @@ const position = shallowRef<Model.TradePositionRsp[]>([])
|
|
|
// const oem = service.getConfig('oem')
|
|
|
|
|
|
// 点击返回
|
|
|
-const itemBack = (isPosition: number, buyorsell: BuyOrSell, tradeId: string) => {
|
|
|
+const itemBack = (isPosition: number, buyorsell: BuyOrSell, tradeId: string, item: Model.SBYJMyOrderRsp) => {
|
|
|
formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
|
|
|
- if (isPosition === 2) { formData.RelatedID = handleRequestBigNumber(tradeId)}
|
|
|
+ if (isPosition === 2) {
|
|
|
+ // formData.RelatedID = handleRequestBigNumber(tradeId)
|
|
|
+ selectedRow.value = item
|
|
|
+ // 打开退订
|
|
|
+ openComponent('transfer')
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent()
|
|
|
@@ -229,10 +236,12 @@ const components = [{
|
|
|
name: 'holdlb2',
|
|
|
title: t('pcroute.bottom.bottom_pricing_detail2'),
|
|
|
component: defineAsyncComponent(() => import('../trade/holdlb2/Index.vue')),
|
|
|
+ detail: defineAsyncComponent(() => import('@mobile/views/order/position/components/pricing/detail2/Index.vue')),
|
|
|
}]
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
|
['detail', defineAsyncComponent(() => import('./components/detail/Index.vue'))],
|
|
|
+ ['transfer', defineAsyncComponent(() => import('@mobile/views/order/position/components/pricing/detail2/components/transfer/Index.vue'))]
|
|
|
])
|
|
|
|
|
|
// // const sl = shallowRef(false) // 止损
|
|
|
@@ -272,9 +281,9 @@ const marketPrice = computed(() => {
|
|
|
})
|
|
|
|
|
|
// 买方向持仓数量
|
|
|
-const buyQty = computed(() => positionStore.getOrderQty(BuyOrSell.Buy, goodsCode))
|
|
|
+// const buyQty = computed(() => positionStore.getOrderQty(BuyOrSell.Buy, goodsCode))
|
|
|
// 卖方向持仓数量
|
|
|
-const sellQty = computed(() => positionStore.getOrderQty(BuyOrSell.Sell, goodsCode))
|
|
|
+// const sellQty = computed(() => positionStore.getOrderQty(BuyOrSell.Sell, goodsCode))
|
|
|
|
|
|
// 表单验证规则
|
|
|
const formRules: { [key in keyof Proto.OrderReq]?: FieldRule[] } = {
|