Handy_Cao 1 년 전
부모
커밋
bc3bb0bd52
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      src/packages/mobile/views/pricing/trade/Index.vue

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

@@ -164,7 +164,7 @@ import { fullloading, dialog } from '@/utils/vant'
 import Stepper from '@mobile/components/base/stepper/index.vue'
 import { formatDecimal, handleNumberValue, handleRequestBigNumber } from '@/filters'
 
-const { router, getQueryString, getQueryStringToNumber } = useNavigation()
+const { getQueryString, getQueryStringToNumber } = useNavigation()
 const { global: { t } } = i18n
 
 const goodsCode = getQueryString('goodscode') ?? ''
@@ -190,12 +190,14 @@ const position = shallowRef<Model.TradePositionRsp[]>([])
 
 // 点击返回
 const itemBack = (isPosition: number, buyorsell: BuyOrSell, tradeId: string) => {
-    formData.BuyOrSell = buyorsell
+    formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
     if (isPosition === 2) { formData.RelatedID = handleRequestBigNumber(tradeId)}
 }
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent()
-const active = shallowRef('cancel')
+
+const active = shallowRef('position')
+
 const components = [
     {
         name: 'cancel',
@@ -331,6 +333,8 @@ const onBeforeSubmit = (buildType: BuildType) => {
         if (datas.length > 0) {
             formData.OrderQty = datas[0].enableqty
         }
+    } else {
+        formData.RelatedID = undefined
     }
     formRef.value?.submit()
 }