コード例 #1
0
        /// <summary>
        /// 删除
        /// </summary>
        void Delete()
        {
            string txtTourId = Utils.GetFormValue("txtTourId");

            if (!this.CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.单项业务_单项业务_删除))
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:没有操作权限。"));
            }

            string txtQuXiaoId = Utils.GetFormValue("txtQuXiaoId");

            int bllRetCode = new EyouSoft.BLL.TourStructure.BSingleService().Delete(CurrentUserCompanyID, txtTourId);

            if (bllRetCode == 1)
            {
                RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            else if (bllRetCode == -98)
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:当前状态不允许删除。"));
            }
            else if (bllRetCode == -97)
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:已经存在收款,不允许删除。"));
            }
            else if (bllRetCode == -96)
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:已经存在付款,不允许删除。"));
            }
            else
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:异常代码[" + bllRetCode + "]"));
            }
        }
コード例 #2
0
        /// <summary>
        /// init info
        /// </summary>
        void InitInfo()
        {
            var info = new EyouSoft.BLL.TourStructure.BSingleService().GetSingleServiceExtendByTourId(TourId);

            if (info == null)
            {
                Utils.RCWE("异常请求");
            }
            if (info.CompanyId != SiteUserInfo.CompanyId)
            {
                Utils.RCWE("异常请求");
            }
            if (info.PlanBaseInfoList == null || info.PlanBaseInfoList.Count == 0)
            {
                Utils.RCWE("异常请求:不存在的供应商安排");
            }

            txtCompanyName.Text      = SiteUserInfo.CompanyName;
            txtXiaoShouYuanName.Text = info.SellerName;

            var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(info.SellerId, SiteUserInfo.CompanyId);

            if (xiaoShouYuanInfo != null)
            {
                txtXiaoShouYuanTelephone.Text = xiaoShouYuanInfo.ContactTel;
                txtXiaoShouYuanFax.Text       = xiaoShouYuanInfo.ContactFax;
            }

            ltrTourCode.Text = info.TourCode;

            EyouSoft.Model.PlanStructure.MPlanBaseInfo anPaiInfo = null;

            foreach (var item in info.PlanBaseInfoList)
            {
                if (item.PlanId == AnPaiId)
                {
                    anPaiInfo = item; break;
                }
            }

            if (anPaiInfo == null)
            {
                Utils.RCWE("异常请求:不存在的供应商安排");
            }

            ltrJuTiAnPai.Text     = Utils.TextareaToHTML(anPaiInfo.GuideNotes);
            ltrFeiYongMingXi.Text = Utils.TextareaToHTML(anPaiInfo.CostDetail);
            ltrShuLiang.Text      = anPaiInfo.Num.ToString();
            ltrZhiFuFangShi.Text  = anPaiInfo.PaymentType.ToString();
            ltrJieSuanJinE.Text   = anPaiInfo.Confirmation.ToString("C2");

            txtGysName.Text      = anPaiInfo.SourceName;
            txtGysLxr.Text       = anPaiInfo.ContactName;
            txtGysTelephone.Text = anPaiInfo.ContactPhone;
            txtGysFax.Text       = anPaiInfo.ContactFax;

            ltrQianFaRiQi.Text = DateTime.Now.ToString("yyyy-MM-dd");
        }
