Handy_Cao 1 anno fa
parent
commit
d42c11d6eb

+ 5 - 3
src/packages/pc/views/market/trade/pricing/list/listing/index.vue

@@ -60,7 +60,7 @@
                             v-if="!selectedGoods?.iscannotbuy">{{ t('operation.order') }}</el-button>
                         <el-button type="primary"
                             :disabled="!formData.OrderQty || !sellQty || (formData.OrderQty > sellQty)"
-                            @click="onBeforeSubmit(BuildType.Close)" v-if="!isTrademode16">
+                            @click="onBeforeSubmit(BuildType.Close)" v-if="!isTrademode16 && riskcontrolmode != 1">
                             <span>{{ t('operation.transfer') }}</span>
                             <span v-if="sellQty">(≤{{ sellQty }})</span>
                         </el-button>
@@ -69,7 +69,7 @@
                         <el-button ref="submitRef" type="success" :disabled="!selectedGoodsId || !formData.OrderQty"
                             @click="onBeforeSubmit(BuildType.Open)"
                             v-if="!isTrademode16 && !selectedGoods?.iscannotsell">{{ t('operation.order') }}</el-button>
-                        <el-button type="primary" :disabled="!formData.OrderQty || !buyQty || (formData.OrderQty > buyQty)"
+                        <el-button v-if="riskcontrolmode != 1" type="primary" :disabled="!formData.OrderQty || !buyQty || (formData.OrderQty > buyQty)"
                             @click="onBeforeSubmit(BuildType.Close)">
                             <span>{{ t('operation.transfer') }}</span>
                             <span v-if="buyQty">(≤{{ buyQty }})</span>
@@ -86,7 +86,7 @@ import { shallowRef, computed, watch, onMounted } from 'vue'
 import { ElMessage, ElMessageBox, FormInstance, FormRules } from 'element-plus'
 import { BuyOrSell, getBuyOrSellList, getPricemode2List, PriceMode, BuildType } from '@/constants/order'
 import { useOrder } from '@/business/trade'
-import { useFuturesStore, useSettingStore, useAccountStore, usePositionStore, i18n } from '@/stores'
+import { useFuturesStore, useSettingStore, useAccountStore, usePositionStore, i18n, useUserStore } from '@/stores'
 import Forex from '@pc/components/modules/quote/forex/index.vue'
 
 const accountStore = useAccountStore()
@@ -101,6 +101,8 @@ const qtyStepList = [1, 10, 100] // 数量步长列表
 const qtyStep = shallowRef(qtyStepList[0]) // 数量步长
 const { t } = i18n.global
 
+const { riskcontrolmode } = useUserStore().userData.markets.find(e => e.marketid === selectedGoods.value?.marketid) ?? {}
+
 const priceRef = shallowRef()
 const qtyRef = shallowRef()
 const submitRef = shallowRef()