Exemple #1
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            //系统配置实体
            MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID);

            IsEnableKis = comModel == null ? false : comModel.IsEnableKis;
            IList <MOtherFeeInOut> sl = new BFinance().GetOtherFeeInOutLst(ParentItemType, Utils.ConvertToIntArray(OtherFeeID.Split(',')));

            if (sl != null && sl.Count > 0)
            {
                Status = (int)sl[0].Status;
                rpt_list.DataSource = sl;
                rpt_list.DataBind();
                if (sl[0].Status != FinStatus.财务待审批)
                {
                    lbl_audit.Text          = sl[0].Audit;
                    lbl_auditTime.Text      = UtilsCommons.GetDateString(sl[0].AuditTime, ProviderToDate);
                    lbl_auditRemark.Text    = sl[0].AuditRemark;
                    pan_ExamineVBtn.Visible = false;
                    txt_auditRemark.Visible = false;
                    pan_InMoney.Visible     = true;
                }
                else
                {
                    lbl_audit.Text          = SiteUserInfo.Name;
                    lbl_auditTime.Text      = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate);
                    lbl_auditRemark.Visible = false;
                }
            }
            else
            {
                pan_ExamineVBtn.Visible = false;
                txt_auditRemark.Visible = false;
            }
        }
Exemple #2
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        /// <param name="id">操作ID</param>
        protected void PageInit()
        {
            SellsSelect1.SetTitle    = "管理责任人";
            SellsSelect1.CallBackFun = "FixedAssets.GetAdminVal";
            SelectSection1.SetTitle  = "使用部门";
            int id = Utils.GetInt(Utils.GetQueryStringValue("id"));

            if (id > 0)
            {
                MAsset model = new BFinance().GetAsset(id);
                if (model != null)
                {
                    //编号
                    txt_Id.Text = model.AssetCode;
                    //资产名称
                    txt_Name.Text = model.AssetName;
                    //购买时间
                    txt_purchaseDate.Text  = UtilsCommons.GetDateString(model.BuyTime, ProviderToDate);
                    SellsSelect1.SellsName = model.Admin;
                    SellsSelect1.SellsID   = model.AdminId;
                    //使用部门名称
                    SelectSection1.SectionName = model.Department;
                    //使用部门Id
                    SelectSection1.SectionID = model.DepartmentId.ToString();
                    //原始价值
                    txt_cost.Text = Utils.FilterEndOfTheZeroDecimal(model.BuyPrice);
                    //折旧年限
                    txt_depreciationDateY.Text = model.DepreciableLife.ToString();
                    //备注
                    txt_Remark.Text = model.Remark;
                }
            }
        }
Exemple #3
0
 /// <summary>
 /// 获取导游实体
 /// </summary>
 /// <param name="ID">计调项id</param>
 protected void GetGuidModel(string planId)
 {
     if (!string.IsNullOrEmpty(planId))
     {
         EyouSoft.Model.PlanStructure.MPlanBaseInfo baseinfo = new EyouSoft.BLL.PlanStructure.BPlan().GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.导游, planId);
         EyouSoft.BLL.TourStructure.BTour           bll      = new EyouSoft.BLL.TourStructure.BTour();
         if (baseinfo != null)
         {
             this.LineSelect1.HideSelect = true;
             EyouSoft.Model.TourStructure.MTourBaseInfo model = bll.GetTourInfo(baseinfo.TourId);
             this.txttel.Text = baseinfo.ContactPhone;
             if (baseinfo.PlanGuide != null)
             {
                 this.txtStartAddress.Text = baseinfo.PlanGuide.OnLocation;
                 this.txtEndAddress.Text   = baseinfo.PlanGuide.NextLocation;
                 JobType = baseinfo.PlanGuide.TaskType.ToString();
             }
             this.GuidControl1.GuidID   = baseinfo.SourceId;
             this.GuidControl1.GuidName = baseinfo.SourceName;
             if (model != null)
             {
                 this.txtTourCode.Text     = model.TourCode;
                 this.LineSelect1.LineName = model.RouteName;
             }
             this.txtDate_Start.Text = UtilsCommons.GetDateString(baseinfo.StartDate, ProviderToDate);
             this.txtDate_End.Text   = UtilsCommons.GetDateString(baseinfo.EndDate, ProviderToDate);
             this.txttravel.Text     = baseinfo.ReceiveJourney;
             this.txtService.Text    = baseinfo.ServiceStandard;
             this.txtrmark.Text      = baseinfo.Remarks;
             this.txtCostDesc.Text   = baseinfo.CostDetail.ToString();
             this.txtPaidCost.Text   = Utils.FilterEndOfTheZeroDecimal(baseinfo.Confirmation);
             this.ddlState.Items.FindByValue(((int)baseinfo.Status).ToString()).Selected = true;
         }
     }
 }
        /// <summary>
        /// 获取地接实体
        /// </summary>
        /// <param name="ID">计调项id</param>
        void GetAyencyModel()
        {
            string PlanId = Utils.GetQueryStringValue("PlanId");

            if (string.IsNullOrEmpty(PlanId))
            {
                RCWE("异常请求");
            }

            EyouSoft.Model.PlanStructure.MPlanBaseInfo AyencyM = new EyouSoft.BLL.PlanStructure.BPlan().GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.地接, PlanId);

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

            this.supplierControl1.HideID = AyencyM.SourceId;
            this.supplierControl1.Name   = AyencyM.SourceName;
            this.txtContentName.Text     = AyencyM.ContactName;
            this.txtContentPhone.Text    = AyencyM.ContactPhone;
            this.txtContentFax.Text      = AyencyM.ContactFax;
            this.txtTravel.Text          = AyencyM.ReceiveJourney;
            this.txtServerStand.Text     = AyencyM.ServiceStandard;
            this.txtCustomer.Text        = AyencyM.CustomerInfo;
            this.txtPeopleNumber.Text    = AyencyM.Num.ToString();
            this.txtCostParticu.Text     = AyencyM.CostDetail;
            this.txtCostAccount.Text     = Utils.FilterEndOfTheZeroDecimal(AyencyM.Confirmation);
            panyMent = ((int)AyencyM.PaymentType).ToString();
            this.txtStartTime.Text   = UtilsCommons.GetDateString(AyencyM.StartDate, ProviderToDate);
            this.txtEndTime.Text     = UtilsCommons.GetDateString(AyencyM.EndDate, ProviderToDate);
            this.txtguidNotes.Value  = AyencyM.GuideNotes;
            this.txtOtherRemark.Text = AyencyM.Remarks;
            this.ddlProfit1.Items.FindByValue(AyencyM.IsRebate == true ? "0" : "1").Selected = true;
            states = ((int)AyencyM.Status).ToString();
        }
        /// <summary>
        /// 获取导游实体
        /// </summary>
        /// <param name="ID">计调项id</param>
        protected void GetGuidModel()
        {
            string planId = Utils.GetQueryStringValue("planId");

            if (!string.IsNullOrEmpty(planId))
            {
                EyouSoft.Model.PlanStructure.MPlanBaseInfo baseinfo = new EyouSoft.BLL.PlanStructure.BPlan().GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.导游, planId);
                if (baseinfo != null)
                {
                    this.GuidControl1.GuidID   = baseinfo.SourceId;
                    this.GuidControl1.GuidName = baseinfo.SourceName;
                    this.txtguidPhone.Text     = baseinfo.ContactPhone;
                    if (baseinfo.PlanGuide != null)
                    {
                        this.txtGroupPlace.Text = baseinfo.PlanGuide.OnLocation;
                        this.txtUnderPlace.Text = baseinfo.PlanGuide.NextLocation;
                        this.guidType.Items.FindByValue(((int)baseinfo.PlanGuide.TaskType).ToString()).Selected = true;
                    }
                    this.txtGroupTime.Text   = UtilsCommons.GetDateString(baseinfo.StartDate, ProviderToDate);
                    this.txtunderTime.Text   = UtilsCommons.GetDateString(baseinfo.EndDate, ProviderToDate);
                    this.txttravel.Text      = baseinfo.ReceiveJourney;
                    this.txtserverStand.Text = baseinfo.ServiceStandard;
                    //this.txtOtherRemark.Text = baseinfo.Remarks;
                    this.txtCostParticu.Text = baseinfo.CostDetail.ToString();
                    this.txtCostAccount.Text = Utils.FilterEndOfTheZeroDecimal(baseinfo.Confirmation);
                    states = ((int)baseinfo.Status).ToString();
                    txtDaoYouXuZhi.Text = baseinfo.GuideNotes;
                }
            }
        }