コード例 #3
0
        void InitInfo()
        {
            var info = new EyouSoft.BLL.TourStructure.BSingleService().GetSingleServiceExtendByTourId(TourId);

            if (info == null)
            {
                Utils.RCWE("异常请求");
            }
            if (info.CompanyId != SiteUserInfo.CompanyId)
            {
                Utils.RCWE("异常请求");
            }

            int i = 1;

            System.Text.StringBuilder s = new System.Text.StringBuilder();

            s.AppendFormat("<p>委托日期:{0}</p>", info.WeiTuoRiQi.ToString("yyyy-MM-dd"));
            s.AppendFormat("<p>订单号:{0}</p>", info.OrderCode);
            s.AppendFormat("<p>销售员:{0}</p>", info.SellerName);

            if (!string.IsNullOrEmpty(PrintPagePath_HeSuanDan) && PrintPagePath_HeSuanDan != "javascript:void(0)")
            {
                s.Append("<p>");
                s.AppendFormat("<a target='_blank' href='{0}?referertype=2&tourid={1}'>{2}.单项服务核算单</a>", PrintPagePath_HeSuanDan, TourId, i.ToString().PadLeft(2, '0'));
                s.Append("</p>");
                i++;
            }

            if (!string.IsNullOrEmpty(PrintPagePath_YouKeQueRenDan) && PrintPagePath_YouKeQueRenDan != "javascript:void(0)")
            {
                s.Append("<p>");
                s.AppendFormat("<a target='_blank' href='{0}?tourid={1}'>{2}.单项服务委托预定单</a>", PrintPagePath_YouKeQueRenDan, TourId, i.ToString().PadLeft(2, '0'));
                s.Append("</p>");
                i++;
            }

            if (!string.IsNullOrEmpty(PrintPagePath_GysQueRenDan) &&
                PrintPagePath_GysQueRenDan != "javascript:void(0)" &&
                info.PlanBaseInfoList != null &&
                info.PlanBaseInfoList.Count > 0)
            {
                foreach (var item in info.PlanBaseInfoList)
                {
                    s.Append("<p>");
                    s.AppendFormat("<a target='_blank' href='{0}?tourid={1}&anpaiid={2}'>{3}.{4}确认件({5})</a>", PrintPagePath_GysQueRenDan, TourId, item.PlanId, i.ToString().PadLeft(2, '0'), item.Type, item.SourceName);
                    s.Append("</p>");
                    i++;
                }
            }

            ltr.Text = s.ToString();
        }
コード例 #4
0
        /// <summary>
        /// init info
        /// </summary>
        void InitInfo()
        {
            var info = new EyouSoft.BLL.TourStructure.BSingleService().GetSingleServiceExtendByTourId(TourId);

            if (info == null)
            {
                Utils.RCWE("异常请求");
            }
            if (info.CompanyId != SiteUserInfo.CompanyId)
            {
                Utils.RCWE("异常请求");
            }

            txtKeHuName.Text      = info.BuyCompanyName;
            txtKeHuLxr.Text       = info.ContactName;
            txtKeHuTelephone.Text = info.ContactTel;

            var keHuLxrInfo = new EyouSoft.BLL.CrmStructure.BCrmLinkMan().GetLinkManModel(info.ContactDepartId);

            if (keHuLxrInfo != null)
            {
                txtKeHuFax.Text = keHuLxrInfo.Fax;
            }

            txtCompanyName.Text      = SiteUserInfo.CompanyName;
            txtXiaoShouYuanName.Text = info.SellerName;

            var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(info.SellerId, SiteUserInfo.CompanyId);

            if (xiaoShouYuanInfo != null)
            {
                txtXiaoShouYuanTelephone.Text = xiaoShouYuanInfo.ContactTel;
                txtXiaoShouYuanFax.Text       = xiaoShouYuanInfo.ContactFax;
            }

            ltrOrderCode.Text = info.OrderCode;

            rptJuTiYaoQiu.DataSource = info.TourTeamPriceList;
            rptJuTiYaoQiu.DataBind();

            ltrHeTongJinE.Text = info.TourIncome.ToString("C2");

            rptYouKe.DataSource = info.TourOrderTravellerList;
            rptYouKe.DataBind();

            ltrQianFaRiQi.Text = DateTime.Now.ToString("yyyy-MM-dd");
        }
