|
|
@@ -4,7 +4,7 @@
|
|
|
<Forex v-bind="{ goodsCode: selectedGoods.goodscode }" @price-click="onPriceClick" />
|
|
|
</div>
|
|
|
<el-scrollbar class="pricing-listing__form" always>
|
|
|
- <h4 class="header-title">{{ t('quote.pricing.title1') }}</h4>
|
|
|
+ <h4 class="header-title">{{ selectedGoods?.trademode === 10 ? t('quote.pricing.title1') : t('quote.pricing.title2') }}</h4>
|
|
|
<el-form ref="formRef" class="el-form--vertical" label-width="60px" :show-message="false" :model="formData"
|
|
|
:rules="formRules">
|
|
|
<el-form-item prop="GoodsID" :label="t('quote.pricing.goods')">
|
|
|
@@ -13,13 +13,13 @@
|
|
|
v-for="(item, index) in marketGoodsList" :key="index" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="BuyOrSell" :label="t('quote.pricing.buyorsell')">
|
|
|
+ <el-form-item v-if="selectedGoods?.trademode === 10" prop="BuyOrSell" :label="t('quote.pricing.buyorsell')">
|
|
|
<el-radio-group v-model="formData.BuyOrSell">
|
|
|
<el-radio v-for="(item, index) in getBuyOrSellList()" :key="index" :label="item.label"
|
|
|
:value="item.value" />
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="PriceMode" :label="t('quote.pricing.pricemode')">
|
|
|
+ <el-form-item v-if="selectedGoods?.trademode === 10" prop="PriceMode" :label="t('quote.pricing.pricemode')">
|
|
|
<el-radio-group v-model="formData.PriceMode">
|
|
|
<el-radio v-for="(item, index) in getPricemode2List()" :key="index" :label="item.label"
|
|
|
:value="item.value" />
|
|
|
@@ -58,8 +58,8 @@
|
|
|
<el-form-item class="footer-btnbar">
|
|
|
<template v-if="formData.BuyOrSell === BuyOrSell.Buy">
|
|
|
<el-button ref="submitRef" type="danger" :disabled="!selectedGoodsId || !formData.OrderQty"
|
|
|
- @click="onBeforeSubmit(BuildType.Open)" v-if="!selectedGoods?.iscannotbuy">{{
|
|
|
- t('operation.order') }}</el-button>
|
|
|
+ @click="onBeforeSubmit(BuildType.Open)" v-if="!selectedGoods?.iscannotbuy">{{ selectedGoods?.trademode != 53 ?
|
|
|
+ t('operation.order') : t('operation.buynow') }}</el-button>
|
|
|
<!-- <el-button type="primary"
|
|
|
:disabled="!formData.OrderQty || !sellQty || (formData.OrderQty > sellQty)"
|
|
|
@click="onBeforeSubmit(BuildType.Close)" v-if="!isTrademode16 && riskcontrolmode != 1">
|
|
|
@@ -79,17 +79,19 @@
|
|
|
</template>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
+ <app-address v-model:show="showAddress" @change="onAddressChange" />
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, computed, watch, onMounted } from 'vue'
|
|
|
+import { shallowRef, computed, watch, onMounted, ref } 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, i18n, useUserStore } from '@/stores'
|
|
|
import Forex from '@pc/components/modules/quote/forex/index.vue'
|
|
|
+import AppAddress from '@pc/components/modules/address/index.vue'
|
|
|
|
|
|
const accountStore = useAccountStore()
|
|
|
const settingStore = useSettingStore()
|
|
|
@@ -101,6 +103,9 @@ const { selectedGoodsId, selectedGoods, marketGoodsList } = futuresStore.$toRefs
|
|
|
const { formData, formSubmit, loading } = useOrder()
|
|
|
// const positionStore = usePositionStore()
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
+
|
|
|
+const showAddress = ref(false)
|
|
|
+
|
|
|
// 数量步长列表
|
|
|
const qtyStepList = computed(() => {
|
|
|
const system_1009 = Number(getSystemParamValue('1009')) ?? 1
|
|
|
@@ -166,6 +171,13 @@ const { decimalplace = 0.0 } = selectedGoods.value ?? {}
|
|
|
const quoteminunit = selectedGoods.value?.quoteminunit ?? 1.0
|
|
|
const decimalvalue = Math.pow(10.0, -decimalplace) * (quoteminunit == 0 ? 1 : quoteminunit)
|
|
|
|
|
|
+// 选择地址
|
|
|
+const onAddressChange = (item: Model.UserReceiveInfoRsp) => {
|
|
|
+ const contact = `${item.receivername} ${item.phonenum}`
|
|
|
+ const address = `${item.provincename} ${item.cityname} ${item.districtname} ${item.address}`
|
|
|
+ formData.AddrInfo = [contact, address].join('\n')
|
|
|
+}
|
|
|
+
|
|
|
const formRules: FormRules = {
|
|
|
OrderPrice: [{
|
|
|
required: true,
|