Exemple #6
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);
            }
        }
Exemple #7
0
        /// <summary>
        /// 导出
        /// </summary>
        private void ToXls()
        {
            int recordCount = 0;

            IList <MAsset> ls = new BFinance().GetAssetLst(UtilsCommons.GetToXlsRecordCount(), 1, ref recordCount, new MAssetBase {
                CompanyId = CurrentUserCompanyID
            });

            if (ls != null && ls.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\n",
                                "编号",
                                "资产名称",
                                "购买时间",
                                "原始价值",
                                "折旧年限",
                                "使用部门",
                                "管理责任人");
                foreach (MAsset item in ls)
                {
                    sb.Append(item.AssetCode + "\t");
                    sb.Append(item.AssetName + "\t");
                    sb.Append(UtilsCommons.GetDateString(item.BuyTime, ProviderToDate) + "\t");
                    sb.Append(UtilsCommons.GetMoneyString(item.BuyPrice, ProviderToMoney) + "\t");
                    sb.Append(item.DepreciableLife + "\t");
                    sb.Append(item.Department + "\t");
                    sb.Append(item.Admin + "\n");
                }
                ResponseToXls(sb.ToString());
            }
            ResponseToXls(string.Empty);
        }
        /// <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.待终审);
            }
        }
        /// <summary>
        /// 导出
        /// </summary>
        private void ToXls()
        {
            int                 recordCount = 0;
            MBudgetContrast     sumModel    = new MBudgetContrast();
            MBudgetContrastBase queryString = new MBudgetContrastBase();

            queryString.TourCode   = Utils.GetQueryStringValue("txt_teamNumber");
            queryString.RouteName  = Utils.GetQueryStringValue("txt_lineName");
            queryString.LDateS     = Utils.GetQueryStringValue("txt_SDate");
            queryString.LDateE     = Utils.GetQueryStringValue("txt_EDate");
            queryString.SellerId   = txt_Seller.SellsID = Utils.GetQueryStringValue(txt_Seller.SellsIDClient);
            queryString.SellerName = txt_Seller.SellsName = Utils.GetQueryStringValue(txt_Seller.SellsNameClient);
            queryString.PlanerId   = txt_Plan.SellsID = Utils.GetQueryStringValue(txt_Plan.SellsIDClient);
            queryString.Planer     = txt_Plan.SellsName = Utils.GetQueryStringValue(txt_Plan.SellsNameClient);

            IList <MBudgetContrast> ls = new BFinance().GetBudgetContrastLst(
                UtilsCommons.GetToXlsRecordCount(),
                1,
                ref recordCount,
                ref sumModel,
                CurrentUserCompanyID,
                queryString);

            if (ls != null && ls.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}\t{11}\n",
                                "团号",
                                "线路名称",
                                "客户单位",
                                "出团时间",
                                "销售员",
                                "计调员",
                                "费用预算收入",
                                "费用预算支出",
                                "费用预算毛利",
                                "结算费用收入",
                                "结算费用支出",
                                "结算费用毛利");
                foreach (MBudgetContrast item in ls)
                {
                    sb.Append(item.TourCode + "\t");
                    sb.Append(item.RouteName + "\t");
                    sb.Append(item.Crm + "\t");
                    sb.Append(UtilsCommons.GetDateString(item.LDate, ProviderToDate) + "\t");
                    sb.Append(item.SellerName + "\t");
                    sb.Append(item.Planer + "\t");
                    sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.BudgetIncome, ProviderToMoney) + "\t");
                    sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.BudgetOutgo, ProviderToMoney) + "\t");
                    sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.BudgetGProfit, ProviderToMoney) + "\t");
                    sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.ClearingIncome, ProviderToMoney) + "\t");
                    sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.ClearingOutgo, ProviderToMoney) + "\t");
                    sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.ClearingGProfit, ProviderToMoney) + "\n");
                }
                ResponseToXls(sb.ToString());
            }
            ResponseToXls(string.Empty);
        }
        /// <summary>
        /// 根据预控类型显示预控时间(总控显示开始日期,单控显示起、止日期)
        /// </summary>
        /// <param name="PeriodType"></param>
        /// <returns></returns>
        protected string GetPeriodTime(object PeriodType, object StartTime, object EndTime)
        {
            EyouSoft.Model.EnumType.SourceStructure.SourceControlType type = (EyouSoft.Model.EnumType.SourceStructure.SourceControlType)PeriodType;
            string str = string.Empty;

            str = UtilsCommons.GetDateString(DateTime.Parse(StartTime.ToString()), ProviderToDate);
            if (type == EyouSoft.Model.EnumType.SourceStructure.SourceControlType.单控)
            {
                str = UtilsCommons.GetDateString(DateTime.Parse(StartTime.ToString()), ProviderToDate) + "-" + UtilsCommons.GetDateString(DateTime.Parse(EndTime.ToString()), ProviderToDate);
            }
            return(str);
        }