コード例 #5
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit(string orderid, string unitname, string orderstime, string orderetime, string operater, string customunit, int status)
        {
            //获取分页参数并强转
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"));
            EyouSoft.BLL.TourStructure.BSingleService        bll   = new EyouSoft.BLL.TourStructure.BSingleService();
            EyouSoft.Model.TourStructure.MSeachSingleService model = new EyouSoft.Model.TourStructure.MSeachSingleService();
            model.BeginLDate     = Utils.GetDateTimeNullable(orderstime);
            model.TourStatus     = status == -1 ? null : (EyouSoft.Model.EnumType.TourStructure.TourStatus?)status;
            model.EndLDate       = Utils.GetDateTimeNullable(orderetime);
            model.BuyCompanyName = customunit;
            model.CompanyId      = this.SiteUserInfo.CompanyId;
            model.Operator       = operater;
            model.OrderCode      = orderid;
            model.SWeiTuoRiQi    = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtSWeiTuoRiQi"));
            model.EWeiTuoRiQi    = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtEWeiTuoRiQi"));

            model.XiaoShouYuanId = this.txtXiaoShouYuan.SellsID = Utils.GetQueryStringValue(this.txtXiaoShouYuan.SellsIDClient);
            model.JiDiaoYuanId   = this.txtJiDiaoYuan.SellsID = Utils.GetQueryStringValue(this.txtJiDiaoYuan.SellsIDClient);

            model.XiaoShouYuanName = this.txtXiaoShouYuan.SellsName = Utils.GetQueryStringValue(txtXiaoShouYuan.SellsNameClient);
            model.JiDiaoYunaName   = this.txtJiDiaoYuan.SellsName = Utils.GetQueryStringValue(txtJiDiaoYuan.SellsNameClient);

            IList <MSingleService> list = bll.GetSingleServiceList(model, pageSize, pageIndex, ref recordCount);

            if (list != null && list.Count > 0)
            {
                rptList.DataSource = list;
                rptList.DataBind();
            }
            else
            {
                this.litMsg.Text             = "<tr class='old'><td colspan='12' align='center'>没有相关数据</td></tr>";
                ExporPageInfoSelect1.Visible = false;
            }
            //绑定分页
            BindPage();
        }
コード例 #6
0
        /// <summary>
        /// 取消
        /// </summary>
        void QuXiao()
        {
            if (!this.CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.单项业务_单项业务_取消))
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:没有操作权限。"));
            }

            string txtQuXiaoId = Utils.GetFormValue("txtQuXiaoId");
            string txtYuanYin  = Utils.GetFormValue("txtYuanYin");

            int bllRetCode = new EyouSoft.BLL.TourStructure.BSingleService().QuXiao(CurrentUserCompanyID, txtQuXiaoId, txtYuanYin, SiteUserInfo.UserId);

            if (bllRetCode == 1)
            {
                RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            else if (bllRetCode == -98)
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:当前状态不允许取消。"));
            }
            else if (bllRetCode == -97)
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:已经存在收款,不允许取消。"));
            }
            else if (bllRetCode == -96)
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:已经存在付款,不允许取消。"));
            }
            else if (bllRetCode == -95)
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:不是该团销售员或计调员,不允许取消。"));
            }
            else
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:异常代码[" + bllRetCode + "]"));
            }
        }
