|
|
@@ -28,7 +28,8 @@
|
|
|
<div class="el-form-item--col">
|
|
|
<div class="qty-group">
|
|
|
<el-input-number placeholder="请输入" :min="agreeunit" :step="qtyStep" v-model="orderQty" />
|
|
|
- <el-radio-group size="small" v-model="qtyStep" @change="onRadioChange">
|
|
|
+ <el-radio-group size="small" v-model="qtyStep" @change="onRadioChange"
|
|
|
+ v-if="qtyStepList.length">
|
|
|
<el-radio v-for="(value, index) in qtyStepList" :key="index" :label="value" border />
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
@@ -38,7 +39,7 @@
|
|
|
</el-form>
|
|
|
<div class="footer-btnbar">
|
|
|
<template v-if="formData.BuyOrSell === BuyOrSell.Buy">
|
|
|
- <el-button type="primary" :loading="loading"
|
|
|
+ <el-button type="primary" :loading="loading" :disabled="!goodsStore.goodsId"
|
|
|
@click="onSubmit(EBuildType.BUILDTYPE_OPEN)">订立买入</el-button>
|
|
|
<el-button type="primary" :loading="loading" :disabled="(sellQty === 0) || (orderQty > sellQty)"
|
|
|
@click="onSubmit(EBuildType.BUILDTYPE_CLOSE)">
|
|
|
@@ -47,7 +48,7 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template v-if="formData.BuyOrSell === BuyOrSell.Sell">
|
|
|
- <el-button type="primary" :loading="loading"
|
|
|
+ <el-button type="primary" :loading="loading" :disabled="!goodsStore.goodsId"
|
|
|
@click="onSubmit(EBuildType.BUILDTYPE_OPEN)">订立卖出</el-button>
|
|
|
<el-button type="primary" :loading="loading" :disabled="(buyQty === 0) || (orderQty > buyQty)"
|
|
|
@click="onSubmit(EBuildType.BUILDTYPE_CLOSE)">
|
|
|
@@ -104,11 +105,14 @@ const priceStep = computed(() => {
|
|
|
|
|
|
// 数量步长列表
|
|
|
const qtyStepList = computed(() => {
|
|
|
- return [
|
|
|
- agreeunit.value * 1,
|
|
|
- agreeunit.value * 10,
|
|
|
- agreeunit.value * 100,
|
|
|
- ]
|
|
|
+ if (agreeunit.value) {
|
|
|
+ return [
|
|
|
+ agreeunit.value * 1,
|
|
|
+ agreeunit.value * 10,
|
|
|
+ agreeunit.value * 100,
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ return []
|
|
|
})
|
|
|
|
|
|
// 买方向持仓数量
|