Exemple #11
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            string OtherFeeID         = Utils.GetQueryStringValue("OtherFeeID");
            IList <MOtherFeeInOut> sl = new BFinance().GetOtherFeeInOutLst(ItemType.支出, Utils.ConvertToIntArray(OtherFeeID.Split(',')));

            txt_PMDate.Text  = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate);
            lbl_PPerson.Text = SiteUserInfo.Name;
            if (sl != null && sl.Count > 0)
            {
                rpt_list.DataSource = sl;
                rpt_list.DataBind();
            }
        }
Exemple #12
0
        /// <summary>
        /// 导出
        /// </summary>
        private void ToXls()
        {
            int recordCount = 0;
            //金额汇总信息
            decimal sum = 0;


            MAuditBase queryModel = new MAuditBase();

            queryModel.TourCode   = Utils.GetQueryStringValue("tourID");
            queryModel.IssueTimeS = Utils.GetQueryStringValue("SDate");
            queryModel.IssueTimeE = Utils.GetQueryStringValue("EDate");
            queryModel.SellerId   = txt_Seller.SellsID = Utils.GetQueryStringValue(txt_Seller.SellsIDClient);
            queryModel.SellerName = txt_Seller.SellsName = Utils.GetQueryStringValue(txt_Seller.SellsNameClient);
            queryModel.Crm        = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHMC);
            queryModel.CrmId      = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHBH);
            IList <MReconciliation> ls = new BFinance().GetReconciliationLst(
                UtilsCommons.GetToXlsRecordCount(),
                1,
                ref recordCount,
                ref sum,
                ReconciliationType.今日应收,
                CurrentUserCompanyID,
                queryModel);

            if (ls != null && ls.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\n",
                                "订单号",
                                "线路名称",
                                "客户单位",
                                "销售员",
                                "应收金额",
                                "核算日期",
                                "财务人");

                foreach (MReconciliation item in ls)
                {
                    sb.Append(item.OrderCode + "\t");
                    sb.Append(item.RouteName + "\t");
                    sb.Append(item.Crm + "\t");
                    sb.Append(item.SellerName + "\t");
                    sb.Append(UtilsCommons.GetMoneyString(item.Amount, ProviderToMoney) + "\t");
                    sb.Append(UtilsCommons.GetDateString(item.IssueTime, ProviderToDate) + "\t");
                    sb.Append(item.Operator + "\n");
                }
                ResponseToXls(sb.ToString());
            }
            ResponseToXls(string.Empty);
        }
Exemple #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MBill model = new BFinance().GetBillMdl(CurrentUserCompanyID, Utils.GetInt(Utils.GetQueryStringValue("billID")));

            if (model != null)
            {
                lbl_billTime.Text      = UtilsCommons.GetDateString(model.BillTime, ProviderToDate);
                lbl_billAmount.Text    = UtilsCommons.GetMoneyString(model.BillAmount, ProviderToMoney);
                lbl_billNo.Text        = model.BillNo;
                lbl_remark.Text        = model.Remark;
                lbl_approver.Text      = model.Approver;
                lbl_approveTime.Text   = UtilsCommons.GetDateString(model.ApproveTime, ProviderToDate);
                lbl_approveRemark.Text = model.ApproveRemark;
            }
        }
