Пример #1
0
        /// <summary>
        /// 初始化信息
        /// </summary>
        private void InitInfo()
        {
            string orderid = string.Empty;

            EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour();

            EyouSoft.Model.TourStructure.MTourBaseInfo baseModel = bll.GetTourInfo(TourId);

            if (baseModel == null)
            {
                RCWE("异常请求");
            }

            EyouSoft.Model.TourStructure.MTourTeamInfo   teamModel   = null;
            EyouSoft.Model.TourStructure.MTourSanPinInfo sanpinModel = null;

            switch (baseModel.TourType)
            {
            case EyouSoft.Model.EnumType.TourStructure.TourType.出境团队:
            case EyouSoft.Model.EnumType.TourStructure.TourType.地接团队:
            case EyouSoft.Model.EnumType.TourStructure.TourType.组团团队:
                teamModel = (EyouSoft.Model.TourStructure.MTourTeamInfo)baseModel;
                break;

            case EyouSoft.Model.EnumType.TourStructure.TourType.单项服务:
                this.TGuideNote.Visible           = false;
                this.TReceiveJourney.Visible      = false;
                this.TService.Visible             = false;
                this.ph_rpt_OrderinfoList.Visible = false;
                return;

            default:
                sanpinModel = (EyouSoft.Model.TourStructure.MTourSanPinInfo)baseModel;
                break;
            }

            #region 订单信息

            EyouSoft.BLL.TourStructure.BTourOrder           bllorder   = new EyouSoft.BLL.TourStructure.BTourOrder();
            EyouSoft.Model.TourStructure.MOrderSum          ordersum   = new EyouSoft.Model.TourStructure.MOrderSum();
            IList <EyouSoft.Model.TourStructure.MTourOrder> MtourOrder = bllorder.GetTourOrderListById(TourId, ref ordersum).Where(c => c.OrderStatus == EyouSoft.Model.EnumType.TourStructure.OrderStatus.已成交).ToList();
            if (MtourOrder != null && MtourOrder.Count > 0)
            {
                this.rpt_OrderinfoList.DataSource = MtourOrder;
                this.rpt_OrderinfoList.DataBind();
            }
            else
            {
                this.ph_rpt_OrderinfoList.Visible = false;
            }
            #endregion

            #region 团队信息
            if (teamModel != null)
            {
                this.lbRouteName.Text = teamModel.RouteName;
                this.lbTourCode.Text  = teamModel.TourCode;
                this.lbdayCount.Text  = teamModel.TourDays.ToString();
                this.lbstarttime.Text = UtilsCommons.GetDateString(teamModel.LDate, ProviderToDate);
                this.lbendtime.Text   = UtilsCommons.GetDateString(teamModel.RDate, ProviderToDate);
                if (teamModel.GuideList != null && teamModel.GuideList.Count > 0)
                {
                    string guidelist = string.Empty;
                    for (int i = 0; i < teamModel.GuideList.Count; i++)
                    {
                        if (i == teamModel.GuideList.Count - 1)
                        {
                            guidelist += teamModel.GuideList[i].Name;
                        }
                        else
                        {
                            guidelist += teamModel.GuideList[i].Name + "、";
                        }
                    }
                    this.lbguidename.Text = guidelist;
                }
                this.lbpeoplecount.Text = teamModel.PlanPeopleNumber.ToString();
                if (teamModel.TourPlaner != null && teamModel.TourPlaner.Count > 0)
                {
                    string planerlist = string.Empty;
                    for (int i = 0; i < teamModel.TourPlaner.Count; i++)
                    {
                        if (i == teamModel.TourPlaner.Count - 1)
                        {
                            planerlist += teamModel.TourPlaner[i].Planer;
                        }
                        else
                        {
                            planerlist += teamModel.TourPlaner[i].Planer + "、";
                        }
                    }

                    var jiDiaoInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(teamModel.TourPlaner[0].PlanerId, CurrentUserCompanyID);
                    if (jiDiaoInfo != null)
                    {
                        planerlist += " " + jiDiaoInfo.ContactMobile + " " + jiDiaoInfo.ContactTel;
                    }
                    this.lbplander.Text = planerlist;
                }
                if (teamModel.SaleInfo != null)
                {
                    var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(teamModel.SaleInfo.SellerId, CurrentUserCompanyID);
                    if (xiaoShouYuanInfo != null)
                    {
                        teamModel.SaleInfo.Mobile = xiaoShouYuanInfo.ContactMobile;
                        teamModel.SaleInfo.Phone  = xiaoShouYuanInfo.ContactTel;
                    }
                    this.lbsellerinfo.Text = teamModel.SaleInfo.Name + " " + teamModel.SaleInfo.Mobile + " " + teamModel.SaleInfo.Phone;
                }
            }
            else if (sanpinModel != null)
            {
                this.lbRouteName.Text = baseModel.RouteName;
                this.lbTourCode.Text  = baseModel.TourCode;
                this.lbdayCount.Text  = baseModel.TourDays.ToString();
                this.lbstarttime.Text = UtilsCommons.GetDateString(baseModel.LDate, ProviderToDate);
                this.lbendtime.Text   = UtilsCommons.GetDateString(baseModel.RDate, ProviderToDate);
                if (baseModel.GuideList != null && baseModel.GuideList.Count > 0)
                {
                    string guidelist = string.Empty;
                    for (int i = 0; i < baseModel.GuideList.Count; i++)
                    {
                        if (i == baseModel.GuideList.Count - 1)
                        {
                            guidelist += baseModel.GuideList[i].Name;
                        }
                        else
                        {
                            guidelist += baseModel.GuideList[i].Name + "、";
                        }
                    }
                    this.lbguidename.Text = guidelist;
                }
                this.lbpeoplecount.Text = baseModel.PlanPeopleNumber.ToString();
                if (baseModel.TourPlaner != null && baseModel.TourPlaner.Count > 0)
                {
                    string planerlist = string.Empty;
                    for (int i = 0; i < baseModel.TourPlaner.Count; i++)
                    {
                        if (i == baseModel.TourPlaner.Count - 1)
                        {
                            planerlist += baseModel.TourPlaner[i].Planer;
                        }
                        else
                        {
                            planerlist += baseModel.TourPlaner[i].Planer + "、";
                        }
                    }
                    var jiDiaoInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(baseModel.TourPlaner[0].PlanerId, CurrentUserCompanyID);
                    if (jiDiaoInfo != null)
                    {
                        planerlist += " " + jiDiaoInfo.ContactMobile + " " + jiDiaoInfo.ContactTel;
                    }
                    this.lbplander.Text = planerlist;
                }
                if (baseModel.SaleInfo != null)
                {
                    var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(baseModel.SaleInfo.SellerId, CurrentUserCompanyID);
                    if (xiaoShouYuanInfo != null)
                    {
                        baseModel.SaleInfo.Mobile = xiaoShouYuanInfo.ContactMobile;
                        baseModel.SaleInfo.Phone  = xiaoShouYuanInfo.ContactTel;
                    }
                    this.lbsellerinfo.Text = baseModel.SaleInfo.Name + " " + baseModel.SaleInfo.Mobile + " " + baseModel.SaleInfo.Phone;
                }
            }
            else
            {
                return;
            }
            #endregion

            #region 计调信息
            EyouSoft.BLL.PlanStructure.BPlan           bllPlan  = new EyouSoft.BLL.PlanStructure.BPlan();
            EyouSoft.Model.PlanStructure.MPlanBaseInfo planinfo = bllPlan.GetGuidePrint(TourId);

            #region 导游安排接待行程
            if (!string.IsNullOrEmpty(planinfo.ReceiveJourney))
            {
                TReceiveJourney.Visible    = true;
                this.lbReceiveJourney.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(planinfo.ReceiveJourney);
            }
            else
            {
                TReceiveJourney.Visible = false;
            }
            #endregion

            #region 导游安排服务标准
            if (!string.IsNullOrEmpty(planinfo.ServiceStandard))
            {
                TService.Visible            = true;
                this.lbServiceStandard.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(planinfo.ServiceStandard);
            }
            else
            {
                TService.Visible = false;
            }
            #endregion

            #region 导游须知
            if (!string.IsNullOrEmpty(planinfo.GuideNotes))
            {
                TGuideNote.Visible   = true;
                this.lbGuidNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(planinfo.GuideNotes);
            }
            else
            {
                this.TGuideNote.Visible = false;
            }
            #endregion

            #region  团队支付详单

            #region 导游

            IList <EyouSoft.Model.PlanStructure.MPlan> GuidePlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.导游, null, null, false, null, TourId, PlanState.已落实);
            GuidePlanList = GetZhiChus(GuidePlanList);
            if (GuidePlanList != null && GuidePlanList.Count > 0)
            {
                this.guid = GuidePlanList.Count;
                this.rpt_guid.DataSource = GuidePlanList;
                this.rpt_guid.DataBind();
            }
            else
            {
                this.ph_guid.Visible = false;
            }

            #endregion

            #region 地接

            IList <EyouSoft.Model.PlanStructure.MPlan> groundPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.地接, null, null, false, null, TourId, PlanState.已落实);
            groundPlanList = GetZhiChus(groundPlanList);
            if (groundPlanList != null && groundPlanList.Count > 0)
            {
                this.dijie = groundPlanList.Count;
                this.rpt_dijie.DataSource = groundPlanList;
                this.rpt_dijie.DataBind();
            }
            else
            {
                this.ph_dijie.Visible = false;
            }

            #endregion

            #region 飞机

            IList <EyouSoft.Model.PlanStructure.MPlan> phanePlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.飞机, null, null, false, null, TourId, PlanState.已落实);
            phanePlanList = GetZhiChus(phanePlanList);
            if (phanePlanList != null && phanePlanList.Count > 0)
            {
                this.plane = phanePlanList.Count;
                this.rpt_plane.DataSource = phanePlanList;
                this.rpt_plane.DataBind();
            }
            else
            {
                this.ph_plane.Visible = false;
            }

            #endregion

            #region 购物

            IList <EyouSoft.Model.PlanStructure.MPlan> shopPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.购物, null, null, false, null, TourId, PlanState.已落实);
            shopPlanList = GetZhiChus(shopPlanList);
            if (shopPlanList != null && shopPlanList.Count > 0)
            {
                this.gouwu = shopPlanList.Count;
                this.rpt_gouwu.DataSource = shopPlanList;
                this.rpt_gouwu.DataBind();
            }
            else
            {
                this.ph_gouwu.Visible = false;
            }

            #endregion

            #region 国内游轮

            IList <EyouSoft.Model.PlanStructure.MPlan> InshipPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.国内游轮, null, null, false, null, TourId, PlanState.已落实);
            InshipPlanList = GetZhiChus(InshipPlanList);
            if (InshipPlanList != null && InshipPlanList.Count > 0)
            {
                this.guoneichuan = InshipPlanList.Count;
                this.rpt_guoneichuan.DataSource = InshipPlanList;
                this.rpt_guoneichuan.DataBind();
            }
            else
            {
                this.ph_guoneichuan.Visible = false;
            }

            #endregion

            #region 涉外游轮

            IList <EyouSoft.Model.PlanStructure.MPlan> OutshipPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.涉外游轮, null, null, false, null, TourId, PlanState.已落实);
            OutshipPlanList = GetZhiChus(OutshipPlanList);
            if (OutshipPlanList != null && OutshipPlanList.Count > 0)
            {
                this.shewaichuan = OutshipPlanList.Count;
                this.rpt_shewaichuan.DataSource = OutshipPlanList;
                this.rpt_shewaichuan.DataBind();
            }
            else
            {
                this.ph_shewaichuan.Visible = false;
            }

            #endregion

            #region 火车

            IList <EyouSoft.Model.PlanStructure.MPlan> trainPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.火车, null, null, false, null, TourId, PlanState.已落实);
            trainPlanList = GetZhiChus(trainPlanList);
            if (trainPlanList != null && trainPlanList.Count > 0)
            {
                this.train = trainPlanList.Count;
                this.rpt_train.DataSource = trainPlanList;
                this.rpt_train.DataBind();
            }
            else
            {
                this.ph_train.Visible = false;
            }

            #endregion

            #region 景点

            IList <EyouSoft.Model.PlanStructure.MPlan> scenicPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.景点, null, null, false, null, TourId, PlanState.已落实);
            scenicPlanList = GetZhiChus(scenicPlanList);
            if (scenicPlanList != null && scenicPlanList.Count > 0)
            {
                this.jingdian = scenicPlanList.Count;
                this.rpt_jingdian.DataSource = scenicPlanList;
                this.rpt_jingdian.DataBind();
            }
            else
            {
                this.ph_jingdian.Visible = false;
            }

            #endregion

            #region 酒店

            IList <EyouSoft.Model.PlanStructure.MPlan> hotelPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.酒店, null, null, false, null, TourId, PlanState.已落实);
            hotelPlanList = GetZhiChus(hotelPlanList);
            if (hotelPlanList != null && hotelPlanList.Count > 0)
            {
                this.hotel = hotelPlanList.Count;
                this.rpt_hotellistk.DataSource = hotelPlanList;
                this.rpt_hotellistk.DataBind();
            }
            else
            {
                this.ph_hotel.Visible = false;
            }

            #endregion

            #region 领料

            IList <EyouSoft.Model.PlanStructure.MPlan> lingliaolPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.领料, null, null, false, null, TourId, PlanState.已落实);
            lingliaolPlanList = GetZhiChus(lingliaolPlanList);
            if (lingliaolPlanList != null && lingliaolPlanList.Count > 0)
            {
                this.lingliao = lingliaolPlanList.Count;
                this.rpt_lingliao.DataSource = lingliaolPlanList;
                this.rpt_lingliao.DataBind();
            }
            else
            {
                this.ph_lingliao.Visible = false;
            }

            #endregion

            #region 其它

            IList <EyouSoft.Model.PlanStructure.MPlan> otherlPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.其它, null, null, false, null, TourId, PlanState.已落实);
            otherlPlanList = GetZhiChus(otherlPlanList);
            if (otherlPlanList != null && otherlPlanList.Count > 0)
            {
                this.qita = otherlPlanList.Count;
                this.rpt_qita.DataSource = otherlPlanList;
                this.rpt_qita.DataBind();
            }
            else
            {
                this.ph_qita.Visible = false;
            }

            #endregion

            #region 汽车

            IList <EyouSoft.Model.PlanStructure.MPlan> busPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.汽车, null, null, false, null, TourId, PlanState.已落实);
            busPlanList = GetZhiChus(busPlanList);
            if (busPlanList != null && busPlanList.Count > 0)
            {
                this.bus = busPlanList.Count;
                this.rpt_bus.DataSource = busPlanList;
                this.rpt_bus.DataBind();
            }
            else
            {
                this.ph_bus.Visible = false;
            }

            #endregion

            #region 用餐

            IList <EyouSoft.Model.PlanStructure.MPlan> yongcanPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.用餐, null, null, false, null, TourId, PlanState.已落实);
            yongcanPlanList = GetZhiChus(yongcanPlanList);
            if (yongcanPlanList != null && yongcanPlanList.Count > 0)
            {
                this.yongcan = yongcanPlanList.Count;
                this.rpt_yongcan.DataSource = yongcanPlanList;
                this.rpt_yongcan.DataBind();
            }
            else
            {
                this.ph_yongcan.Visible = false;
            }

            #endregion

            #region 用车

            IList <EyouSoft.Model.PlanStructure.MPlan> carPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.用车, null, null, false, null, TourId, PlanState.已落实);
            carPlanList = GetZhiChus(carPlanList);
            if (carPlanList != null && carPlanList.Count > 0)
            {
                this.chedui = carPlanList.Count;
                this.rpt_chedui.DataSource = carPlanList;
                this.rpt_chedui.DataBind();
            }
            else
            {
                this.ph_chedui.Visible = false;
            }

            #endregion

            #endregion
            #endregion
        }
