/// <summary>
        /// 初始化团队信息
        /// </summary>
        void InitTourInfo()
        {
            EyouSoft.Model.TourStructure.MTourBaseInfo baseinfo = new EyouSoft.BLL.TourStructure.BTour().GetTourInfo(TourId);

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

            this.litRouteName.Text = baseinfo.RouteName;
            this.litStartTime.Text = UtilsCommons.GetDateString(baseinfo.LDate, ProviderToDate);
            this.litTourCode.Text  = baseinfo.TourCode;
            this.litDays.Text      = baseinfo.TourDays.ToString();
            this.litAdults.Text    = baseinfo.Adults.ToString();
            this.litChilds.Text    = baseinfo.Childs.ToString();
            if (baseinfo.SaleInfo != null)
            {
                this.litSellersName.Text = baseinfo.SaleInfo.Name;
            }
            this.litOperaterName.Text = UtilsCommons.PingPlaner(baseinfo.TourPlaner);
            this.litGuidName.Text     = UtilsCommons.PingGuide(baseinfo.GuideList);

            TourType = baseinfo.TourType;

            if (baseinfo.TourStatus != EyouSoft.Model.EnumType.TourStructure.TourStatus.待终审)
            {
                this.panView.Visible = false;
            }
            else
            {
                this.panViewReturnOp.Visible  = CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.计调中心_计调终审_退回计调操作) && (baseinfo.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.待终审);
                this.panViewSubmitFin.Visible = CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.计调中心_计调终审_提交财务操作) && (baseinfo.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.待终审);
            }
        }
Exemple #2
0
        /// <summary>
        /// 初始化团队实体数据
        /// </summary>
        /// <param name="tourId">团队编号</param>
        private void TourModelInit(string tourId)
        {
            MTourBaseInfo model = new BTour().GetTourInfo(tourId);

            if (model != null)
            {
                TourCode = model.TourCode;
                //线路名称
                lbl_routeName.Text = model.RouteName;
                //出团时间
                lbl_lDate.Text = UtilsCommons.GetDateString(model.LDate, ProviderToDate);
                //团号
                lbl_tourCode.Text = model.TourCode;
                //团队天数
                lbl_tourDays.Text = model.TourDays.ToString();
                //人数
                lbl_number.Text = string.Format("<b class=fontblue>{0}</b><sup class=fontred>+{1}</sup>", model.Adults, model.Childs);
                //销售
                lbl_saleInfoName.Text = model.SaleInfo.Name;
                //计调
                lbl_tourPlaner.Text = UtilsCommons.PingPlaner(model.TourPlaner);
                //导游
                lbl_mGuidInfoName.Text = UtilsCommons.PingGuide(model.GuideList);
            }
        }
        /// <summary>
        /// 初始化团队实体数据
        /// </summary>
        /// <param name="tourId">团队编号</param>
        private void TourModelInit(string tourId)
        {
            MTourBaseInfo model = new BTour().GetTourInfo(tourId);

            if (model != null)
            {
                //团号
                lbl_TourCode.Text = model.TourCode;
                //线路区域
                EyouSoft.Model.ComStructure.MComArea AreaModel = new EyouSoft.BLL.ComStructure.BComArea().GetModel(model.AreaId, SiteUserInfo.CompanyId);
                if (AreaModel != null)
                {
                    this.lbl_AreaName.Text = AreaModel.AreaName;
                }
                AreaModel = null;

                //线路名称
                lbl_RouteName.Text = model.RouteName;
                //天数
                lbl_TourDays.Text = model.TourDays.ToString();
                //出发时间
                lbl_LDate.Text = UtilsCommons.GetDateString(model.LDate, ProviderToDate);
                //返回时间
                lbl_RDate.Text = UtilsCommons.GetDateString(model.RDate, ProviderToDate);
                //导游
                lbl_TourGride.Text = UtilsCommons.PingGuide(model.GuideList);
                //出发交通
                lbl_LTraffic.Text = model.LTraffic;
                //销售员
                this.hideSaleId.Value = model.SaleInfo.SellerId;
                lbl_SaleInfo.Text     = model.SaleInfo.Name;
                //返回交通
                lbl_RTraffic.Text = model.RTraffic;
                //计调
                lbl_TourPlaner.Text = UtilsCommons.PingPlaner(model.TourPlaner);
                //集合方式
                lbl_Gather.Text = model.Gather;
            }
        }
        /// <summary>
        /// 初始化团队信息
        /// </summary>
        /// <param name="tourID">团号</param>
        protected void DataInit(string tourID)
        {
            if (!string.IsNullOrEmpty(tourID))
            {
                EyouSoft.Model.TourStructure.MTourBaseInfo tourInfo = new EyouSoft.BLL.TourStructure.BTour().GetTourInfo(tourID);
                if (tourInfo != null)
                {
                    this.litTourCode.Text = tourInfo.TourCode;
                    if (!string.IsNullOrEmpty(tourInfo.AreaId.ToString()))
                    {
                        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 = UtilsCommons.GetDateString(tourInfo.LDate, ProviderToDate);
                    this.litPeoples.Text   = tourInfo.PlanPeopleNumber.ToString();
                    this.litEndDate.Text   = UtilsCommons.GetDateString(tourInfo.RDate, ProviderToDate);
                    //带团导游
                    if (tourInfo.GuideList != null && tourInfo.GuideList.Count > 0)
                    {
                        this.litGuidNames.Text = UtilsCommons.PingGuide(tourInfo.GuideList);
                    }

                    //销售员
                    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.TourPlanItem != null && tourInfo.TourPlanItem.Count > 0)
                    {
                        for (int i = 0; i < tourInfo.TourPlanItem.Count; i++)
                        {
                            if (i == tourInfo.TourPlanItem.Count - 1)
                            {
                                this.litPlanItems.Text += "" + tourInfo.TourPlanItem[i].PlanType.ToString() + "";
                            }
                            else
                            {
                                this.litPlanItems.Text += "" + tourInfo.TourPlanItem[i].PlanType.ToString() + ",";
                            }
                        }
                    }

                    //团队状态
                    if (ret)
                    {
                        this.BtnglobalAction.Visible = !EyouSoft.Common.UtilsCommons.GetTourStatusByTourID(SiteUserInfo.CompanyId, tourID);
                    }
                    else
                    {
                        this.BtnglobalAction.Visible = false;
                    }

                    if (tourInfo.TourService != null)
                    {
                        ltrNeiBuXinXi.Text = tourInfo.TourService.InsiderInfor;
                    }
                    ltrChengBenHeSuan.Text = tourInfo.CostCalculation;
                }
            }
        }