Exemple #14
0
 /// <summary>
 /// 页面初始化
 /// </summary>
 /// <param name="id">操作ID</param>
 protected void PageInit(string id)
 {
     #region 初始化用户控件
     this.SingleFileUpload1.CompanyID = this.SiteUserInfo.CompanyId;
     #endregion
     //编辑初始化
     if (!string.IsNullOrEmpty(id))
     {
         BContract    BLL   = new BContract();
         MGovContract Model = BLL.GetGovContractModel(id);
         if (null != Model)
         {
             this.hidKeyId.Value             = Model.ID;
             this.txtNumber.Text             = Model.Number;
             this.txtType.Text               = Model.Type;
             this.txtCompany.Text            = Model.Company;
             this.txtStartTime.Text          = UtilsCommons.GetDateString(Model.SignedTime, this.ProviderToDate);
             this.txtEndTime.Text            = UtilsCommons.GetDateString(Model.MaturityTime, this.ProviderToDate);
             this.txtContent.Text            = Model.Description;
             this.HrSelect1.HrSelectID       = Model.signierId;
             this.HrSelect1.HrSelectName     = Model.signier;
             this.SelectSection1.SectionID   = Model.SignedDepId.ToString();
             this.SelectSection1.SectionName = Model.SignedDep;
             if (Model.IsRemind)
             {
                 warn.Checked = true;
             }
             else
             {
                 nowarn.Checked = true;
             }
             StringBuilder strFile = new StringBuilder();
             IList <EyouSoft.Model.ComStructure.MComAttach> lstFile = Model.ComAttachList;
             if (Model.ComAttachList != null && Model.ComAttachList.Count > 0)
             {
                 for (int i = 0; i < lstFile.Count; i++)
                 {
                     strFile.AppendFormat("<span class='upload_filename'><a href='/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}&name={1}' target='_blank'>{1}</a><a href=\"javascript:void(0)\" onclick=\"PageJsData.DelFile(this)\" style='color:#f00;font-weight:bolder;' title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideFileInfo\" value='{1}|{0}'/></span>", lstFile[i].FilePath, lstFile[i].Name);
                 }
             }
             this.lbFiles.Text = strFile.ToString();
             if (!this.SiteUserInfo.IsHandleElse && this.SiteUserInfo.UserId != Model.OperatorId)
             {
                 this.ph_Save.Visible = false;
             }
         }
     }
 }
Exemple #15
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            IList <MRegister> ls = new BFinance().GetRegisterById(
                CurrentUserCompanyID,
                Utils.ConvertToIntArray(Utils.GetQueryStringValue("registerIds").Split(','))
                );

            if (ls != null && ls.Count > 0)
            {
                rpt_list.DataSource = ls;
                rpt_list.DataBind();
                lbl_amount.Text = UtilsCommons.GetMoneyString(ls.Sum(item => item.PaymentAmount), ProviderToMoney);
            }
            lbl_EAPerson.Text = SiteUserInfo.Name;
            txt_EADate.Text   = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate);
        }
Exemple #16
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        private void DataInit()
        {
            //系统配置实体
            MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID) ?? new MComSetting();

            IsEnableKis = comModel.IsEnableKis;
            debitID     = Utils.GetInt(Utils.GetQueryStringValue("debitID"));
            if (debitID > 0)
            {
                MDebit model = new BFinance().GetDebit(debitID);
                if (model != null && model.Id > 0)
                {
                    //借款人
                    lbl_borrower.Text = model.Borrower;
                    //预借金额
                    lbl_borrowAmount.Text = UtilsCommons.GetMoneyString(model.BorrowAmount, ProviderToMoney);
                    //实借金额
                    txt_realAmount.Text = UtilsCommons.GetMoneyString(model.RealAmount, ProviderToMoney);
                    //实领签单数
                    txt_relSignNum.Text = model.RelSignNum.ToString();
                    //预领签单数
                    lbl_preSignNum.Text = model.PreSignNum.ToString();
                    //审批人
                    lbl_approver.Text = model.Approver;
                    //审批时间
                    txt_approveDate.Text    = UtilsCommons.GetDateString(model.ApproveDate, ProviderToDate);
                    txt_approveDate.Enabled = false;
                    //审批意见
                    txt_approval.Text = model.Approval;
                    //出纳
                    txt_lender.SellsName = SiteUserInfo.Name;
                    txt_lender.SellsID   = SiteUserInfo.UserId;
                    //支付日期
                    txt_lendDate.Text = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate);
                    if (Utils.GetInt(Utils.GetQueryStringValue("intstatus")) == ((int)EyouSoft.Model.EnumType.FinStructure.FinStatus.账务已支付))
                    {
                        txt_lender.SellsName = model.Lender;
                        txt_lender.SellsID   = model.LenderId;
                        txt_lendDate.Text    = UtilsCommons.GetDateString(model.LendDate, ProviderToDate);
                        txt_lender.ReadOnly  = true;
                        txt_lendDate.Enabled = false;
                    }
                }
            }
        }
        /// <summary>
        /// 导出
        /// </summary>
        private void ToXls()
        {
            int recordCount = 0;
            //金额汇总信息
            decimal sum = 0;
            IList <MReconciliation> ls = new BFinance().GetReconciliationLst(
                UtilsCommons.GetToXlsRecordCount(),
                1,
                ref recordCount,
                ref sum,
                ReconciliationType.今日应付,
                CurrentUserCompanyID,
                new MAuditBase());

            if (ls != null && ls.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\n",
                                "团号",
                                "线路名称",
                                "计调项",
                                "供应商单位",
                                "计调员",
                                "销售员",
                                "应付金额",
                                "核算日期",
                                "财务人");

                foreach (MReconciliation item in ls)
                {
                    sb.Append(item.TourCode + "\t");
                    sb.Append(item.RouteName + "\t");
                    sb.Append(item.PlanItem + "\t");
                    sb.Append(item.Crm + "\t");
                    sb.Append(item.Planer + "\t");
                    sb.Append(item.SellerName + "\t");
                    sb.Append(UtilsCommons.GetMoneyString(item.IssueTime, ProviderToMoney) + "\t");
                    sb.Append(UtilsCommons.GetDateString(item.Amount, ProviderToDate) + "\t");
                    sb.Append(item.Operator + "\n");
                }
                ResponseToXls(sb.ToString());
            }
            ResponseToXls(string.Empty);
        }
