Merge branch 'glms/feature/dotnumber' into 'glms/feature/1.4.2'

feat(swaptrade): 收益互换界面金额固定两位小数

See merge request otc-dev/zszq-trs!5
This commit is contained in:
张名锐
2026-08-05 01:53:14 +00:00
2 changed files with 5 additions and 4 deletions
+4 -4
View File
@@ -93,10 +93,10 @@
<tr v-for="item in marginList">
<td :class="item.InterestDirection==1?'swapget':'swappay'">{{item.InterestDirection==1?"收取":"支付"}}</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="inputFormatInterestAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
</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="inputFormatInterestAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
</td>
<td>{{item.InterestClosePnL}}</td>
</tr>
@@ -121,10 +121,10 @@
<tr v-for="item in interestList">
<td :class="item.InterestDirection==1?'swapget':'swappay'">{{item.InterestDirection==1?"收取":"支付"}}</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="inputFormatInterestAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
</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="inputFormatInterestAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
</td>
<td>{{item.InterestClosePnL}}</td>
</tr>
@@ -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 inputFormatInterestAmount = Object.freeze({ precision: 2, append: '', negative: true, trimTailZeros: false });
const inputFormatDividend = Object.freeze({ precision: 2, append: '', negative: true });
const inputFormatMarginRate = Object.freeze({ precision: otcformat.trading.marginRateP.precision, append: '%' });
const inputFormatMarginRateNoPercent = Object.freeze({ precision: otcformat.trading.umpriceP.precision, append: '', percent: true });