|
@@ -90,22 +90,38 @@ import { ElMessage, ElMessageBox, FormInstance, FormRules } from 'element-plus'
|
|
|
import { EPriceMode, EListingSelectType, EDelistingType, EBuildType, EValidType, EOrderOperateType } from '@/constants/client'
|
|
import { EPriceMode, EListingSelectType, EDelistingType, EBuildType, EValidType, EOrderOperateType } from '@/constants/client'
|
|
|
import { BuyOrSell, getBuyOrSellList } from '@/constants/order'
|
|
import { BuyOrSell, getBuyOrSellList } from '@/constants/order'
|
|
|
import { useOrder } from '@/business/trade'
|
|
import { useOrder } from '@/business/trade'
|
|
|
-import { useFuturesStore, useSettingStore, useAccountStore, usePositionStore, i18n } from '@/stores'
|
|
|
|
|
|
|
+import { useFuturesStore, useSettingStore, useAccountStore, usePositionStore, useUserStore, i18n } from '@/stores'
|
|
|
import Forex from '@pc/components/modules/quote/forex/index.vue'
|
|
import Forex from '@pc/components/modules/quote/forex/index.vue'
|
|
|
import Icon from '@pc/components/base/icon/index.vue'
|
|
import Icon from '@pc/components/base/icon/index.vue'
|
|
|
|
|
|
|
|
const accountStore = useAccountStore()
|
|
const accountStore = useAccountStore()
|
|
|
const settingStore = useSettingStore()
|
|
const settingStore = useSettingStore()
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
const futuresStore = useFuturesStore()
|
|
const futuresStore = useFuturesStore()
|
|
|
|
|
|
|
|
const { selectedGoodsId, selectedGoods, marketGoodsList } = futuresStore.$toRefs()
|
|
const { selectedGoodsId, selectedGoods, marketGoodsList } = futuresStore.$toRefs()
|
|
|
const { formData, loading, formSubmit } = useOrder()
|
|
const { formData, loading, formSubmit } = useOrder()
|
|
|
const positionStore = usePositionStore()
|
|
const positionStore = usePositionStore()
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
-const qtyStepList = [1, 10, 100] // 数量步长列表
|
|
|
|
|
-const qtyStep = shallowRef(qtyStepList[0]) // 数量步长
|
|
|
|
|
const { t } = i18n.global
|
|
const { t } = i18n.global
|
|
|
|
|
|
|
|
|
|
+// 数量步长列表
|
|
|
|
|
+const qtyStepList = computed(() => {
|
|
|
|
|
+ // 任务 #6640
|
|
|
|
|
+ const param1009 = userStore.getSystemParamValue('1009')
|
|
|
|
|
+
|
|
|
|
|
+ if (param1009) {
|
|
|
|
|
+ const values = param1009.split(',')
|
|
|
|
|
+ const { traderules = [], agreeunit = 0 } = selectedGoods.value ?? {}
|
|
|
|
|
+ const { ParamValue = 1 } = traderules.find((e) => e.RuleID === 103) ?? {}
|
|
|
|
|
+ const min = ParamValue * agreeunit // ParamValue 是数量
|
|
|
|
|
+
|
|
|
|
|
+ return values.map((value) => (+value) * min)
|
|
|
|
|
+ }
|
|
|
|
|
+ return []
|
|
|
|
|
+})
|
|
|
|
|
+const qtyStep = shallowRef(qtyStepList.value[0]) // 数量步长
|
|
|
|
|
+
|
|
|
const priceRef = shallowRef()
|
|
const priceRef = shallowRef()
|
|
|
const qtyRef = shallowRef()
|
|
const qtyRef = shallowRef()
|
|
|
const submitRef = shallowRef()
|
|
const submitRef = shallowRef()
|