|
|
@@ -4,30 +4,30 @@
|
|
|
<Forex v-bind="{ goodsCode: selectedGoods.goodscode }" @price-click="onPriceClick" />
|
|
|
</div>
|
|
|
<div class="pricing-listing__form">
|
|
|
- <h4 class="header-title">挂牌点价</h4>
|
|
|
+ <h4 class="header-title">{{ t('quote.pricing.title1') }}</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="商品">
|
|
|
+ <el-form-item prop="GoodsID" :label="t('quote.pricing.goods')">
|
|
|
<el-select effect="dark" :placeholder="t('common.choice')" v-model="selectedGoodsId" filterable>
|
|
|
<el-option :label="item.goodsname" :value="item.goodsid" v-for="(item, index) in marketGoodsList"
|
|
|
:key="index" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="BuyOrSell" label="方向">
|
|
|
+ <el-form-item 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.value">
|
|
|
{{ item.label }}
|
|
|
</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="PriceMode" label="方式">
|
|
|
+ <el-form-item 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.value">
|
|
|
{{ item.label }}
|
|
|
</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="OrderQty" label="数量">
|
|
|
+ <el-form-item prop="OrderQty" :label="t('quote.pricing.orderqty')">
|
|
|
<div class="g-qty-group">
|
|
|
<el-input-number ref="qtyRef" :placeholder="t('common.pleaseenter')" :min="0" :max="9999999999" :precision="0" :step="qtyStep || 1"
|
|
|
v-model="formData.OrderQty" @keyup.enter="submitFocus" />
|
|
|
@@ -38,18 +38,18 @@
|
|
|
v-if="(formData.BuyOrSell === BuyOrSell.Buy || selectedGoods?.tradeproperty !== 2) && settingStore.getSettingValue('showOrderEnableQty')">
|
|
|
<div
|
|
|
style="display: flex;flex-direction: column;line-height: normal;font-size: 12px;color: #7a8a94;">
|
|
|
- <span>预估可订立量:{{ total.enableQty }}</span>
|
|
|
- <span>预扣保证金:{{ total.deposit.toFixed(2) }}</span>
|
|
|
- <span>可用资金:{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
|
|
|
+ <span>{{ t('quote.pricing.enableQty') }}:{{ total.enableQty }}</span>
|
|
|
+ <span>{{ t('quote.pricing.deposit') }}:{{ total.deposit.toFixed(2) }}</span>
|
|
|
+ <span>{{ t('quote.pricing.avaiableMoney') }}:{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="MarketMaxSub" label="点差" v-if="formData.PriceMode === PriceMode.Market">
|
|
|
+ <el-form-item prop="MarketMaxSub" :label="t('quote.pricing.marketmaxsub')" v-if="formData.PriceMode === PriceMode.Market">
|
|
|
<el-input-number ref="priceRef" :placeholder="t('common.pleaseenter')" :min="0" :max="9999999999" v-model="formData.MarketMaxSub"
|
|
|
@keyup.enter="submitFocus" integer />
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="OrderPrice" label="价格" v-if="formData.PriceMode === PriceMode.Limit">
|
|
|
+ <el-form-item prop="OrderPrice" :label="t('quote.pricing.price')" v-if="formData.PriceMode === PriceMode.Limit">
|
|
|
<el-input-number ref="priceRef" :placeholder="t('common.pleaseenter')" :max="9999999999" :min="0" v-model="formData.OrderPrice"
|
|
|
:auto-fixed="false" :decimal-length="decimalplace" :step="decimalvalue" @keyup.enter="submitFocus" />
|
|
|
</el-form-item>
|
|
|
@@ -164,7 +164,7 @@ const formRules: FormRules = {
|
|
|
if (value) {
|
|
|
callback()
|
|
|
} else {
|
|
|
- callback(new Error('请输入价格'))
|
|
|
+ callback(new Error(t('quote.pricing.tips2')))
|
|
|
}
|
|
|
}
|
|
|
}],
|
|
|
@@ -175,7 +175,7 @@ const formRules: FormRules = {
|
|
|
if (value) {
|
|
|
callback()
|
|
|
} else {
|
|
|
- callback(new Error('请输入允许成交范围'))
|
|
|
+ callback(new Error(t('quote.pricing.tips3')))
|
|
|
}
|
|
|
}
|
|
|
}],
|
|
|
@@ -185,32 +185,32 @@ const formRules: FormRules = {
|
|
|
if (value) {
|
|
|
callback()
|
|
|
} else {
|
|
|
- callback(new Error('请输入数量'))
|
|
|
- }
|
|
|
- }
|
|
|
- }],
|
|
|
- SlPrice: [{
|
|
|
- required: true,
|
|
|
- type: 'number',
|
|
|
- validator: (rule, value, callback) => {
|
|
|
- if (value) {
|
|
|
- callback()
|
|
|
- } else {
|
|
|
- callback(new Error('请输入止损价'))
|
|
|
- }
|
|
|
- }
|
|
|
- }],
|
|
|
- SpPrice: [{
|
|
|
- required: true,
|
|
|
- type: 'number',
|
|
|
- validator: (rule, value, callback) => {
|
|
|
- if (value) {
|
|
|
- callback()
|
|
|
- } else {
|
|
|
- callback(new Error('请输入止盈价'))
|
|
|
+ callback(new Error(t('quote.pricing.tips1')))
|
|
|
}
|
|
|
}
|
|
|
}],
|
|
|
+ // SlPrice: [{
|
|
|
+ // required: true,
|
|
|
+ // type: 'number',
|
|
|
+ // validator: (rule, value, callback) => {
|
|
|
+ // if (value) {
|
|
|
+ // callback()
|
|
|
+ // } else {
|
|
|
+ // callback(new Error('请输入止损价'))
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }],
|
|
|
+ // SpPrice: [{
|
|
|
+ // required: true,
|
|
|
+ // type: 'number',
|
|
|
+ // validator: (rule, value, callback) => {
|
|
|
+ // if (value) {
|
|
|
+ // callback()
|
|
|
+ // } else {
|
|
|
+ // callback(new Error('请输入止盈价'))
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }],
|
|
|
}
|
|
|
|
|
|
const onPriceClick = (buyorsell: BuyOrSell, value: number) => {
|
|
|
@@ -260,10 +260,10 @@ const onBeforeSubmit = (buildType: BuildType) => {
|
|
|
|
|
|
if (settingStore.getSettingValue('showOrderDialog')) {
|
|
|
ElMessageBox.confirm(
|
|
|
- '是否立即挂牌?',
|
|
|
- '提示'
|
|
|
- ).then(() => onSubmit())
|
|
|
- } else {
|
|
|
+ t('common.tips1'),
|
|
|
+ t('common.tips')
|
|
|
+ ).then(() => onSubmit())
|
|
|
+ } else {
|
|
|
onSubmit()
|
|
|
}
|
|
|
}
|