Merge branch 'glms/feature/dotnumber' into 'glms/feature/1.4.2'
fix(swap): 修复平仓交易界面金额格式化问题 See merge request otc-dev/zszq-trs!8
This commit is contained in:
@@ -120,10 +120,10 @@
|
||||
<td :class="item.InterestDirection==1?'swapget':'swappay'">{{item.InterestDirection==1?"收取":"支付"}}</td>
|
||||
<td>{{item.InterestModeStr}}</td>
|
||||
<td>
|
||||
<vue-number-input v-model="item.InterestPrincipal" v-bind:format="inputFormatEqvNotional" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
||||
<vue-number-input v-model="item.InterestPrincipal" v-bind:format="inputFormatCloseAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
||||
</td>
|
||||
<td>
|
||||
<vue-number-input v-model="item.InterestAmount" v-bind:format="inputFormatEqvNotional" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
||||
<vue-number-input v-model="item.InterestAmount" v-bind:format="inputFormatCloseAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
||||
</td>
|
||||
<td>{{item.InterestClosePnL}}</td>
|
||||
</tr>
|
||||
@@ -160,10 +160,10 @@
|
||||
{{item.InterestRate*100}}%
|
||||
</td>*@
|
||||
<td>
|
||||
<vue-number-input v-model="item.InterestFee" v-bind:format="inputFormatEqvNotional" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
||||
<vue-number-input v-model="item.InterestFee" v-bind:format="inputFormatCloseAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
||||
</td>
|
||||
<td>
|
||||
<vue-number-input v-model="item.InterestAmount" v-bind:format="inputFormatEqvNotional" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
||||
<vue-number-input v-model="item.InterestAmount" v-bind:format="inputFormatCloseAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
||||
</td>
|
||||
<td>{{item.InterestClosePnL}}</td>
|
||||
</tr>
|
||||
@@ -216,7 +216,7 @@
|
||||
</td>
|
||||
<td>{{deal.CloseQty}}</td>
|
||||
<td>
|
||||
<vue-number-input v-model="floatPosition.TradingFee" v-bind:format="inputFormatEqvNotional" v-on:input="changeTradingFee"></vue-number-input>
|
||||
<vue-number-input v-model="floatPosition.TradingFee" v-bind:format="inputFormatCloseAmount" v-on:input="changeTradingFee"></vue-number-input>
|
||||
<div class="bubble-box">我方{{floatPosition.PayDirection==1?"支付":"收取"}}交易费用</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -5,6 +5,7 @@ const inputFormatSwapRate = Object.freeze({ precision: otcformat.trading.premium
|
||||
const inputFormatTradePrice = Object.freeze({ precision: otcformat.trading.tradePrice.precision, append: '' });
|
||||
const inputFormatTradeAmount = Object.freeze({ precision: otcformat.trading.notional.precision, append: '' });
|
||||
const inputFormatEqvNotional = Object.freeze({ precision: otcformat.trading.StockEqvNotional.precision, append: '', negative: true });
|
||||
const inputFormatCloseAmount = Object.freeze({ precision: 2, append: '', negative: true, trimTailZeros: false });
|
||||
const inputFormatMarginRate = Object.freeze({ precision: otcformat.trading.marginRateP.precision, append: '%' });
|
||||
const inputFormatMarginRateNoPercent = Object.freeze({ precision: otcformat.trading.umpriceP.precision, append: '', percent: true });
|
||||
const inputFormatSwapDeliveryPrice = Object.freeze({ precision: 9, append: '', negative: true });
|
||||
|
||||
Reference in New Issue
Block a user