/// <summary> /// 获得超限信息 /// </summary> /// <returns></returns> private string GetAmount() { EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); string msg = string.Empty; //询价单位编号 string buyID = Utils.GetQueryStringValue("buyID"); //销售员编号 string sellsID = Utils.GetQueryStringValue("sellsID"); //合计金额 decimal price = Utils.GetDecimal(Utils.GetQueryStringValue("price")); //返回状态1、2、3 string state = string.Empty; //是否超限 bool isOverrun = true; //报价编号 string id = Utils.GetQueryStringValue("id"); string cHtml = string.Empty; string sHtml = string.Empty; EyouSoft.Model.FinStructure.MCustomerWarning customerWarningModel = bll.GetCustomerOverrunDetail(buyID, price, SiteUserInfo.CompanyId); EyouSoft.Model.FinStructure.MSalesmanWarning salesmanWarningModel = bll.GetSaleOverrunDetail(sellsID, price, SiteUserInfo.CompanyId); if (customerWarningModel != null) { cHtml = "<tr><td height='28' bgcolor='#FFFFFF' align='center'>" + customerWarningModel.Customer + "</td><td bgcolor='#FFFFFF' align='center'><b class='fontbsize12'>" + UtilsCommons.GetMoneyString(customerWarningModel.AmountOwed, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><a class='link1'><strong>" + UtilsCommons.GetMoneyString(customerWarningModel.Arrear, this.ProviderToMoney) + "</strong></a></td><td bgcolor='#FFFFFF' align='center'><b class='fontgreen'>" + UtilsCommons.GetMoneyString(customerWarningModel.Transfinite, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'>" + UtilsCommons.GetDateString(customerWarningModel.TransfiniteTime, this.ProviderToDate) + "</td><td bgcolor='#FFFFFF' align='center'>" + customerWarningModel.Deadline.ToString() + "</td><td bgcolor='#FFFFFF' align='center'>" + (customerWarningModel.DeadDay <= 0 ? 0 : customerWarningModel.DeadDay) + "</td></tr>"; isOverrun = false; } if (salesmanWarningModel != null) { sHtml = "<tr><td height='28' bgcolor='#FFFFFF' align='center'>" + salesmanWarningModel.SellerName + "</td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.AmountOwed, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.ConfirmAdvances, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.PreIncome, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><b class='fontblue'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.SumPay, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><b class='fontbsize12'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.Arrear, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><b class='fontgreen'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.Transfinite, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'>" + UtilsCommons.GetDateString(salesmanWarningModel.TransfiniteTime, this.ProviderToDate) + "</td></tr>"; isOverrun = false; } if (isOverrun) { //未超限处理 msg = "{\"type\":\"3\",\"chtml\":\"" + cHtml + "\",\"shtml\":\"" + sHtml + "\"}"; } else { //超限 未申请 msg = "{\"type\":\"1\",\"chtml\":\"" + cHtml + "\",\"shtml\":\"" + sHtml + "\"}"; } return(msg); }
/// <summary> /// 修改成本核算 /// </summary> /// <returns></returns> private string UpdateCostCalculation() { string id = Utils.GetQueryStringValue("id"); string content = Server.UrlDecode(Utils.GetFormValue("content")); EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); if (bll.PlanerQuote(id, content)) { return(UtilsCommons.AjaxReturnJson("1", "报价成功!")); } else { return(UtilsCommons.AjaxReturnJson("0", "报价失败!")); } }
/// <summary> /// 初始化 /// </summary> private void DataInit() { //获取分页参数并强转 pageIndex = UtilsCommons.GetPadingIndex(); string quoteId = Utils.GetQueryStringValue("quoteId"); string tourId = Utils.GetQueryStringValue("tourId"); if (quoteId != "") { EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); EyouSoft.Model.TourStructure.MTourQuoteInfo model = bll.GetQuoteInfo(quoteId); if (model != null) { if (model.VisaFileList != null && model.VisaFileList.Count > 0) { this.rptList.DataSource = model.VisaFileList; this.rptList.DataBind(); } } this.ExporPageInfoSelect1.Visible = false; } if (tourId != "") { IList <EyouSoft.Model.ComStructure.MComAttach> visaFileList = new EyouSoft.BLL.TourStructure.BTour().GetVisaFileList(tourId, pageSize, pageIndex, ref recordCount); if (visaFileList != null && visaFileList.Count > 0) { this.rptList.DataSource = visaFileList; this.rptList.DataBind(); BindPage(); if (visaFileList.Count <= 10) { //绑定分页 this.ExporPageInfoSelect1.Visible = false; } } else { this.ExporPageInfoSelect1.Visible = false; } } }
/// <summary> /// 删除操作 /// </summary> /// <param name="id">删除ID</param> /// <returns></returns> private string DeleteData(string[] ids) { string msg = string.Empty; //删除操作 if (ids.Length > 0) { EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); foreach (string id in ids) { bll.DeleteQuote(id); } msg = "{\"result\":\"1\",\"msg\":\"删除成功!\"}"; } else { msg = "{\"result\":\"0\",\"msg\":\"请选择一行数据!\"}"; } return(msg); }
/// <summary> /// 保存操作 /// </summary> /// <returns></returns> private string Save() { string msg = string.Empty; EyouSoft.Model.TourStructure.MTourOrderExpand order = new EyouSoft.Model.TourStructure.MTourOrderExpand(); IList <EyouSoft.Model.TourStructure.MTourOrderCarTypeSeat> list = null; if (PageValidate(ref order, ref msg)) { //判断客户单位是否欠款、单团账龄是否超限 EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); EyouSoft.Model.FinStructure.MCustomerWarning customerWarningModel = bll.GetCustomerOverrunDetail(SiteUserInfo.TourCompanyInfo.CompanyId, order.SumPrice, SiteUserInfo.CompanyId); if (customerWarningModel != null) { msg = UtilsCommons.AjaxReturnJson("0", "您的欠款已经超过限额,暂不可报名。"); } else { EyouSoft.BLL.TourStructure.BTourOrder bOrder = new EyouSoft.BLL.TourStructure.BTourOrder(); string IsShortRoute = Utils.GetQueryStringValue("IsShort"); int flg = 0; if (!string.IsNullOrEmpty(IsShortRoute)) { flg = bOrder.AddTourOrderExpand(order, ref list); } else { flg = bOrder.AddTourOrderExpand(order); } if (flg == 3) { msg = UtilsCommons.AjaxReturnJson("1", "订单报名成功! 正在跳转..."); } else if (flg == 5) { msg = UtilsCommons.AjaxReturnJson("0", "计划自动客满,不允许报名!"); } else if (flg == 6) { msg = UtilsCommons.AjaxReturnJson("0", "计划自动停收,不允许报名!"); } else if (flg == 7) { msg = UtilsCommons.AjaxReturnJson("0", "计划手动客满,不允许报名!"); } else if (flg == 8) { msg = UtilsCommons.AjaxReturnJson("0", "计划手动停收,不允许报名!"); } else if (flg == 1) { msg = UtilsCommons.AjaxReturnJson("0", "订单报名人数超过计划剩余人数!"); } else { msg = UtilsCommons.AjaxReturnJson("0", "订单报名失败!"); } } } else { msg = UtilsCommons.AjaxReturnJson("0", msg); } return(msg); }
/// <summary> /// 页面初始化 /// </summary> private void PageInit() { this.lblApplyMan.Text = SiteUserInfo.Name; this.lblApplyDateTime.Text = UtilsCommons.GetDateString(DateTime.Now, this.ProviderToDate); EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); string tourId = Utils.GetQueryStringValue("tourId"); string orderId = Utils.GetQueryStringValue("orderId"); string msg = string.Empty; //询价单位编号 string buyID = string.Empty; //销售员编号 string sellsID = string.Empty; //合计金额 decimal price = 0; decimal settePrice = 0; if (tourId != "") { this.hideTourId.Value = tourId; EyouSoft.BLL.TourStructure.BTour tourBll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.TourStructure.MTourTeamInfo model = (EyouSoft.Model.TourStructure.MTourTeamInfo)tourBll.GetTourInfo(tourId); if (model != null) { if (model.SaleInfo != null) { sellsID = model.SaleInfo.SellerId; } if (model.CompanyInfo != null) { buyID = model.CompanyInfo.CompanyId; } settePrice = price = model.SumPrice; } } if (orderId != "") { this.hideOrderId.Value = orderId; EyouSoft.BLL.TourStructure.BTourOrder orderBll = new EyouSoft.BLL.TourStructure.BTourOrder(); EyouSoft.Model.TourStructure.MTourOrderExpand orderModel = orderBll.GetTourOrderExpandByOrderId(orderId); if (orderModel != null) { sellsID = orderModel.SellerId; buyID = orderModel.BuyCompanyId; price = orderModel.SumPrice; settePrice = orderModel.ConfirmSettlementMoney; } } if (buyID != "" && sellsID != "" && price > 0) { EyouSoft.Model.FinStructure.MCustomerWarning customerWarningModel = bll.GetCustomerOverrunDetail(buyID, price, SiteUserInfo.CompanyId); EyouSoft.Model.FinStructure.MSalesmanWarning salesmanWarningModel = bll.GetSaleOverrunDetail(sellsID, settePrice, SiteUserInfo.CompanyId); if (customerWarningModel != null) { PageHtml[0] = "<tr><td height='28' bgcolor='#FFFFFF' align='center'>" + customerWarningModel.Customer + "</td><td bgcolor='#FFFFFF' align='center'><b class='fontbsize12'>" + UtilsCommons.GetMoneyString(customerWarningModel.AmountOwed, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><a class='link1'><strong>" + UtilsCommons.GetMoneyString(customerWarningModel.Arrear, this.ProviderToMoney) + "</strong></a></td><td bgcolor='#FFFFFF' align='center'><b class='fontgreen'>" + UtilsCommons.GetMoneyString(customerWarningModel.Transfinite, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'>" + UtilsCommons.GetDateString(customerWarningModel.TransfiniteTime, this.ProviderToDate) + "</td><td bgcolor='#FFFFFF' align='center'>" + customerWarningModel.Deadline.ToString() + "</td><td bgcolor='#FFFFFF' align='center'>" + (customerWarningModel.DeadDay <= 0 ? 0 : customerWarningModel.DeadDay) + "</td></tr>"; } else { this.phdKehu.Visible = false; } if (salesmanWarningModel != null) { PageHtml[1] = "<tr><td height='28' bgcolor='#FFFFFF' align='center'>" + salesmanWarningModel.SellerName + "</td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.AmountOwed, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.ConfirmAdvances, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.PreIncome, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><b class='fontblue'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.SumPay, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><b class='fontbsize12'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.Arrear, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><b class='fontgreen'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.Transfinite, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'>" + UtilsCommons.GetDateString(salesmanWarningModel.TransfiniteTime, this.ProviderToDate) + "</td></tr>"; } else { this.phdXiaoshou.Visible = false; } } else { this.phdKehu.Visible = false; this.phdXiaoshou.Visible = false; } }
/// <summary> /// 保存新的报价 /// </summary> /// <returns></returns> private string PageSave() { string msg = string.Empty; #region 获取表单 //线路区域编号 int areaID = Utils.GetInt(Utils.GetFormValue("sltArea")); //线路编号 string routeID = Utils.GetFormValue(this.hideRouteID.UniqueID); //线路名称 string routeName = Utils.GetFormValue(this.txt_RouteName.UniqueID); //天数 int days = Utils.GetInt(Utils.GetFormValue(this.txt_Days.UniqueID)); //客源地 国家 int countryID = Utils.GetInt(Utils.GetFormValue("sltCountry")); //客源地 省份 int provinceID = Utils.GetInt(Utils.GetFormValue("sltProvince")); //询价单位 编号 string buyCompanyID = Utils.GetFormValue(this.UC_CustomerUnitSelect.ClientNameKHBH); //询价单位 名称 string buyCompanyName = Utils.GetFormValue(this.UC_CustomerUnitSelect.ClientNameKHMC); //联系人 string contactName = Utils.GetFormValue(this.txt_Contact.UniqueID); //联系电话 string contactTel = Utils.GetFormValue(this.txt_ConTel.UniqueID); //销售员编号 string sellsID = Utils.GetFormValue(this.UC_SellsSelect.SellsIDClient); //销售员名称 string sellsName = Utils.GetFormValue(this.UC_SellsSelect.SellsNameClient); //报价员 取当前登录用户 EyouSoft.Model.TourStructure.MOperatorInfo operatorModel = new EyouSoft.Model.TourStructure.MOperatorInfo(); operatorModel.OperatorId = this.SiteUserInfo.UserId; operatorModel.Name = this.SiteUserInfo.Name; operatorModel.Phone = this.SiteUserInfo.Telephone; //成人数 int adultCount = Utils.GetInt(Utils.GetFormValue(this.txt_Adult.UniqueID)); //成人价格 decimal adultPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtAdultPrice.UniqueID)); //儿童数 int childCount = Utils.GetInt(Utils.GetFormValue(this.txt_Child.UniqueID)); //儿童价格 decimal childPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtChildPrice.UniqueID)); //其它价格 decimal otherPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtOtherPrice.UniqueID)); //行程特色 string planContent = Utils.EditInputText(Request.Form[this.txtPlanContent.UniqueID]); //价格备注 string quoteRemark = Utils.GetFormValue(this.txtQuoteRemark.UniqueID); //合计金额 decimal sumPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSumPrice.UniqueID)); //询价员 string toOper = Utils.GetFormValue("hideToOperID"); #region 未超限表单获取 //出团时间 DateTime successDateBegin = Utils.GetDateTime(Utils.GetFormValue(this.txtSuccessDateBegin.UniqueID), DateTime.Now); //出发交通 string successsStraffBegin = Utils.GetFormValue(this.txtSuccesssStraffBegin.UniqueID); //返回交通 string successsStraffEnd = Utils.GetFormValue(this.txtSuccesssStraffEnd.UniqueID); //集合方式 string successGather = Utils.GetFormValue(this.txtSuccessGather.UniqueID); //增加费用 decimal successAddPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessAddPrice.UniqueID), 0); //增加费用备注 string successAddPriceRemark = Utils.GetFormValue(this.txtSuccessAddPriceRemark.UniqueID); //减少费用 decimal successReducePrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessReducePrice.UniqueID)); //减少费用备注 string successReducePriceRemark = Utils.GetFormValue(this.txtSuccessReducePriceRemark.UniqueID); //导游现收 decimal successGuideIncome = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessGuideIncome.UniqueID)); //订单备注 string successOrderRemark = Utils.GetFormValue(this.txtSuccessOrderRemark.UniqueID); //是否询价 bool isPlanerQuote = Utils.GetFormValue(this.cbxJdxj.UniqueID) == "on" ? true : false; //签证附件(新) string[] visaUpload = Utils.GetFormValues(this.UploadControl1.ClientHideID); string[] oldVisaUpload = Utils.GetFormValues("hideVisaFile"); //联系人部门编号 string contactDeptId = Utils.GetFormValue(this.hideContactDeptId.UniqueID); #endregion #endregion //1=保存,2=报价超限,3=报价未超,4=保存新报价 string saveType = Utils.GetQueryStringValue("saveType"); //如果是保存和保存新报价 则不做控制 if (saveType == "1" || saveType == "4") { #region 表单后台验证 if (areaID == 0) { msg = "请选择线路区域!"; } if (routeName == "") { msg += "<br />请输入线路名称!"; } if (days == 0) { msg += "<br />请输入天数!"; } if (buyCompanyID == "") { msg += "<br />请输入询价单位!"; } if (sellsID == "") { msg += "<br />请输入销售员!"; } if (adultCount == 0) { msg += "<br />请输入成人数!"; } if (adultPrice == 0) { msg += "<br />请输入成人价!"; } if (msg != "") { return(UtilsCommons.AjaxReturnJson("0", msg)); } #endregion } EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); EyouSoft.Model.TourStructure.MTourQuoteInfo model = new EyouSoft.Model.TourStructure.MTourQuoteInfo(); string act = Utils.GetQueryStringValue("act"); string qid = Utils.GetQueryStringValue("id"); model.AdultPrice = adultPrice; model.Adults = adultCount; model.AdvanceApp = null; model.AreaId = areaID; model.BuyCompanyID = buyCompanyID; model.BuyCompanyName = buyCompanyName; model.IsPlanerQuote = isPlanerQuote; model.ChildPrice = childPrice; model.Childs = childCount; model.CompanyId = SiteUserInfo.CompanyId; model.CompanyInfo = new EyouSoft.Model.TourStructure.MCompanyInfo() { CompanyId = buyCompanyID, CompanyName = buyCompanyName, Contact = contactName, Phone = contactTel }; model.Contact = contactName; string costCalculation = string.Empty; EyouSoft.Model.TourStructure.MTourService tourService = UtilsCommons.GetTourService(out costCalculation); model.TourService = tourService; model.CostCalculation = costCalculation; model.CountryId = countryID; model.Days = days; model.InquiryTime = DateTime.Now; model.IsPlanerQuote = false; model.MTourQuoteTourInfo = null; model.OperatorInfo = new EyouSoft.Model.TourStructure.MOperatorInfo(); model.OperatorInfo.OperatorId = this.SiteUserInfo.UserId; model.OperatorInfo.Name = this.SiteUserInfo.Name; model.OperatorInfo.Phone = this.SiteUserInfo.Telephone; model.OtherCost = otherPrice; if (isPlanerQuote) { model.PlanerId = toOper; } #region 签证附件 IList <EyouSoft.Model.ComStructure.MComAttach> visaList = null; if (visaUpload.Length > 0) { visaList = new List <EyouSoft.Model.ComStructure.MComAttach>(); for (int i = 0; i < visaUpload.Length; i++) { if (visaUpload[i].Trim() != "") { if (visaUpload[i].Split('|').Length > 1) { EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach(); visaModel.Downloads = 0; visaModel.FilePath = visaUpload[i].Split('|')[1]; visaModel.ItemType = EyouSoft.Model.EnumType.ComStructure.AttachItemType.报价签证资料; visaModel.Name = visaUpload[i].Split('|')[0]; visaModel.Size = 0; visaList.Add(visaModel); } } } } if (oldVisaUpload.Length > 0) { if (visaList == null) { visaList = new List <EyouSoft.Model.ComStructure.MComAttach>(); } for (int i = 0; i < oldVisaUpload.Length; i++) { EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach(); visaModel.Downloads = Utils.GetInt(oldVisaUpload[i].Split('|')[2]); visaModel.FilePath = oldVisaUpload[i].Split('|')[1]; visaModel.ItemType = EyouSoft.Model.EnumType.ComStructure.AttachItemType.报价签证资料; visaModel.Name = oldVisaUpload[i].Split('|')[0]; visaModel.Size = 0; visaList.Add(visaModel); } } model.VisaFileList = visaList; #endregion Dictionary <string, object> quoteType = UtilsCommons.GetServiceType(); bool IsTourOrSubentry = (bool)quoteType["IsTourOrSubentry"]; if (IsTourOrSubentry) { //整团 model.ServiceStandard = quoteType["Service"].ToString(); model.OutQuoteType = EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团; } else { //分项 model.TourTeamPrice = (IList <EyouSoft.Model.TourStructure.MTourTeamPrice>)quoteType["Service"]; model.OutQuoteType = EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项; } model.Phone = contactTel; model.ContactDepartId = contactDeptId; model.PlanFeature = planContent; model.ProvinceId = provinceID; model.QuotePlan = UtilsCommons.GetPlanList(); model.QuoteRemark = quoteRemark; model.QuoteState = EyouSoft.Model.EnumType.TourStructure.QuoteState.未处理; model.QuoteType = (EyouSoft.Model.EnumType.TourStructure.ModuleType)(type - 1); model.RouteId = routeID; model.RouteName = routeName; model.TotalPrice = sumPrice; model.QuoteId = qid; //获得销售员信息实体 EyouSoft.Model.ComStructure.MComUser sellsModel = new EyouSoft.BLL.ComStructure.BComUser().GetModel(sellsID, SiteUserInfo.CompanyId); if (sellsModel != null) { model.SaleInfo = new EyouSoft.Model.TourStructure.MSaleInfo(); model.SaleInfo.SellerId = sellsID; model.SaleInfo.Name = sellsName; model.SaleInfo.Phone = sellsModel.ContactMobile; model.SaleInfo.DeptId = sellsModel.DeptId; } bool result = false; //新增,修改,复制 if (saveType == "1") { if (act == "add" || act == "copy") { model.ParentId = "0"; result = bll.AddTourQuote(model); msg = UtilsCommons.AjaxReturnJson("1", "新增报价成功,正在跳转.."); } if (act == "update") { model.QuoteId = qid; model.UpdateTime = DateTime.Now; result = bll.UpdateTourQuote(model); msg = UtilsCommons.AjaxReturnJson("1", "修改成功,正在跳转.."); } } //超限实体赋值 if (saveType == "2") { model.AdvanceApp = new EyouSoft.Model.TourStructure.MAdvanceApp(); model.AdvanceApp.Applier = this.SiteUserInfo.Name; model.AdvanceApp.ApplierId = this.SiteUserInfo.UserId; //model.AdvanceApp.DisburseAmount = applyPrice; //model.AdvanceApp.ApplyTime = applyDateTime; model.AdvanceApp.DeptId = this.SiteUserInfo.DeptId; //model.AdvanceApp.Remark = applyRemarks; model.MTourQuoteTourInfo = null; int r = bll.SuccessTourQuote(model); result = (r == 1 || r == 3) ? true : false; msg = UtilsCommons.AjaxReturnJson("1", "成功提交垫付申请,等待审核!"); } //未超限实体赋值 if (saveType == "3") { model.MTourQuoteTourInfo = new EyouSoft.Model.TourStructure.MTourQuoteTourInfo(); model.MTourQuoteTourInfo.AddCostRemark = successAddPriceRemark; model.MTourQuoteTourInfo.Gather = successGather; model.MTourQuoteTourInfo.GuideIncome = successGuideIncome; model.MTourQuoteTourInfo.LDate = successDateBegin; model.MTourQuoteTourInfo.LTraffic = successsStraffBegin; model.MTourQuoteTourInfo.OrderRemark = successOrderRemark; model.MTourQuoteTourInfo.ReduceCostRemark = successReducePriceRemark; model.MTourQuoteTourInfo.RTraffic = successsStraffEnd; model.MTourQuoteTourInfo.SaleAddCost = successAddPrice; model.MTourQuoteTourInfo.SaleReduceCost = successReducePrice; model.MTourQuoteTourInfo.SalerIncome = sumPrice - successGuideIncome; model.AdvanceApp = null; switch (type) { case 1: model.MTourQuoteTourInfo.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.组团团队; model.MTourQuoteTourInfo.Traveller = UtilsCommons.GetTravelList(); break; case 2: model.MTourQuoteTourInfo.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.地接团队; model.MTourQuoteTourInfo.Traveller = UtilsCommons.GetTravelList(); break; case 3: model.MTourQuoteTourInfo.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.出境团队; model.MTourQuoteTourInfo.Traveller = UtilsCommons.GetTravelListS(); break; } model.MTourQuoteTourInfo.TourStatus = EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划; model.UpdateTime = DateTime.Now; int successState = bll.SuccessTourQuote(model); switch (successState) { case 2: msg = UtilsCommons.AjaxReturnJson("1", "报价成功!"); result = true; break; case 4: msg = UtilsCommons.AjaxReturnJson("0", "操作失败!"); break; case 5: msg = UtilsCommons.AjaxReturnJson("2", "报价成功,但销售员超限!,是否需要进行收款操作?"); result = true; break; case 6: msg = UtilsCommons.AjaxReturnJson("2", "报价成功,但客户单位超限!,是否需要进行收款操作?"); result = true; break; case 7: msg = UtilsCommons.AjaxReturnJson("2", "报价成功,但销售员和客户单位超限!,是否需要进行收款操作?"); result = true; break; default: msg = UtilsCommons.AjaxReturnJson("0", "操作失败!"); break; } if (successState == 1) { msg = UtilsCommons.AjaxReturnJson("0", "超限、垫付申请中,不能报价!"); } if (successState == 2) { msg = UtilsCommons.AjaxReturnJson("1", "报价成功!"); result = true; } } if (saveType == "4") { model.ParentId = Utils.GetFormValue(this.hideFristQuoteId.UniqueID); result = bll.AddNewTourQuote(model); msg = UtilsCommons.AjaxReturnJson("1", "新增新报价成功,正在跳转.."); } if (saveType == "5") { result = bll.CalcelTourQuote(qid, Utils.GetFormValue("txtCanelRemark")); msg = UtilsCommons.AjaxReturnJson("1", "取消成功,正在跳转.."); } if (!result) { msg = UtilsCommons.AjaxReturnJson("0", "操作失败,请稍后尝试!"); } return(msg); //model.CancelReason = ""; //model.IsLatest //model.OrderCode = ""; //model.OrderId = ""; //model.Planer //model.TimeCount //model.TotalPrice //model.TourPrice //model.TourQuoteNo //model.UpdateTime //model.VisaFileList }
/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit(string id) { #region 用户控件初始化 this.UC_Journey.IsSuppliers = false; #endregion EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); EyouSoft.Model.TourStructure.MTourQuoteInfo model = bll.GetQuoteInfo(id); if (model != null) { #region 绑定报价次数 //如果其它报价有非处理的,那么该报价不能操作 bool isCanDo = true; string isCanDoQuote = string.Empty; if (model.TourQuoteNo != null && model.TourQuoteNo.Count > 0) { this.rptChildPrice.DataSource = model.TourQuoteNo.OrderBy(p => p.Times); this.rptChildPrice.DataBind(); //如果多次报价中有一个是未处理的,那就记录下来 var cdModel = model.TourQuoteNo.FirstOrDefault(p => p.QuoteState != EyouSoft.Model.EnumType.TourStructure.QuoteState.未处理); if (cdModel != null) { isCanDo = false; isCanDoQuote = cdModel.QuoteId; } //获得第一次报价的编号 var fristModel = model.TourQuoteNo.FirstOrDefault(p => p.Times == 1); if (fristModel != null) { this.hideFristQuoteId.Value = fristModel.QuoteId; } } else { this.phdPriceCount.Visible = false; this.hideFristQuoteId.Value = model.QuoteId; } #endregion this.hideOverrunState.Value = ((int)model.QuoteState).ToString(); BindAreaList(model.AreaId); this.CountryID = model.CountryId.ToString(); this.ProvinceID = model.ProvinceId.ToString(); this.hideRouteID.Value = model.RouteId; this.txt_RouteName.Text = model.RouteName; this.txt_Days.Text = model.Days.ToString(); this.UC_CustomerUnitSelect.CustomerUnitId = model.BuyCompanyID; this.UC_CustomerUnitSelect.CustomerUnitName = model.BuyCompanyName; this.txt_Contact.Text = model.Contact; this.txt_ConTel.Text = model.Phone; this.hideContactDeptId.Value = model.ContactDepartId; this.UC_SellsSelect.SellsID = model.SaleInfo.SellerId; this.UC_SellsSelect.SellsName = model.SaleInfo.Name; //this.cbxJdxj.Checked = model.IsPlanerQuote; this.lblQuote.Text = model.OperatorInfo.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.TotalPrice); this.txtQuoteRemark.Text = model.QuoteRemark; if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项) { this.UC_ForeignQuote.IsTourOrSubentry = false; this.UC_ForeignQuote.StandardTourList = model.TourTeamPrice; } else { this.UC_ForeignQuote.IsTourOrSubentry = true; this.UC_ForeignQuote.GroupService = model.ServiceStandard; } this.UC_Journey.SetPlanList = model.QuotePlan; UC_CostAccounting.CostCalculation = model.CostCalculation; UC_CostAccounting.NoNeedItem = model.TourService.NoNeedItem; UC_CostAccounting.ShoppingItem = model.TourService.ShoppingItem; UC_CostAccounting.ChildServiceItem = model.TourService.ChildServiceItem; UC_CostAccounting.OwnExpense = model.TourService.OwnExpense; UC_CostAccounting.NeedAttention = model.TourService.NeedAttention; UC_CostAccounting.WarmRemind = model.TourService.WarmRemind; UC_CostAccounting.InsiderInfor = model.TourService.InsiderInfor; //签证附件 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='AddPrice.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; } if (model.PlanerId != "") { if (model.Planer == "") { EyouSoft.Model.ComStructure.MComUser planerModel = new EyouSoft.BLL.ComStructure.BComUser().GetModel(model.PlanerId, SiteUserInfo.CompanyId); if (planerModel != null) { model.Planer = planerModel.ContactName; } } this.lblToOper.Text = "<span class='upload_filename'> 计调员:" + model.Planer + "<a href='javascript:void(0);' onclick='AddPrice.RemoveOper(this);return false;'> <img style='vertical-align:middle' src='/images/cha.gif'></a><input type='hidden' name='hideToOperID' value='" + model.PlanerId + "'></span>"; } this.phdSave.Visible = false; this.phdQuote.Visible = false; this.phdNewAdd.Visible = false; this.phdCanel.Visible = false; //如果其它报价有非处理的,那么该报价不能操作 if (isCanDo || (isCanDo == false && isCanDoQuote == model.QuoteId)) { switch (model.QuoteState) { case EyouSoft.Model.EnumType.TourStructure.QuoteState.报价成功: case EyouSoft.Model.EnumType.TourStructure.QuoteState.取消报价: break; case EyouSoft.Model.EnumType.TourStructure.QuoteState.垫付申请审核: this.litMsg.Text = "<div class='tishi_info'>该报价垫付申请审核中,无法操作!</div>"; //this.phdSave.Visible = true; //this.phdQuote.Visible = true; //this.phdCanel.Visible = true; break; case EyouSoft.Model.EnumType.TourStructure.QuoteState.审核成功: this.phdQuote.Visible = true; this.phdCanel.Visible = true; break; case EyouSoft.Model.EnumType.TourStructure.QuoteState.审核失败: this.phdCanel.Visible = true; break; case EyouSoft.Model.EnumType.TourStructure.QuoteState.未处理: this.phdSave.Visible = true; this.phdQuote.Visible = true; this.phdNewAdd.Visible = true; this.phdCanel.Visible = true; break; } } if (act == "copy") { this.phdPriceCount.Visible = false; this.phdSave.Visible = true; this.phdQuote.Visible = true; this.phdNewAdd.Visible = false; this.phdCanel.Visible = false; this.hideOverrunState.Value = "0"; this.UC_SellsSelect.SellsID = SiteUserInfo.UserId; this.UC_SellsSelect.SellsName = SiteUserInfo.Name; this.lblQuote.Text = SiteUserInfo.Name; this.litMsg.Visible = false; } //权限控制 BtnPowerControl(); //是否可以操作该数据 if (!SiteUserInfo.IsHandleElse && act != "copy") { if ((model.OperatorInfo != null && model.OperatorInfo.OperatorId != SiteUserInfo.UserId) || act == "forOper") { this.phdSave.Visible = false; this.phdQuote.Visible = false; this.phdNewAdd.Visible = false; this.phdCanel.Visible = false; } } } else { Utils.ResponseGoBack(); } }
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> private void DataInit() { #region 获取查询条件 //状态 string status = Utils.GetQueryStringValue("sltStatus"); string[] removeStatus = { ((int)QuoteState.垫付申请审核).ToString(), ((int)QuoteState.审核成功).ToString(), ((int)QuoteState.审核失败).ToString() }; this.litStatue.Text = UtilsCommons.GetEnumDDL(EyouSoft.Common.EnumObj.GetList(typeof(EyouSoft.Model.EnumType.TourStructure.QuoteState), removeStatus), status.ToString()); //获取分页参数并强转 pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page")); //线路区域ID int areaID = Utils.GetInt(Utils.GetQueryStringValue("ddlArea")); //线路ID、名称 //string lineId = Utils.GetQueryStringValue(""); string routeName = Utils.GetQueryStringValue("txtRouteName"); //询价单位 string comName = Utils.GetQueryStringValue(this.CustomerUnitSelect1.ClientNameKHMC); string comId = Utils.GetQueryStringValue(this.CustomerUnitSelect1.ClientNameKHBH); this.CustomerUnitSelect1.CustomerUnitId = comId; this.CustomerUnitSelect1.CustomerUnitName = comName; //销售员 string sellerId = Utils.GetQueryStringValue(this.SellsSelect1.ClientID + "_hideSellID"); string sellerName = Utils.GetQueryStringValue(this.SellsSelect1.ClientID + "_txtSellName"); this.SellsSelect1.SellsID = sellerId; this.SellsSelect1.SellsName = sellerName; //报价员 string operatorId = Utils.GetQueryStringValue(this.SellsSelect2.ClientID + "_hideSellID"); string operatorName = Utils.GetQueryStringValue(this.SellsSelect2.ClientID + "_txtSellName"); this.SellsSelect2.SellsID = operatorId; this.SellsSelect2.SellsName = operatorName; EyouSoft.Model.TourStructure.MTourQuoteSearch searchModel = new EyouSoft.Model.TourStructure.MTourQuoteSearch(); searchModel.AreaId = areaID; searchModel.BuyCompanyID = comId; searchModel.BuyCompanyName = comName; searchModel.OperatorId = operatorId; searchModel.Operator = operatorName; if (status != "") { searchModel.QuoteState = (EyouSoft.Model.EnumType.TourStructure.QuoteState)Utils.GetInt(status); } searchModel.RouteName = routeName; searchModel.SellerId = sellerId; searchModel.SellerName = sellerName; #endregion EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); IList <EyouSoft.Model.TourStructure.MTourQuoteInfo> list = bll.GetTourQuoteList(SiteUserInfo.CompanyId, pageSize, pageIndex, ref recordCount, searchModel, (EyouSoft.Model.EnumType.TourStructure.ModuleType)(type - 1)); if (list != null && list.Count > 0) { //绑定分页 rptList.DataSource = list; rptList.DataBind(); BindPage(); litMsg.Visible = false; } else { this.ExporPageInfoSelect1.Visible = false; this.ExporPageInfoSelect2.Visible = false; litMsg.Visible = true; } //释放 bll = null; list = null; }