diff --git a/Framework/YLErp.Core/DBModels/SwapPosition.cs b/Framework/YLErp.Core/DBModels/SwapPosition.cs index bcc18c36..44fb89d9 100644 --- a/Framework/YLErp.Core/DBModels/SwapPosition.cs +++ b/Framework/YLErp.Core/DBModels/SwapPosition.cs @@ -246,6 +246,10 @@ namespace YLErp.DBModels /// public int? interest_rule { get; set; } /// + /// 利息端类别 + /// + public string category_tag { get; set; } + /// /// 互换观察日集合 /// [NotMapped] diff --git a/YLErpDAL/Modules/SwapModule/SwapTradeService.cs b/YLErpDAL/Modules/SwapModule/SwapTradeService.cs index d5c04664..2f8caedf 100644 --- a/YLErpDAL/Modules/SwapModule/SwapTradeService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapTradeService.cs @@ -1377,6 +1377,7 @@ namespace YLErp.Modules.SwapModule position.FloatRateUnderlyingCode = swap.FloatRateUnderlyingCode; position.interest_rest_days = swap.interest_rest_days; position.interest_rule = swap.interest_rule; + position.category_tag = string.IsNullOrEmpty(swap.category_tag) ? "互换利率" : swap.category_tag; position.InitYtm = swap.InitYtm; if (swap.InitYtm != null && swap.InitYtm > 0) { diff --git a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml index 50d78b66..9776cec2 100644 --- a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml +++ b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml @@ -21,6 +21,7 @@ var jsTraders = canAddNewTrader ? JsDataModel.GetTraders(assetunits) : Enumerable.Empty(); var jsTrader = canAddNewTrader && Model.TraderId > 0 ? jsTraders.FirstOrDefault(n => n.id == Model.TraderId) : null; var currencys = CurrencyController.getList(); + var categoryTagOptions = DictionaryBLL.GetList("利息端类别", false, "互换利率"); List places = new List(); List agencys = new List(); var tradingPlaceMap = YLErp.DBModels.Consts.ConsReport.TradingPlaceMapDisplay; @@ -362,6 +363,7 @@ 计息方式 重置频率(天) 利率准则 + 类别 结算规则 @@ -412,6 +414,14 @@ + + + diff --git a/YLErpWeb/Views/SwapTrade2/TradeView.cshtml b/YLErpWeb/Views/SwapTrade2/TradeView.cshtml index 5b2e1e92..9172e401 100644 --- a/YLErpWeb/Views/SwapTrade2/TradeView.cshtml +++ b/YLErpWeb/Views/SwapTrade2/TradeView.cshtml @@ -304,6 +304,7 @@ 计息方式 重置频率(天) 利率准则 + 类别 结算规则 @if (trade.swap_positions != null) @@ -348,6 +349,7 @@ @item.interest_rest_days @((item.interest_rule != null) ? (SwapInterestRule)item.interest_rule : "") + @(string.IsNullOrEmpty(item.category_tag) ? "互换利率" : item.category_tag) @@ -508,6 +510,7 @@ 计息方式 重置频率(天) 利率准则 + 类别 结算规则 @{ @@ -549,6 +552,7 @@ @(item.InterestType == 0 ? "单利" : "复利") @item.interest_rest_days @((item.interest_rule != null) ? (SwapInterestRule)item.interest_rule : "") + @(string.IsNullOrEmpty(item.category_tag) ? "互换利率" : item.category_tag) } diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js index dc726ce2..eed5a34f 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js @@ -1289,6 +1289,7 @@ const vue = new Vue({ thisObj.getSwapList = thisObj.trade.swap_positions.filter(x => { if ((x.UnderlyingCode == null || x.UnderlyingCode.length == 0) && x.IsInitial && (x.InterestMode == 1 || x.InterestMode == 2 || x.InterestMode == 7 || x.InterestMode == 8 || x.InterestMode == 9)) return x; }); thisObj.getSwapList.forEach((val, num, arr) => { arr[num].index = num; + arr[num].category_tag = arr[num].category_tag || '互换利率'; // 解析 InterestSwapInterval 为 SwapIntervalList if (arr[num].InterestSwapInterval && !arr[num].SwapIntervalList) { try { @@ -1368,7 +1369,8 @@ const vue = new Vue({ HappenDate: null,//发生日期, Currency: 'CNY',//币种 interest_rest_days: 7,//重置频率 - interest_rule: null//利率准则 + interest_rule: null,//利率准则 + category_tag: '互换利率'//类别 } thisObj.getSwapList.push(getSwap); },