コード例 #7
0
        /// <summary>
        /// 保存按钮点击事件执行方法
        /// </summary>
        void BaoCun()
        {
            string msg = string.Empty;

            EyouSoft.Model.SourceStructure.MSource    source    = new EyouSoft.Model.SourceStructure.MSource();
            EyouSoft.BLL.SourceStructure.BSource      bllsource = new EyouSoft.BLL.SourceStructure.BSource();
            EyouSoft.BLL.TourStructure.BSingleService bll       = new EyouSoft.BLL.TourStructure.BSingleService();
            MSingleServiceExtend model = new MSingleServiceExtend();

            if (!String.IsNullOrEmpty(DanXiangYeWuId))
            {
                model        = bll.GetSingleServiceExtendByTourId(DanXiangYeWuId);
                model.TourId = DanXiangYeWuId;
            }

            if (Utils.GetQueryStringValue("submitplan") == "submit")
            {
                model.TourStatus = EyouSoft.Model.EnumType.TourStructure.TourStatus.待终审;
                if (model.PlanBaseInfoList != null && model.PlanBaseInfoList.Count > 0)
                {
                    for (int i = 0; i < model.PlanBaseInfoList.Count; i++)
                    {
                        model.PlanBaseInfoList[i].Status = EyouSoft.Model.EnumType.PlanStructure.PlanState.已落实;
                    }
                }
            }
            else
            {
                //联系人
                string ContactName = Utils.GetFormValue(this.txtContactName.UniqueID);
                //订单编号
                //string ordercode = Utils.GetFormValue(this.txtOrdercode.UniqueID);
                //客户电话
                string ContactTel = Utils.GetFormValue(this.txtContactTel.UniqueID);
                //客户单位
                string CustomUnit = Utils.GetFormValue(this.CustomerUnitSelect1.ClientNameKHMC);
                //客户单位编号
                string CustomUnitID = Utils.GetFormValue(this.CustomerUnitSelect1.ClientNameKHBH);

                //毛利
                string Profit = Utils.GetFormValue(this.txtProfit.UniqueID);
                //总支出
                string TotalEx = Utils.GetFormValue(this.txtTotalEx.UniqueID);
                //总收入
                string TotalIn = Utils.GetFormValue(this.txtTotalIn.UniqueID);
                //人数
                string AdultCount = Utils.GetFormValue(this.txtAdultCount.UniqueID);
                //操作状态
                string opeateStatu = Utils.GetFormValue(this.ddlopeaterStatus.UniqueID);

                if (opeateStatu != "")
                {
                    model.TourStatus = (EyouSoft.Model.EnumType.TourStructure.TourStatus)EyouSoft.Common.Utils.GetInt(opeateStatu);
                }
                else
                {
                    RCWE(UtilsCommons.AjaxReturnJson("0", "无法修改已落实的数据!"));
                }

                #region 游客信息附件
                string[] agrUpload    = Utils.GetFormValues(this.UploadControl1.ClientHideID);
                string[] oldagrUpload = Utils.GetFormValues("hideagreement");
                string   agreement    = string.Empty;
                if (oldagrUpload.Length > 0)
                {
                    for (int i = 0; i < oldagrUpload.Length; i++)
                    {
                        agreement = oldagrUpload[i].Split('|')[1];
                    }
                }
                if (agrUpload.Length > 0)
                {
                    for (int i = 0; i < agrUpload.Length; i++)
                    {
                        if (agrUpload[i].Trim() != "")
                        {
                            if (agrUpload[i].Split('|').Length > 1)
                            {
                                if (agrUpload[i].Length > 1)
                                {
                                    agreement = agrUpload[i].Split('|')[1];
                                }
                            }
                        }
                    }
                }

                #endregion
                model.TravellerFile   = agreement;
                model.CompanyId       = this.SiteUserInfo.CompanyId;
                model.ContactName     = ContactName;
                model.ContactTel      = ContactTel;
                model.ContactDepartId = Utils.GetFormValue(this.CustomerUnitSelect1.ClientNameKHBH);
                model.Operator        = this.SiteUserInfo.Name;
                model.SellerName      = Utils.GetFormValue(SellsSelect1.SellsNameClient);
                model.SellerId        = Utils.GetFormValue(SellsSelect1.SellsIDClient);
                model.DeptId          = Utils.GetInt(Utils.GetFormValue(this.hideDeptID.ClientID));
                model.BuyCompanyId    = CustomUnitID;
                model.BuyCompanyName  = CustomUnit;
                model.OperatorId      = this.SiteUserInfo.UserId;

                IList <MTourPlaner> planerlist = new List <MTourPlaner>();
                MTourPlaner         planer     = null;
                string planernamestr           = Utils.GetFormValue(SellsSelect2.SellsNameClient);
                string planerIdstr             = Utils.GetFormValue(SellsSelect2.SellsIDClient);
                string planerptIdstr           = Utils.GetFormValue(this.hidePlanerDeptID.ClientID);

                for (int i = 0; i < planerIdstr.Split(',').Length; i++)
                {
                    planer          = new MTourPlaner();
                    planer.PlanerId = planerIdstr.Split(',')[i];
                    planer.Planer   = planernamestr.Split(',')[i];
                    planer.DeptId   = Utils.GetInt(planerptIdstr.Split(',')[i]);
                    planerlist.Add(planer);
                }
                model.TourPlanersList = planerlist;
                model.Adults          = Utils.GetInt(AdultCount);
                model.ContactDepartId = this.hdContactdepartid.Value;
                //客户要求
                model.TourTeamPriceList = GetCustomRequireList();
                //供应商安排
                model.PlanBaseInfoList = GetSourcePlanList();
                //客户信息
                model.TourOrderTravellerList = GetCustomList();
                model.TourPay    = Utils.GetDecimal(TotalEx);
                model.TourIncome = Utils.GetDecimal(TotalIn);
                model.TourProfit = Utils.GetDecimal(Profit);
                if (model.TourOrderTravellerList.Count == 0)
                {
                    msg = UtilsCommons.AjaxReturnJson("0", "请至少填写一条客户信息");
                    RCWE(msg);
                }
            }

            model.OperatorDeptId = this.SiteUserInfo.DeptId;
            model.WeiTuoRiQi     = Utils.GetDateTime(Utils.GetFormValue(txtWeiTuoRiQi.UniqueID), DateTime.Today);
            model.HeTongCode     = Utils.GetFormValue(txtHeTongHao.HeTongCodeClientID);
            model.HeTongId       = Utils.GetFormValue(txtHeTongHao.HeTongIdClientID);

            bool result = false;
            if (string.IsNullOrEmpty(DanXiangYeWuId))
            {
                lock (PaiTuanXuHaoLockHelper)
                {
                    result = bll.AddSingleService(model);
                }
            }
            else
            {
                result = bll.UpdateSingleService(model);
            }

            string type = string.IsNullOrEmpty(DanXiangYeWuId) ? "新增" : "修改";
            if (Utils.GetQueryStringValue("submitplan") == "submit")
            {
                type = "提交";
            }

            if (result)
            {
                msg = UtilsCommons.AjaxReturnJson("1", type + "成功!");
            }
            else
            {
                msg = UtilsCommons.AjaxReturnJson("0", type + "失败!");
            }

            RCWE(msg);
        }
