From 269807cc4472055c9c0eb67bdf2a3c5c6525512c 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 09:52:22 +0800
Subject: [PATCH] =?UTF-8?q?feat(swaptrade):=20=E6=94=B6=E7=9B=8A=E4=BA=92?=
=?UTF-8?q?=E6=8D=A2=E7=95=8C=E9=9D=A2=E9=87=91=E9=A2=9D=E5=9B=BA=E5=AE=9A?=
=?UTF-8?q?=E4=B8=A4=E4=BD=8D=E5=B0=8F=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 新增 inputFormatInterestAmount 配置对象,精度为2位小数,支持负数显示和尾随零保留
- 在保证金列表中将 InterestAmount 和 InterestFee 字段的格式化从 inputFormatEqvNotional 替换为 inputFormatInterestAmount
- 在利息列表中将 InterestAmount 和 InterestFee 字段的格式化从 inputFormatEqvNotional 替换为 inputFormatInterestAmount
- 保持原有的双向数据绑定和事件监听功能不变
---
YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml | 8 ++++----
YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml b/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml
index 0e702cde..eae9270a 100644
--- a/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml
+++ b/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml
@@ -93,10 +93,10 @@
| {{item.InterestDirection==1?"收取":"支付"}} |
-
+
|
-
+
|
{{item.InterestClosePnL}} |
@@ -121,10 +121,10 @@
| {{item.InterestDirection==1?"收取":"支付"}} |
-
+
|
-
+
|
{{item.InterestClosePnL}} |
diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js
index 2159db48..379e53ba 100644
--- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js
+++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.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 inputFormatInterestAmount = Object.freeze({ precision: 2, append: '', negative: true, trimTailZeros: false });
const inputFormatDividend = Object.freeze({ precision: 2, append: '', negative: true });
const inputFormatMarginRate = Object.freeze({ precision: otcformat.trading.marginRateP.precision, append: '%' });
const inputFormatMarginRateNoPercent = Object.freeze({ precision: otcformat.trading.umpriceP.precision, append: '', percent: true });