From d5837f2de8f28fd0c5e6d78eafed72adcec3bb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8D=E9=94=90?= <1565842059@qq.com> Date: Wed, 5 Aug 2026 17:52:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(swaptrade):=20=E4=BF=AE=E5=A4=8D=E5=B9=B3?= =?UTF-8?q?=E4=BB=93=E6=AF=94=E4=BE=8B=E6=98=BE=E7=A4=BA=E7=B2=BE=E5=BA=A6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整平仓比例显示精度为4位小数 - 修改掉期利率输入格式配置,设置精度为4并保留尾随零 - 确保数值显示的一致性和准确性 --- YLErpWeb/Views/SwapTrade2/TradeView.cshtml | 2 +- YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/YLErpWeb/Views/SwapTrade2/TradeView.cshtml b/YLErpWeb/Views/SwapTrade2/TradeView.cshtml index 54ed37dc..e82b88bc 100644 --- a/YLErpWeb/Views/SwapTrade2/TradeView.cshtml +++ b/YLErpWeb/Views/SwapTrade2/TradeView.cshtml @@ -714,7 +714,7 @@ else { 平仓比例 - @(tc.ClosePercent.OtcFormatPercent()) + @(tc.ClosePercent.OtcFormatPercent(4)) 平仓名义本金 @(tc.CloseNotionalValue.OtcFormat(OtcFormatFlag.StockEqvNotional)) } diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js index 66dd5ddd..27e031a7 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js @@ -1,7 +1,7 @@ //otcformat禁止千分位分组 window.otcformat.options.disableGrouping = true; -const inputFormatSwapRate = Object.freeze({ precision: otcformat.trading.premiumRateP.precision, append: '%' }); +const inputFormatSwapRate = Object.freeze({ precision: 4, append: '%', trimTailZeros: false }); 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: 2, append: '', negative: true, trimTailZeros: false });