修复互换收益结算期末价被错误缩放及显示问题

a00fe3cc合并etf分支时,误把initDeal中TradingAmountAvg的×100缩放去掉,
导致期末标的价格停留在相对价态(1.02),提交时又被getPriceScale()÷100,
最终swap_flow_event.TradingAmountAvg入库为0.0102,且盈亏计算错误。

对齐平仓页(unwindSwapTrade.js)的正确实现:
- initDeal: TradingAmountAvg = initPosiNetPrice × multiplier 转为界面百分比态
- SwapIncome表格期末价列: 不再经过priceFormat(避免二次×100),直接显示界面态值
This commit is contained in:
hjhan
2026-06-25 14:04:54 +08:00
parent 0514e34e13
commit 20ea93d89c
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -154,7 +154,7 @@
<td>{{priceFormat(floatPosition.PosiGrossPrice)}}</td>
<td v-if="deal.StructureType!='普通收益互换'">{{priceFormat(floatPosition.TradingAmountNetAvg)}}</td>
<td>
{{priceFormat(floatPosition.TradingAmountAvg)}}
{{floatPosition.TradingAmountAvg}}
</td>
<td>{{floatPosition.Quantity}}</td>
<td>
@@ -43,7 +43,8 @@ const vue = new Vue({
this.floatPosition = positions[0];
this.initPosiNetPrice = this.floatPosition.PosiNetPrice;
// 互换标的价格固定为期初净价,与平仓不同不需要用户填写
this.floatPosition.TradingAmountAvg = this.initPosiNetPrice;
// 期初净价入库为相对价(如1.02),需转换为界面百分比形态(102),与平仓页保持一致
this.floatPosition.TradingAmountAvg = this.initPosiNetPrice * this.multiplier;
this.interestList = model.FlowEvents.filter((item) => {
return item.InterestMode == 1 || item.InterestMode == 2 || item.InterestMode == 7 || item.InterestMode == 8 || item.InterestMode == 9;
});