fix(SwapTrade2): 到期日期默认值置空并限制不可早于成交/开始日期
- 移除新增交易时到期日期的默认值(原StartDate+14天),改为空白由用户手工填写 - 到期日期选择器增加mindate限制,不可选择早于成交日期和开始日期的日期 - 联动修正:成交日期或开始日期变化时同步刷新到期日期下限
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user