Пример #2
0
        /// <summary>
        /// 初始化团队信息
        /// </summary>
        /// <param name="tourID"></param>
        protected void DataInitTourInfo(string tourID)
        {
            if (!string.IsNullOrEmpty(tourID))
            {
                EyouSoft.Model.TourStructure.MTourBaseInfo tourInfo = new EyouSoft.BLL.TourStructure.BTour().GetTourInfo(tourID);
                if (tourInfo != null)
                {
                    TourType = (int)tourInfo.TourType;
                    this.litTourCode.Text = tourInfo.TourCode;
                    EyouSoft.Model.ComStructure.MComArea AreaModel = new EyouSoft.BLL.ComStructure.BComArea().GetModel(tourInfo.AreaId, SiteUserInfo.CompanyId);
                    if (AreaModel != null)
                    {
                        this.litAreaName.Text = AreaModel.AreaName;
                    }
                    AreaModel = null;

                    this.litRouteName.Text = tourInfo.RouteName;
                    this.litDays.Text      = tourInfo.TourDays.ToString();
                    this.litStartDate.Text = EyouSoft.Common.UtilsCommons.GetDateString(tourInfo.LDate, ProviderToDate);
                    this.litEndDate.Text   = EyouSoft.Common.UtilsCommons.GetDateString(tourInfo.RDate, ProviderToDate);

                    //人数
                    this.litPeoples.Text = tourInfo.PlanPeopleNumber.ToString();
                    //导游人数
                    if (tourInfo.GuideList != null && tourInfo.GuideList.Count > 0)
                    {
                        this.litGuidNames.Text = UtilsCommons.PingGuide(tourInfo.GuideList);
                    }
                    //需安排计调项
                    if (tourInfo.TourPlanItem != null && tourInfo.TourPlanItem.Count > 0)
                    {
                        for (int i = 0; i < tourInfo.TourPlanItem.Count; i++)
                        {
                            if (i == tourInfo.TourPlanItem.Count - 1)
                            {
                                strOperaterPlanHtml += "" + tourInfo.TourPlanItem[i].PlanType.ToString();
                            }
                            else
                            {
                                strOperaterPlanHtml += "" + tourInfo.TourPlanItem[i].PlanType.ToString() + "、";
                            }
                        }
                    }
                    else
                    {
                        this.planItemView.Visible = false;
                    }

                    //销售员
                    if (tourInfo.SaleInfo != null)
                    {
                        this.litSellers.Text = tourInfo.SaleInfo.Name;
                    }
                    //计调员
                    if (tourInfo.TourPlaner != null && tourInfo.TourPlaner.Count > 0)
                    {
                        this.litOperaters.Text = UtilsCommons.PingPlaner(tourInfo.TourPlaner);
                    }

                    if (tourInfo.TourService != null)
                    {
                        //内部信息
                        this.LitInterInfo.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.InsiderInfor);
                        //服务标准
                        //this.litCostAccount.Text = tourInfo.TourService.ServiceStandard;
                        //不含项目
                        this.litObjectItem.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.NoNeedItem);
                        //购物安排
                        this.litShoppPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.ShoppingItem);
                        //儿童安排
                        this.litChildrenPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.ChildServiceItem);
                        //自费项目
                        this.litExpenceObj.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.OwnExpense);
                        //注意事项
                        this.litAttenTion.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.NeedAttention);
                        //温馨提醒
                        this.litWenxinTix.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.TourService.WarmRemind);
                    }
                    //成本核算
                    this.litCostCalculation.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(tourInfo.CostCalculation);
                    //行程安排
                    this.dt = tourInfo.LDate.HasValue ? tourInfo.LDate.Value : DateTime.Now;
                    if (tourInfo.TourPlan != null && tourInfo.TourPlan.Count > 0)
                    {
                        this.repSchedulePlan.DataSource = tourInfo.TourPlan;
                        this.repSchedulePlan.DataBind();
                    }
                    //团队类型 散拼 组团
                    if (tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼 || tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼 || tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼)
                    {
                        //价格组成
                        EyouSoft.Model.TourStructure.MTourSanPinInfo SanpinInfo = (EyouSoft.Model.TourStructure.MTourSanPinInfo)tourInfo;
                        if (SanpinInfo != null)
                        {
                            if (SanpinInfo.MTourPriceStandard != null && SanpinInfo.MTourPriceStandard.Count > 0)
                            {
                                //客户等级列
                                System.Text.StringBuilder priceLeaveCols = new System.Text.StringBuilder();
                                priceLeaveCols.Append("<tr>");
                                //标价标准表头
                                TourPriceStandardHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"jd-table01\" style=\"border-bottom: 1px solid #A9D7EC;\">");
                                TourPriceStandardHtml.Append("<tr><th width=\"100\" rowspan=\"2\" align=\"center\" class=\"border-l\">标准</th>");

                                if (SanpinInfo.MTourPriceStandard[0].PriceLevel != null && SanpinInfo.MTourPriceStandard[0].PriceLevel.Count > 0)
                                {
                                    for (int i = 0; i < SanpinInfo.MTourPriceStandard[0].PriceLevel.Count; i++)
                                    {
                                        TourPriceStandardHtml.Append("<th colspan=\"2\" align=\"center\">" + SanpinInfo.MTourPriceStandard[0].PriceLevel[i].LevelName + "</th>");

                                        priceLeaveCols.Append("<th align=\"center\">成人</th><th align=\"center\">儿童</th>");
                                    }
                                    TourPriceStandardHtml.Append("</tr>");
                                    priceLeaveCols.Append("</tr>");
                                }
                                TourPriceStandardHtml.Append("" + priceLeaveCols.ToString() + "");

                                //报价标准价格
                                for (int j = 0; j < SanpinInfo.MTourPriceStandard.Count; j++)
                                {
                                    TourPriceStandardHtml.Append("<tr><td align=\"center\" class=\"border-l\">" + SanpinInfo.MTourPriceStandard[j].StandardName + "</td>");
                                    for (int k = 0; k < SanpinInfo.MTourPriceStandard[j].PriceLevel.Count; k++)
                                    {
                                        TourPriceStandardHtml.Append("<th align=\"center\">" + Utils.FilterEndOfTheZeroDecimal(SanpinInfo.MTourPriceStandard[j].PriceLevel[k].AdultPrice) + "</th><th align=\"center\">" + Utils.FilterEndOfTheZeroDecimal(SanpinInfo.MTourPriceStandard[j].PriceLevel[k].ChildPrice) + "</th>");
                                    }
                                }
                                TourPriceStandardHtml.Append("</tr></table>");
                            }

                            if (SanpinInfo.TourService != null)
                            {
                                litCostAccount.Text = SanpinInfo.TourService.ServiceStandard;
                                phFWBZ.Visible      = true;
                            }
                        }
                        SanpinInfo = null;
                    }
                    if (tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境团队 || tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接团队 || tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团团队)
                    {
                        //对外报价 整团 分项
                        EyouSoft.Model.TourStructure.MTourTeamInfo TeamInfo = (EyouSoft.Model.TourStructure.MTourTeamInfo)tourInfo;
                        if (TeamInfo != null)
                        {
                            if (TeamInfo.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项)
                            {
                                //分项报价
                                if (TeamInfo.TourTeamPrice != null && TeamInfo.TourTeamPrice.Count > 0)
                                {
                                    this.repQuoteList.DataSource = TeamInfo.TourTeamPrice;
                                    this.repQuoteList.DataBind();
                                }
                            }
                            else
                            {
                                this.litServerStandard.Text = TeamInfo.TourService != null?EyouSoft.Common.Function.StringValidate.TextToHtml(TeamInfo.TourService.ServiceStandard) : "";
                            }
                            BaoJiaType = (int)TeamInfo.OutQuoteType;
                            //成人价
                            this.litAdultPrices.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(TeamInfo.AdultPrice, ProviderToMoney);
                            //儿童价
                            this.litChilrenPrices.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(TeamInfo.ChildPrice, ProviderToMoney);
                            //其它费用
                            this.litOtherPrices.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(TeamInfo.OtherCost, ProviderToMoney);
                            //合计费用
                            this.litAccountPrices.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(TeamInfo.SumPrice, ProviderToMoney);
                        }
                        TeamInfo = null;
                    }
                }
                tourInfo = null;
            }
        }
