|
|
@@ -27,7 +27,7 @@
|
|
|
<Field name="OrderPrice" :rules="formRules.OrderPrice" label="转让价格">
|
|
|
<template #input>
|
|
|
<Stepper v-model="formData.OrderPrice" theme="round" button-size="22" :min="0"
|
|
|
- :decimal-length="selectedRow.decimalplace" :step="priceStep" :auto-fixed="false" />
|
|
|
+ :decimal-length="quote?.decimalplace" :step="quote?.decimalvalue" :auto-fixed="false" />
|
|
|
</template>
|
|
|
</Field>
|
|
|
<Field name="OrderQty" :rules="formRules.OrderQty" label="转让量">
|
|
|
@@ -54,11 +54,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, PropType, onMounted, computed } from 'vue'
|
|
|
+import { shallowRef, PropType, onMounted } from 'vue'
|
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
|
import { CellGroup, Cell, Button, FieldRule, Form, Field, RadioGroup, Radio, FormInstance } from 'vant'
|
|
|
import { getBuyOrSellName, BuyOrSell } from '@/constants/order'
|
|
|
-import { formatDecimal, handleNumberValue, pow } from '@/filters'
|
|
|
+import { formatDecimal, handleNumberValue } from '@/filters'
|
|
|
import { useOrder } from '@/business/trade'
|
|
|
import { dialog, fullloading } from '@/utils/vant'
|
|
|
import { useFuturesStore } from '@/stores'
|
|
|
@@ -85,15 +85,6 @@ const qtyStepList = [1, 5, 10, 20, 30, 50] // 数量步长列表
|
|
|
const qtyStep = shallowRef(qtyStepList[0]) // 数量步长
|
|
|
const { formSubmit, formData } = useOrder()
|
|
|
|
|
|
-// 价格步长
|
|
|
-const priceStep = computed(() => {
|
|
|
- const { quoteminunit = 0, decimalplace = 0 } = quote.value ?? {}
|
|
|
- if (quoteminunit) {
|
|
|
- return quoteminunit * pow(10, decimalplace * -1)
|
|
|
- }
|
|
|
- return 1
|
|
|
-})
|
|
|
-
|
|
|
// 表单验证规则
|
|
|
const formRules: { [key: string]: FieldRule[] } = {
|
|
|
OrderPrice: [{
|