From 20ea93d89ce231a336f44c73b601c282f61640d3 Mon Sep 17 00:00:00 2001 From: hjhan Date: Thu, 25 Jun 2026 13:57:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=92=E6=8D=A2=E6=94=B6?= =?UTF-8?q?=E7=9B=8A=E7=BB=93=E7=AE=97=E6=9C=9F=E6=9C=AB=E4=BB=B7=E8=A2=AB?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=BC=A9=E6=94=BE=E5=8F=8A=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a00fe3cc合并etf分支时,误把initDeal中TradingAmountAvg的×100缩放去掉, 导致期末标的价格停留在相对价态(1.02),提交时又被getPriceScale()÷100, 最终swap_flow_event.TradingAmountAvg入库为0.0102,且盈亏计算错误。 对齐平仓页(unwindSwapTrade.js)的正确实现: - initDeal: TradingAmountAvg = initPosiNetPrice × multiplier 转为界面百分比态 - SwapIncome表格期末价列: 不再经过priceFormat(避免二次×100),直接显示界面态值 --- YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml | 2 +- YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml b/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml index 7ff430fd..d86d8631 100644 --- a/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml +++ b/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml @@ -154,7 +154,7 @@ {{priceFormat(floatPosition.PosiGrossPrice)}} {{priceFormat(floatPosition.TradingAmountNetAvg)}} - {{priceFormat(floatPosition.TradingAmountAvg)}} + {{floatPosition.TradingAmountAvg}} {{floatPosition.Quantity}} diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js index 9cdd68fa..2293b45b 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js @@ -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; });