Пример #3
0
        /// <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;
            }
        }
Пример #4
0
        /// <summary>
        /// 团款详细信息
        /// </summary>
        /// <param name="orderID">订单类型</param>
        /// <param name="tourType">团队类型</param>
        protected void DataInit()
        {
            string orderId  = Utils.GetQueryStringValue("OrderId");
            int    tourType = Utils.GetInt(Utils.GetQueryStringValue("tourType"));
            string action   = Utils.GetQueryStringValue("action");

            var privs = (action == "3") ? EyouSoft.Model.EnumType.PrivsStructure.Privs.财务管理_应收管理_确认合同金额 : EyouSoft.Model.EnumType.PrivsStructure.Privs.销售中心_销售收款_确认合同金额;

            pan_Save.Visible = (action == "1" || action == "3") && CheckGrant(privs);

            if (!string.IsNullOrEmpty(orderId))
            {
                EyouSoft.Model.TourStructure.MOrderSale salesmodel = new EyouSoft.BLL.TourStructure.BTourOrder().GetSettlementOrderByOrderId(orderId, (EyouSoft.Model.EnumType.TourStructure.TourType)tourType);
                if (salesmodel != null)
                {
                    EyouSoft.Model.TourStructure.MTourBaseInfo tourInfo = new EyouSoft.BLL.TourStructure.BTour().GetTourInfo(salesmodel.TourId);

                    string _printPageJSD = new EyouSoft.BLL.ComStructure.BComSetting().GetPrintUri(SiteUserInfo.CompanyId, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.结算单);
                    ltrCaoZuoTiShi.Text = string.Format("<a target=\"_blank\"  class=\"unbtn\" href=\"{0}?OrderId={1}&tourType={2}\">查看确认件</a>", _printPageJSD, salesmodel.OrderId, (int)tourInfo.TourType);

                    //已经确认过合同金额的不可再确认
                    if (salesmodel.ConfirmMoneyStatus)
                    {
                        pan_Save.Visible     = false;
                        ltrCaoZuoTiShi.Text += string.Format("合同金额已确认&nbsp;&nbsp;&nbsp;&nbsp;", salesmodel.OrderId, (int)tourInfo.TourType);

                        if (CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.销售中心_销售收款_取消确认合同金额))
                        {
                            ph_QuXiaoQueRen.Visible = true;
                        }
                    }

                    //非订单销售员不可确认合同金额
                    if (pan_Save.Visible && salesmodel.SellerId != SiteUserInfo.UserId)
                    {
                        pan_Save.Visible     = false;
                        ltrCaoZuoTiShi.Text += "非订单销售员不能确认合同金额&nbsp;&nbsp;&nbsp;&nbsp;";
                    }

                    if (salesmodel.ConfirmMoneyStatus)
                    {
                        this.txtSettlementName.Text = salesmodel.ConfirmPeople;
                    }
                    else
                    {
                        this.txtSettlementName.Text = this.SiteUserInfo.Name;
                    }
                    this.txtChangeAddMoney.Text    = Utils.FilterEndOfTheZeroDecimal(salesmodel.SumPriceAddCost);
                    this.txtChangeRemark.Text      = salesmodel.SumPriceAddCostRemark;
                    this.txtChangelessonMoney.Text = Utils.FilterEndOfTheZeroDecimal(salesmodel.SumPriceReduceCost);
                    this.txtChangeRemarks.Text     = salesmodel.SumPriceReduceCostRemark;
                    decimal sumPrices  = salesmodel.SumPrice;
                    decimal addPrices  = salesmodel.SumPriceAddCost;
                    decimal lessPrices = salesmodel.SumPriceReduceCost;
                    //decimal countPrices = sumPrices + addPrices - lessPrices;
                    this.txtComfirmMoney.Text  = Utils.FilterEndOfTheZeroDecimal(salesmodel.ConfirmMoney);
                    this.hidComfirmMoney.Value = Utils.FilterEndOfTheZeroDecimal(salesmodel.ConfirmMoney);
                    this.txtchangeEsplain.Text = salesmodel.ConfirmRemark;
                    //已支付金额
                    this.litpayMoney.Text  = EyouSoft.Common.UtilsCommons.GetMoneyString(salesmodel.CheckMoney, ProviderToMoney);
                    this.hidPayMoney.Value = Utils.FilterEndOfTheZeroDecimal(salesmodel.CheckMoney);
                    decimal payMoney  = salesmodel.CheckMoney;
                    decimal debtMoney = salesmodel.ConfirmMoney - payMoney;
                    //尚欠金额
                    this.txtDebtMoney.Text = Utils.FilterEndOfTheZeroDecimal(debtMoney);

                    //出团时间
                    this.litLDate.Text = EyouSoft.Common.UtilsCommons.GetDateString(salesmodel.LDate, ProviderToDate);
                    //线路名称
                    this.litRouteName.Text = salesmodel.RouteName;
                    //订单信息
                    this.litorderCode.Text    = salesmodel.OrderCode;
                    this.litCompanyName.Text  = salesmodel.BuyCompanyName;
                    this.litContectName.Text  = salesmodel.ContactName;
                    this.litContectPhone.Text = salesmodel.ContactTel;
                    //退款信息
                    if (salesmodel.TourOrderSalesList != null && salesmodel.TourOrderSalesList.Count > 0)
                    {
                        this.repTourOrderSalesList.DataSource = salesmodel.TourOrderSalesList;
                        this.repTourOrderSalesList.DataBind();
                    }
                    else
                    {
                        phTuiKuan.Visible = false;
                    }
                    //增加费用 备注
                    this.litAddMoney.Text  = EyouSoft.Common.UtilsCommons.GetMoneyString(salesmodel.SaleAddCost, ProviderToMoney);
                    this.litAddRemark.Text = salesmodel.SaleAddCostRemark;
                    //减少费用 备注
                    this.litlessenMoney.Text  = EyouSoft.Common.UtilsCommons.GetMoneyString(salesmodel.SaleReduceCost, ProviderToMoney);
                    this.litlessenRemark.Text = salesmodel.SaleReduceCostRemark;
                    //合计费用
                    this.litAccountPrices.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(salesmodel.SumPrice, ProviderToMoney);
                    //订单合计金额
                    this.hidAccountPrices.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroDecimal(salesmodel.SumPrice);

                    string _jiaGeHtml = string.Empty;
                    _jiaGeHtml += string.Format("成人价:<b>{0}</b> * 成人数:<b>{1}</b>", salesmodel.AdultPrice.ToString("F2"), salesmodel.Adults);
                    _jiaGeHtml += string.Format(" + 儿童价:<b>{0}</b> * 儿童数:<b>{1}</b>", salesmodel.ChildPrice.ToString("F2"), salesmodel.Childs);

                    if (tourInfo != null)
                    {
                        if (tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接团队 ||
                            tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团团队 ||
                            tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境团队)
                        {
                            //对外报价 整团 分项
                            EyouSoft.Model.TourStructure.MTourTeamInfo TeamInfo = (EyouSoft.Model.TourStructure.MTourTeamInfo)tourInfo;
                            if (TeamInfo != null)
                            {
                                if (TeamInfo.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项)
                                {
                                    //分项报价
                                    if (TeamInfo.TourTeamPrice != null && TeamInfo.TourTeamPrice.Count > 0)
                                    {
                                        this.repForeignQuotelist.DataSource = TeamInfo.TourTeamPrice;
                                        this.repForeignQuotelist.DataBind();
                                    }
                                    this.TourQuoteView1.Visible = true;
                                }
                                else
                                {
                                    this.litServerStandard.Text = TeamInfo.TourService != null ? TeamInfo.TourService.ServiceStandard : "";
                                    this.TourQuoteView.Visible  = true;
                                }
                            }

                            _jiaGeHtml += string.Format(" + 其它费用:<b>{0}</b> ", salesmodel.OtherCost.ToString("F2"));
                        }

                        if (tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼 ||
                            tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼 ||
                            tourInfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼)
                        {
                        }
                    }

                    ltrJiaGe.Text = _jiaGeHtml;

                    if (!string.IsNullOrEmpty(salesmodel.DingDanBeiZhu))
                    {
                        ltrDingDanBeiZhu.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(salesmodel.DingDanBeiZhu);
                    }

                    if (!string.IsNullOrEmpty(salesmodel.NeiBuXinXi))
                    {
                        ltrNeiBuXinXi.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(salesmodel.NeiBuXinXi);
                    }
                }
            }
        }