|
@@ -28,7 +28,7 @@
|
|
|
<Field name="OrderPrice" :rules="formRules.OrderPrice" label="转让价格">
|
|
<Field name="OrderPrice" :rules="formRules.OrderPrice" label="转让价格">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<Stepper v-model="formData.OrderPrice" theme="round" button-size="22" :min="0"
|
|
<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>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
<Field name="OrderQty" :rules="formRules.OrderQty" label="转让量">
|
|
<Field name="OrderQty" :rules="formRules.OrderQty" label="转让量">
|
|
@@ -51,7 +51,7 @@ import { shallowRef, PropType, onMounted, computed } from 'vue'
|
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
|
import { CellGroup, Cell, Button, FieldRule, Form, Field, Stepper, FormInstance } from 'vant'
|
|
import { CellGroup, Cell, Button, FieldRule, Form, Field, Stepper, FormInstance } from 'vant'
|
|
|
import { getBuyOrSellName, BuyOrSell } from '@/constants/order'
|
|
import { getBuyOrSellName, BuyOrSell } from '@/constants/order'
|
|
|
-import { formatDecimal, handleNumberValue, handleRequestBigNumber, handlePriceColor, pow } from '@/filters'
|
|
|
|
|
|
|
+import { formatDecimal, handleNumberValue, handleRequestBigNumber, handlePriceColor } from '@/filters'
|
|
|
import { useOrder } from '@/business/trade'
|
|
import { useOrder } from '@/business/trade'
|
|
|
import { dialog, fullloading } from '@/utils/vant'
|
|
import { dialog, fullloading } from '@/utils/vant'
|
|
|
import { useFuturesStore, usePositionStore } from '@/stores'
|
|
import { useFuturesStore, usePositionStore } from '@/stores'
|
|
@@ -68,15 +68,6 @@ const futuresStore = useFuturesStore()
|
|
|
const positionStore = usePositionStore()
|
|
const positionStore = usePositionStore()
|
|
|
const quote = futuresStore.getGoodsQuote(props.selectedRow.goodscode)
|
|
const quote = futuresStore.getGoodsQuote(props.selectedRow.goodscode)
|
|
|
|
|
|
|
|
-// 价格步长
|
|
|
|
|
-const priceStep = computed(() => {
|
|
|
|
|
- const { quoteminunit = 0, decimalplace = 0 } = quote.value ?? {}
|
|
|
|
|
- if (quoteminunit) {
|
|
|
|
|
- return quoteminunit * pow(10, decimalplace * -1)
|
|
|
|
|
- }
|
|
|
|
|
- return 1
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
// 可用数量
|
|
// 可用数量
|
|
|
const maxQty = computed(() => {
|
|
const maxQty = computed(() => {
|
|
|
const record = positionStore.positionList.find((e) => e.goodsid === props.selectedRow.goodsid && e.buyorsell === props.selectedRow.buyorsell)
|
|
const record = positionStore.positionList.find((e) => e.goodsid === props.selectedRow.goodsid && e.buyorsell === props.selectedRow.buyorsell)
|