From bf6b27ba19e498cf338f0fc646b7e3af322f7c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8D=E9=94=90?= <1565842059@qq.com> Date: Mon, 27 Jul 2026 13:17:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(swaptrade):=20=E4=BA=92=E6=8D=A2=E5=BC=80?= =?UTF-8?q?=E5=B9=B3=E4=BB=93=E4=BA=8B=E4=BB=B6=E6=B5=81=E6=B0=B4=20?= =?UTF-8?q?=E5=B0=8F=E6=95=B0=E7=82=B9=E7=B2=BE=E5=BA=A6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将事件列表中的价格字段格式化统一为两位小数或九位小数 - 替换原有的otcformat.trading.umprice格式化方法 - 在前端JavaScript中添加EventTwoDecimalFormat和EventNineDecimalFormat函数 - 修改后端C#代码中的OtcFormat调用改为OtcFormatMoney并调整精度参数 - 为事件列表脚本添加版本参数以确保缓存更新 --- .../Modules/SwapModule/SwapFlowService.cs | 16 +++---- YLErpWeb/Views/SwapTrade2/EventList.cshtml | 4 +- .../Scripts/app/swaptrade/eventlist.js | 44 ++++++++++++------- 3 files changed, 38 insertions(+), 26 deletions(-) diff --git a/YLErpDAL/Modules/SwapModule/SwapFlowService.cs b/YLErpDAL/Modules/SwapModule/SwapFlowService.cs index 430a5e53..30a40623 100644 --- a/YLErpDAL/Modules/SwapModule/SwapFlowService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapFlowService.cs @@ -372,16 +372,16 @@ namespace YLErp.Modules.SwapModule exportModel.PositionType = item.PositionType==1?"多头":"空头"; exportModel.UnderlyingCode = item.UnderlyingCode; exportModel.MatuirityDate = item.MatuirityDate.OtcFormatDate(); - exportModel.TradingAmountAvg = item.TradingAmountAvg.OtcFormat(OtcFormatFlag.umprice); - exportModel.TradingAmountFeeAvg = item.TradingAmountFeeAvg.OtcFormat(OtcFormatFlag.umprice); + exportModel.TradingAmountAvg = item.TradingAmountAvg.OtcFormatMoney(grouping: false); + exportModel.TradingAmountFeeAvg = item.TradingAmountFeeAvg.OtcFormatMoney(grouping: false); exportModel.Quantity = item.Quantity.OtcFormatMoney(false, 4); - exportModel.TradingAmount = item.TradingAmount.OtcFormatMoney(false, 4); + exportModel.TradingAmount = item.TradingAmount.OtcFormatMoney(false, 2); exportModel.ContractSize = item.ContractSize.ToString(); - exportModel.TradingFee = item.TradingFee.OtcFormatMoney(false, 4); - exportModel.TradingFeePending = item.TradingFeePending.OtcFormatMoney(false, 4); - exportModel.DividendPending = item.DividendPending.OtcFormatMoney(false, 4); - exportModel.MarkClosePnl = item.MarkClosePnl.OtcFormatMoney(false, 4); - exportModel.DividendIn = item.DividendIn.OtcFormatMoney(false, 4); + exportModel.TradingFee = item.TradingFee.OtcFormatMoney(false, 2); + exportModel.TradingFeePending = item.TradingFeePending.OtcFormatMoney(false, 2); + exportModel.DividendPending = item.DividendPending.OtcFormatMoney(false, 2); + exportModel.MarkClosePnl = item.MarkClosePnl.OtcFormatMoney(false, 2); + exportModel.DividendIn = item.DividendIn.OtcFormatMoney(false, 2); exportModel.OptLog = item.OptLog; exportModel.InitYtm = item.InitYtm; list.Add(exportModel); diff --git a/YLErpWeb/Views/SwapTrade2/EventList.cshtml b/YLErpWeb/Views/SwapTrade2/EventList.cshtml index cfbe53fc..c3905e38 100644 --- a/YLErpWeb/Views/SwapTrade2/EventList.cshtml +++ b/YLErpWeb/Views/SwapTrade2/EventList.cshtml @@ -12,7 +12,7 @@ - + }