コード例 #8
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        protected void InitInfo()
        {
            this.UploadControl1.CompanyID = this.SiteUserInfo.CompanyId;
            if (string.IsNullOrEmpty(DanXiangYeWuId))
            {
                this.txtOpeator.Text     = this.SiteUserInfo.Name;
                this.txtTotalIn.ReadOnly = true;
                this.txtTotalEx.ReadOnly = true;
                this.txtProfit.ReadOnly  = true;

                return;
            }

            EyouSoft.BLL.TourStructure.BSingleService bll = new EyouSoft.BLL.TourStructure.BSingleService();
            MSingleServiceExtend model = bll.GetSingleServiceExtendByTourId(DanXiangYeWuId);

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

            this.status.Value        = ((int)model.TourStatus).ToString();
            this.txtContactName.Text = model.ContactName;
            this.txtContactTel.Text  = model.ContactTel;
            this.CustomerUnitSelect1.CustomerUnitName = model.BuyCompanyName;
            this.CustomerUnitSelect1.CustomerUnitId   = model.BuyCompanyId;
            this.SellsSelect1.SellsName = model.SellerName;
            this.SellsSelect1.SellsID   = model.SellerId;
            this.SellsSelect2.SetTitle  = "计调员";
            if (model.TourPlanersList != null && model.TourPlanersList.Count > 0)
            {
                //this.SellsSelect2.SellsName = model.TourPlanersList[0].Planer;
                string planidlist   = string.Empty;
                string plannamelist = string.Empty;
                string plandeptlist = string.Empty;
                for (int i = 0; i < model.TourPlanersList.Count; i++)
                {
                    if (i == model.TourPlanersList.Count - 1)
                    {
                        planidlist   += model.TourPlanersList[i].PlanerId;
                        plannamelist += model.TourPlanersList[i].Planer;
                        plandeptlist += model.TourPlanersList[i].DeptId;
                    }
                    else
                    {
                        planidlist   += model.TourPlanersList[i].PlanerId + ",";
                        plannamelist += model.TourPlanersList[i].Planer + ",";
                        plandeptlist += model.TourPlanersList[i].DeptId + ",";
                    }
                }
                this.SellsSelect2.SellsID   = planidlist;
                this.SellsSelect2.SellsName = plannamelist;
                this.hidePlanerDeptID.Value = plandeptlist;
            }
            this.hideDeptID.Value = model.DeptId.ToString();
            if (model.TourStatus != EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划 &&
                model.TourStatus != EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置完毕)
            {
                this.ddlopeaterStatus.Items.Add(new ListItem {
                    Value = ((int)model.TourStatus).ToString(), Text = model.TourStatus.ToString(), Selected = true
                });
            }
            else
            {
                this.ddlopeaterStatus.Items.FindByValue(((int)model.TourStatus).ToString()).Selected = true;;
            }

            if (model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置完毕 ||
                model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.待终审 ||
                model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.封团 ||
                model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.财务核算)
            {
                this.ddlopeaterStatus.Enabled = false;
            }

            this.txtWeiTuoRiQi.Text  = model.WeiTuoRiQi.ToString("yyyy-MM-dd");
            this.txtOpeator.Text     = model.Operator;
            this.txtTotalIn.Text     = Utils.FilterEndOfTheZeroDecimal(model.TourIncome);
            this.txtTotalEx.Text     = Utils.FilterEndOfTheZeroDecimal(model.TourPay);
            this.txtAdultCount.Text  = model.Adults.ToString();
            this.txtProfit.Text      = Utils.FilterEndOfTheZeroDecimal((model.TourIncome - model.TourPay));
            this.txtTotalIn.ReadOnly = true;
            this.txtTotalEx.ReadOnly = true;
            this.txtProfit.ReadOnly  = true;

            if (model.TravellerFile != "")
            {
                StringBuilder agreement = new StringBuilder();
                agreement.AppendFormat("<span class='upload_filename'><a href='/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}' target='_blank'>游客附件</a><a href=\"javascript:void(0)\" onclick=\"SingleEditPage.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideagreement\" value='附件|{0}'/></span>", model.TravellerFile);
                this.lbFiles.Text = agreement.ToString();
            }
            if (model.TourOrderTravellerList != null && model.TourOrderTravellerList.Count > 0)
            {
                this.SetCustomList = model.TourOrderTravellerList;
                CustomListCount    = SetCustomList.Count;
            }
            if (model.TourTeamPriceList != null && model.TourTeamPriceList.Count > 0)
            {
                this.SetCusttomrequire = model.TourTeamPriceList;
                CustomRequireCount     = SetCusttomrequire.Count;
            }

            if (model.PlanBaseInfoList != null && model.PlanBaseInfoList.Count > 0)
            {
                this.SetSourcePlan = model.PlanBaseInfoList;
                SourcePlanCount    = SetSourcePlan.Count;
            }

            hdContactdepartid.Value = model.ContactDepartId;
            ltrOrderCode.Text       = model.OrderCode;
            phOrderCode.Visible     = true;

            txtHeTongHao.HeTongId   = model.HeTongId;
            txtHeTongHao.HeTongCode = model.HeTongCode;

            string printPageHSD  = new EyouSoft.BLL.ComStructure.BComSetting().GetPrintUri(SiteUserInfo.CompanyId, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.核算单);
            string heSuanDanLink = string.Format("<a target='_blank' href='{0}?referertype=2&tourid={1}' class='unbtn'>查看核算单</a>", printPageHSD, model.TourId);

            switch (model.TourStatus)
            {
            case EyouSoft.Model.EnumType.TourStructure.TourStatus.待终审:
                ltrCaoZuoTiShi.Text = heSuanDanLink + "当前业务状态为<b>待终审</b>。";
                break;

            case EyouSoft.Model.EnumType.TourStructure.TourStatus.财务核算:
                ltrCaoZuoTiShi.Text = heSuanDanLink + "当前业务状态为<b>财务核算</b>。";
                break;

            case EyouSoft.Model.EnumType.TourStructure.TourStatus.封团:
                ltrCaoZuoTiShi.Text = heSuanDanLink + "当前业务状态为<b>核算结束</b>。";
                break;

            case EyouSoft.Model.EnumType.TourStructure.TourStatus.已取消:
                ltrCaoZuoTiShi.Text = "当前业务已取消。";
                break;

            default: break;
            }

            bool _isCaoZuo = model.OperatorId == SiteUserInfo.UserId || model.SellerId == SiteUserInfo.UserId;

            if (!_isCaoZuo && model.TourPlanersList != null && model.TourPlanersList.Count > 0)
            {
                foreach (var item in model.TourPlanersList)
                {
                    if (item.PlanerId == SiteUserInfo.UserId)
                    {
                        _isCaoZuo = true; break;
                    }
                }
            }

            if (!_isCaoZuo)
            {
                phCaoZuo.Visible = false;

                if (string.IsNullOrEmpty(ltrCaoZuoTiShi.Text))
                {
                    ltrCaoZuoTiShi.Text = "你没有当前业务的操作权限。";
                }
            }
        }