Exemple #18
0
        /// <summary>
        /// 导出
        /// </summary>
        private void ToXls()
        {
            int recordCount = 0;
            //金额汇总信息
            decimal             sum        = 0;
            MPayableApproveBase queryModel = new MPayableApproveBase {
                CompanyId = CurrentUserCompanyID
            };
            IList <MPayableApprove> ls = new BFinance().GetMPayableApproveLst(
                UtilsCommons.GetToXlsRecordCount(),
                1,
                ref recordCount,
                ref sum,
                queryModel);

            if (ls != null && ls.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                //应付账款
                sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\n",
                                "计调项",
                                "团号",
                                "出团时间",
                                "供应商单位",
                                "请款人",
                                "付款金额",
                                "最晚付款时间",
                                "备注");
                foreach (MPayableApprove item in ls)
                {
                    sb.Append(item.PlanTyp + "\t");
                    sb.Append(item.TourCode + "\t");
                    sb.Append(UtilsCommons.GetDateString(item.LDate, ProviderToDate) + "\t");
                    sb.Append(item.Supplier + "\t");
                    sb.Append(item.Dealer + "\t");
                    sb.Append(UtilsCommons.GetMoneyString(item.PayAmount, ProviderToMoney) + "\t");
                    sb.Append(UtilsCommons.GetDateString(item.PayExpire, ProviderToDate) + "\t");
                    sb.Append(item.Remark + "\n");
                }
                ResponseToXls(sb.ToString());
            }
            ResponseToXls(string.Empty);
        }
Exemple #19
0
        /// <summary>
        /// 获取计调项出账等级实体
        /// </summary>
        /// <param name="registerID">出账等级id</param>
        protected void GetPayResgin()
        {
            string ID = Utils.GetQueryStringValue("ID");

            if (!string.IsNullOrEmpty(ID))
            {
                EyouSoft.Model.FinStructure.MRegister registerM = new EyouSoft.BLL.FinStructure.BFinance().GetRegisterById(this.SiteUserInfo.CompanyId, Utils.GetInt(ID));
                if (registerM != null)
                {
                    this.txtPrepaidPrices.Text = Utils.FilterEndOfTheZeroDecimal(registerM.PaymentAmount);
                    this.txtPayDate.Text       = UtilsCommons.GetDateString(registerM.Deadline, ProviderToDate);
                    this.txtUseInterpret.Text  = registerM.Remark;
                    if (registerM.Status == EyouSoft.Model.EnumType.FinStructure.FinStatus.账务待支付 || registerM.Status == EyouSoft.Model.EnumType.FinStructure.FinStatus.账务已支付)
                    {
                        this.panView.Visible = false;
                    }
                }
            }
        }
Exemple #20
0
 /// <summary>
 /// 页面初始化
 /// </summary>
 private void DataInit()
 {
     debitID = Utils.GetInt(Utils.GetQueryStringValue("debitID"));
     if (debitID > 0)
     {
         MDebit model = new BFinance().GetDebit(debitID);
         if (model != null && model.Id > 0)
         {
             //借款人
             lbl_borrower.Text = model.Borrower;
             //预借金额
             lbl_borrowAmount.Text = UtilsCommons.GetMoneyString(model.BorrowAmount, ProviderToMoney);
             //预领签单数
             lbl_preSignNum.Text = model.PreSignNum.ToString();
             //审批人
             lbl_approver.Text = SiteUserInfo.Name;
             //审批时间
             txt_approveDate.Text = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate);
         }
     }
 }
Exemple #21
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            IsInAccount = Utils.GetQueryStringValue("isInAccount") == "" ? false : true;
            //系统配置实体
            MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID) ?? new MComSetting();

            IsEnableKis = comModel.IsEnableKis;

            if (Utils.GetQueryStringValue("isInAccount") == "chakan")
            {
                IsEnableKis = false;
            }

            txt_PDate.Text                 = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate);
            this.SellsSelect1.SellsID      = this.SiteUserInfo.UserId;
            this.SellsSelect1.SellsName    = this.SiteUserInfo.Name;
            this.SellsSelect1.ReadOnly     = IsInAccount;  //财务入账 不能修改出纳
            this.SellsSelect1.IsShowSelect = !IsInAccount; //财务入账 隐藏选用按钮
            this.hideDeptID.Value          = this.SiteUserInfo.DeptId.ToString();

            IList <MRegister> ls = new BFinance().GetRegisterById(
                CurrentUserCompanyID,
                Utils.ConvertToIntArray(Utils.GetQueryStringValue("registerIds").Split(','))
                );

            if (ls != null && ls.Count > 0)
            {
                rpt_list.DataSource = ls;
                rpt_list.DataBind();
                lbl_amount.Text = UtilsCommons.GetMoneyString(ls.Sum(item => item.PaymentAmount).ToString(), ProviderToMoney);
                if (ls[0].Status == EyouSoft.Model.EnumType.FinStructure.FinStatus.账务已支付)
                {
                    txt_PDate.Text              = UtilsCommons.GetDateString(ls[0].PayTime, ProviderToDate);
                    this.SellsSelect1.SellsID   = ls[0].AccountantId;
                    this.SellsSelect1.SellsName = ls[0].Accountant;
                    this.hideDeptID.Value       = ls[0].AccountantDeptId.ToString();
                    txt_PDate.Enabled           = false;
                }
            }
        }
        /// <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;
            }
        }
