|
|
@@ -31,8 +31,16 @@
|
|
|
</Field>
|
|
|
<Field name="OrderQty" :rules="formRules.OrderQty" label="挂牌数量">
|
|
|
<template #input>
|
|
|
- <Stepper v-model="formData.OrderQty" theme="round" button-size="22" :min="0" :step="0.01"
|
|
|
- :max="selectedRow.orderqty" :auto-fixed="false" @change="calculateDelistingAmount"/>
|
|
|
+ <div class="g-qty-group">
|
|
|
+ <div class="g-qty-group__stepper">
|
|
|
+ <Stepper v-model="formData.OrderQty" theme="round" :max="selectedRow.orderqty" button-size="22" :min="0"
|
|
|
+ :step="qtyStep" integer @change="calculateDelistingAmount"/>
|
|
|
+ </div>
|
|
|
+ <RadioGroup v-model="qtyStep" direction="horizontal" @change="onRadioChange">
|
|
|
+ <Radio v-for="(value, index) in qtyStepList" :key="index" :name="value">{{ value }}
|
|
|
+ </Radio>
|
|
|
+ </RadioGroup>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</Field>
|
|
|
<Field label="估算金额" v-if="priceMove === 3">
|
|
|
@@ -64,6 +72,7 @@ import { handleRequestBigNumber } from '@/filters'
|
|
|
import { useAccountStore, useFuturesStore } from '@/stores'
|
|
|
import { EBuildType, EDelistingType, EListingSelectType, EOrderOperateType, EPriceMode, EValidType } from '@/constants/client'
|
|
|
import { useOrder } from '@/business/trade'
|
|
|
+import { BuyOrSell } from '@/constants/order'
|
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { queryTjmdTodayAccountMargin } from '@/services/api/swap'
|
|
|
@@ -72,7 +81,10 @@ import AppPopup from '@mobile/components/base/popup/index.vue'
|
|
|
const accountStore = useAccountStore()
|
|
|
const futuresStore = useFuturesStore()
|
|
|
const { formData, formSubmit } = useOrder()
|
|
|
-
|
|
|
+// 数量步长列表
|
|
|
+const qtyStepList = [1, 5, 10, 20, 30, 50]
|
|
|
+// 数量步长
|
|
|
+const qtyStep = shallowRef(qtyStepList[0])
|
|
|
/// 挂牌金额
|
|
|
const amount = shallowRef(0.0)
|
|
|
/// 履约保证金
|
|
|
@@ -137,6 +149,12 @@ const formRules: { [key in keyof Proto.OrderReq]?: FieldRule[] } = {
|
|
|
}],
|
|
|
}
|
|
|
|
|
|
+const onRadioChange = (value: number) => {
|
|
|
+ formData.OrderQty = value
|
|
|
+ /// 计算摘牌金额
|
|
|
+ calculateDelistingAmount()
|
|
|
+}
|
|
|
+
|
|
|
/// 查询交易保证金信息
|
|
|
useRequest(queryTjmdTodayAccountMargin, {
|
|
|
params: {
|