From 570d1339f10e289c7eb92bdce9a5098fb96ebf6d Mon Sep 17 00:00:00 2001 From: tengyufan <1532636164@qq.com> Date: Wed, 1 Jul 2026 15:33:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(SwapTrade2):=20=E5=88=B0=E6=9C=9F=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E9=BB=98=E8=AE=A4=E5=80=BC=E7=BD=AE=E7=A9=BA=E5=B9=B6?= =?UTF-8?q?=E9=99=90=E5=88=B6=E4=B8=8D=E5=8F=AF=E6=97=A9=E4=BA=8E=E6=88=90?= =?UTF-8?q?=E4=BA=A4/=E5=BC=80=E5=A7=8B=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除新增交易时到期日期的默认值(原StartDate+14天),改为空白由用户手工填写 - 到期日期选择器增加mindate限制,不可选择早于成交日期和开始日期的日期 - 联动修正:成交日期或开始日期变化时同步刷新到期日期下限 --- YLErpWeb/Controllers/SwapTrade2Controller.cs | 1 - YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js | 7 +++++++ YLErpWeb/wwwroot/Scripts/fast/fastVue.components.js | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) 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,