/// <summary> /// 是否显示查看链接 /// </summary> /// <param name="orderid"></param> /// <param name="tourid"></param> /// <returns></returns> protected string GetIsShow(object orderid, object tourid) { EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.TourStructure.MTourBaseInfo model = bll.GetTourInfo(Convert.ToString(tourid)); System.Text.StringBuilder str = new System.Text.StringBuilder(); if (model != null) { if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼短线) { EyouSoft.BLL.TourStructure.BTourOrder bllorder = new EyouSoft.BLL.TourStructure.BTourOrder(); IList <EyouSoft.Model.TourStructure.MTourOrderSeatInfo> list = bllorder.GetTourOrderSeatInfo(tourid.ToString()); if (list != null && list.Count > 0) { str.AppendFormat("<a href='javascript:void(0);' data-class='showCarModel' data-peonum='{0}' data-tourid='{1}' data-orderid='{2}'>查看</a>", GetPeopleNum(Convert.ToString(orderid)), Convert.ToString(tourid), Convert.ToString(orderid)); } } } return(str.ToString()); }
/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit(string id) { EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.TourStructure.MTourBaseInfo baseModel = bll.GetTourInfo(id); if (baseModel != null && (baseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境团队 || baseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接团队 || baseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团团队)) { EyouSoft.Model.TourStructure.MTourTeamInfo model = (EyouSoft.Model.TourStructure.MTourTeamInfo)baseModel; if (model.TourCode.Trim() != "") { this.lblTourCode.Text = model.TourCode; } BindAreaList(model.AreaId); this.hideRouteID.Value = model.RouteId; this.txt_RouteName.Text = model.RouteName; this.txt_Days.Text = model.TourDays.ToString(); this.UC_CustomerUnitSelect.CustomerUnitId = model.CompanyInfo != null ? model.CompanyInfo.CompanyId : ""; this.UC_CustomerUnitSelect.CustomerUnitName = model.CompanyInfo != null ? model.CompanyInfo.CompanyName : ""; this.txt_Contact.Text = model.CompanyInfo != null ? model.CompanyInfo.Contact : ""; this.txt_ConTel.Text = model.CompanyInfo != null ? model.CompanyInfo.Phone : ""; this.hideContactDeptId.Value = model.ContactDepartId; if (act == "copy") { this.SellsSelect1.SellsID = SiteUserInfo.UserId; this.SellsSelect1.SellsName = SiteUserInfo.Name; lblTourCode.Text = ""; } else { this.SellsSelect1.SellsID = model.SaleInfo.SellerId; this.SellsSelect1.SellsName = model.SaleInfo.Name; } this.txt_Adult.Text = model.Adults.ToString(); this.txt_Child.Text = model.Childs.ToString(); this.txtPlanContent.Text = model.PlanFeature; this.txtAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.AdultPrice); this.txtChildPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.ChildPrice); this.txtOtherPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.OtherCost); this.txtSumPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SumPrice); this.txtQuoteRemark.Text = model.QuoteRemark; this.CountryID = model.CountryId.ToString(); this.ProvinceID = model.ProvinceId.ToString(); if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项) { this.ForeignQuote1.IsTourOrSubentry = false; this.ForeignQuote1.StandardTourList = model.TourTeamPrice; } else { this.ForeignQuote1.IsTourOrSubentry = true; this.ForeignQuote1.GroupService = model.TourService != null ? model.TourService.ServiceStandard : ""; } this.Journey1.SetPlanList = model.TourPlan; CostAccounting1.CostCalculation = model.CostCalculation; if (model.TourService != null) { CostAccounting1.NoNeedItem = model.TourService.NoNeedItem; CostAccounting1.ShoppingItem = model.TourService.ShoppingItem; CostAccounting1.ChildServiceItem = model.TourService.ChildServiceItem; CostAccounting1.OwnExpense = model.TourService.OwnExpense; CostAccounting1.NeedAttention = model.TourService.NeedAttention; CostAccounting1.WarmRemind = model.TourService.WarmRemind; CostAccounting1.InsiderInfor = model.TourService.InsiderInfor; } this.txtLDate.Text = model.LDate.HasValue ? model.LDate.Value.ToString("yyyy-MM-dd") : ""; this.txtSuccesssStraffBegin.Text = model.LTraffic; this.txtSuccesssStraffEnd.Text = model.RTraffic; this.txtSuccessGather.Text = model.Gather; this.txtSuccessAddPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SaleAddCost); this.txtSuccessAddPriceRemark.Text = model.AddCostRemark; this.txtSuccessReducePrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SaleReduceCost); this.txtSuccessReducePriceRemark.Text = model.ReduceCostRemark; this.txtSuccessGuideIncome.Text = Utils.FilterEndOfTheZeroDecimal(model.GuideIncome); this.lblSuccessSalerIncome.Text = Utils.FilterEndOfTheZeroDecimal(model.SalerIncome); this.txtSuccessOrderRemark.Text = model.OrderRemark; if (act != "copy") { txtHeTongHao.HeTongId = model.HeTongId; txtHeTongHao.HeTongCode = model.HeTongCode; } //签证附件 if (model.VisaFileList != null && model.VisaFileList.Count > 0) { string visaStr = string.Empty; for (int i = 0; i < model.VisaFileList.Count; i++) { visaStr += "<span class='upload_filename'> <a href='" + model.VisaFileList[i].FilePath + "' target='_blank'>" + model.VisaFileList[i].Name + "</a><a href='javascript:void(0);' onclick='AddTeamPlan.RemoveVisaFile(this);return false;'> <img style='vertical-align:middle' src='/images/cha.gif'></a><input type='hidden' name='hideVisaFile' value='" + model.VisaFileList[i].Name + "|" + model.VisaFileList[i].FilePath + "|" + model.VisaFileList[i].Downloads.ToString() + "'>;</span>"; } this.lblVisaFiles.Text = visaStr; } switch (model.TourType) { case EyouSoft.Model.EnumType.TourStructure.TourType.地接团队: case EyouSoft.Model.EnumType.TourStructure.TourType.组团团队: this.phdTravelControlS.Visible = false; this.TravelControl1.SetTravelList = model.Traveller; break; case EyouSoft.Model.EnumType.TourStructure.TourType.出境团队: this.phdTravelControl.Visible = false; this.TravelControlS1.SetTravelList = model.Traveller; break; } #region 修改控制 this.phdSave.Visible = false; if (model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划 || model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调未接收 || model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置 || model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置完毕 || model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.资金超限 ) { this.phdSave.Visible = true; } if (act == "copy") { this.phdSave.Visible = true; } //按钮权限控制 BtnPowerControl(); //是否可以操作该数据 if (!SiteUserInfo.IsHandleElse && act != "copy") { if (model.OperatorInfo != null && model.OperatorInfo.OperatorId != SiteUserInfo.UserId && model.SaleInfo != null && model.SaleInfo.SellerId != SiteUserInfo.UserId) { this.phdSave.Visible = false; } } #endregion #region 变更控制 if (model.TourStatus != EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划) { this.hideIsChangeInput.Value = "true"; } else { this.hideIsChangeInput.Value = "false"; } #endregion switch (model.TourStatus) { case EyouSoft.Model.EnumType.TourStructure.TourStatus.垫付申请: this.hideOverrunState.Value = "3"; break; case EyouSoft.Model.EnumType.TourStructure.TourStatus.审核失败: this.hideOverrunState.Value = "4"; break; } } else { Utils.ResponseGoBack(); } }
/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit(string id) { #region 用户控件初始化 #endregion EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.TourStructure.MTourBaseInfo baseModel = bll.GetTourInfo(id); if (baseModel != null && (baseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼 || baseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼 || baseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼)) { EyouSoft.Model.TourStructure.MTourSanPinInfo model = (EyouSoft.Model.TourStructure.MTourSanPinInfo)baseModel; #region 表单控件赋值 this.lblLeaveDateMore.Text = "出团日期:"; BindAreaList(model.AreaId); this.cbxDistribution.Checked = model.IsShowDistribution; this.hideRouteID.Value = model.RouteId; this.txt_RouteName.Text = model.RouteName; this.txt_Days.Text = model.TourDays.ToString(); this.txtPeopleCount.Text = model.PlanPeopleNumber.ToString(); this.lblLeaveDate.Text = UtilsCommons.GetDateString(model.LDate, this.ProviderToDate); this.hideLeaveDate.Value = model.LDate.HasValue ? model.LDate.Value.ToString("yyyy-MM-dd") : ""; this.txtSuccesssStraffBegin.Text = model.LTraffic; this.txtSuccesssStraffEnd.Text = model.RTraffic; this.txtSuccessGather.Text = model.Gather; this.txtStopDate.Text = model.StopDays.ToString(); if (act == "copy") { this.SellsSelect1.SellsID = SiteUserInfo.UserId; this.SellsSelect1.SellsName = SiteUserInfo.Name; } else { this.SellsSelect1.SellsID = model.SaleInfo.SellerId; this.SellsSelect1.SellsName = model.SaleInfo.Name; } this.txtPlanContent.Text = model.PlanFeature; this.txtSearchKey.Text = model.KeyName; // 报价标准 this.PriceStand1.InitMode = false; this.PriceStand1.InitTour = true; this.PriceStand1.SetPriceStandard = model.MTourPriceStandard; //行程安排 this.Journey1.SetPlanList = model.TourPlan; //散拼 服务 if (model.TourService != null) { CostAccounting1.ServiceStandard = model.TourService.ServiceStandard; CostAccounting1.NoNeedItem = model.TourService.NoNeedItem; CostAccounting1.ShoppingItem = model.TourService.ShoppingItem; CostAccounting1.ChildServiceItem = model.TourService.ChildServiceItem; CostAccounting1.OwnExpense = model.TourService.OwnExpense; CostAccounting1.NeedAttention = model.TourService.NeedAttention; CostAccounting1.WarmRemind = model.TourService.WarmRemind; CostAccounting1.InsiderInfor = model.TourService.InsiderInfor; } #endregion #region 附件 //附件 if (model.FilePath.Trim() != "") { this.lblFiles.Text = "<span class='upload_filename'> <a href='" + model.FilePath + "' target='_blank'>查看附件</a><a href='javascript:void(0);' onclick='AddSanPlan.RemoveVisaFile(this);return false;'> <img style='vertical-align:middle' src='/images/cha.gif'></a><input type='hidden' name='hideOtherFile' value='|" + model.FilePath + "'></span>"; } //签证附件 if (model.VisaFileList != null && model.VisaFileList.Count > 0) { string visaStr = string.Empty; for (int i = 0; i < model.VisaFileList.Count; i++) { visaStr += "<span class='upload_filename'> <a href='" + model.VisaFileList[i].FilePath + "' target='_blank'>" + model.VisaFileList[i].Name + "</a><a href='javascript:void(0);' onclick='AddSanPlan.RemoveVisaFile(this);return false;'> <img style='vertical-align:middle' src='/images/cha.gif'></a><input type='hidden' name='hideVisaFile' value='" + model.VisaFileList[i].Name + "|" + model.VisaFileList[i].FilePath + "|" + model.VisaFileList[i].Downloads.ToString() + "'></span>"; } this.lblVisaFiles.Text = visaStr; } #endregion #region 修改控制 this.phdSave.Visible = false; if (model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划 || model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调未接收 || model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置 || model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置完毕 ) { //供应商发布的散拼计划不能修改 if (model.SourceId.Trim() != "") { this.phdSave.Visible = false; } else { this.phdSave.Visible = true; } } if (act == "copy") { this.phdSave.Visible = true; } //按钮权限控制 BtnPowerControl(); //是否可以操作该数据 if (!SiteUserInfo.IsHandleElse && act != "copy") { if (model.OperatorInfo != null && model.OperatorInfo.OperatorId != SiteUserInfo.UserId && model.SaleInfo != null && model.SaleInfo.SellerId != SiteUserInfo.UserId) { this.phdSave.Visible = false; } } #endregion #region 变更控制 if (model.TourStatus != EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划) { this.hideIsChangeInput.Value = "true"; } else { this.hideIsChangeInput.Value = "false"; } #endregion } else { Utils.ResponseGoBack(); } }