Exemple #23
0
        /// <summary>
        /// 导出Excel
        /// </summary>
        private void ListToExcel()
        {
            int toXlsRecordCount = UtilsCommons.GetToXlsRecordCount();

            if (toXlsRecordCount < 1)
            {
                ResponseToXls(string.Empty);
            }

            var s = new StringBuilder();

            s.Append("团号\t线路名称\t出团时间\t回团时间\t人数\t销售员\t计调员\t导游\t状态\n");

            object[] heJi;

            IList <Model.StatStructure.MTourStatus> list;

            list = new BLL.StatStructure.BStatistics().GetTourStatusLst(SiteUserInfo.CompanyId, toXlsRecordCount, 1, ref _recordCount, this.GetSearchModel(), out heJi);

            if (list != null && list.Any())
            {
                foreach (var t in list)
                {
                    s.AppendFormat(
                        "{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\n",
                        t.TourCode,
                        t.RouteName,
                        UtilsCommons.GetDateString(t.LDate, ProviderToDate),
                        UtilsCommons.GetDateString(t.RDate, ProviderToDate),
                        t.PersonNum,
                        t.SellerName,
                        GetPlanerName(t.Planer),
                        GetGuiderName(t.Guide),
                        t.TourStatus);
                }
            }

            ResponseToXls(s.ToString());
        }
        /// <summary>
        /// 获取用餐实体
        /// </summary>
        /// <param name="planID">计调项id</param>
        protected void GetDinModel()
        {
            string planId = Utils.GetQueryStringValue("planId");

            if (!string.IsNullOrEmpty(planId))
            {
                EyouSoft.Model.PlanStructure.MPlanBaseInfo baseinfo = new EyouSoft.BLL.PlanStructure.BPlan().GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.用餐, planId);
                if (baseinfo != null)
                {
                    this.supplierControl1.HideID = baseinfo.SourceId;
                    this.supplierControl1.Name   = baseinfo.SourceName;
                    this.txtContactFax.Text      = baseinfo.ContactFax;
                    this.txtContactName.Text     = baseinfo.ContactName;
                    this.txtContactPhone.Text    = baseinfo.ContactPhone;
                    this.txtDinningDate.Text     = UtilsCommons.GetDateString(baseinfo.StartDate, ProviderToDate);
                    if (baseinfo.PlanDiningPricelist != null && baseinfo.PlanDiningPricelist.Count > 0)
                    {
                        this.tabViewPrices.Visible   = false;
                        this.repPriceList.DataSource = baseinfo.PlanDiningPricelist;
                        this.repPriceList.DataBind();
                    }
                    else
                    {
                        this.tabViewPrices.Visible = true;
                    }
                    this.txtPeopleNum.Text   = baseinfo.Num.ToString();
                    this.txtCostDetail.Text  = baseinfo.CostDetail;
                    this.txtTotalPrices.Text = Utils.FilterEndOfTheZeroDecimal(baseinfo.Confirmation);
                    this.txtGuidNotes.Text   = baseinfo.GuideNotes;
                    this.txtOtherMarks.Text  = baseinfo.Remarks;
                    panMent = ((int)baseinfo.PaymentType).ToString();
                    Status  = ((int)baseinfo.Status).ToString();
                }
                else
                {
                    Utils.ResponseGoBack();
                }
            }
        }
Exemple #25
0
        /// <summary>
        /// 导出
        /// </summary>
        private void ToXls()
        {
            MDayRegister         sumModel    = new MDayRegister();
            int                  recordCount = 0;
            IList <MDayRegister> ls          = new BFinance().GetDayRegisterLst(
                UtilsCommons.GetToXlsRecordCount(),
                1,
                ref recordCount,
                ref sumModel,
                new MDayRegisterBase
            {
                CompanyId = CurrentUserCompanyID
            });

            if (ls != null && ls.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\n",
                                "时间",
                                "摘要",
                                "借方现金",
                                "借方银行存款",
                                "贷方现金",
                                "贷方银行存款");

                foreach (MDayRegister item in ls)
                {
                    sb.Append(UtilsCommons.GetDateString(item.LDate, ProviderToDate) + "\t");
                    sb.Append(item.Summary + "\t");
                    sb.Append(UtilsCommons.GetMoneyString(item.DebitCash, ProviderToMoney) + "\t");
                    sb.Append(UtilsCommons.GetMoneyString(item.DebitBank, ProviderToMoney) + "\t");
                    sb.Append(UtilsCommons.GetMoneyString(item.LenderCash, ProviderToMoney) + "\t");
                    sb.Append(UtilsCommons.GetMoneyString(item.LenderBank, ProviderToMoney) + "\n");
                }
                ResponseToXls(sb.ToString());
            }
            ResponseToXls(string.Empty);
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="tourId"></param>
        private void PageInit(string tourId, string type)
        {
            EyouSoft.BLL.TourStructure.BTour             bTour = new EyouSoft.BLL.TourStructure.BTour();
            EyouSoft.Model.TourStructure.MTourSanPinInfo tour  = bTour.GetTourInfo(tourId) as EyouSoft.Model.TourStructure.MTourSanPinInfo;
            if (tour != null)
            {
                if (tour.IsCheck && type.Equals("DoUpdate"))
                {
                    this.phMsg.Visible  = true;
                    this.phSave.Visible = false;
                    this.phBack.Visible = true;

                    //发班周期
                    this.phdSelectDate.Visible = false;
                    //this.lblLeaveDate.Text = UtilsCommons.GetDateString(tour.LDate.Value, this.ProviderToDate);
                    //this.hideLeaveDate.Value = UtilsCommons.GetDateString(tour.LDate.Value, this.ProviderToDate);
                }

                //线路区域
                this.litArea.Text = GetArea(tour.AreaId);

                this.txtRouteName.Text        = tour.RouteName;
                this.txtTourDays.Text         = tour.TourDays.ToString();
                this.txtPlanPeopleNumber.Text = tour.PlanPeopleNumber.ToString();

                //发班周期
                //copy可选择法班周期
                //this.phdSelectDate.Visible = false;
                this.lblLeaveDate.Text   = UtilsCommons.GetDateString(tour.LDate.Value, this.ProviderToDate);
                this.hideLeaveDate.Value = UtilsCommons.GetDateString(tour.LDate.Value, this.ProviderToDate);

                //停收提前的天数
                this.txtStopDays.Text = tour.StopDays.ToString();

                this.txtLTraffic.Text = tour.LTraffic;
                this.txtRTraffic.Text = tour.RTraffic;
                this.txtGather.Text   = tour.Gather;

                //附件
                if (!string.IsNullOrEmpty(tour.FilePath))
                {
                    System.Text.StringBuilder agreement = new System.Text.StringBuilder();
                    agreement.AppendFormat("<span class='upload_filename'><a href='{0}' target='_blank'>查看附件</a><a href=\"javascript:void(0)\" onclick=\"AddSupplierPlan.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideagreement\" value='{0}'/></span>", tour.FilePath);
                    this.lblFile.Text = agreement.ToString();
                }

                this.txtPlanFeature.Text    = tour.PlanFeature;
                this.txtPeerAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(tour.MSupplierPublishPrice.SettleAdultPrice);
                this.txtPeerChildPrice.Text = Utils.FilterEndOfTheZeroDecimal(tour.MSupplierPublishPrice.SettleChildPrice);


                //行程安排
                this.Journey1.SetPlanList = tour.TourPlan;


                //购物安排
                this.txtServiceStandard.Text  = tour.TourService.ServiceStandard;
                this.txtNoNeedItem.Text       = tour.TourService.NoNeedItem;
                this.txtShoppingItem.Text     = tour.TourService.ShoppingItem;
                this.txtChildServiceItem.Text = tour.TourService.ChildServiceItem;
                this.txtOwnExpense.Text       = tour.TourService.OwnExpense;
                this.txtNeedAttention.Text    = tour.TourService.NeedAttention;
                this.txtWarmRemind.Text       = tour.TourService.WarmRemind;
                this.txtInsiderInfor.Text     = tour.TourService.InsiderInfor;
            }
        }
