| | |
| | | <a-row class="form-row" :gutter="16"> |
| | | <a-col :lg="6" :md="12" :sm="24"> |
| | | <a-form-item label="免息杠杆(例:1,填倍数)"> |
| | | <a-input |
| | | placeholder="请输入免息杠杆倍数" |
| | | v-decorator="[ |
| | | 'interestFreeLever',{}]" /> |
| | | <a-input placeholder="请输入免息杠杆倍数" v-decorator="['interestFreeLever', {}]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="{ span: 7, offset: 1 }" :lg="{ span: 8 }" :md="{ span: 12 }" :sm="24"> |
| | |
| | | </a-col> |
| | | <a-col :xl="{ span: 9, offset: 1 }" :lg="{ span: 10 }" :md="{ span: 24 }" :sm="24"> |
| | | <a-form-item label="免息盈利(例:0.85,百分比)"> |
| | | <a-input |
| | | placeholder="请输入免息盈利" |
| | | v-decorator="['interestFreeProfit',{} |
| | | ]" /> |
| | | <a-input placeholder="请输入免息盈利" v-decorator="['interestFreeProfit', {}]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-row class="form-row" :gutter="16"> |
| | | <a-col :lg="6" :md="12" :sm="24"> |
| | | <a-form-item label="使用期限(例:2|3)"> |
| | | <a-input |
| | | placeholder="请输入使用期限" |
| | | v-decorator="[ |
| | | 'daysUsePeriod', |
| | | {} |
| | | ]" /> |
| | | <a-input placeholder="请输入使用期限" v-decorator="['daysUsePeriod', {}]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="{ span: 7, offset: 1 }" :lg="{ span: 8 }" :md="{ span: 12 }" :sm="24"> |
| | | <a-form-item label="按天预警线(例:0.75,百分比"> |
| | | <a-input |
| | | placeholder="请输入按天预警线" |
| | | v-decorator="[ |
| | | 'daysWarning', |
| | | {} |
| | | ]" /> |
| | | <a-input placeholder="请输入按天预警线" v-decorator="['daysWarning', {}]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="{ span: 9, offset: 1 }" :lg="{ span: 10 }" :md="{ span: 24 }" :sm="24"> |
| | | <a-form-item label="按天平仓线(例:0.82,百分比)"> |
| | | <a-input |
| | | placeholder="请输入按天平仓线" |
| | | v-decorator="[ |
| | | 'daysUnwind', |
| | | {} |
| | | ]" /> |
| | | <a-input placeholder="请输入按天平仓线" v-decorator="['daysUnwind', {}]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-row class="form-row" :gutter="16"> |
| | | <a-col :lg="5" :md="12" :sm="24"> |
| | | <a-form-item label="交易佣金费率(例:0.75,百分比)"> |
| | | <a-input |
| | | placeholder="请输入交易佣金费率" |
| | | v-decorator="[ |
| | | 'tradingCommissionRate', |
| | | {} |
| | | ]" /> |
| | | <a-input placeholder="请输入交易佣金费率" v-decorator="['tradingCommissionRate', {}]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="{ span: 5, offset: 1 }" :lg="{ span: 8 }" :md="{ span: 12 }" :sm="24"> |
| | | <a-form-item label="每笔最低费用(例:5,单位元)"> |
| | | <a-input |
| | | placeholder="请输入每笔最低费用" |
| | | v-decorator="[ |
| | | 'stampDutyRate', |
| | | {} |
| | | ]" /> |
| | | <a-input placeholder="请输入每笔最低费用" v-decorator="['stampDutyRate', {}]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="{ span: 5, offset: 1 }" :lg="{ span: 10 }" :md="{ span: 24 }" :sm="24"> |
| | | <a-form-item label="盈利分成比例(例:0.85,百分比)"> |
| | | <a-input |
| | | placeholder="请输入盈利分成比例" |
| | | v-decorator="[ |
| | | 'profitSharingRatio', |
| | | {} |
| | | ]" /> |
| | | <a-input placeholder="请输入盈利分成比例" v-decorator="['profitSharingRatio', {}]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="{ span: 5, offset: 1 }" :lg="{ span: 10 }" :md="{ span: 24 }" :sm="24"> |
| | | <a-form-item label="提前终止利息(例:0.25,百分比)"> |
| | | <a-input |
| | | placeholder="请输入提前终止利息" |
| | | v-decorator="[ |
| | | 'earlyTerminationInterest', |
| | | {} |
| | | ]" /> |
| | | <a-input placeholder="请输入提前终止利息" v-decorator="['earlyTerminationInterest', {}]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | </a-card> |
| | | <footer-tool-bar> |
| | | <a-button type="primary" html-type="submit"> |
| | | 修改提交 |
| | | </a-button> |
| | | <a-button type="primary" html-type="submit"> 修改提交 </a-button> |
| | | </footer-tool-bar> |
| | | </a-form> |
| | | </page-header-wrapper> |
| | |
| | | export default { |
| | | name: 'Setting', |
| | | components: { |
| | | FooterToolBar |
| | | FooterToolBar, |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | loading: false, |
| | | id: '', |
| | | details: {}, |
| | | fields: ['marginMin', 'marginMax', 'interestFreeLever', 'interestFreeDays', 'interestFreeProfit', 'interestFreeWarning', 'interestFreeUnwind', 'daysUsePeriod', 'daysWarning', 'daysUnwind', 'tradingCommissionRate', 'stampDutyRate', 'profitSharingRatio', 'earlyTerminationInterest'] |
| | | fields: [ |
| | | 'marginMin', |
| | | 'marginMax', |
| | | 'interestFreeLever', |
| | | 'interestFreeDays', |
| | | 'interestFreeProfit', |
| | | 'interestFreeWarning', |
| | | 'interestFreeUnwind', |
| | | 'daysUsePeriod', |
| | | 'daysWarning', |
| | | 'daysUnwind', |
| | | 'tradingCommissionRate', |
| | | 'stampDutyRate', |
| | | 'profitSharingRatio', |
| | | 'earlyTerminationInterest', |
| | | ], |
| | | } |
| | | }, |
| | | mounted () { |
| | |
| | | var that = this |
| | | var formitem = values |
| | | formitem.id = that.id |
| | | saveFundsSetting(formitem).then(res => { |
| | | saveFundsSetting(formitem).then((res) => { |
| | | if (res.status == 0) { |
| | | that.$message.loading({ content: 'Loading...' }) |
| | | setTimeout(() => { |
| | |
| | | that.getdetail() |
| | | }, 2000) |
| | | } else { |
| | | that.$message.error({ content: res.msg }) |
| | | that.$message.error(res.msg) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | getdetail () { |
| | | var that = this |
| | | this.loading = true |
| | | getFundsSetting().then(res => { |
| | | getFundsSetting().then((res) => { |
| | | that.id = res.data.id |
| | | this.fields.forEach(v => this.form.getFieldDecorator(v)) |
| | | this.fields.forEach((v) => this.form.getFieldDecorator(v)) |
| | | this.form.setFieldsValue(pick(res.data, this.fields)) |
| | | setTimeout(() => { |
| | | that.loading = false |
| | | }, 500) |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | |
| | | list-style: none; |
| | | border-bottom: 1px solid #e8e8e8; |
| | | cursor: pointer; |
| | | transition: all .3s; |
| | | transition: all 0.3s; |
| | | |
| | | &:hover { |
| | | background: #e6f7ff; |
| | |
| | | |
| | | .antd-pro-pages-forms-style-errorField { |
| | | margin-top: 2px; |
| | | color: rgba(0, 0, 0, .45); |
| | | color: rgba(0, 0, 0, 0.45); |
| | | font-size: 12px; |
| | | } |
| | | } |