diff --git a/YLErpDAL/Modules/SwapModule/SwapTradeService.cs b/YLErpDAL/Modules/SwapModule/SwapTradeService.cs index 332873f5..a62a6c4f 100644 --- a/YLErpDAL/Modules/SwapModule/SwapTradeService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapTradeService.cs @@ -771,10 +771,6 @@ namespace YLErp.Modules.SwapModule { var client = PrepareBaseTradeClient(req); - if (req.StructureType != ClientMarginTypeEnum.多空组合.ToString() && _underlying.CalcTypeIsStock() && ((client.TradingInstType & TradingInstTypeEnum.Equity) != TradingInstTypeEnum.Equity)) - { - throw new ServiceException($"客户'{client.Name}'的'交易资产'属性不包括'权益',不能进行收益互换交易"); - } if (client.EvaluateExpireDate < req.TradeDate) { throw new ServiceException("适当性评估已经过期,只有在适当性有效期内才可以新开仓"); diff --git a/YLErpDAL/Modules/UnderlyingModule/UnderlyingDalService.cs b/YLErpDAL/Modules/UnderlyingModule/UnderlyingDalService.cs index d9af5ba0..22011d3c 100644 --- a/YLErpDAL/Modules/UnderlyingModule/UnderlyingDalService.cs +++ b/YLErpDAL/Modules/UnderlyingModule/UnderlyingDalService.cs @@ -435,7 +435,7 @@ namespace YLErp.Modules.UnderlyingModule dbModel.MarketCode = string.IsNullOrWhiteSpace(dbModel.MarketName) ? "" : DataCacheProvider.GetMarketDataSource().AsQueryable().FirstOrDefault(n => n.MarketName == dbModel.MarketName)?.ExchangeNo; } - if (dbModel.ContractSize <= 1) + if (dbModel.ContractSize < 1) { dbModel.ContractSize = variety.TradeUnitValue > 0 ? variety.TradeUnitValue.Value : 1; } diff --git a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml index 6a395497..45a1b9e7 100644 --- a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml +++ b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml @@ -420,13 +420,13 @@ - + - + - + {{item.underlying!=null?item.underlying.QuoteUnitString:''}} @@ -601,4 +601,4 @@ - \ No newline at end of file + diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js index 9922fb2e..603340c3 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js @@ -177,6 +177,16 @@ const vue = new Vue({ this.initSwapRateList(); }, methods: { + getPosiPriceFormat(item) { + return tradeHelper.IsBond(item && item.UnderlyingInstrumentType) + ? inputFormatMarginRateNoPercent + : inputFormatTradeSinglePrice; + }, + getPosiPriceFormatKey(item, field) { + const index = item && item.index != null ? item.index : ''; + const isBond = tradeHelper.IsBond(item && item.UnderlyingInstrumentType); + return `${index}-${field}-${isBond ? 'bond' : 'other'}`; + }, changeStructureType() { this.trade.StockEqvNotional = 0; //this.trade.trade_extend.ExtendObj.FlowBookMode = 0; @@ -529,7 +539,7 @@ const vue = new Vue({ .done(function (resp) { item.PosiNetNoFeePrice = otcformat.trading.umprice(resp.obj.netPrice); item.PosiGrossPrice = otcformat.trading.umprice(resp.obj.price); - thisObj.changeStockEqvNotional(); + thisObj.calcNotional(); }); }, //年化利率变更同步修改 同行观察日利率 @@ -1544,4 +1554,4 @@ $(function () { $(this).datepicker("setDate", dateVal); }); -}); \ No newline at end of file +});