Exemple #5
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;
            }
        }
Exemple #6
0
        protected void InitPage(string tourId)
        {
            //核算单
            MTourBaseInfo model = new BTour().GetTourInfo(tourId);

            if (model != null)
            {
                this.lbRouteName.Text = model.RouteName;
                this.lbTourCode.Text  = model.TourCode;
                this.lbLDate.Text     = model.LDate.HasValue ? model.LDate.Value.ToString("yyyy-MM-dd") : "";
                this.lbTourDays.Text  = model.TourDays.ToString();
                this.lbPersonNum.Text = string.Format("<b class=fontblue>{0}</b><sup class=fontred>+{1}</sup>", model.Adults, model.Childs);
                this.lbSeller.Text    = model.SaleInfo.Name;
                if (model.GuideList != null && model.GuideList.Count > 0)
                {
                    this.lbGuid.Text = UtilsCommons.PingGuide(model.GuideList);
                }
                if (model.TourPlaner != null && model.TourPlaner.Count > 0)
                {
                    this.lbTourPlaner.Text = UtilsCommons.PingPlaner(model.TourPlaner);
                }
            }
            //团款收入
            EyouSoft.Model.TourStructure.MOrderSum          orders    = new EyouSoft.Model.TourStructure.MOrderSum();
            IList <EyouSoft.Model.TourStructure.MTourOrder> tourOrder = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(ref orders, tourId);

            if (tourOrder != null && tourOrder.Count > 0)
            {
                this.rpt_tuankuan.DataSource = tourOrder;
                this.rpt_tuankuan.DataBind();
                this.lbConfirmMoneyCount.Text    = UtilsCommons.GetMoneyString(orders.ConfirmMoney, ProviderToMoney);
                this.lbSettlementMoneyCount.Text = UtilsCommons.GetMoneyString(orders.ConfirmSettlementMoney, ProviderToMoney);
                this.lbGuideIncomeCount.Text     = UtilsCommons.GetMoneyString(orders.GuideRealIncome, ProviderToMoney);
                this.lbCheckMoneyCount.Text      = UtilsCommons.GetMoneyString(orders.ConfirmMoney - orders.GuideRealIncome, ProviderToMoney);
                this.lbProfitCount.Text          = UtilsCommons.GetMoneyString(orders.Profit, ProviderToMoney);
            }
            else
            {
                this.ph_tuankuan.Visible = false;
            }
            //其他收入
            IList <MOtherFeeInOut> otherList = new EyouSoft.BLL.PlanStructure.BPlan().GetOtherIncome(tourId);

            if (otherList != null && otherList.Count > 0)
            {
                this.rpt_qita.DataSource = otherList;
                this.rpt_qita.DataBind();
            }
            else
            {
                this.ph_qita.Visible = false;
            }
            //团队支出
            IList <EyouSoft.Model.PlanStructure.MPlanBaseInfo> payList = new EyouSoft.BLL.PlanStructure.BPlan().GetList(tourId);

            if (payList != null && payList.Count > 0)
            {
                this.rpt_zhichu.DataSource = payList;
                this.rpt_zhichu.DataBind();
                int     Count      = 0;
                decimal TotalMoney = 0;
                foreach (var item in payList)
                {
                    Count      += item.Num;
                    TotalMoney += item.Confirmation;
                }
                //this.lbNumCount.Text = Count.ToString();
                this.lbSettlementMoney.Text = UtilsCommons.GetMoneyString(TotalMoney, ProviderToMoney);
            }
            else
            {
                this.ph_zhichu.Visible = false;
            }
            //利润分配
            IList <MProfitDistribute> profitList = new EyouSoft.BLL.FinStructure.BFinance().GetProfitDistribute(tourId);

            if (profitList != null && profitList.Count > 0)
            {
                this.rpt_lirun.DataSource = profitList;
                this.rpt_lirun.DataBind();
            }
            else
            {
                this.ph_lirun.Visible = false;
            }
            //报帐汇总
            MBZHZ BZmodel = new EyouSoft.BLL.PlanStructure.BPlan().GetBZHZ(tourId);

            if (model != null)
            {
                this.lb_guidesIncome.Text        = UtilsCommons.GetMoneyString(BZmodel.GuideIncome, ProviderToMoney);
                this.lb_guidesBorrower.Text      = UtilsCommons.GetMoneyString(BZmodel.GuideBorrow, ProviderToMoney);
                this.lb_guidesSpending.Text      = UtilsCommons.GetMoneyString(BZmodel.GuideOutlay, ProviderToMoney);
                this.lb_replacementOrReturn.Text = UtilsCommons.GetMoneyString(BZmodel.GuideMoneyRtn, ProviderToMoney);
                this.lb_RCSN.Text = BZmodel.GuideRelSign.ToString();
                this.lb_HUSN.Text = BZmodel.GuideUsed.ToString();
                this.lb_RSN.Text  = BZmodel.GuideSignRtn.ToString();
            }
            //团队汇总信息
            EyouSoft.Model.PlanStructure.MTourTotalInOut tourModel = new EyouSoft.BLL.PlanStructure.BPlan().GetTourTotalInOut(tourId);
            /*团队收入*/
            this.lb_tourMoneyIn.Text = UtilsCommons.GetMoneyString(tourModel.TourIncome + tourModel.QiTaShouRu, ProviderToMoney);
            /*团队支出*/
            this.lb_tourMoneyOut.Text = UtilsCommons.GetMoneyString(tourModel.TourOutlay, ProviderToMoney);
            /*团队利润*/
            this.lb_tourMoney.Text = UtilsCommons.GetMoneyString(tourModel.TourProfit, ProviderToMoney);
            /*团队利润率*/
            this.lb_tourMoneyRate.Text = tourModel.TourProRate.ToString("F2") + "%";
        }