li.shaoyi hace 2 años
padre
commit
efbbb95431

+ 2 - 2
src/packages/pc/components/layouts/header/components/setting/index.vue

@@ -10,9 +10,9 @@
                     <el-option label="实时对手价" :value="4" />
                 </el-select>
             </el-form-item>
-            <el-form-item label="单笔最大下单量">
+            <!-- <el-form-item label="单笔最大下单量">
                 <el-input-number placeholder="请输入" v-model="formData.orderMaxQty" :min="1" :max="1000000" />
-            </el-form-item>
+            </el-form-item> -->
             <el-form-item prop="orderFocusType" label="下单后默认焦点">
                 <el-select placeholder="请选择" v-model="formData.orderFocusType">
                     <el-option label="价格" :value="1" />

+ 23 - 24
src/packages/pc/views/market/trade/goods/list/listing/index.vue

@@ -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()
             }
-        }
-    })
+        })
+    }
 }
 
 // 提交挂牌

+ 1 - 1
src/stores/modules/setting.ts

@@ -18,7 +18,7 @@ export const useSettingStore = defineStore(() => {
         showOrderSuccessMessage: true,
         showOrderFailMessage: true,
         showOrderEnableQty: false,
-        orderMaxQty: 10000,
+        orderMaxQty: 10000000,
         orderFocusType: 1,
         orderPriceType: 1,
         orderQtyIsEmpty: false