Exemple #27
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void DataInit()
 {
     lbl_Name.Text     = SiteUserInfo.Name;
     txt_dateTime.Text = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate);
 }
Exemple #28
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        /// <param name="id">操作ID</param>
        protected void PageInit(string id, string dotype)
        {
            this.UploadControl1.CompanyID = this.SiteUserInfo.CompanyId;
            this.txtLastHuman.Text        = this.SiteUserInfo.Name;
            this.txtLastDate.Enabled      = false;
            this.txtLastHuman.Enabled     = false;

            if (String.Equals(dotype, "update", StringComparison.InvariantCultureIgnoreCase) && !string.IsNullOrEmpty(id))
            {
                EyouSoft.BLL.SourceStructure.BSource         bll   = new EyouSoft.BLL.SourceStructure.BSource();
                EyouSoft.Model.SourceStructure.MSourceDining model = bll.GetDiningModel(id);
                if (model != null)
                {
                    if (model.SourceModel != null)
                    {
                        Countryindex                    = model.SourceModel.CountryId;
                        Provinceindex                   = model.SourceModel.ProvinceId;
                        Cityindex                       = model.SourceModel.CityId;
                        Areaindex                       = model.SourceModel.CountyId;
                        this.txtaddress.Text            = model.SourceModel.Address;
                        this.txthotleinfo.Text          = model.SourceModel.Desc;
                        this.txtHotleName.Text          = model.SourceModel.Name;
                        this.txtRemarks.Text            = model.SourceModel.Remark;
                        this.txtContractDate.Text       = UtilsCommons.GetDateString(model.SourceModel.ContractPeriodEnd, ProviderToDate);
                        this.txtContractDate_Start.Text = UtilsCommons.GetDateString(model.SourceModel.ContractPeriodStart, ProviderToDate);
                        this.txtLastDate.Text           = UtilsCommons.GetDateString(model.SourceModel.LastModifyTime, ProviderToDate);
                        this.txtLastHuman.Text          = model.SourceModel.LastModifierId;
                        string cuisinename = string.Empty;
                        string cuisineid   = string.Empty;
                        if (model.DiningCuisineList != null && model.DiningCuisineList.Count > 0)
                        {
                            for (int i = 0; i < model.DiningCuisineList.Count; i++)
                            {
                                if (model.DiningCuisineList.Count - 1 == i)
                                {
                                    cuisinename += model.DiningCuisineList[i].Cuisine.ToString();
                                    cuisineid   += ((int)model.DiningCuisineList[i].Cuisine).ToString();
                                }
                                else
                                {
                                    cuisinename += model.DiningCuisineList[i].Cuisine.ToString() + ",";
                                    cuisineid   += ((int)model.DiningCuisineList[i].Cuisine).ToString() + ",";
                                }
                            }
                        }
                        this.CuisineSelect1.CuisineSelectName = cuisinename;
                        this.CuisineSelect1.CuisineSelectID   = cuisineid;

                        radno.Checked = true;
                        if (model.SourceModel.IsCommission)
                        {
                            radyes.Checked = true;
                            radno.Checked  = false;
                        }
                        Radio_hd_no.Checked = true;
                        if (model.SourceModel.IsSignContract)
                        {
                            Radio_hd_yes.Checked        = true;
                            this.Radio_hd_no.Checked    = false;
                            this.txtContractNum.Visible = true;
                            this.txtContractNum.Text    = model.SourceModel.ContractCode;
                        }
                        RadRecommend_no.Checked = true;
                        if (model.SourceModel.IsRecommend)
                        {
                            RadRecommend_yes.Checked = true;
                            RadRecommend_no.Checked  = false;
                        }
                        RadSign_no.Checked = true;
                        if (model.SourceModel.IsPermission)
                        {
                            RadSign_yes.Checked = true;
                            RadSign_no.Checked  = false;
                        }
                        if (model.SourceModel.ContractAttach != null)
                        {
                            StringBuilder strFile = new StringBuilder();
                            if (model.SourceModel.ContractAttach.FilePath != "")
                            {
                                strFile.AppendFormat("<span class='upload_filename'><a href='/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}&name={1}' target='_blank'>{1}</a><a href=\"javascript:void(0)\" onclick=\"CruiseEditPage.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideFileInfo\" value='{1}|{0}'/></span>", model.SourceModel.ContractAttach.FilePath, model.SourceModel.ContractAttach.Name);
                            }
                            this.lbFiles.Text = strFile.ToString();
                        }
                    }
                    if (!string.IsNullOrEmpty(model.DiningStandard) && model.DiningStandard.Split('-').Length > 1)
                    {
                        this.txtPmax.Text = model.DiningStandard.Split('-')[1].Replace("元", "");
                        this.txtPmin.Text = model.DiningStandard.Split('-')[0].Replace("元", "");
                    }
                    if (model.LinkManList.Count > 0)
                    {
                        this.Contact1.SetTravelList = model.LinkManList;
                    }
                }
                else
                {
                    Utils.ResponseGoBack();
                }
            }
        }
