diff --git a/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看多】-【债券ETF】-清洁版.docx b/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看多】-【债券ETF】-清洁版.docx index 8719402e..61f0b939 100644 Binary files a/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看多】-【债券ETF】-清洁版.docx and b/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看多】-【债券ETF】-清洁版.docx differ diff --git a/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看多】-【现券】-清洁版.docx b/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看多】-【现券】-清洁版.docx index 83c478c8..6f29a29e 100644 Binary files a/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看多】-【现券】-清洁版.docx and b/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看多】-【现券】-清洁版.docx differ diff --git a/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看空】-【债券ETF】-清洁版.docx b/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看空】-【债券ETF】-清洁版.docx index e60e2ce2..b48ba6cf 100644 Binary files a/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看空】-【债券ETF】-清洁版.docx and b/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看空】-【债券ETF】-清洁版.docx differ diff --git a/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看空】-【现券】-清洁版.docx b/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看空】-【现券】-清洁版.docx index ed0f6197..7b46d112 100644 Binary files a/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看空】-【现券】-清洁版.docx and b/Plugins/YLErp.Plugins.GuoLian/App_Docs/contract_template/国联民生-收益互换交易确认书-境内模板-【客户看空】-【现券】-清洁版.docx differ diff --git a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml index 4133bbc4..a6ee5d02 100644 --- a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml +++ b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml @@ -1,4 +1,5 @@ @using YLErp.Web.Models.JsModels; +@using YLErp.Commons; @model trade @{ ViewBag.Title = "交易信息 | 编辑"; @@ -30,6 +31,24 @@ { agencys.Add(item.Key); } + var otcFormatConfig = new + { + StockEqvNotional = new + { + precision = OtcFormatHelper.FormatModel.trading.StockEqvNotional.precision, + minDecimals = OtcFormatHelper.FormatModel.trading.StockEqvNotional.minDecimals, + maxDecimals = OtcFormatHelper.FormatModel.trading.StockEqvNotional.maxDecimals + }, + // 如果需要其他格式,可以继续添加 + notional = new + { + precision = OtcFormatHelper.FormatModel.trading.notional.precision + }, + tradePrice = new + { + precision = OtcFormatHelper.FormatModel.trading.tradePrice.precision + } + }; var pageObj = new { isAdd, @@ -56,7 +75,8 @@ securitiesEnvironment = PS.Config.ErpElement.SecuritiesEnvironment, tradingPlaceMap = places, clearingAgencyMap = agencys, - timeUnits = GlobalData.AllTimeUnits() + timeUnits = GlobalData.AllTimeUnits(), + otcFormatConfig = otcFormatConfig }; //pageObj.clearingAgencyMap.Remove("甲方"); //pageObj.clearingAgencyMap.Remove("已方"); diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js index e71b9f5a..bd63138b 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js @@ -234,7 +234,7 @@ const vue = new Vue({ if (this.paySwapList.length > 0) { var item = this.paySwapList[0]; var notional = item.PosiGrossPrice * item.ContractSize; - item.PosiQuantity = notional == 0 ? 0 : this.trade.StockEqvNotional / notional; + item.PosiQuantity = notional == 0 ? 0 : _.round(this.trade.StockEqvNotional / notional, page.otcFormatConfig.StockEqvNotional.precision); this.calcNotional(); } diff --git a/YLErpWeb/wwwroot/Scripts/app/trade/forwardTradeEditV2.js b/YLErpWeb/wwwroot/Scripts/app/trade/forwardTradeEditV2.js index fbe333b7..e93a9764 100644 --- a/YLErpWeb/wwwroot/Scripts/app/trade/forwardTradeEditV2.js +++ b/YLErpWeb/wwwroot/Scripts/app/trade/forwardTradeEditV2.js @@ -606,15 +606,15 @@ var vue = new Vue({ }, //变更交易手数 changeLots() { - this.trade.Notional = this.trade.Lots * this.viewState.underlying.ContractSize; + this.trade.Notional = consFormat.notional(this.trade.Lots * this.viewState.underlying.ContractSize); this.trade.OriginalNotional = this.trade.Notional; - this.trade.TradeAmount = this.trade.Notional / this.viewState.underlying.CountRatio; + this.trade.TradeAmount = consFormat.notional(this.trade.Lots * this.viewState.underlying.ContractSize / this.viewState.underlying.CountRatio); this.resetTradePrice(true); }, //变更交易数量 changeTradeAmount() { - this.trade.Lots = this.trade.TradeAmount * this.viewState.underlying.CountRatio / this.viewState.underlying.ContractSize; - this.trade.Notional = this.trade.Lots * this.viewState.underlying.ContractSize; + this.trade.Lots = _.round(this.trade.TradeAmount * this.viewState.underlying.CountRatio / this.viewState.underlying.ContractSize, InputFormatLots.precision); + this.trade.Notional = consFormat.notional(this.trade.TradeAmount * this.viewState.underlying.CountRatio); this.trade.OriginalNotional = this.trade.Notional; this.resetTradePrice(true); }, @@ -711,9 +711,9 @@ var vue = new Vue({ let SpotPrice1 = parseFloat(this.trade.SpotPrice1 || 0); let SpotPrice2 = parseFloat(this.trade.SpotPrice2 || 0); if (SpotPrice1 > SpotPrice2) { - this.trade.StockEqvNotional = this.trade.SpotPrice1 * this.trade.Notional; + this.trade.StockEqvNotional = consFormat.StockEqvNotional(this.trade.SpotPrice1 * this.trade.Notional); } else { - this.trade.StockEqvNotional = this.trade.SpotPrice2 * this.trade.Notional; + this.trade.StockEqvNotional = consFormat.StockEqvNotional(this.trade.SpotPrice2 * this.trade.Notional); } } },