From de0e7f791b7479259e62b6f2ca696ff5ed162d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=A6=E9=BA=9F=20=E7=8E=8B?= Date: Thu, 2 Jul 2026 20:46:58 +0800 Subject: [PATCH] =?UTF-8?q?BugFix=20=E8=AE=A1=E7=AE=97=E4=B8=AD=E9=83=BD?= =?UTF-8?q?=E4=BD=BF=E7=94=A8GrossPrice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js index 87903971..019e302f 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js @@ -17,7 +17,8 @@ const vue = new Vue({ interestList: [], marginList: [], multiplier: 1, - initPosiNetPrice: 0 + initPosiNetPrice: 0, + initPosiGrossPrice:0 }, computed: { maxUnwindDate() { @@ -42,9 +43,10 @@ const vue = new Vue({ }); this.floatPosition = positions[0]; this.initPosiNetPrice = this.floatPosition.PosiNetPrice; + this.initPosiGrossPrice = this.floatPosition.PosiGrossPrice; // 互换标的价格固定为期初净价,与平仓不同不需要用户填写 // 期初净价入库为相对价(如1.02),需转换为界面百分比形态(102),与平仓页保持一致 - this.floatPosition.TradingAmountAvg = this.initPosiNetPrice * this.multiplier; + this.floatPosition.TradingAmountAvg = this.initPosiGrossPrice * this.multiplier; this.interestList = model.FlowEvents.filter((item) => { return item.InterestMode == 1 || item.InterestMode == 2 || item.InterestMode == 7 || item.InterestMode == 8 || item.InterestMode == 9; }); @@ -130,7 +132,8 @@ const vue = new Vue({ let TradingFeePending = thisObj.floatPosition.TradingFeePending == "" ? 0 : parseFloat(thisObj.floatPosition.TradingFeePending); let DividendIn = thisObj.floatPosition.DividendIn == "" ? 0 : parseFloat(thisObj.floatPosition.DividendIn ?? 0); let scale = thisObj.getPriceScale(); - thisObj.floatPosition.MarkClosePnl = thisObj.deal.CloseNotionalValue * (thisObj.floatPosition.TradingAmountAvg * scale - thisObj.initPosiNetPrice) * floatRatio; + //thisObj.floatPosition.MarkClosePnl = thisObj.deal.CloseNotionalValue * (thisObj.floatPosition.TradingAmountAvg * scale - thisObj.initPosiNetPrice) * floatRatio; + thisObj.floatPosition.MarkClosePnl = thisObj.deal.CloseNotionalValue * (thisObj.floatPosition.TradingAmountAvg * scale - thisObj.initPosiGrossPrice) * floatRatio; thisObj.floatPosition.MarkClosePnl = otcformat.trading.StockEqvNotional(thisObj.floatPosition.MarkClosePnl);//MarkClosePnl 纯盯市不要计算交易费用和分红 thisObj.floatPosition.FloatPnlSum = (parseFloat(thisObj.floatPosition.MarkClosePnl) + TradingFee + TradingFeePending + DividendIn).toFixed(2); thisObj.calcCloseAmount();