Exemple #29
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        protected void PageInit()
        {
            #region 权限判断
            switch (parent)
            {
            case ItemType.收入:
                //if (!CheckGrant(TravelPermission.账务管理_杂费收入_收入登记))
                //{
                //    Utils.ResponseNoPermit(TravelPermission.账务管理_杂费收入_收入登记, true);
                //    return;
                //}
                break;

            case ItemType.支出:
                //if (!CheckGrant(TravelPermission.账务管理_杂费支出_支出登记))
                //{
                //    Utils.ResponseNoPermit(TravelPermission.账务管理_杂费支出_支出登记, true);
                //    return;
                //}
                break;
            }
            #endregion
            CustomerUnitSelect1.CallBack = "Add.CustomerUnitSelectCallBack";
            #region 支付方式
            IList <MComPayment> ddlSl = UtilsCommons.GetPaymentList(CurrentUserCompanyID, parent);
            if (ddlSl != null && ddlSl.Count > 0)
            {
                ddl_PayType.DataTextField  = "Name";
                ddl_PayType.DataValueField = "PaymentId";
                ddl_PayType.DataSource     = ddlSl;
                ddl_PayType.DataBind();
            }
            #endregion
            txt_dealTime.Text = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate);
            #region 页面基本数据
            MOtherFeeInOut model = new BFinance().GetOtherFeeInOut(
                parent,
                OtherFeeID,
                CurrentUserCompanyID);
            txt_dealer.SellsID   = SiteUserInfo.UserId;
            txt_dealer.SellsName = SiteUserInfo.Name;
            if (model != null)
            {
                //收/付款时间
                txt_dealTime.Text = model.DealTime.ToString(ProviderToDate);
                //收支项目
                txt_feeItem.Text = model.FeeItem;
                //金额
                txt_feeAmount.Text = Utils.FilterEndOfTheZeroDecimal(model.FeeAmount);
                //备注
                txt_remark.Text = model.Remark;
                //销售员
                if (parent == ItemType.支出)
                {
                    txt_seller.SellsID   = model.SellerId;
                    txt_seller.SellsName = model.Seller;
                }
                else
                {
                    txt_seller.SellsID   = model.DealerId;
                    txt_seller.SellsName = model.Dealer;
                }
                CustomerUnitSelect1.CustomerUnitId   = model.CrmId;
                CustomerUnitSelect1.CustomerUnitName = model.Crm;
                if (parent == ItemType.支出)
                {
                    //请款人
                    txt_dealer.SellsID   = model.DealerId;
                    txt_dealer.SellsName = model.Dealer;
                }
                //复制清除OtherFeeID
                if (Utils.GetQueryStringValue("type") == "Copy")
                {
                    OtherFeeID = 0;
                }
                ddl_PayType.SelectedValue = model.PayType.ToString();
            }
            #endregion

            #region 配置用户控件
            txt_seller.SetTitle = "销售员";
            txt_dealer.SetTitle = "请款人";
            #endregion
        }
Exemple #30
0
        /// <summary>
        /// 获得超限信息
        /// </summary>
        /// <returns></returns>
        private string GetAmount()
        {
            EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote();
            string msg = string.Empty;
            //询价单位编号
            string buyID = Utils.GetQueryStringValue("buyID");
            //销售员编号
            string sellsID = Utils.GetQueryStringValue("sellsID");
            //合计金额
            decimal price = Utils.GetDecimal(Utils.GetQueryStringValue("price"));
            //返回状态1、2、3
            string state = string.Empty;
            //是否超限
            bool isOverrun = true;
            //报价编号

            string cHtml = string.Empty;
            string sHtml = string.Empty;

            EyouSoft.Model.FinStructure.MCustomerWarning customerWarningModel = bll.GetCustomerOverrunDetail(buyID, price, SiteUserInfo.CompanyId);
            EyouSoft.Model.FinStructure.MSalesmanWarning salesmanWarningModel = bll.GetSaleOverrunDetail(sellsID, price, SiteUserInfo.CompanyId);
            if (customerWarningModel != null)
            {
                cHtml = "<tr><td height='28' bgcolor='#FFFFFF' align='center'>" + customerWarningModel.Customer + "</td><td bgcolor='#FFFFFF' align='center'><b class='fontbsize12'>" + UtilsCommons.GetMoneyString(customerWarningModel.AmountOwed, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><a class='link1'><strong>" + UtilsCommons.GetMoneyString(customerWarningModel.Arrear, this.ProviderToMoney) + "</strong></a></td><td bgcolor='#FFFFFF' align='center'><b class='fontgreen'>" + UtilsCommons.GetMoneyString(customerWarningModel.Transfinite, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'>" + UtilsCommons.GetDateString(customerWarningModel.TransfiniteTime, this.ProviderToDate) + "</td><td bgcolor='#FFFFFF' align='center'>" + customerWarningModel.Deadline.ToString() + "</td><td bgcolor='#FFFFFF' align='center'>" + (customerWarningModel.DeadDay <= 0 ? 0 : customerWarningModel.DeadDay) + "</td></tr>";

                isOverrun = false;
            }

            if (salesmanWarningModel != null)
            {
                sHtml = "<tr><td height='28' bgcolor='#FFFFFF' align='center'>" + salesmanWarningModel.SellerName + "</td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.AmountOwed, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.ConfirmAdvances, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.PreIncome, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><b class='fontblue'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.SumPay, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><b class='fontbsize12'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.Arrear, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><b class='fontgreen'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.Transfinite, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'>" + UtilsCommons.GetDateString(salesmanWarningModel.TransfiniteTime, this.ProviderToDate) + "</td></tr>";

                isOverrun = false;
            }


            if (isOverrun)
            {
                //未超限处理
                msg = "{\"type\":\"3\",\"chtml\":\"" + cHtml + "\",\"shtml\":\"" + sHtml + "\"}";
            }
            else
            {
                //超限 未申请
                msg = "{\"type\":\"1\",\"chtml\":\"" + cHtml + "\",\"shtml\":\"" + sHtml + "\"}";
            }
            return(msg);
        }