|
|
@@ -51,11 +51,10 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item class="footer-btnbar">
|
|
|
<template v-if="formData.BuyOrSell === BuyOrSell.Buy">
|
|
|
- <el-button ref="submitRef" type="danger" :loading="loading"
|
|
|
- :disabled="!selectedGoodsId || !formData.OrderQty"
|
|
|
+ <el-button ref="submitRef" type="danger" :disabled="!selectedGoodsId || !formData.OrderQty"
|
|
|
@click="onBeforeSubmit(EBuildType.BUILDTYPE_OPEN)"
|
|
|
v-if="!selectedGoods?.iscannotbuy">订立</el-button>
|
|
|
- <el-button type="primary" :loading="loading"
|
|
|
+ <el-button type="primary"
|
|
|
:disabled="!formData.OrderQty || !sellQty || (formData.OrderQty > sellQty)"
|
|
|
@click="onBeforeSubmit(EBuildType.BUILDTYPE_CLOSE)" v-if="!isTrademode16">
|
|
|
<span>转让</span>
|
|
|
@@ -63,12 +62,10 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template v-if="formData.BuyOrSell === BuyOrSell.Sell">
|
|
|
- <el-button ref="submitRef" type="success" :loading="loading"
|
|
|
- :disabled="!selectedGoodsId || !formData.OrderQty"
|
|
|
+ <el-button ref="submitRef" type="success" :disabled="!selectedGoodsId || !formData.OrderQty"
|
|
|
@click="onBeforeSubmit(EBuildType.BUILDTYPE_OPEN)"
|
|
|
v-if="!isTrademode16 && !selectedGoods?.iscannotsell">订立</el-button>
|
|
|
- <el-button type="primary" :loading="loading"
|
|
|
- :disabled="!formData.OrderQty || !buyQty || (formData.OrderQty > buyQty)"
|
|
|
+ <el-button type="primary" :disabled="!formData.OrderQty || !buyQty || (formData.OrderQty > buyQty)"
|
|
|
@click="onBeforeSubmit(EBuildType.BUILDTYPE_CLOSE)">
|
|
|
<span>转让</span>
|
|
|
<span v-if="buyQty">(≤{{ buyQty }})</span>
|
|
|
@@ -203,26 +200,28 @@ const onPriceClick = (buyorsell: BuyOrSell, value: number) => {
|
|
|
}
|
|
|
|
|
|
const onBeforeSubmit = (buildType: EBuildType) => {
|
|
|
- formRef.value?.validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- formData.BuildType = buildType
|
|
|
- if (settingStore.getSettingValue('showOrderDialog')) {
|
|
|
- if (isTrademode16.value) {
|
|
|
- ElMessageBox.confirm(
|
|
|
- '是否立即挂牌?',
|
|
|
- '提示'
|
|
|
- ).then(() => onSubmit())
|
|
|
+ if (!loading.value) {
|
|
|
+ formRef.value?.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ formData.BuildType = buildType
|
|
|
+ if (settingStore.getSettingValue('showOrderDialog')) {
|
|
|
+ if (isTrademode16.value) {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ '是否立即挂牌?',
|
|
|
+ '提示'
|
|
|
+ ).then(() => onSubmit())
|
|
|
+ } else {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ '*若存在价格匹配的反方向委托订单,系统将会自动撤销。',
|
|
|
+ '是否立即挂牌?'
|
|
|
+ ).then(() => onSubmit())
|
|
|
+ }
|
|
|
} else {
|
|
|
- ElMessageBox.confirm(
|
|
|
- '*若存在价格匹配的反方向委托订单,系统将会自动撤销。',
|
|
|
- '是否立即挂牌?'
|
|
|
- ).then(() => onSubmit())
|
|
|
+ onSubmit()
|
|
|
}
|
|
|
- } else {
|
|
|
- onSubmit()
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 提交挂牌
|