bug
This commit is contained in:
@ -477,14 +477,14 @@
|
||||
<el-col :span="5">加仓下跌百分比<el-input v-model.number="item.addPositionPriceRatio" size="mini" type="number" placeholder="加仓价格百分比" /></el-col>
|
||||
<el-col :span="5">加仓数值<el-input v-model.number="item.addPositionVal" size="mini" type="number" placeholder="加仓数值" /></el-col>
|
||||
<el-col :span="4">加仓后止盈价百分比<el-input v-model.number="item.takeProfitRatio" size="mini" type="number" placeholder="止盈百分比">
|
||||
<template v-if="form.type===1" #append>{{ ext.length ? ext[index].reTakeProfitRatio : 0 }}</template>
|
||||
<template v-if="form.type===1" #append>{{ ext[index] ? ext[index].reTakeProfitRatio : 0 }}</template>
|
||||
</el-input></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 10px;">
|
||||
<el-col :span="5">减仓下跌百分比<el-input v-model.number="item.reducePriceRatio" size="mini" type="number" placeholder="减仓价格百分比" /></el-col>
|
||||
<el-col :span="5">减仓数量百分比<el-input v-model.number="item.reduceNumRatio" size="mini" type="number" placeholder="减仓数量百分比" /></el-col>
|
||||
<el-col :span="5">减仓后止盈价百分比<el-input v-model.number="item.reduceTakeProfitRatio" size="mini" type="number" placeholder="减仓后止盈百分比">
|
||||
<template v-if="form.type===1" #append>{{ ext.length ? ext[index].reduceReTakeProfitRatio : 0 }}</template>
|
||||
<template v-if="form.type===1" #append>{{ ext[index] ? ext[index].reduceReTakeProfitRatio : 0 }}</template>
|
||||
</el-input></el-col>
|
||||
<el-col :span="5">减仓后止损价百分比<el-input v-model.number="item.reduceStopLossRatio" size="mini" type="number" placeholder="减仓后止损百分比" /></el-col>
|
||||
<el-col :span="4"><div style="margin-bottom: 14px;" /><el-button size="mini" type="danger" @click="onAddExt(1,index)">删除</el-button></el-col>
|
||||
@ -848,6 +848,10 @@ export default {
|
||||
if (!valided) return false
|
||||
const params = JSON.stringify({
|
||||
...this.inForm,
|
||||
reduce_price: this.inForm.reduce_price || 0,
|
||||
reduce_num: this.inForm.reduce_num || 0,
|
||||
reduce_take_profit: this.inForm.reduce_take_profit || 0,
|
||||
reduce_stop_price: this.inForm.reduce_stop_price || 0,
|
||||
symbol_group_id: String(this.inForm.symbol_group_id),
|
||||
api_id: this.inForm.api_id.toString(),
|
||||
hedge_trigger_percent: Number(this.inForm.hedge_trigger_percent),
|
||||
|
||||
@ -806,14 +806,14 @@
|
||||
<el-col :span="5">加仓下跌百分比<el-input v-model.number="item.addPositionPriceRatio" size="mini" type="number" placeholder="加仓下跌百分比" /></el-col>
|
||||
<el-col :span="5">加仓数值<el-input v-model.number="item.addPositionVal" size="mini" type="number" placeholder="加仓数值" /></el-col>
|
||||
<el-col :span="4">加仓后止盈价百分比<el-input v-model.number="item.takeProfitRatio" size="mini" type="number" placeholder="止盈百分比">
|
||||
<template v-if="title!=='批量添加'" #append>{{ ext.length ? ext[index].reTakeProfitRatio : 0 }}</template>
|
||||
<template v-if="title!=='批量添加'" #append>{{ ext[index] ? ext[index].reTakeProfitRatio : 0 }}</template>
|
||||
</el-input></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 10px;">
|
||||
<el-col :span="5">减仓下跌百分比<el-input v-model.number="item.reducePriceRatio" size="mini" type="number" placeholder="减仓下跌百分比" /></el-col>
|
||||
<el-col :span="5">减仓数量百分比<el-input v-model.number="item.reduceNumRatio" size="mini" type="number" placeholder="减仓数量百分比" /></el-col>
|
||||
<el-col :span="5">减仓后止盈价百分比<el-input v-model.number="item.reduceTakeProfitRatio" size="mini" type="number" placeholder="减仓后止盈百分比">
|
||||
<template v-if="title!=='批量添加'" #append>{{ ext.length ? ext[index].reduceReTakeProfitRatio : 0 }}</template>
|
||||
<template v-if="title!=='批量添加'" #append>{{ ext[index] ? ext[index].reduceReTakeProfitRatio : 0 }}</template>
|
||||
</el-input></el-col>
|
||||
<el-col :span="5">减仓后止损价百分比<el-input v-model.number="item.reduceStopLossRatio" size="mini" type="number" placeholder="减仓后止损百分比" /></el-col>
|
||||
<el-col :span="4"><div style="margin-bottom: 14px;" /><el-button size="mini" type="danger" @click="onAddExt(1,index)">删除</el-button></el-col>
|
||||
@ -1853,7 +1853,7 @@ export default {
|
||||
sign_price: undefined,
|
||||
price_type: 'new',
|
||||
rate: undefined,
|
||||
price: undefined,
|
||||
price: 0,
|
||||
num: undefined,
|
||||
buy_price: undefined,
|
||||
site: 'BUY',
|
||||
@ -1867,6 +1867,10 @@ export default {
|
||||
close_type: undefined,
|
||||
direction: undefined,
|
||||
|
||||
reduce_price: 0,
|
||||
reduce_num: 0,
|
||||
reduce_take_profit: 0,
|
||||
reduce_stop_price: 0,
|
||||
ext: [],
|
||||
symbol_type: 1,
|
||||
hedge_buy_type: 1,
|
||||
@ -1886,7 +1890,7 @@ export default {
|
||||
profit_rate: '',
|
||||
cover_type: 0,
|
||||
price_pattern: 'percentage',
|
||||
profit: '',
|
||||
profit: 0,
|
||||
stop_price: '',
|
||||
save_template: '0',
|
||||
template_name: ''
|
||||
@ -1987,7 +1991,14 @@ export default {
|
||||
})
|
||||
return false
|
||||
}
|
||||
addOrder({ ...this.form, api_id: this.form.api_id.toString() }).then(response => {
|
||||
addOrder({
|
||||
...this.form,
|
||||
reduce_price: this.form.reduce_price || 0,
|
||||
reduce_num: this.form.reduce_num || 0,
|
||||
reduce_take_profit: this.form.reduce_take_profit || 0,
|
||||
reduce_stop_price: this.form.reduce_stop_price || 0,
|
||||
api_id: this.form.api_id.toString()
|
||||
}).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess(response.msg)
|
||||
this.open = false
|
||||
|
||||
Reference in New Issue
Block a user