Commit ddc31604 authored by liudong1993's avatar liudong1993

1

parent af0a1a3a
......@@ -2416,6 +2416,22 @@ namespace Mall.Module.Product
date_remark = "剩余座位数不足,请重新选择出发日期";
}
#region 线路验证
if (gmodel.CarType == GuideCarGoodsTypeEnum.Line) {
var tdlist = goods_TargetDateRepository.GetList(new RB_Goods_TargetDate_Extend() { GoodsId = item.GoodsId ?? 0, StartTime = demodel.TripSTime.Value.ToString("yyyy-MM-dd"), EndTime = demodel.TripETime.Value.ToString("yyyy-MM-dd") });
var firstModel = tdlist.OrderBy(x => x.Date).FirstOrDefault();
var endModel = tdlist.OrderByDescending(x => x.Date).FirstOrDefault();
if (endModel != null && endModel.IsReserve == 2) {
date_enable = false;
date_remark = "日期范围不在可预定的范围内,请提前日期选择";
}
if (endModel != null && endModel.IsReserve == 1 && endModel.ReserveNum > 0){
date_enable = false;
date_remark = "日期范围不在可预定的范围内,请提前日期选择";
}
}
#endregion
string SiteName = sitelist.Where(x => x.ID == gmodel.SiteId).FirstOrDefault()?.SiteName ?? "";
var guideModel = guidelist.Where(x => x.ID == gmodel.GuideId).FirstOrDefault();
string GuideName = guideModel?.Name ?? "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment