/// <summary> /// 权限处理 /// </summary> void InitPrivs() { if (RequestType == "1") //财务管理-应收管理 { if (ShouTuiType == "1") //收款 { IsDengJiPrivs = CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.财务管理_应收管理_收款登记); IsShenHePrivs = CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.财务管理_应收管理_收款审核); } else if (ShouTuiType == "2")//退款 { IsDengJiPrivs = CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.财务管理_应收管理_退款登记); IsShenHePrivs = CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.财务管理_应收管理_退款审核); } var setting = new BComSetting().GetModel(CurrentUserCompanyID); if (setting != null) { IsEnableKis = setting.IsEnableKis; } } else if (RequestType == "2") //销售中心-销售收款 { if (ShouTuiType == "1") //收款 { IsDengJiPrivs = CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.销售中心_销售收款_收款登记); } else if (ShouTuiType == "2")//退款 { IsDengJiPrivs = CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.销售中心_销售收款_退款登记); } } }
/// <summary> /// 初始化 /// </summary> private void DataInit() { //系统配置实体 MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID) ?? new MComSetting(); IsEnableKis = comModel.IsEnableKis; #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion MDebitBase queryModel = new MDebitBase(); queryModel.IsVerificated = Utils.GetQueryStringValue("verificated") == "1"; queryModel.CompanyId = CurrentUserCompanyID; queryModel.TourCode = Utils.GetQueryStringValue("txt_teamNumber"); queryModel.Borrower = txt_Seller.GuidName = Utils.GetQueryStringValue(txt_Seller.GuidNameClient); queryModel.BorrowerId = txt_Seller.GuidID = Utils.GetQueryStringValue(txt_Seller.GuidIDClient); IList <MDebit> ls = new BFinance().GetDebitLst(pageSize, pageIndex, ref recordCount, queryModel); if (ls != null && ls.Count > 0) { pan_msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); BindPage(pageSize, pageIndex, recordCount); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; }
/// <summary> /// 初始化 /// </summary> private void DataInit() { BComSetting comSettingBll = new BComSetting(); YKQRDPrintUri = comSettingBll.GetPrintUri(CurrentUserCompanyID, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.车辆预控确认单); #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion //车辆预控查询实体 MSourceSueCarSearch queryModel = new MSourceSueCarSearch(); queryModel.CompanyId = CurrentUserCompanyID; //车型 queryModel.CarType = Utils.InputText(Utils.GetQueryStringValue("txt_carType")); //车队名称 queryModel.SourceName = Utils.InputText(Utils.GetQueryStringValue("txt_carName")); //天数 queryModel.DaysNum = Utils.GetIntNull(Utils.GetQueryStringValue("txt_day")); IList <MSourceSueCar> ls = new BSourceControl().GetListSueCar(pageIndex, pageSize, ref recordCount, queryModel); if (ls != null && ls.Count > 0) { pan_Msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); BindPage(pageSize, pageIndex, recordCount); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; }
/// <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; } }
/// <summary> /// 初始化 /// </summary> private void DataInit() { BComSetting comSettingBll = new BComSetting(); YKQRDPrintUri = comSettingBll.GetPrintUri(CurrentUserCompanyID, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.酒店预控确认单); #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion #region 查询实体 MSourceSueHotelSearch queryModel = new MSourceSueHotelSearch(); queryModel.CompanyId = CurrentUserCompanyID; //房型 queryModel.RoomType = Utils.GetQueryStringValue("rType"); //酒店名称 queryModel.SourceName = Utils.GetQueryStringValue("tavName"); //有效时间--始 queryModel.PeriodStartTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("dateTimeS")); //有效时间--终 queryModel.PeriodEndTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("dateTimeE")); #endregion IList <MSourceSueHotel> ls = new BSourceControl().GetListSueHotel(pageIndex, pageSize, ref recordCount, queryModel); if (ls != null && ls.Count > 0) { pan_Msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); BindPage(pageSize, pageIndex, recordCount); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; }
/// <summary> /// 初始化 /// </summary> private void DataInit() { BComSetting comSettingBll = new BComSetting(); YKQRDPrintUri = comSettingBll.GetPrintUri(CurrentUserCompanyID, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.游轮预控确认单); #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion #region 查询实体 MSourceSueShipSearch queryModel = new MSourceSueShipSearch(); queryModel.CompanyId = CurrentUserCompanyID; //游船公司 queryModel.ShipCompany = Utils.InputText(Utils.GetQueryStringValue("loosePulleyCor")); //游轮名称 queryModel.SourceName = Utils.InputText(Utils.GetQueryStringValue("loosePulleyName")); queryModel.StartTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("periodStartTime")); queryModel.EndTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("periodEndTime")); #endregion //预控BLL IList <MSourceSueShip> ls = new BSourceControl().GetListSueShip(pageIndex, pageSize, ref recordCount, queryModel); if (ls != null && ls.Count > 0) { pan_Msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); BindPage(pageSize, pageIndex, recordCount); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; }
/// <summary> /// 获取参数并验证 /// </summary> /// <param name="model">赋值实体</param> /// <param name="msg">验证提示语</param> /// <returns></returns> private bool GetVal(MRegister model, ref string msg) { //系统配置实体 MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID) ?? new MComSetting(); model = model ?? new MRegister(); model.Status = comModel.FinancialExpensesReview ? FinStatus.财务待审批 : FinStatus.账务已支付; model.RegisterId = Utils.GetInt(Utils.GetFormValue("registerId")); model.PlanId = Utils.GetFormValue("planID"); model.TourId = Utils.GetFormValue("tourID"); model.CompanyId = CurrentUserCompanyID; model.Operator = model.Planer = SiteUserInfo.Name; model.OperatorId = SiteUserInfo.UserId; model.IssueTime = DateTime.Now; model.PaymentDate = Utils.GetDateTimeNullable(Utils.GetFormValue("txt_paymentDate")); model.Deadline = Utils.GetDateTime(Utils.GetFormValue("txt_deadline")); model.PaymentType = Utils.GetInt(Utils.GetFormValue("sel_paymentType")); model.Remark = Utils.GetFormValue("txt_remark"); model.PaymentAmount = Utils.GetDecimal(Utils.GetFormValue("txt_paymentAmount")); //收退款人 model.Dealer = Request.Form[txt_Sells.SellsNameClient] ?? Utils.GetFormValue(Utils.GetFormValue("sellsFormKey") + txt_Sells.SellsNameClient); //收退款人ID model.DealerId = Request.Form[txt_Sells.SellsIDClient] ?? Utils.GetFormValue(Utils.GetFormValue("sellsFormKey") + txt_Sells.SellsIDClient); msg += model.PaymentDate != DateTime.MinValue ? string.Empty : "付款时间错误!<br/>"; msg += model.Dealer.Length > 0 && model.DealerId.Length > 0 ? string.Empty : "收退款人异常!<br/>"; msg += model.Deadline != DateTime.MinValue ? string.Empty : "最晚付款时间错误!<br/>"; msg += model.PaymentType > 0 ? string.Empty : "请选择付款方式错误!<br/>"; msg += model.PaymentAmount > 0 ? string.Empty : "付款金额错误!<br/>"; return(msg.Length <= 0); }
/// <summary> /// 初始化 /// </summary> private void DataInit() { //系统配置实体 MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID) ?? new MComSetting(); IsEnableKis = comModel.IsEnableKis; #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion #region 配置用户控件 txt_SellsSelect.SetTitle = "选择 -请款人-"; //CustomerUnitSelect1.TxtCssClass = "formsize80"; //CustomerUnitSelect1.BoxyTitle = unitTitle + "单位"; #endregion #region 查询实体 MOtherFeeInOutBase queryModel = new MOtherFeeInOutBase(); //公司编号 queryModel.CompanyId = CurrentUserCompanyID; //付款时间--始 queryModel.DealTimeS = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txt_inDateS")); //付款时间--终 queryModel.DealTimeE = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txt_inDateE")); //付款项目 queryModel.FeeItem = Utils.GetQueryStringValue("txt_PayItemName"); //客户单位Id queryModel.CrmId = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHBH); //客户单位Name queryModel.Crm = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHMC); //销售员Id queryModel.DealerId = txt_SellsSelect.SellsID = Utils.GetQueryStringValue(txt_SellsSelect.SellsIDClient); //销售员Name queryModel.Dealer = txt_SellsSelect.SellsName = Utils.GetQueryStringValue(txt_SellsSelect.SellsNameClient); queryModel.Status = (FinStatus)Utils.GetIntSign(Utils.GetQueryStringValue("Status"), -1); #endregion #region 绑定列表 BFinance bfBLL = new BFinance(); IList <MOtherFeeInOut> ls = bfBLL.GetOtherFeeInOutLst( pageSize, pageIndex, ref recordCount, ItemType.支出, queryModel); if (ls != null && ls.Count > 0) { pan_Msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); //绑定分页 BindPage(pageSize, pageIndex, recordCount); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; #endregion }
/// <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 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> private void Save() { if (RequestType != "1" && RequestType != "2") { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "错误的请求")); } if (ShouTuiType != "1" && ShouTuiType != "2") { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "错误的请求")); } BTourOrder bll = new BTourOrder(); MTourOrderSales model = bll.GetTourOrderSalesById(Utils.GetFormValue("TourOrderSalesID")) ?? new MTourOrderSales(); string msg = string.Empty; string doType = Utils.GetQueryStringValue("doType"); if ((doType == "Add" || doType == "Updata") && !GetVal(model, out msg)) { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "操作失败!<br/>" + msg)); } switch (doType) { case "Add": if (!IsDengJiPrivs) { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "操作失败:无权限。")); } if (RequestType == "1") { //根据系统配置配置是否需要审核 MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID); model.IsCheck = !comModel.FinancialIncomeReview; //如果默认为不需要审核 审核人默认为当前操作人 if (model.IsCheck) { model.Approver = SiteUserInfo.Name; model.ApproverId = SiteUserInfo.UserId; model.ApproverDeptId = SiteUserInfo.DeptId; model.ApproveTime = DateTime.Now; } } if (bll.AddTourOrderSales(model)) { AjaxResponse(UtilsCommons.AjaxReturnJson("1")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "添加失败!")); } break; case "Updata": if (!IsDengJiPrivs) { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "操作失败:无权限。")); } if (bll.UpdateTourOrderSales(model)) { AjaxResponse(UtilsCommons.AjaxReturnJson("1")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "修改失败!")); } break; case "Delete": if (!IsDengJiPrivs) { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "操作失败:无权限。")); } if (bll.DeleteTourOrderSales(Utils.GetFormValue("TourOrderSalesID"))) { AjaxResponse(UtilsCommons.AjaxReturnJson("1")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "删除失败!")); } break; case "ExamineV": if (!IsShenHePrivs) { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "操作失败:无权限。")); } model.Approver = SiteUserInfo.Name; model.ApproverId = SiteUserInfo.UserId; model.ApproverDeptId = SiteUserInfo.DeptId; model.ApproveTime = DateTime.Now; if (new BFinance().SetTourOrderSalesCheck(model)) { AjaxResponse(UtilsCommons.AjaxReturnJson("1")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "审核失败!")); } break; default: AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "错误的请求!")); break; } }
/// <summary> /// 权限判断 /// </summary> private void PowerControl(string tourId) { int source = Utils.GetInt(Utils.GetQueryStringValue("source")); TourMoneyOut.ParentType = (PlanChangeChangeClass?)Utils.GetEnumValueNull(typeof(PlanChangeChangeClass), Utils.GetQueryStringValue("source")); if (source == 4) { TourMoneyOut.IsPlanChangeChange = false; } //团队实体 MTourBaseInfo model = new BTour().GetTourInfo(tourId) ?? new MTourBaseInfo(); IList <MGuidInfo> guideList = (model.GuideList ?? new List <MGuidInfo>()).Where(item => item.GuidId == SiteUserInfo.UserId).ToList(); IList <MTourPlaner> tourPlaner = (model.TourPlaner ?? new List <MTourPlaner>()).Where(item => item.PlanerId == SiteUserInfo.UserId).ToList(); //系统配置实体 MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID) ?? new MComSetting(); status = model.TourStatus; this.pan_OperaterExamineV.Visible = pan_OperaterCheck.Visible = pan_SellsExamineV.Visible = false; #region 修改删除权限控制 //导游报账 if (source == 1) { IsSubmit = IsChangeDaoYou = pan_SellsExamineV.Visible = TourMoneyOut.IsChangeDaoYou = TourMoneyOut.IsPlanChangeChange = Privs_DaoYouBaoZhang(); } if (source == 3) //销售报账 { //团队状态 GetTourType(); //显示操作 GetOrderListByTourId(tourId); IsSubmit = pan_OperaterExamineV.Visible = TourMoneyOut.IsPlanChangeChange = Privs_XiaoShouBaoZhang(out IsChangeDaoYou); TourMoneyOut.IsChangeDaoYou = IsChangeDaoYou; } //计调报账 if (source == 2) { //团队收入 GetOrderListByTourId(tourId); //团队状态 GetTourType(); pan_OperaterCheck.Visible = IsSubmit = TourMoneyOut.IsPlanChangeChange = Privs_JiDiaoBaoZhang(out IsChangeDaoYou); TourMoneyOut.IsChangeDaoYou = IsChangeDaoYou; } #endregion /* * 财务提交-报销完成 */ if (source == 4 && CheckGrant(Privs.财务管理_报销报账_报销完成)) { TourStatus[] status1 = { TourStatus.销售未结算, TourStatus.销售待审, TourStatus.计调待审, TourStatus.待终审, TourStatus.财务核算 }; if (comModel.SkipGuide) { status1 = new TourStatus[] { TourStatus.待终审, TourStatus.财务核算 }; } //报销完成 pan_ApplyOver.Visible = status1.Contains(model.TourStatus) && (!model.IsSubmit); //财务入账 pan_InAccount.Visible = comModel.IsEnableKis && model.IsSubmit; } else { pan_ApplyOver.Visible = false; pan_InAccount.Visible = false; } }
/// <summary> /// 权限判断 /// </summary> private void PowerControl(string tourId) { BTour bll = new BTour(); //团队实体 MTourBaseInfo model = bll.GetTourInfo(tourId); if (model != null) { /* 根据页面来源判断 利润分配列表是否显示 * 计调终审-计调终审 无法查看利润分配 */ int source = Utils.GetInt(Utils.GetQueryStringValue("source")); if (source > 1) { //初始化利润分配 MoneyDistribute(tourId); //利润分配添加修改权限控制 pan_AddMongyAllot.Visible = model.TourStatus == TourStatus.财务核算; //利润分配栏目 财务进入 pan_moneyAllot.Visible = true; } /* * 退回计调 * 待终审状态 And 不是财务进去 */ pan_returnOperater.Visible = CheckGrant(Privs.计调中心_计调终审_退回计调操作) && (model.TourStatus == TourStatus.待终审 && source <= 1); /* * 提交财务 * 待终审状态 And 不是财务进去 */ pan_submitFinance.Visible = CheckGrant(Privs.计调中心_计调终审_提交财务操作) && (model.TourStatus == TourStatus.待终审 && source <= 1); /* * 退回终审 * 财务核算状态 And 不是计调进入 */ pan_returnCourtFinal.Visible = CheckGrant(Privs.财务管理_报销报账_核算结束) && (model.TourStatus == TourStatus.财务核算 && source > 1); //系统配置实体 MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID) ?? new MComSetting(); //封团 pan_sealTour.Visible = (source > 1) && CheckGrant(Privs.财务管理_报销报账_核算结束) && bll.GetCostStatus(tourId) && (model.IsSubmit || model.GuideList == null) && ((model.TourStatus == TourStatus.待终审 && comModel.SkipFinalJudgment) || (model.TourStatus == TourStatus.财务核算 && model.GuideList == null) || (model.TourStatus == TourStatus.财务核算 && model.GuideList != null && model.IsSubmit)); //系统配置实体 //如果是单团核算 财务入账 if (source == 2) { pan_InAccount.Visible = (CheckGrant(Privs.财务管理_单团核算_核算结束)) && comModel.IsEnableKis && model.TourStatus == TourStatus.封团; } //如果是报销报账 财务入账 if (source == 3) { pan_InAccount.Visible = (CheckGrant(Privs.财务管理_报销报账_核算结束)) && comModel.IsEnableKis && model.TourStatus == TourStatus.封团; } } }
/// <summary> /// 初始化 /// </summary> private void DataInit() { //系统配置实体 MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID) ?? new MComSetting(); IsEnableKis = comModel.IsEnableKis; //获取分页参数并强转 pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); MPayableApproveBase queryModel = new MPayableApproveBase(); #region 查询参数 //公司id queryModel.CompanyId = CurrentUserCompanyID; // int status = Utils.GetIntSign(Utils.GetQueryStringValue("Status"), -1); if (status >= 0) { queryModel.Status = (FinStatus)status; } queryModel.PlanTyp = (PlanProject?)Utils.GetIntNull(Utils.GetQueryStringValue("sustainType")); //团号 queryModel.TourCode = Utils.GetQueryStringValue("txt_teamNumber"); //供应商 queryModel.Supplier = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHMC); //供应商Id queryModel.SupplierId = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHBH); //请款人 queryModel.Dealer = SellsSelect1.SellsName = Utils.GetQueryStringValue(SellsSelect1.SellsNameClient); //请款人Id queryModel.DealerId = SellsSelect1.SellsID = Utils.GetQueryStringValue(SellsSelect1.SellsIDClient); //付款时间 始 queryModel.PaymentDateS = Utils.GetQueryStringValue("txt_paymentDateS"); //付款时间 终 queryModel.PaymentDateE = Utils.GetQueryStringValue("txt_paymentDateE"); //最晚付款日期 始 queryModel.DeadlineS = Utils.GetQueryStringValue("txt_DeadlineS"); //最晚付款日期 终 queryModel.DeadlineE = Utils.GetQueryStringValue("txt_DeadlineE"); #endregion decimal sum = 0; IList <MPayableApprove> ls = new BFinance().GetMPayableApproveLst( pageSize, pageIndex, ref recordCount, ref sum, queryModel); lbl_sum.Text = UtilsCommons.GetMoneyString(sum, ProviderToMoney); if (ls != null && ls.Count > 0) { pan_sum.Visible = true; pan_Msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); //绑定分页 BindPage(); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; }