/// <summary> /// 栏目权限判断 /// </summary> protected void PowerControl(EyouSoft.Model.EnumType.TourStructure.TourType tourType) { EyouSoft.Model.EnumType.PrivsStructure.Privs menuPrivs = (EyouSoft.Model.EnumType.PrivsStructure.Privs)Utils.GetInt(Utils.GetQueryStringValue("sl")); if (menuPrivs == EyouSoft.Model.EnumType.PrivsStructure.Privs.业分销_订单中心_栏目 || menuPrivs == EyouSoft.Model.EnumType.PrivsStructure.Privs.业分销_收客计划_栏目) { if (menuPrivs == EyouSoft.Model.EnumType.PrivsStructure.Privs.业分销_订单中心_栏目) { if (!CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.业分销_订单中心_栏目)) { Utils.ResponseNoPermit(EyouSoft.Model.EnumType.PrivsStructure.Privs.业分销_订单中心_栏目, true); return; } } else { if (!CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.业分销_收客计划_栏目)) { Utils.ResponseNoPermit(EyouSoft.Model.EnumType.PrivsStructure.Privs.业分销_收客计划_栏目, true); return; } } } else { switch (tourType) { case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼: if (!CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.组团团队_组团散拼_订单报名)) { Utils.ResponseNoPermit(EyouSoft.Model.EnumType.PrivsStructure.Privs.组团团队_组团散拼_订单报名, true); return; } break; case EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼: if (!CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.地接团队_组团散拼_订单报名)) { Utils.ResponseNoPermit(EyouSoft.Model.EnumType.PrivsStructure.Privs.地接团队_组团散拼_订单报名, true); return; } break; case EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼: if (!CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.出境团队_组团散拼_订单报名)) { Utils.ResponseNoPermit(EyouSoft.Model.EnumType.PrivsStructure.Privs.出境团队_组团散拼_订单报名, true); return; } break; default: Utils.ResponseGoBack(); break; } } }
/// <summary> /// 计划类型 /// </summary> /// <param name="type"></param> /// <returns></returns> protected bool GetTourType(EyouSoft.Model.EnumType.TourStructure.TourType type) { bool ret = true; if (type == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼 || type == EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼 || type == EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼) { ret = false; } return(ret); }
/// <summary> /// 是否是单项服务 /// </summary> /// <param name="tourtype"></param> /// <returns></returns> public bool isSingle(object tourtype) { EyouSoft.Model.EnumType.TourStructure.TourType tourType = (EyouSoft.Model.EnumType.TourStructure.TourType)tourtype; if (tourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { return(true); } else { return(false); } }
/// <summary> /// init info /// </summary> void InitInfo() { var info = new EyouSoft.BLL.TourStructure.BTour().GetTourInfo(TourId); if (info == null) { RCWE("异常请求"); } ltrTourCode.Text = info.TourCode; TourType = info.TourType; }
/// <summary> /// 通过收客状态返回html /// </summary> /// <param name="tourId"></param> /// <param name="state"></param> /// <param name="sourceId"></param> /// <param name="isCheck"></param> /// <returns></returns> protected string GetHtmlByShouKeState(object tourId, object state, object sourceId, object isCheck, object tourStatus, object tourType) { StringBuilder sb = new StringBuilder(); bool c = isCheck == null ? false : (bool)isCheck; EyouSoft.Model.EnumType.TourStructure.TourShouKeStatus skState = (EyouSoft.Model.EnumType.TourStructure.TourShouKeStatus)state; EyouSoft.Model.EnumType.TourStructure.TourStatus tStatus = (EyouSoft.Model.EnumType.TourStructure.TourStatus)((int)tourStatus); EyouSoft.Model.EnumType.TourStructure.TourType tType = (EyouSoft.Model.EnumType.TourStructure.TourType)tourType; if (tStatus != EyouSoft.Model.EnumType.TourStructure.TourStatus.封团 && tStatus != EyouSoft.Model.EnumType.TourStructure.TourStatus.已取消) { switch (skState) { case EyouSoft.Model.EnumType.TourStructure.TourShouKeStatus.报名中: case EyouSoft.Model.EnumType.TourStructure.TourShouKeStatus.手动客满: case EyouSoft.Model.EnumType.TourStructure.TourShouKeStatus.手动停收: if (tType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼短线) { if (sourceId != null && sourceId.ToString().Trim() != "" && c) { sb.Append("<a onclick='SanPinList.OpenBaoMing(this);return false;' href='/TeamCenter/ShortSanKeBaoMing.aspx?tourID=" + tourId.ToString() + "&sl=" + Utils.GetQueryStringValue("sl") + "'>" + skState.ToString() + "</a>"); } if (sourceId == null || sourceId.ToString().Trim() == "") { sb.Append("<a onclick='SanPinList.OpenBaoMing(this);return false;' href='/TeamCenter/ShortSanKeBaoMing.aspx?tourID=" + tourId.ToString() + "&sl=" + Utils.GetQueryStringValue("sl") + "'>" + skState.ToString() + "</a>"); } } else { if (sourceId != null && sourceId.ToString().Trim() != "" && c) { sb.Append("<a onclick='SanPinList.OpenBaoMing(this);return false;' href='/TeamCenter/SanKeBaoMing.aspx?tourID=" + tourId.ToString() + "&sl=" + Utils.GetQueryStringValue("sl") + "'>" + skState.ToString() + "</a>"); } if (sourceId == null || sourceId.ToString().Trim() == "") { sb.Append("<a onclick='SanPinList.OpenBaoMing(this);return false;' href='/TeamCenter/SanKeBaoMing.aspx?tourID=" + tourId.ToString() + "&sl=" + Utils.GetQueryStringValue("sl") + "'>" + skState.ToString() + "</a>"); } } break; default: sb.Append("<b class='fontred' data-class='tingshou'>" + skState.ToString() + "</b>"); break; } } if (IsBaoMing) { return(sb.ToString()); } else { return("无权报名"); } }
/// <summary> /// 获取计划状态 /// </summary> /// <param name="tourType">团队类型</param> /// <param name="tourStatus">状态</param> /// <returns></returns> protected string GetTourStatus(object tourType, object tourStatus) { string s = string.Empty; if (tourType == null || tourStatus == null) { return(string.Empty); } EyouSoft.Model.EnumType.TourStructure.TourType _tourType = (EyouSoft.Model.EnumType.TourStructure.TourType)tourType; EyouSoft.Model.EnumType.TourStructure.TourStatus _tourStatus = (EyouSoft.Model.EnumType.TourStructure.TourStatus)tourStatus; if (_tourType != EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { return(_tourStatus.ToString()); } switch (_tourStatus) { case EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划: s = "操作中"; break; case EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置完毕: s = "已落实"; break; case EyouSoft.Model.EnumType.TourStructure.TourStatus.待终审: s = "待终审"; break; case EyouSoft.Model.EnumType.TourStructure.TourStatus.财务核算: s = "财务核算"; break; case EyouSoft.Model.EnumType.TourStructure.TourStatus.封团: s = "核算结束"; break; default: s = _tourStatus.ToString(); break; } return(s); }
/// <summary> /// 获取订单报价信息 /// </summary> /// <param name="tourType">团队类型</param> /// <param name="keHuLevName">客户等级名称</param> /// <param name="baoJiaBiaoZhunName">报价标准名称</param> /// <returns></returns> protected string GetBaoJiaInfo(object tourType, object keHuLevName, object baoJiaBiaoZhunName) { string s = string.Empty; EyouSoft.Model.EnumType.TourStructure.TourType _tourType = (EyouSoft.Model.EnumType.TourStructure.TourType)tourType; if (_tourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼 || _tourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼 || _tourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼 || _tourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼短线) { if (baoJiaBiaoZhunName != null) { s += "标准:" + baoJiaBiaoZhunName.ToString() + " "; } if (keHuLevName != null) { s += "等级:" + keHuLevName.ToString(); } } return(s); }
private void PageInit(string tourid, string type) { this.txtsourcename.Text = SiteUserInfo.CompanyName; this.txtname.Text = SiteUserInfo.Name; this.txttel.Text = SiteUserInfo.Telephone; this.txtfax.Text = SiteUserInfo.Fax; //团实体 EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.TourStructure.MTourSanPinInfo model = null; EyouSoft.Model.EnumType.TourStructure.TourType tourtype = bll.GetTourType(tourid); switch (tourtype) { case EyouSoft.Model.EnumType.TourStructure.TourType.出境团队: case EyouSoft.Model.EnumType.TourStructure.TourType.地接团队: case EyouSoft.Model.EnumType.TourStructure.TourType.组团团队: //跳转到团队打印单 EyouSoft.BLL.ComStructure.BComSetting bcom = new EyouSoft.BLL.ComStructure.BComSetting(); Response.Redirect(bcom.GetPrintUri(this.SiteUserInfo.CompanyId, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.团队行程单) + "?tourId=" + tourid); break; case EyouSoft.Model.EnumType.TourStructure.TourType.单项服务: this.TSelfProject.Visible = false; this.TService.Visible = false; this.TShopping.Visible = false; this.TWarmRemind.Visible = false; return; } if (type == "") { model = (EyouSoft.Model.TourStructure.MTourSanPinInfo)bll.GetTourInfo(tourid); } else { model = (EyouSoft.Model.TourStructure.MTourSanPinInfo)bll.GetOldTourInfo(tourid, this.SiteUserInfo.CompanyId); } this.lbTourCode.Text = model.TourCode; this.lbRouteName.Text = model.RouteName; if (model != null) { #region 行程 IList <EyouSoft.Model.TourStructure.MPlanBaseInfo> planinfo = model.TourPlan.OrderBy(m => m.Days).ToList(); if (planinfo != null && planinfo.Count > 0) { StringBuilder strAllDateInfo = new StringBuilder(); string Dinner = string.Empty;//包餐(早、中、晚) foreach (EyouSoft.Model.TourStructure.MPlanBaseInfo Plan in planinfo) { if (Plan.Breakfast) { Dinner += "早、"; } if (Plan.Lunch) { Dinner += "中、"; } if (Plan.Supper) { Dinner += "晚、"; } string riQi = "第" + Plan.Days + "天 "; if (model.LDate.HasValue) { riQi += model.LDate.Value.AddDays(Plan.Days - 1).ToString("yyyy-MM-dd"); } strAllDateInfo.AppendFormat("<table width='696' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td width='35%' class='small_title'><b class='font16'>{0} {6}</b></td><td width='15%' class='small_title'><b class='font14'>交通:{1}</b></td><td width='20%' class='small_title'><b class='font14'>餐:{2}</b></td><td width='30%' class='small_title'><b class='font14'>住宿:{3}</b></td></tr></table><table width='696' border='0' align='center' cellpadding='0' cellspacing='0' class='list_2' style='margin-top:0px;'><tr><td class='td_text' style='border-top:none;' width='{7}'>{4}</td>{5}</tr></table>", riQi, Plan.Traffic, Dinner, Plan.Hotel, Plan.Content, string.IsNullOrEmpty(Plan.FilePath) ? "" : "<td style='border-top:none;'><img src='http://" + Request.Url.Authority + Plan.FilePath + "' width='202' height='163' /></td>", Plan.Section, string.IsNullOrEmpty(Plan.FilePath) ? "100%" : "480px"); Dinner = string.Empty; } this.lbtourplan.Text = strAllDateInfo.ToString(); } #endregion #region 线路特色 if (string.IsNullOrEmpty(model.PlanFeature)) { this.TPlanFeature.Visible = false; } else { this.lbPlanFeature.Text = model.PlanFeature; } #endregion #region 计划服务 if (model.TourService != null) { #region 务标准 if (string.IsNullOrEmpty(model.TourService.ServiceStandard)) { this.TService.Visible = false; } else { this.lbService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard); } #endregion #region 务不含 if (string.IsNullOrEmpty(model.TourService.NoNeedItem)) { this.TNoService.Visible = false; } else { this.lbnoService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NoNeedItem); } #endregion #region 购物安排 if (string.IsNullOrEmpty(model.TourService.ShoppingItem)) { this.TShopping.Visible = false; } else { this.lbshopping.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ShoppingItem); } #endregion #region 儿童安排 if (string.IsNullOrEmpty(model.TourService.ChildServiceItem)) { this.TChildren.Visible = false; } else { this.lbchildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ChildServiceItem); } #endregion #region 自费项目 if (string.IsNullOrEmpty(model.TourService.OwnExpense)) { this.TSelfProject.Visible = false; } else { this.lbselfproject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.OwnExpense); } #endregion #region 温馨提醒 if (string.IsNullOrEmpty(model.TourService.WarmRemind)) { this.TWarmRemind.Visible = false; } else { this.lbwarmremind.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.WarmRemind); } #endregion #region 注意事项 if (string.IsNullOrEmpty(model.TourService.NeedAttention)) { this.TNeedAttention.Visible = false; } else { this.lbneedattention.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NeedAttention); } #endregion } else { this.TPlanService.Visible = false; } #endregion #region 价格组成 if (model.MTourPriceStandard != null && model.MTourPriceStandard.Count > 0) { this.lbPriceStand.Text = GetPriceStandardTable(model.MTourPriceStandard); } #endregion } }
private void PageInit(string tourid, string quoteid, string type) { this.txtsourcename.Text = SiteUserInfo.CompanyName; /*this.txtname.Text = SiteUserInfo.Name; * this.txttel.Text = SiteUserInfo.Telephone; * this.txtfax.Text = SiteUserInfo.Fax;*/ //派团计划实体 if (!string.IsNullOrEmpty(tourid)) { EyouSoft.Model.TourStructure.MTourTeamInfo model = null; EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.EnumType.TourStructure.TourType tourtype = bll.GetTourType(tourid); switch (tourtype) { case EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼短线: //跳转到散拼 EyouSoft.BLL.ComStructure.BComSetting bcom = new EyouSoft.BLL.ComStructure.BComSetting(); Response.Redirect(bcom.GetPrintUri(this.SiteUserInfo.CompanyId, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.散拼行程单) + "?tourId=" + tourid); break; case EyouSoft.Model.EnumType.TourStructure.TourType.单项服务: this.TAll.Visible = false; this.TChildren.Visible = false; this.TNeedAttention.Visible = false; this.TNoService.Visible = false; this.TOption.Visible = false; this.TPlanFeature.Visible = false; this.TSelfProject.Visible = false; this.TService.Visible = false; this.TShopping.Visible = false; this.TTourPrice.Visible = false; this.TWarmRemind.Visible = false; return; } if (type == "") { model = (EyouSoft.Model.TourStructure.MTourTeamInfo)bll.GetTourInfo(tourid); } else { model = (EyouSoft.Model.TourStructure.MTourTeamInfo)bll.GetOldTourInfo(tourid, this.SiteUserInfo.CompanyId); } if (model != null) { this.lbTourCode.Text = model.TourCode; this.lbPeoNum.Text = model.Adults.ToString() + "<sup>+" + model.Childs.ToString() + "</sup>"; this.lbAdultsNum.Text = model.Adults.ToString() + "人"; this.lbChildsNum.Text = model.Childs.ToString() + "人"; this.lbRouteName.Text = model.RouteName; if (model.CompanyInfo != null) { this.txtunitname.Text = model.CompanyInfo.CompanyName; this.txtunitContactname.Text = model.CompanyInfo.Contact; this.txtunittel.Text = model.CompanyInfo.Phone; } #region 行程 IList <EyouSoft.Model.TourStructure.MPlanBaseInfo> planinfo = model.TourPlan.OrderBy(m => m.Days).ToList(); if (planinfo != null && planinfo.Count > 0) { StringBuilder strAllDateInfo = new StringBuilder(); string Dinner = string.Empty;//包餐(早、中、晚) foreach (EyouSoft.Model.TourStructure.MPlanBaseInfo Plan in planinfo) { if (Plan.Breakfast) { Dinner += "早、"; } if (Plan.Lunch) { Dinner += "中、"; } if (Plan.Supper) { Dinner += "晚、"; } string riQi = "第" + Plan.Days + "天 "; if (model.LDate.HasValue) { riQi += model.LDate.Value.AddDays(Plan.Days - 1).ToString("yyyy-MM-dd"); } strAllDateInfo.AppendFormat("<table width='696' border='0' align='center' cellpadding='0' cellspacing='0' class='borderline_2'><tr><td width='35%' class='small_title'><b class='font16'>{0} {6}</b></td><td width='15%' class='small_title'><b class='font14'>交通:{1}</b></td><td width='20%' class='small_title'><b class='font14'>餐:{2}</b></td><td width='30%' class='small_title'><b class='font14'>住宿:{3}</b></td></tr></table><table width='696' border='0' align='center' cellpadding='0' cellspacing='0' style='margin-top:0px' class='list_2'><tr><td class='td_text' style='border-top:none;' width='{7}'>{4}</td>{5}</tr></table>", riQi, Plan.Traffic, Dinner, Plan.Hotel, Plan.Content, string.IsNullOrEmpty(Plan.FilePath) ? "" : "<td style='border-top:none;'><img src='http://" + Request.Url.Authority + Plan.FilePath + "' width='202' height='163' /></td>", Plan.Section, string.IsNullOrEmpty(Plan.FilePath) ? "100%" : "480px"); Dinner = string.Empty; } this.lbtourplan.Text = strAllDateInfo.ToString(); } #endregion #region 线路特色 if (string.IsNullOrEmpty(model.PlanFeature)) { this.TPlanFeature.Visible = false; } else { this.lbPlanFeature.Text = model.PlanFeature; } #endregion #region 计划服务 if (model.TourService != null) { #region 务标准 /*if (string.IsNullOrEmpty(model.TourService.ServiceStandard)) * { * this.TService.Visible = false; * } * else * { * this.lbService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard); * }*/ TService.Visible = false; #endregion #region 务不含 if (string.IsNullOrEmpty(model.TourService.NoNeedItem)) { this.TNoService.Visible = false; } else { this.lbnoService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NoNeedItem); } #endregion #region 购物安排 if (string.IsNullOrEmpty(model.TourService.ShoppingItem)) { this.TShopping.Visible = false; } else { this.lbshopping.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ShoppingItem); } #endregion #region 儿童安排 if (string.IsNullOrEmpty(model.TourService.ChildServiceItem)) { this.TChildren.Visible = false; } else { this.lbchildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ChildServiceItem); } #endregion #region 自费项目 if (string.IsNullOrEmpty(model.TourService.OwnExpense)) { this.TSelfProject.Visible = false; } else { this.lbselfproject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.OwnExpense); } #endregion #region 温馨提醒 if (string.IsNullOrEmpty(model.TourService.WarmRemind)) { this.TWarmRemind.Visible = false; } else { this.lbwarmremind.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.WarmRemind); } #endregion #region 注意事项 if (string.IsNullOrEmpty(model.TourService.NeedAttention)) { this.TNeedAttention.Visible = false; } else { this.lbneedattention.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NeedAttention); } #endregion } else { this.TPlanService.Visible = false; } #endregion #region 务标准 if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团) { this.TOption.Visible = false; if (model.TourService != null) { this.lballservice.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard); } } else { this.TAll.Visible = false; IList <MTourTeamPrice> TeamPrice = model.TourTeamPrice; StringBuilder strTeamPrice = new StringBuilder(); foreach (MTourTeamPrice teamprice in TeamPrice) { if (!string.IsNullOrEmpty(teamprice.ServiceType.ToString())) { strTeamPrice.AppendFormat("<tr><td width='9%' align='left'><b class='font14'>{0}</b></td><td align='left'>{1}</td><td align='center' width='13%'>{2}</td>", teamprice.ServiceType.ToString(), EyouSoft.Common.Function.StringValidate.TextToHtml(teamprice.ServiceStandard), EyouSoft.Common.UtilsCommons.GetMoneyString(teamprice.Quote, ProviderToMoney) + "/" + teamprice.Unit.ToString()); } } this.lboptionservice.Text = strTeamPrice.ToString(); } #endregion #region 团队报价 this.lbChildPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ChildPrice, ProviderToMoney) + "/人"; this.lbAdultPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.AdultPrice, ProviderToMoney) + "/人"; this.lbotherprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.OtherCost, ProviderToMoney) + "/团"; this.lbtotleprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.SumPrice, ProviderToMoney); this.lbremark.Text = model.QuoteRemark; #endregion #region 销售员 if (model.SaleInfo != null) { var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(model.SaleInfo.SellerId, SiteUserInfo.CompanyId); if (xiaoShouYuanInfo != null) { this.txtname.Text = xiaoShouYuanInfo.ContactName; this.txttel.Text = xiaoShouYuanInfo.ContactTel; this.txtfax.Text = xiaoShouYuanInfo.ContactFax; } } #endregion } } else//团队报价实体 { EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); EyouSoft.Model.TourStructure.MTourQuoteInfo model = bll.GetQuoteInfo(quoteid); if (model != null) { this.lbRouteName.Text = model.RouteName; this.lbPeoNum.Text = model.Adults.ToString() + "<sup>+" + model.Childs.ToString() + "</sup>"; this.lbAdultsNum.Text = model.Adults.ToString() + "人"; this.lbChildsNum.Text = model.Childs.ToString() + "人"; this.txtunitname.Text = model.BuyCompanyName; this.txtunitContactname.Text = model.Contact; this.txtunittel.Text = model.Phone; this.lbRouteName.Text = model.RouteName; #region 行程 IList <EyouSoft.Model.TourStructure.MPlanBaseInfo> planinfo = model.QuotePlan.OrderBy(m => m.Days).ToList(); if (planinfo != null && planinfo.Count > 0) { StringBuilder strAllDateInfo = new StringBuilder(); string Dinner = string.Empty;//包餐(早、中、晚) foreach (EyouSoft.Model.TourStructure.MPlanBaseInfo Plan in planinfo) { if (Plan.Breakfast) { Dinner += "早、"; } if (Plan.Lunch) { Dinner += "中、"; } if (Plan.Supper) { Dinner += "晚、"; } strAllDateInfo.AppendFormat("<table width='696' border='0' align='center' cellpadding='0' cellspacing='0' class='borderline_2'><tr><td width='35%' class='small_title'><b class='font16'>第{0}天 {6}</b></td><td width='15%' class='small_title'><b class='font14'>交通:{1}</b></td><td width='20%' class='small_title'><b class='font14'>餐:{2}</b></td><td width='30%' class='small_title'><b class='font14'>住宿:{3}</b></td></tr></table><table width='696' border='0' align='center' cellpadding='0' cellspacing='0' style='margin-top:0px' class='list_2'><tr><td class='td_text' style='border-top:none;' width='{7}'>{4}</td>{5}</tr></table>", Plan.Days.ToString(), Plan.Traffic, Dinner, Plan.Hotel, Plan.Content, string.IsNullOrEmpty(Plan.FilePath) ? "" : "<td style='border-top:none;'><img src='http://" + Request.Url.Authority + Plan.FilePath + "' width='202' height='163' /></td>", Plan.Section, string.IsNullOrEmpty(Plan.FilePath) ? "100%" : "480px"); Dinner = string.Empty; } this.lbtourplan.Text = strAllDateInfo.ToString(); } #endregion #region 线路特色 if (string.IsNullOrEmpty(model.PlanFeature)) { this.TPlanFeature.Visible = false; } else { this.lbPlanFeature.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.PlanFeature); } #endregion #region 计划服务 if (model.TourService != null) { #region 务标准 if (string.IsNullOrEmpty(model.TourService.ServiceStandard)) { this.TService.Visible = false; } else { this.lbService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard); } #endregion #region 务不含 if (string.IsNullOrEmpty(model.TourService.NoNeedItem)) { this.TNoService.Visible = false; } else { this.lbnoService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NoNeedItem); } #endregion #region 购物安排 if (string.IsNullOrEmpty(model.TourService.ShoppingItem)) { this.TShopping.Visible = false; } else { this.lbshopping.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ShoppingItem); } #endregion #region 儿童安排 if (string.IsNullOrEmpty(model.TourService.ChildServiceItem)) { this.TChildren.Visible = false; } else { this.lbchildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ChildServiceItem); } #endregion #region 自费项目 if (string.IsNullOrEmpty(model.TourService.OwnExpense)) { this.TSelfProject.Visible = false; } else { this.lbselfproject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.OwnExpense); } #endregion #region 温馨提醒 if (string.IsNullOrEmpty(model.TourService.WarmRemind)) { this.TWarmRemind.Visible = false; } else { this.lbwarmremind.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.WarmRemind); } #endregion #region 注意事项 if (string.IsNullOrEmpty(model.TourService.NeedAttention)) { this.TNeedAttention.Visible = false; } else { this.lbneedattention.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NeedAttention); } #endregion } else { this.TPlanService.Visible = false; } #endregion #region 务标准 if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团) { this.TOption.Visible = false; this.lballservice.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard); } else { this.TAll.Visible = false; IList <MTourTeamPrice> TeamPrice = model.TourTeamPrice; StringBuilder strTeamPrice = new StringBuilder(); foreach (MTourTeamPrice teamprice in TeamPrice) { if (!string.IsNullOrEmpty(teamprice.ServiceType.ToString())) { strTeamPrice.AppendFormat("<tr><td width='9%' align='left'><b class='font14'>{0}</b></td><td align='left'>{1}</td><td width='13%' align='center'>{2}</td>", teamprice.ServiceType.ToString(), EyouSoft.Common.Function.StringValidate.TextToHtml(teamprice.ServiceStandard), EyouSoft.Common.UtilsCommons.GetMoneyString(teamprice.Quote, ProviderToMoney) + "/" + teamprice.Unit.ToString()); } } this.lboptionservice.Text = strTeamPrice.ToString(); } #endregion #region 团队报价 this.lbChildPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ChildPrice, ProviderToMoney) + "/人"; this.lbAdultPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.AdultPrice, ProviderToMoney) + "/人"; this.lbotherprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.OtherCost, ProviderToMoney) + "/团"; this.lbtotleprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.TotalPrice, ProviderToMoney); this.lbremark.Text = model.QuoteRemark; #endregion #region 销售员 if (model.SaleInfo != null) { var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(model.SaleInfo.SellerId, SiteUserInfo.CompanyId); if (xiaoShouYuanInfo != null) { this.txtname.Text = xiaoShouYuanInfo.ContactName; this.txttel.Text = xiaoShouYuanInfo.ContactTel; this.txtfax.Text = xiaoShouYuanInfo.ContactFax; } } #endregion } } }
/// <summary> /// 保存按钮点击事件执行方法 /// </summary> protected string PageSave() { string msg = ""; #region 获得参数 string doType = Utils.GetQueryStringValue("doType"); string saveType = Utils.GetQueryStringValue("saveType"); string tourID = Utils.GetQueryStringValue("tourID"); string orderID = Utils.GetQueryStringValue("orderID"); #endregion #region 获得表单 //联系人 string contactName = Utils.GetFormValue(this.txtContact.UniqueID); string contactTel = Utils.GetFormValue(this.txtContactTel.UniqueID); //联系人部门编号 string contactDepartId = Utils.GetFormValue(this.hideContactDeptId.UniqueID); //销售员 string sellsID = Utils.GetFormValue(this.SellsSelect1.SellsIDClient); string sellsName = Utils.GetFormValue(this.SellsSelect1.SellsNameClient); //客户单位 string companyID = Utils.GetFormValue(this.CustomerUnitSelect1.ClientNameKHBH); string companyName = Utils.GetFormValue(this.CustomerUnitSelect1.ClientNameKHMC); #region 团队计划价格组成 //成人单价 decimal adultPrice = Utils.GetDecimal(Utils.GetFormValue(this.hideAdultPrice.UniqueID)); //成人数 int adultCount = Utils.GetInt(Utils.GetFormValue(this.txtAdultCount.UniqueID)); //儿童单价 decimal childPrice = Utils.GetDecimal(Utils.GetFormValue(this.hideChildPrcie.UniqueID)); //儿童数量 int childCount = Utils.GetInt(Utils.GetFormValue(this.txtChildCount.UniqueID)); #endregion //增加费用 decimal addPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtAddPrice.UniqueID)); //增加费用备注 string remarksFrist = Utils.GetFormValue(this.txtRemarksFrist.UniqueID); //减少费用 decimal reducePrice = Utils.GetDecimal(Utils.GetFormValue(this.txtReducePrice.UniqueID)); //减少费用备注 string remarksSecond = Utils.GetFormValue(this.txtRemarksSecond.UniqueID); //导游现收 decimal guidePrice = Utils.GetDecimal(Utils.GetFormValue(this.txtGuidePrice.UniqueID)); //合计金额 decimal totalPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtTotalPrice.UniqueID)); //销售应收 decimal sellPrice = totalPrice - guidePrice; //订单备注 string orderRemarks = Utils.GetFormValue(this.txtRemarksOrder.UniqueID); //合同号 string contractCode = Utils.GetFormValue(txtHeTongHao.HeTongCodeClientID); string contractCodeId = Utils.GetFormValue(txtHeTongHao.HeTongIdClientID); //客源地 国家 int countryID = Utils.GetInt(Utils.GetFormValue("sltCountry")); //客源地 省份 int provinceID = Utils.GetInt(Utils.GetFormValue("sltProvince")); //预留截至时间 DateTime?saveSeatDate = Utils.GetDateTimeNullable(Utils.GetFormValue(this.txtSaveSeatDate.UniqueID)); //团类型 EyouSoft.Model.EnumType.TourStructure.TourType tourType = (EyouSoft.Model.EnumType.TourStructure.TourType)Utils.GetInt(Utils.GetFormValue(this.hideTourType.UniqueID)); //订单来源 EyouSoft.Model.EnumType.TourStructure.OrderType orderType = (EyouSoft.Model.EnumType.TourStructure.OrderType)Utils.GetInt(Utils.GetFormValue(this.hideOrderFrom.UniqueID)); #endregion #region 表单验证 if (contactName == "") { msg = "请输入联系人!<br />"; } if (sellsID == "" || sellsName == "") { msg += "请选择销售员!<br />"; } if (adultPrice <= 0) { msg += "请输入成人单价!<br />"; } if (adultCount <= 0) { msg += "请输入成人数!<br />"; } if (saveType == "1" && saveSeatDate == null) { msg += "请选择预留日期!<br />"; } if (saveType == "1" && saveSeatDate != null) { GetMaxDateTime(); if (saveSeatDate > Utils.GetDateTime(MaxDateTime) || saveSeatDate < DateTime.Now.AddMinutes(5)) { msg += "请选择新的预留日期!<br />"; } } if (msg != "") { return(UtilsCommons.AjaxReturnJson("0", msg)); } #endregion EyouSoft.BLL.TourStructure.BTourOrder orderBll = new EyouSoft.BLL.TourStructure.BTourOrder(); EyouSoft.Model.TourStructure.MTourOrderExpand orderModel = new EyouSoft.Model.TourStructure.MTourOrderExpand(); orderModel.BuyCompanyId = companyID; orderModel.BuyCompanyName = companyName; orderModel.ContactName = contactName; orderModel.ContactTel = contactTel; orderModel.ContactDepartId = contactDepartId; orderModel.SellerId = sellsID; orderModel.SellerName = sellsName; orderModel.OperatorId = SiteUserInfo.UserId; orderModel.Operator = SiteUserInfo.Name; orderModel.Adults = adultCount; orderModel.Childs = childCount; orderModel.PriceStandId = Utils.GetInt(Utils.GetFormValue(this.hidePriceStandID.UniqueID)); orderModel.BuyCountryId = countryID; orderModel.BuyProvincesId = provinceID; orderModel.SettlementMoney = adultPrice * adultCount + childCount * childPrice; #region 销售价 orderModel.LevId = Utils.GetInt(Utils.GetFormValue(this.hideLevelID.UniqueID)); orderModel.AdultPrice = Utils.GetDecimal(Utils.GetFormValue(this.hideAdultPrice.UniqueID)); orderModel.ChildPrice = Utils.GetDecimal(Utils.GetFormValue(this.hideChildPrcie.UniqueID)); #endregion #region 结算价 orderModel.PeerAdultPrice = Utils.GetDecimal(Utils.GetFormValue(this.hideSettAdultPrice.UniqueID)); orderModel.PeerChildPrice = Utils.GetDecimal(Utils.GetFormValue(this.hideSettChildPrice.UniqueID)); orderModel.PeerLevId = Utils.GetInt(Utils.GetFormValue(this.hideSettLevelID.UniqueID)); #endregion orderModel.ContractCode = contractCode; orderModel.ContractId = contractCodeId; orderModel.OrderRemark = orderRemarks; orderModel.SaleAddCost = addPrice; orderModel.SaleAddCostRemark = remarksFrist; orderModel.SaleReduceCost = reducePrice; orderModel.SaleReduceCostRemark = remarksSecond; orderModel.SalerIncome = sellPrice; orderModel.GuideIncome = guidePrice; orderModel.SumPrice = totalPrice; orderModel.CompanyId = SiteUserInfo.CompanyId; orderModel.DeptId = Utils.GetInt(Utils.GetFormValue(this.hideDeptID.UniqueID)); orderModel.TourId = tourID; switch (tourType) { case EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.出境团队: orderModel.MTourOrderTravellerList = UtilsCommons.GetTravelListS(); break; case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.地接团队: case EyouSoft.Model.EnumType.TourStructure.TourType.组团团队: orderModel.MTourOrderTravellerList = UtilsCommons.GetTravelList(); break; } int result = 0; //散拼订单新增 orderModel.TourType = tourType; orderModel.IssueTime = DateTime.Now; orderModel.NeiBuXinXi = Utils.GetFormValue(txtNeiBuXinXi.UniqueID); #region 变更实体 EyouSoft.Model.TourStructure.MTourOrderChange changeModel = new EyouSoft.Model.TourStructure.MTourOrderChange(); changeModel.CompanyId = orderModel.CompanyId; changeModel.TourId = orderModel.TourId; changeModel.ChangePerson = adultCount + childCount; changeModel.ChangePrice = totalPrice; changeModel.CompanyId = SiteUserInfo.CompanyId; if (Utils.GetFormValue(this.hideOldAdultCount.UniqueID).Split('|').Length == 2) { int oldAdultCount = Utils.GetInt(Utils.GetFormValue(this.hideOldAdultCount.UniqueID).Split('|')[0]); int oldChildCount = Utils.GetInt(Utils.GetFormValue(this.hideOldAdultCount.UniqueID).Split('|')[1]); //changeModel.Content = "成人数由" + adultCount + "变" + oldAdultCount; changeModel.Content = "成人数由" + oldAdultCount + "变" + adultCount; //changeModel.Content += " 儿童数由" + childCount + "变" + oldChildCount; changeModel.Content += " 儿童数由" + oldChildCount + "变" + childCount; } changeModel.IssueTime = DateTime.Now; changeModel.IsSure = false; changeModel.Operator = SiteUserInfo.Name; changeModel.OperatorId = SiteUserInfo.UserId; changeModel.OrderId = orderID; changeModel.ChangeType = EyouSoft.Model.EnumType.TourStructure.ChangeType.修改; if (Utils.GetFormValue(this.hideOrderBianGeng.UniqueID) == "true") { changeModel.ChangeType = EyouSoft.Model.EnumType.TourStructure.ChangeType.变更; } #endregion switch (saveType) { //确认预留 case "1": orderModel.OrderStatus = EyouSoft.Model.EnumType.TourStructure.OrderStatus.已留位; orderModel.SaveSeatDate = saveSeatDate; orderModel.TourOrderChange = changeModel; break; //确定成交 case "2": orderModel.OrderStatus = EyouSoft.Model.EnumType.TourStructure.OrderStatus.已成交; orderModel.SaveSeatDate = null; orderModel.TourOrderChange = changeModel; break; case "4": orderModel.OrderStatus = (EyouSoft.Model.EnumType.TourStructure.OrderStatus)Utils.GetInt(Utils.GetFormValue(this.hideOrderState.UniqueID)); orderModel.SaveSeatDate = saveSeatDate; orderModel.TourOrderChange = changeModel; break; //取消订单 case "5": int bllRetCode1 = 0; bllRetCode1 = orderBll.UpdateTourOrderExpand(orderID, EyouSoft.Model.EnumType.TourStructure.OrderStatus.已取消, null); if (bllRetCode1 == 1) { return(UtilsCommons.AjaxReturnJson("1", "操作成功")); } else if (bllRetCode1 == -99) { return(UtilsCommons.AjaxReturnJson("0", "不存在的订单信息")); } else if (bllRetCode1 == -98) { return(UtilsCommons.AjaxReturnJson("0", "已取消的订单不可重复取消订单")); } else if (bllRetCode1 == -97) { return(UtilsCommons.AjaxReturnJson("0", "该计划状态不允许取消订单")); } else if (bllRetCode1 == -96) { return(UtilsCommons.AjaxReturnJson("0", "已确认合同金额不允许取消订单")); } else if (bllRetCode1 == -95) { return(UtilsCommons.AjaxReturnJson("0", "已存在收款信息不允许取消订单")); } else { return(UtilsCommons.AjaxReturnJson("0", "操作失败")); } //不受理 case "6": int bllRetCode2 = 0; bllRetCode2 = orderBll.UpdateTourOrderExpand(orderID, EyouSoft.Model.EnumType.TourStructure.OrderStatus.受理, null); if (bllRetCode2 == 1) { return(UtilsCommons.AjaxReturnJson("1", "操作成功")); } else if (bllRetCode2 == -99) { return(UtilsCommons.AjaxReturnJson("0", "不存在的订单信息")); } else if (bllRetCode2 == -98) { return(UtilsCommons.AjaxReturnJson("0", "已取消的订单不可重复取消订单")); } else if (bllRetCode2 == -97) { return(UtilsCommons.AjaxReturnJson("0", "该计划状态不允许取消订单")); } else if (bllRetCode2 == -96) { return(UtilsCommons.AjaxReturnJson("0", "已确认合同金额不允许取消订单")); } else if (bllRetCode2 == -95) { return(UtilsCommons.AjaxReturnJson("0", "已存在收款信息不允许取消订单")); } else { return(UtilsCommons.AjaxReturnJson("0", "操作失败")); } } #region 新增订单 if (tourID != "" && orderID == "") { orderModel.OrderId = Guid.NewGuid().ToString(); orderModel.OrderType = EyouSoft.Model.EnumType.TourStructure.OrderType.代客预定; result = orderBll.AddTourOrderExpand(orderModel); } #endregion #region 修改订单 if (orderID != "") { //如果计划是供应商 发布的,且不超限 那么订单状态永远是未处理 if (Utils.GetFormValue(this.hideSourceID.UniqueID).Trim() != "") { orderModel.OrderStatus = EyouSoft.Model.EnumType.TourStructure.OrderStatus.未处理; } orderModel.OrderId = orderID; orderModel.OrderType = orderType; result = orderBll.UpdateTourOrderExpand(orderModel); } switch (result) { case 1: msg = UtilsCommons.AjaxReturnJson("0", "报名失败,总人数超过计划剩余人数!"); break; case 2: msg = UtilsCommons.AjaxReturnJson("0", "报名失败,合同号未领用!"); break; case 3: if (saveType == "1") { msg = UtilsCommons.AjaxReturnJson("1", "预留成功,正在跳转.."); } if (saveType == "2") { msg = UtilsCommons.AjaxReturnJson("1", "确认成功!"); } if (saveType == "3") { msg = UtilsCommons.AjaxReturnJson("1", "垫付申请成功!"); } if (saveType == "4") { msg = UtilsCommons.AjaxReturnJson("1", "操作成功!"); } break; case 4: msg = UtilsCommons.AjaxReturnJson("0", "报名失败,未知错误!"); break; case 5: case 9: msg = UtilsCommons.AjaxReturnJson("2", "操作成功! 销售员已超限,请收款或超限申请!", orderModel.OrderId); break; case 6: case 10: msg = UtilsCommons.AjaxReturnJson("2", "操作成功! 客户单位已超限,请收款或超限申请!", orderModel.OrderId); break; case 7: case 11: msg = UtilsCommons.AjaxReturnJson("2", "操作成功! 销售员和客户单位已超限,请收款或超限申请!", orderModel.OrderId); break; } #endregion return(msg); }
/// <summary> /// 根据团队状态判断计调操作 /// </summary> /// <param name="state"></param> /// <param name="tourid"></param> /// <param name="tourQType">对外报价类型 分项 整团</param> /// <param name="tourType">团队类型 组团 散拼</param> /// <returns></returns> protected string GetOperate(EyouSoft.Model.EnumType.TourStructure.TourStatus state, string tourid, EyouSoft.Model.EnumType.TourStructure.TourType tourType, EyouSoft.Model.EnumType.TourStructure.TourQuoteType tourQType) { string str = string.Empty; string sl = Utils.GetQueryStringValue("sl"); //string tour_Type = string.Empty; //计调类型 组团,地接,出境 /*string type = string.Empty; * if (sl == ((int)EyouSoft.Model.EnumType.PrivsStructure.Menu2.计调中心_组团计调).ToString()) * { * type = "Team"; * } * if (sl == ((int)EyouSoft.Model.EnumType.PrivsStructure.Menu2.计调中心_出境计调).ToString()) * { * type = "Departure"; * } * if (sl == ((int)EyouSoft.Model.EnumType.PrivsStructure.Menu2.计调中心_地接计调).ToString()) * { * type = "Agency"; * }*/ //团队类型 /*if (tourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼 || tourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼 || tourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼) * { * tour_Type = "sanping"; * } * if (tourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境团队 || tourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接团队 || tourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团团队) * { * tour_Type = "zutuan"; * //团队报价类型 * if (tourQType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团) * { * tour_Type += "&TourQType=" + ((int)EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团) + ""; * } * else * { * tour_Type += "&TourQType=" + ((int)EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项) + ""; * } * }*/ //计调未接收的显示接收任务,计调已接收的显示安排 if (state == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调未接收) { str = "<a data-class=\"receiveOp\" data-TourId=" + tourid + " data-teamPlaner=\"" + UtilsCommons.GetTourPlanItemBytourID(tourid, this.SiteUserInfo.UserId) + "\" href=\"javascript:void(0);\">接收任务</a>"; } else { str = "<a href=\"/OperaterCenter/OperaterConfigPage.aspx?&sl=" + sl + "&tourId=" + tourid + "\">安排</a>"; } return(str); }