Exemple #1
0
 /// <summary>
 /// 页面初始绑定
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!CheckGrant(global::Common.Enum.TravelPermission.财务管理_团款支出_付款登记))
         {
             Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.财务管理_团款支出_付款登记, false);
         }
         string tourId = Utils.GetQueryStringValue("tourId");
         EyouSoft.BLL.TourStructure.Tour             tourBll = new EyouSoft.BLL.TourStructure.Tour(this.SiteUserInfo);
         EyouSoft.Model.TourStructure.TourSingleInfo Model   = (EyouSoft.Model.TourStructure.TourSingleInfo)tourBll.GetTourInfo(tourId);
         if (Model != null)
         {
             rpt_list.DataSource = Model.Plans;
             rpt_list.DataBind();
         }
     }
 }
        void Bind()
        {
            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            string tourId = Utils.GetQueryStringValue("tourId");

            if (tourId == "")
            {
                Response.Write("未找到信息!");
                return;
            }


            //声明团队计划对象
            EyouSoft.Model.TourStructure.TourBaseInfo basemodel = bll.GetTourInfo(tourId);
            LeaveDate        = basemodel.LDate;
            lt_LDate.Text    = basemodel.LDate.Month.ToString() + "月" + basemodel.LDate.Day.ToString() + "日" + basemodel.TourType.ToString();
            lt_TourName.Text = basemodel.RouteName;
            #region 组团端
            EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(basemodel.BuyerCId);
            if (cusModel != null)
            {
                txt_to_fax.Text  = cusModel.Fax;
                txt_to_name.Text = cusModel.Name;
                txt_to_tel.Text  = cusModel.Phone;
                txt_to_user.Text = cusModel.ContactName;
            }
            #endregion
            #region 专线
            EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(basemodel.OperatorId);
            if (userInfoModel != null)
            {
                //主要联系人电话
                this.txt_fr_tel.Text = userInfoModel.ContactTel;
                //专线FAX
                this.txt_fr_fax.Text = userInfoModel.ContactFax;

                EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(basemodel.CompanyId, SiteUserInfo.SysId);
                if (companyModel != null)
                {
                    this.txt_fr_user.Text = companyModel.ContactName;
                    txt_fr_name.Text      = companyModel.CompanyName;
                    txt_fr_tel.Text       = companyModel.ContactTel;
                    txt_fr_tel.Text       = companyModel.ContactFax;
                }
            }
            #endregion
            if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划)
            {
                EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)basemodel;
                if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
                {
                    tb_normal.Visible    = true;
                    rptTravel.DataSource = model.TourNormalInfo.Plans;
                    rptTravel.DataBind();
                    rptProject.DataSource = model.TourNormalInfo.Services;
                    rptProject.DataBind();
                    div_noproject.Visible = true;
                    lblNoProject.Text     = TextToHtml(model.TourNormalInfo.BuHanXiangMu);
                    div_notice.Visible    = true;
                    lt_notice.Text        = TextToHtml(model.TourNormalInfo.ZhuYiShiXiang);
                }
                else
                {
                    tb_normal.Visible       = false;
                    tb_quick.Visible        = true;
                    tb_quickService.Visible = true;
                    lb_Quick.Text           = model.TourQuickInfo.QuickPlan;
                    lt_service.Text         = model.TourQuickInfo.Service;
                }
            }
            else
            if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划)
            {
                EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)basemodel;
                if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
                {
                    tb_normal.Visible = true;
                    if (model.TourNormalInfo != null)
                    {
                        rptTravel.DataSource = model.TourNormalInfo.Plans;
                        rptTravel.DataBind();
                        rptProject.DataSource = model.Services;
                        rptProject.DataBind();
                        div_noproject.Visible = true;
                        lblNoProject.Text     = TextToHtml(model.TourNormalInfo.BuHanXiangMu);
                        div_notice.Visible    = true;
                        lt_notice.Text        = TextToHtml(model.TourNormalInfo.ZhuYiShiXiang);
                    }
                }
                else
                {
                    if (model.TourQuickInfo != null)
                    {
                        tb_normal.Visible       = false;
                        tb_quick.Visible        = true;
                        tb_quickService.Visible = true;
                        lb_Quick.Text           = model.TourQuickInfo.QuickPlan;
                        lt_service.Text         = model.TourQuickInfo.Service;
                    }
                }

                /*#region 结算价
                 * TourQuotePrint priantTQP = new TourQuotePrint();
                 * string number = string.Empty;
                 * string money = string.Empty;
                 * priantTQP.getPepoleNum(SiteUserInfo.CompanyID,model.PlanPeopleNumber, model.TourTeamUnit, ref number, ref money);
                 * this.txt_Money.Text = money;
                 #endregion*/
            }
            else if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务)
            {
                p_title.Visible   = false;
                d_title.Visible   = false;
                Title             = "单项服务确认单";
                tb_single.Visible = true;
                tb_normal.Visible = false;
                EyouSoft.Model.TourStructure.TourSingleInfo model = (EyouSoft.Model.TourStructure.TourSingleInfo)basemodel;
                rpt_single.DataSource = model.Plans;
                rpt_single.DataBind();
                txt_Money.Text = model.TotalAmount.ToString("#,##0.00");
            }


            if (basemodel.TourType != EyouSoft.Model.EnumType.TourStructure.TourType.单项服务)
            {
                phJieSuanJiaGe.Visible = true;
                EyouSoft.BLL.PlanStruture.TravelAgency planbll = new EyouSoft.BLL.PlanStruture.TravelAgency();
                IList <EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo> agencys = planbll.GetList(tourId);
                planbll = null;

                if (agencys != null && agencys.Count > 0)
                {
                    System.Text.StringBuilder s = new System.Text.StringBuilder();

                    foreach (var agency in agencys)
                    {
                        s.AppendFormat("单位名称:{0} 结算费用:{1}    ", agency.LocalTravelAgency, Utils.FilterEndOfTheZeroDecimal(agency.Settlement));
                    }

                    txt_Money.Text = s.ToString();
                }
            }
        }
