From 1458acc030208c0285116bd831a0b020faed6d00 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 11:27:37 +0800
Subject: [PATCH] =?UTF-8?q?fix(swap):=20=E4=BF=AE=E5=A4=8D=E5=B9=B3?=
=?UTF-8?q?=E4=BB=93=E4=BA=A4=E6=98=93=E7=95=8C=E9=9D=A2=E9=87=91=E9=A2=9D?=
=?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将展期界面的本金、利息、费用等字段格式化方法从inputFormatEqvNotional改为inputFormatCloseAmount
- 新增inputFormatCloseAmount格式化配置,设置精度为2位小数,支持负数显示,保留尾随零
- 统一展期界面各金额输入框的格式化规则,确保数据展示一致性
---
YLErpWeb/Views/SwapTrade2/SwapUnwind.cshtml | 10 +++++-----
.../wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js | 1 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/YLErpWeb/Views/SwapTrade2/SwapUnwind.cshtml b/YLErpWeb/Views/SwapTrade2/SwapUnwind.cshtml
index 184177a4..7f9e2ea1 100644
--- a/YLErpWeb/Views/SwapTrade2/SwapUnwind.cshtml
+++ b/YLErpWeb/Views/SwapTrade2/SwapUnwind.cshtml
@@ -120,10 +120,10 @@
{{item.InterestDirection==1?"收取":"支付"}} |
{{item.InterestModeStr}} |
-
+
|
-
+
|
{{item.InterestClosePnL}} |
@@ -160,10 +160,10 @@
{{item.InterestRate*100}}%
*@
-
+
|
-
+
|
{{item.InterestClosePnL}} |
@@ -216,7 +216,7 @@
{{deal.CloseQty}} |
-
+
我方{{floatPosition.PayDirection==1?"支付":"收取"}}交易费用
|
diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js
index c2f06e0e..169aa039 100644
--- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js
+++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js
@@ -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 inputFormatCloseAmount = Object.freeze({ precision: 2, append: '', negative: true, trimTailZeros: false });
const inputFormatMarginRate = Object.freeze({ precision: otcformat.trading.marginRateP.precision, append: '%' });
const inputFormatMarginRateNoPercent = Object.freeze({ precision: otcformat.trading.umpriceP.precision, append: '', percent: true });
const inputFormatSwapDeliveryPrice = Object.freeze({ precision: 9, append: '', negative: true });
|