diff --git a/YLErpWeb/Controllers/SwapTrade2Controller.cs b/YLErpWeb/Controllers/SwapTrade2Controller.cs index 232edf2e..3eceef63 100644 --- a/YLErpWeb/Controllers/SwapTrade2Controller.cs +++ b/YLErpWeb/Controllers/SwapTrade2Controller.cs @@ -78,7 +78,6 @@ namespace YLErp.Web.Controllers InitialMargin = 0 }; r.StructureType = "普通债券类收益互换"; - r.ExerciseDate = QdpCalendarHelper.GetNonHolidayDefore(r.StartDate.Value.AddDays(14), GetBestCountry(r.StartDate.Value.Year)); tradeExtendJson.FlowBookMode = (int)FlowBookModeEnum.先进先出; r.trade_extend = new trade_extend() { diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js index 857e8811..5831c53a 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js @@ -191,6 +191,13 @@ const vue = new Vue({ $("#MainProtocolCode").val(this.trade.MetaDic["主协议编号"]); $("#SupProtocolCode").val(this.trade.MetaDic["补充协议编号"]); this.initSwapRateList(); + // 初始化到期日期选择器下限 + this.$nextTick(() => { + if (this.$refs.exerciseDatePicker) { + var minDate = this.trade.StartDate > this.trade.TradeDate ? this.trade.StartDate : this.trade.TradeDate; + this.$refs.exerciseDatePicker.refresh(minDate, null); + } + }); }, methods: { getPosiPriceFormatKey(item, field) { diff --git a/YLErpWeb/wwwroot/Scripts/fast/fastVue.components.js b/YLErpWeb/wwwroot/Scripts/fast/fastVue.components.js index 7b1d84a2..7d0b0fd2 100644 --- a/YLErpWeb/wwwroot/Scripts/fast/fastVue.components.js +++ b/YLErpWeb/wwwroot/Scripts/fast/fastVue.components.js @@ -24,9 +24,9 @@ } }).datepicker({ - minDate: self.mindate, + minDate: self.mindate ? new Date(self.mindate) : null, beforeShowDay(date) { - return [(!self.maxdate || date <= new Date(self.maxdate)) && (self.noholiday || !ylotc.isHoliday(date))]; + return [(self.noholiday || !ylotc.isHoliday(date))]; }, changeMonth: true, changeYear: true,