Exemple #3
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="tourId"></param>
        protected void DataInit(string tourId)
        {
            EyouSoft.BLL.TourStructure.Tour           bll   = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId);
            if (model != null)
            {
                this.hideTourID.Value = tourId;

                //绑定地接社信息
                this.rptDjList.DataSource = bll.GetTourLocalAgencys(tourId);
                this.rptDjList.DataBind();
                //绑定旅客信息

                this.rptCustomer.DataSource = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetTravellers(tourId).Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();;
                this.rptCustomer.DataBind();

                //出团日期
                this.txtOutDate.Text = model.LDate.ToString("yyyy-MM-dd");
                //出发交通
                this.lblBenginDate.Text = model.LTraffic;
                //回程交通
                this.lblBackDate.Text = model.RTraffic;
                //线路名称
                this.lblAreaName.Text = model.RouteName;
                //人数
                this.lblCount.Text = model.PlanPeopleNumber.ToString();
                //计划类型
                this.lblTourType.Text = model.TourType.ToString();

                if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务)
                {
                    EyouSoft.Model.TourStructure.TourSingleInfo tsModel = (EyouSoft.Model.TourStructure.TourSingleInfo)model;
                    //this.lblRemarks.Text =tsModel.
                }
                if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划)
                {
                    EyouSoft.Model.TourStructure.TourInfo tModel = (EyouSoft.Model.TourStructure.TourInfo)model;
                    if (tModel.TourNormalInfo != null)
                    {
                        //内部信息
                        this.lblRemarks.Text = tModel.TourNormalInfo.NeiBuXingXi;
                    }
                    //标志
                    this.txtNum4.Value = tModel.GatheringSign;
                    //string gather = Utils.GetDateTimeNullable(tModel.GatheringTime) == null ? string.Empty : Utils.GetDateTimeNullable(tModel.GatheringTime).ToString();
                    //this.txtGather.Text = gather == string.Empty ? "" : (Utils.GetDateTime(gather, DateTime.Now)).ToString("yyyy-MM-dd hh 点");
                    this.txtGather.Text = tModel.GatheringTime;
                    IList <string> txtList = bll.GetTourGuides(tourId);
                    if (txtList != null)
                    {
                        if (txtList.Count > 0)
                        {
                            this.txtNum1.Value = txtList[0];
                        }
                        if (txtList.Count > 1)
                        {
                            this.txtNum2.Value = txtList[1];
                        }
                        if (txtList.Count > 2)
                        {
                            this.txtNum3.Value = txtList[2];
                        }
                    }
                }
                if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划)
                {
                    EyouSoft.Model.TourStructure.TourTeamInfo ttModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model;

                    #region 人数And结算价

                    TourQuotePrint priantTQP = new TourQuotePrint();
                    string         number    = string.Empty;
                    string         money     = string.Empty;
                    priantTQP.getPepoleNum(SiteUserInfo.CompanyID, model.PlanPeopleNumber, ttModel.TourTeamUnit, ref number, ref money);
                    this.lblCount.Text = number;

                    #endregion
                    //内部信息
                    if (ttModel.TourNormalInfo != null)
                    {
                        this.lblRemarks.Text = ttModel.TourNormalInfo.NeiBuXingXi;
                    }

                    //标志
                    this.txtNum4.Value = ttModel.GatheringSign;
                    //string gather = Utils.GetDateTimeNullable(ttModel.GatheringTime) == null ? string.Empty : Utils.GetDateTimeNullable(ttModel.GatheringTime).ToString();
                    //this.txtGather.Text = gather == string.Empty ? "" : (Utils.GetDateTime(gather, DateTime.Now)).ToString("yyyy-MM-dd hh 点");
                    this.txtGather.Text = ttModel.GatheringTime;
                    IList <string> txtList = bll.GetTourGuides(tourId);
                    if (txtList != null)
                    {
                        if (txtList.Count > 0)
                        {
                            this.txtNum1.Value = txtList[0];
                        }
                        if (txtList.Count > 1)
                        {
                            this.txtNum2.Value = txtList[1];
                        }
                        if (txtList.Count > 2)
                        {
                            this.txtNum3.Value = txtList[2];
                        }
                    }
                }
            }
        }
