|
@@ -44,8 +44,7 @@
|
|
|
<div class="g-form__footer">
|
|
<div class="g-form__footer">
|
|
|
<template v-if="buyOrSell === BuyOrSell.Buy">
|
|
<template v-if="buyOrSell === BuyOrSell.Buy">
|
|
|
<Button type="danger" block square :disabled="!formData.OrderQty"
|
|
<Button type="danger" block square :disabled="!formData.OrderQty"
|
|
|
- @click="onBeforeSubmit(EBuildType.BUILDTYPE_OPEN)"
|
|
|
|
|
- v-if="!quote?.iscannotbuy">订立买入</Button>
|
|
|
|
|
|
|
+ @click="onBeforeSubmit(EBuildType.BUILDTYPE_OPEN)" v-if="!quote?.iscannotbuy">订立买入</Button>
|
|
|
<Button type="primary" block square
|
|
<Button type="primary" block square
|
|
|
:disabled="!formData.OrderQty || !sellQty || (formData.OrderQty > sellQty)"
|
|
:disabled="!formData.OrderQty || !sellQty || (formData.OrderQty > sellQty)"
|
|
|
@click="onBeforeSubmit(EBuildType.BUILDTYPE_CLOSE)" v-if="!isTrademode16">
|
|
@click="onBeforeSubmit(EBuildType.BUILDTYPE_CLOSE)" v-if="!isTrademode16">
|
|
@@ -55,7 +54,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="buyOrSell === BuyOrSell.Sell">
|
|
<template v-if="buyOrSell === BuyOrSell.Sell">
|
|
|
<Button type="danger" block square :disabled="!formData.OrderQty"
|
|
<Button type="danger" block square :disabled="!formData.OrderQty"
|
|
|
- @click="onBeforeSubmit(EBuildType.BUILDTYPE_OPEN)" v-if="!isTrademode16 && !quote?.iscannotsell">订立卖出</Button>
|
|
|
|
|
|
|
+ @click="onBeforeSubmit(EBuildType.BUILDTYPE_OPEN)"
|
|
|
|
|
+ v-if="!isTrademode16 && !quote?.iscannotsell">订立卖出</Button>
|
|
|
<Button type="primary" block square
|
|
<Button type="primary" block square
|
|
|
:disabled="!formData.OrderQty || !buyQty || (formData.OrderQty > buyQty)"
|
|
:disabled="!formData.OrderQty || !buyQty || (formData.OrderQty > buyQty)"
|
|
|
@click="onBeforeSubmit(EBuildType.BUILDTYPE_CLOSE)">
|
|
@click="onBeforeSubmit(EBuildType.BUILDTYPE_CLOSE)">
|
|
@@ -127,10 +127,10 @@ const enableQty = computed(() => {
|
|
|
|
|
|
|
|
if (fixed && ratio) {
|
|
if (fixed && ratio) {
|
|
|
if (marketmarginalgorithm === 1) {
|
|
if (marketmarginalgorithm === 1) {
|
|
|
- return Math.trunc(avaiableMoney / ratio)
|
|
|
|
|
|
|
+ return Math.trunc(avaiableMoney / ratio) || 0
|
|
|
}
|
|
}
|
|
|
if (marketmarginalgorithm === 2) {
|
|
if (marketmarginalgorithm === 2) {
|
|
|
- return Math.trunc(avaiableMoney / fixed)
|
|
|
|
|
|
|
+ return Math.trunc(avaiableMoney / fixed) || 0
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return 0
|
|
return 0
|