Exemple #4
0
        protected void GetSingleServer(string Tourid, string planId)
        {
            EyouSoft.BLL.TourStructure.Tour             tourBll   = new EyouSoft.BLL.TourStructure.Tour(this.SiteUserInfo);
            EyouSoft.Model.TourStructure.TourSingleInfo EditModel = null;
            EditModel = (EyouSoft.Model.TourStructure.TourSingleInfo)tourBll.GetTourInfo(Tourid);
            if (EditModel != null)
            {
                //计划人数
                this.PelpeoNumber.Value = EditModel.PlanPeopleNumber.ToString();
                //确认时间
                this.ConfirmDate.Value = System.DateTime.Now.ToString("yyyy-MM-dd");
                //供应商信息集合
                IList <EyouSoft.Model.TourStructure.PlanSingleInfo> planlist = EditModel.Plans;

                if (planId != "")
                {
                    EyouSoft.Model.TourStructure.PlanSingleInfo singleModel = new EyouSoft.BLL.TourStructure.Tour().GetSinglePlanInfo(planId);
                    if (singleModel != null)
                    {
                        //获取供应商信息--供应商名称
                        this.txtTo.Value = singleModel.SupplierName;
                        //获取供应商信息--供应商Id
                        int supplierid = singleModel.SupplierId;
                        //实例化供应商基础信息BLL
                        EyouSoft.BLL.CompanyStructure.SupplierBaseHandle csBLL = new EyouSoft.BLL.CompanyStructure.SupplierBaseHandle();
                        //实例化供应商基础信息Model
                        EyouSoft.Model.CompanyStructure.SupplierBasic model = new EyouSoft.Model.CompanyStructure.SupplierBasic();
                        //根据供应商基础信息ID获取供应商实体
                        model = csBLL.GetSupplierBase(supplierid);
                        //供应商基础信息不为空并且联系人不为空
                        if (model != null && model.SupplierContact != null)
                        {
                            //供应商 联系人电话
                            this.txtTel.Value = model.SupplierContact[0].ContactTel;
                            //供应商联系人Fax
                            this.txtFax.Value = model.SupplierContact[0].ContactFax;
                        }


                        this.lblServiceType.Text  = "<strong>服务类别:</strong>" + singleModel.ServiceType.ToString();
                        this.lblSupplierName.Text = "<strong>供应商:</strong>" + singleModel.SupplierName;
                        this.lblArrange.Text      = "<strong>具体安排:</strong>" + singleModel.Arrange;
                    }
                    else
                    {
                        this.pnlIsShow.Visible       = false;
                        this.Repeaterlist.DataSource = planlist;
                        this.Repeaterlist.DataBind();
                    }
                }
                else
                {
                    //客户单位名称
                    this.txtTo.Value = EditModel.BuyerCName;
                    EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(EditModel.BuyerCId);
                    if (cusModel != null)
                    {
                        //组团 联系人电话
                        this.txtTel.Value = cusModel.Phone;
                        //组团联系人Fax
                        this.txtFax.Value = cusModel.Fax;
                    }
                    this.pnlIsShow.Visible       = false;
                    this.Repeaterlist.DataSource = planlist;
                    this.Repeaterlist.DataBind();
                }



                #region 专线
                EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(EditModel.OperatorId);
                if (userInfoModel != null)
                {
                    //主要联系人电话
                    this.txtTelS.Value = userInfoModel.ContactTel;
                    //专线FAX
                    this.txtFaxS.Value = userInfoModel.ContactFax;

                    EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(EditModel.CompanyId, SiteUserInfo.SysId);
                    if (companyModel != null)
                    {
                        this.txtFr.Value = companyModel.CompanyName;
                    }
                }
                #endregion


                //游客信息
                IList <EyouSoft.Model.TourStructure.TourOrderCustomer> customer = EditModel.Customers.Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();
                ;
                if (customer.Count > 0 && customer != null)
                {
                    this.repCustomer.DataSource = customer;
                    this.repCustomer.DataBind();
                }
            }
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string type   = Utils.GetQueryStringValue("type");
                string planId = Utils.GetQueryStringValue("id");

                if (type != "")
                {
                    this.hideType.Value = type;
                    //设置结算单打印路径

                    //设置
                    //团队计划
                    if (type == "team")
                    {
                        //团队计划:团队结算权限判断
                        if (CheckGrant(TravelPermission.团队计划_团队计划_栏目))
                        {
                            if (CheckGrant(TravelPermission.团队计划_团队计划_团队结算))
                            {
                                this.lblLocation.Text   = "团队计划";
                                this.lblLocationT.Text  = "团队计划";
                                Page.Title              = "团队计划_团队结算";
                                this.hidePrintUrl.Value = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队结算明细单);
                                this.pnlPlan.Visible    = true;
                                this.pnlAccount.Visible = false;
                            }
                            else
                            {
                                Utils.ResponseNoPermit(TravelPermission.团队计划_团队计划_团队结算, false);
                            }
                        }
                        else
                        {
                            Utils.ResponseNoPermit(TravelPermission.团队计划_团队计划_栏目, false);
                        }
                    }
                    //财务管理
                    if (type == "account")
                    {
                        //财务管理:权限判断
                        if (CheckGrant(TravelPermission.财务管理_团队核算_栏目))
                        {
                            this.lblLocation.Text       = "财务管理";
                            this.lblLocationT.Text      = "财务管理";
                            Page.Title                  = "财务管理_团队核算";
                            this.pnlPlan.Visible        = false;
                            this.pnlAccount.Visible     = true;
                            this.pnlTuiHuiCaiWu.Visible = false;
                            //团队复核
                            if (!CheckGrant(TravelPermission.财务管理_团队核算_团队复核))
                            {
                                this.pnlFuHe.Visible = false;
                            }
                            //核算结束
                            if (!CheckGrant(TravelPermission.财务管理_团队核算_核算结束))
                            {
                                this.pnlJieSu.Visible = false;
                            }
                            //退回计调
                            if (!CheckGrant(TravelPermission.财务管理_团队核算_退回计调))
                            {
                                this.pnlJiDiao.Visible = false;
                            }
                            ////添加收入
                            //if (!CheckGrant(TravelPermission.财务管理_团队核算_其它收入添加))
                            //{
                            //    this.pnlSecond.Visible = false;
                            //}
                            ////添加支出
                            //if (!CheckGrant(TravelPermission.财务管理_团队核算_其它支出添加))
                            //{
                            //    this.pnlFouth.Visible = false;
                            //}
                            //添加分配
                            if (!CheckGrant(TravelPermission.财务管理_团队核算_利润分配添加))
                            {
                                this.pnlFouth.Visible = false;
                            }
                        }
                        else
                        {
                            Utils.ResponseNoPermit(TravelPermission.财务管理_团队核算_栏目, false);
                        }
                    }
                    //散拼计划
                    if (type == "san")
                    {
                        //团队计划:团队结算权限判断
                        if (CheckGrant(TravelPermission.散拼计划_散拼计划_栏目))
                        {
                            if (CheckGrant(TravelPermission.散拼计划_散拼计划_团队结算))
                            {
                                this.lblLocation.Text   = "散拼计划";
                                this.lblLocationT.Text  = "散拼计划";
                                Page.Title              = "散拼计划_团队结算";
                                this.pnlPlan.Visible    = true;
                                this.pnlAccount.Visible = false;
                                this.hidePrintUrl.Value = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.结算明细单);
                            }
                            else
                            {
                                Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_团队结算, false);
                            }
                        }
                        else
                        {
                            Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_栏目, false);
                        }
                    }
                }

                if (planId != "")
                {
                    EyouSoft.Model.TourStructure.TourBaseInfo model = new EyouSoft.BLL.TourStructure.Tour().GetTourInfo(planId);
                    if (model != null)
                    {
                        //核算结束时隐藏所有操作按钮
                        //计划已提交账务,由散拼或团队计划进入团队核算页面时隐藏所有操作按钮
                        if (model.Status == EyouSoft.Model.EnumType.TourStructure.TourStatus.核算结束 ||
                            ((type == "san" || type == "team") && model.Status == EyouSoft.Model.EnumType.TourStructure.TourStatus.财务核算))
                        {
                            //复核
                            this.pnlFuHe.Visible = false;
                            //核算结束
                            this.pnlJieSu.Visible = false;
                            //退回计调
                            this.pnlJiDiao.Visible = false;
                            //保存按钮
                            this.pnlSave.Visible = false;
                            //提交财务
                            this.pnlTiJiao.Visible = false;
                            //添加收入
                            this.pnlSecond.Visible = false;
                            //其它支出
                            this.pnlFouth.Visible = false;
                            //利润分配
                            this.pnlFifth.Visible = false;
                        }

                        //判断是否为单项服务
                        if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务)
                        {
                            EyouSoft.Model.TourStructure.TourSingleInfo singleModel = (EyouSoft.Model.TourStructure.TourSingleInfo)model;
                            //单项服务 支出
                            this.rptListThird_S.DataSource = singleModel.Plans;
                            this.rptListThird_S.DataBind();
                        }
                        else
                        {
                            //团队计划 && 散拼计划 支出
                            this.rptListThird.DataSource = new EyouSoft.BLL.PlanStruture.TravelAgency().GetSettleList(planId);
                            this.rptListThird.DataBind();
                        }
                    }

                    this.hidePlanID.Value = planId;
                    //收入
                    this.rptListFrist.DataSource = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderList(SiteUserInfo.CompanyID, planId);
                    this.rptListFrist.DataBind();

                    //其它收入
                    EyouSoft.Model.FinanceStructure.OtherCostQuery otherCostQueryModel = new EyouSoft.Model.FinanceStructure.OtherCostQuery();
                    otherCostQueryModel.TourId    = planId;
                    this.rptListSecond.DataSource = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).GetOtherIncomeList(otherCostQueryModel);
                    this.rptListSecond.DataBind();

                    //其它支出
                    this.rptListForth.DataSource = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).GetOtherOutList(otherCostQueryModel);
                    this.rptListForth.DataBind();

                    //利润分配
                    this.rptListFifth.DataSource = new EyouSoft.BLL.FinanceStructure.TourProfitSharer(SiteUserInfo).GetTourShareList(planId);
                    this.rptListFifth.DataBind();

                    //团队核算退回财务权限 如果团队状态为核算结束&&从账务管理团队核算页面点击进去的&&有退回账务权限&&//是系统管理员时
                    if (CheckGrant(TravelPermission.财务管理_团队核算_退回财务) && Request.QueryString["Account"] == "yes" && model.Status == EyouSoft.Model.EnumType.TourStructure.TourStatus.核算结束 //&& SiteUserInfo.IsAdmin == true
                        )
                    {
                        this.pnlTuiHuiCaiWu.Visible = true;
                    }
                }
            }
        }