/// <summary> /// 添加单项业务 /// </summary> /// <param name="single"></param> /// <returns>True or False</returns> public bool AddSingleService(MSingleServiceExtend single) { BTour tour = new BTour(); var temp = tour.GenerateTourNo(single.OperatorDeptId, single.CompanyId, EyouSoft.Model.EnumType.TourStructure.TourType.单项服务, single.WeiTuoRiQi); single.TourCode = temp[0]; single.XuHao = EyouSoft.Toolkit.Utils.GetInt(temp[1]); single.OrderCode = single.TourCode + "-1"; single.TourId = Guid.NewGuid().ToString(); single.OrderId = Guid.NewGuid().ToString(); int flg = dal.AddSingleService(single); if (flg == 1) { StringBuilder query = new StringBuilder(); query.AppendFormat("添加单项业务,订单编号:{0}。", single.OrderId); EyouSoft.BLL.SysStructure.BSysLogHandle.Insert(query.ToString()); return(true); } return(false); }
/// <summary> /// 取消散拼计划 /// </summary> /// <param name="ids"></param> /// <returns></returns> private string CanelData(string ids, string canelRemarks) { string[] id = ids.Split(','); if (id == null || id.Length == 0) { return(UtilsCommons.AjaxReturnJson("0", "操作失败:未选择要取消的计划")); } if (id.Length > 1) { return(UtilsCommons.AjaxReturnJson("0", "操作失败:一次只能取消一个计划")); } BTour bll = new BTour(); bool bllRetCode = bll.CancelTour(id, canelRemarks, SiteUserInfo.CompanyId); if (bllRetCode) { return(UtilsCommons.AjaxReturnJson("1", "操作成功!")); } else { return(UtilsCommons.AjaxReturnJson("0", "操作失败!")); } }
/// <summary> /// 页面初始化 /// </summary> /// <param name="id"></param> private void PageInit(string id) { BTour bll = new BTour(); EyouSoft.Model.TourStructure.MTourBaseInfo model = bll.GetTourInfo(id); //lblTourCode.Text = bll.GenerateTourNo(SiteUserInfo.DeptId, SiteUserInfo.CompanyId, model.TourType, (DateTime)model.LDate); if (model != null) { if (model.TourService != null) { //绑定内部信息 this.txtInsiderInfor.Text = model.TourService.InsiderInfor; } if (model.TourPlanItem != null) { for (int i = 0; i < model.TourPlanItem.Count; i++) { //绑定原计调安排项 this.hidePlanItem.Value += ((int)model.TourPlanItem[i].PlanType).ToString() + ","; } } if (model.TourPlaner != null && model.TourPlaner.Count > 0) { for (int i = 0; i < model.TourPlaner.Count; i++) { this.SellsSelect1.SellsID += model.TourPlaner[i].PlanerId + ","; this.SellsSelect1.SellsName += model.TourPlaner[i].Planer + ","; } //绑定 计调员 this.SellsSelect1.SellsID = this.SellsSelect1.SellsID.Remove(this.SellsSelect1.SellsID.Length - 1, 1); this.SellsSelect1.SellsName = this.SellsSelect1.SellsName.Remove(this.SellsSelect1.SellsName.Length - 1, 1); } } bll = null; }
/// <summary> /// 绑定数据、分页控件 /// </summary> public void BindSource() { pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); string levelId = SiteUserInfo.TourCompanyInfo.LevelId.ToString(); MTourSaleSearch search = new MTourSaleSearch(); search.AreaId = Utils.GetInt(Utils.GetQueryStringValue("AreaId")); search.RouteName = Utils.GetQueryStringValue("txtRouteName"); search.SLDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtBeginLDate")); search.LLDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtEndLDate")); BTour tour = new BTour(); IList <MTourSanPinInfo> list = tour.GetTourSaleList(SiteUserInfo.CompanyId, pageSize, pageIndex, ref recordCount, search, levelId); this.RtPlan.DataSource = list; this.RtPlan.DataBind(); //绑定线路区域 EyouSoft.BLL.ComStructure.BComArea bArea = new EyouSoft.BLL.ComStructure.BComArea(); IList <EyouSoft.Model.ComStructure.MComArea> areaList = bArea.GetAreaByCID(SiteUserInfo.CompanyId); this.rpArea.DataSource = areaList; this.rpArea.DataBind(); BindPage(); }
/// <summary> /// 获取发布人信息 /// </summary> /// <returns></returns> protected string GetOperatorInfo() { string result = ""; string arguments = Utils.GetQueryStringValue("argument"); /**/ string[] listarg = arguments.Split('|'); BTour bllBTour = new BTour(); MPersonInfo modelMPersonInfo = new MPersonInfo(); if (!string.IsNullOrEmpty(listarg[0]) || !string.IsNullOrEmpty(listarg[1])) { modelMPersonInfo = bllBTour.GetPersonInfo(listarg[1], listarg[0]); if (modelMPersonInfo != null) { result = "联系电话:" + modelMPersonInfo.Phone + "<br/>联系手机:" + modelMPersonInfo.Mobile; result = UtilsCommons.AjaxReturnJson("true", result); } else { result = UtilsCommons.AjaxReturnJson("false", "数据为空"); } } else { result = UtilsCommons.AjaxReturnJson("false", "参数为空"); } return(result); }
/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit() { MTourBaseInfo model = new BTour().GetTourInfo(Utils.GetQueryStringValue("TourId")); if (model != null) { lbl_uName.Text = model.SaleInfo.Name; txt_Price.Text = Utils.FilterEndOfTheZeroDecimal(model.SumPrice); pan_tourTye.Visible = model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼 || model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼 || model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼; } string distributeId = Utils.GetQueryStringValue("id"); if (distributeId.Length > 0) { MProfitDistribute DistributeModel = new BFinance().GetProfitDistribute(Utils.GetInt(distributeId), CurrentUserCompanyID); txt_distributeType.Text = DistributeModel.DistributeType; lbl_uName.Text = DistributeModel.Staff; txt_amount.Text = Utils.FilterEndOfTheZeroDecimal(DistributeModel.Amount); txt_remark.Text = DistributeModel.Remark; txt_OrderList.Text = DistributeModel.OrderCode; DistributeModel.OrderId = DistributeModel.OrderId ?? string.Empty; pan_tourTye.Visible = pan_tourTye.Visible || DistributeModel.OrderId.Length > 0; } }
/// <summary> /// 初始化团队实体数据 /// </summary> /// <param name="tourId">团队编号</param> private void TourModelInit(string tourId) { MTourBaseInfo model = new BTour().GetTourInfo(tourId); if (model != null) { TourCode = model.TourCode; //线路名称 lbl_routeName.Text = model.RouteName; //出团时间 lbl_lDate.Text = UtilsCommons.GetDateString(model.LDate, ProviderToDate); //团号 lbl_tourCode.Text = model.TourCode; //团队天数 lbl_tourDays.Text = model.TourDays.ToString(); //人数 lbl_number.Text = string.Format("<b class=fontblue>{0}</b><sup class=fontred>+{1}</sup>", model.Adults, model.Childs); //销售 lbl_saleInfoName.Text = model.SaleInfo.Name; //计调 lbl_tourPlaner.Text = UtilsCommons.PingPlaner(model.TourPlaner); //导游 lbl_mGuidInfoName.Text = UtilsCommons.PingGuide(model.GuideList); } }
/// <summary> /// 初始化 /// </summary> private void DataInit() { #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion var chaXun = GetChaXunInfo(); PrintUri = new BComSetting().GetPrintUri(CurrentUserCompanyID, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.核算单); IsYiHeSuan = chaXun.IsDealt; IList <MBZInfo> ls = new BTour().GetFinHSList( CurrentUserCompanyID, pageSize, pageIndex, ref recordCount, chaXun, SiteUserInfo.DeptId); 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="id">设置的ID</param> /// <returns></returns> private string ZhengChangData(string ids) { string[] id = ids.Split(','); bool result = false; string msg = string.Empty; if (id.Length > 0) { BTour bll = new BTour(); for (int i = 0; i < id.Length; i++) { result = bll.SetHandStatus(id[i], EyouSoft.Model.EnumType.TourStructure.TourShouKeStatus.报名中); if (result == false) { msg += (i + 1).ToString() + ","; } } if (msg.Length > 0) { msg.Remove(msg.Length - 1, 1); msg = "部分数据已设置成功,当前选中数据中的第" + msg + "行设置失败!"; } else { msg = "设置成功!"; } } return(UtilsCommons.AjaxReturnJson("1", msg)); }
/// <summary> /// 获取短线更改提醒 /// </summary> private string GetShortLine() { string result = string.Empty; System.Text.StringBuilder strbuder = new System.Text.StringBuilder(); EyouSoft.Model.ComStructure.MComSetting model = new EyouSoft.BLL.ComStructure.BComSetting().GetModel(SiteUserInfo.CompanyId); if (model != null && model.IsEnableDuanXian) { IList <EyouSoft.Model.TourStructure.MCarTypeSeatChange> list = new BTour().GetCarTypeSeatChangeList(SiteUserInfo.CompanyId, SiteUserInfo.TourCompanyInfo.CompanyId, 5, null); if (list != null) { for (int i = 0; i < list.Count; i++) { strbuder.AppendFormat(" <li><em>{0}</em> <a href='{1}'> {2}({4})</a><span class='date'>{3}</span> </li>", (i + 1).ToString(), list[i].CarChangeType == CarChangeType.车地点变更 ? "MyOrder.aspx?orderId=" + list[i].OrderId + "&id=" + list[i].Id : "MyOrder.aspx?tourid=" + list[i].TourId + "&id=" + list[i].Id, list[i].RouteName.Length >= 20 ? list[i].RouteName.Substring(0, 10) : list[i].RouteName, list[i].IssueTime.ToString("MM-dd"), list[i].CarChangeType == CarChangeType.车型座次变更 ? "计划变更" : "订单变更"); } result = "{\"result\":\"1\",\"msg\":\"" + strbuder.ToString() + "\"}"; } else { result = "{\"result\":\"0\",\"msg\":\"\"}"; } } return(result); }
protected void Page_Load(object sender, EventArgs e) { IList <MTourOrderDisInfo> ls = new BTour().GetTourOrderDisList(Utils.GetQueryStringValue("tourId")); if (ls != null && ls.Count > 0) { pan_msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); } }
/// <summary> /// toxls /// </summary> void ToXls() { int toXlsRecordCount = UtilsCommons.GetToXlsRecordCount(); if (toXlsRecordCount >= 5000) { Utils.RCWE("当前导出数据量较大(一次最多可导出5000个记录),请分批次导出。<a href=\"javascript:history.go(-1)\">点击这里返回</a>"); } if (toXlsRecordCount < 1) { ResponseToXls(string.Empty); } int _recordCount = 0; StringBuilder s = new StringBuilder(); var chaXun = GetChaXunInfo(); var items = new BTour().GetFinHSList(CurrentUserCompanyID, toXlsRecordCount, 1, ref _recordCount, chaXun, SiteUserInfo.DeptId); if (items == null || items.Count == 0) { ResponseToXls(string.Empty); } s.AppendFormat("团号\t线路名称\t出团时间\t人数\t总人数\t销售\t计调\t导游\t收入\t支出\t毛利\t利润分配\t净利润\t核算时间\n"); foreach (var item in items) { s.AppendFormat(item.TourCode + "\t"); s.AppendFormat(item.RouteName + "\t"); s.AppendFormat(item.LDate.ToString("yyyy-MM-dd") + "\t"); s.AppendFormat(item.Adults + "+" + item.Childs + "\t"); s.AppendFormat(item.Adults + item.Childs + "\t"); s.AppendFormat(item.SellerName + "\t"); s.AppendFormat(EyouSoft.Common.UtilsCommons.PingPlaner(item.MPlanerInfo) + "\t"); s.AppendFormat(EyouSoft.Common.UtilsCommons.PingGuide(item.MGuidInfo) + "\t"); s.AppendFormat(item.ZongShouRu.ToString("F2") + "\t"); s.AppendFormat(item.TourPay.ToString("F2") + "\t"); s.AppendFormat(item.Profit.ToString("F2") + "\t"); s.AppendFormat(item.DisProfit.ToString("F2") + "\t"); s.AppendFormat(item.JProfit.ToString("F2") + "\t"); if (item.HeSuanTime.HasValue) { s.AppendFormat(item.HeSuanTime.Value.ToString("yyyy-MM-dd") + "\n"); } else { s.AppendFormat(" " + "\n"); } } ResponseToXls(s.ToString()); }
/// <summary> /// 确认变更 /// </summary> /// <param name="tourid"></param> /// <returns></returns> private string IsSureChange(string tourid) { string result = ""; if (!string.IsNullOrEmpty(tourid)) { //实例化计划变更实体 MTourPlanChange modelMTourPlanChange = new MTourPlanChange(); //实例化业务 BTour bllBTour = new BTour(); modelMTourPlanChange = bllBTour.GetTourChangeModel(SiteUserInfo.CompanyId, Utils.GetInt(tourid)); if (modelMTourPlanChange != null) { //主键编号 modelMTourPlanChange.Id = Utils.GetInt(tourid); //确认变更人 modelMTourPlanChange.Confirmer = SiteUserInfo.Name; //确认变更人ID modelMTourPlanChange.ConfirmerId = SiteUserInfo.UserId; //确认变更时间 modelMTourPlanChange.ConfirmTime = DateTime.Now; //公司编号 modelMTourPlanChange.CompanyId = SiteUserInfo.CompanyId; if (bllBTour.TourChangeSure(modelMTourPlanChange)) { result = UtilsCommons.AjaxReturnJson("false", "确认变更成功"); } else { result = UtilsCommons.AjaxReturnJson("false", "确认变更失败"); } } else { result = UtilsCommons.AjaxReturnJson("false", "数据对象为空"); } } else { result = UtilsCommons.AjaxReturnJson("false", "数据参数id为空"); } return(result); }
/// <summary> /// 删除操作 /// </summary> /// <param name="id">删除ID</param> /// <returns></returns> private string DeleteData(string ids) { string[] id = ids.Split(','); //删除操作 bool result = false; if (id.Length > 0) { BTour bll = new BTour(); result = bll.DeleteTour(SiteUserInfo.CompanyId, id); } if (result) { return(UtilsCommons.AjaxReturnJson("1", "删除成功!")); } else { return(UtilsCommons.AjaxReturnJson("0", "删除失败!")); } }
/// <summary> /// 修改团队状态 /// </summary> /// <param name="tourStatus">团队状态</param> /// <param name="tourId">计调编号</param> private void UpdateTourStatus(EyouSoft.Model.EnumType.TourStructure.TourStatus tourStatus, string tourId) { BTour btour = new BTour(); EyouSoft.Model.TourStructure.MTourStatusChange mtourstatuschange = new EyouSoft.Model.TourStructure.MTourStatusChange(); mtourstatuschange.TourId = tourId; mtourstatuschange.DeptId = SiteUserInfo.DeptId; mtourstatuschange.Operator = SiteUserInfo.Name; mtourstatuschange.OperatorId = SiteUserInfo.UserId; mtourstatuschange.IssueTime = System.DateTime.Now; mtourstatuschange.TourStatus = tourStatus; mtourstatuschange.CompanyId = SiteUserInfo.CompanyId; if (btour.UpdateTourStatus(mtourstatuschange)) { mark = "1"; } else { mark = "2"; } Response.Redirect("/m/baozhang.aspx?sl=" + Utils.GetQueryStringValue("sl") + "&source=1&tourId=" + tourId + "&tourType=" + Utils.GetQueryStringValue("tourType") + "&mark=" + mark); }
/// <summary> /// 初始化团队实体数据 /// </summary> /// <param name="tourId">团队编号</param> private void TourModelInit(string tourId) { MTourBaseInfo model = new BTour().GetTourInfo(tourId); if (model != null) { //团号 lbl_TourCode.Text = model.TourCode; //线路区域 EyouSoft.Model.ComStructure.MComArea AreaModel = new EyouSoft.BLL.ComStructure.BComArea().GetModel(model.AreaId, SiteUserInfo.CompanyId); if (AreaModel != null) { this.lbl_AreaName.Text = AreaModel.AreaName; } AreaModel = null; //线路名称 lbl_RouteName.Text = model.RouteName; //天数 lbl_TourDays.Text = model.TourDays.ToString(); //出发时间 lbl_LDate.Text = UtilsCommons.GetDateString(model.LDate, ProviderToDate); //返回时间 lbl_RDate.Text = UtilsCommons.GetDateString(model.RDate, ProviderToDate); //导游 lbl_TourGride.Text = UtilsCommons.PingGuide(model.GuideList); //出发交通 lbl_LTraffic.Text = model.LTraffic; //销售员 this.hideSaleId.Value = model.SaleInfo.SellerId; lbl_SaleInfo.Text = model.SaleInfo.Name; //返回交通 lbl_RTraffic.Text = model.RTraffic; //计调 lbl_TourPlaner.Text = UtilsCommons.PingPlaner(model.TourPlaner); //集合方式 lbl_Gather.Text = model.Gather; } }
/// <summary> /// 改变团队状态 /// </summary> /// <param name="tourStatus">计划状态</param> /// <param name="tourId">团队编号</param> private void UpdateTourStatus(EyouSoft.Model.EnumType.TourStructure.TourStatus tourStatus, string tourId) { var info = new MTourStatusChange(); info.TourId = tourId; /*团队编号*/ info.CompanyId = CurrentUserCompanyID; /*系统公司编号*/ info.DeptId = SiteUserInfo.DeptId; /*操作人部门Id*/ info.Operator = SiteUserInfo.Name; /*操作人*/ info.OperatorId = SiteUserInfo.UserId; /*操作人ID*/ info.IssueTime = System.DateTime.Now; /*操作时间*/ info.TourStatus = tourStatus; /*团队状态*/ /*以下参数仅封团操作才有效*/ info.TourSettlement = Utils.GetDecimal(Utils.GetQueryStringValue(TourSettlement.UniqueID)); /*团队订单结算金额*/ info.TourPay = Utils.GetDecimal(Utils.GetQueryStringValue(TourPay.UniqueID)); /*团队总支出*/ info.TourProfit = Utils.GetDecimal(Utils.GetQueryStringValue(TourProfit.UniqueID)); /*团队利润*/ info.DisOrderProfit = Utils.GetDecimal(Utils.GetQueryStringValue(DisOrderProfit.UniqueID)); /*团队订单分配利润*/ info.DisTourProfit = Utils.GetDecimal(Utils.GetQueryStringValue(DisTourProfit.UniqueID)); /*团队分配利润*/ info.TourIncome = Utils.GetDecimal(Utils.GetQueryStringValue(TourIncome.UniqueID)); /*团队订单合同确认金额合计*/ info.TourOtherIncome = Utils.GetDecimal(Utils.GetQueryStringValue(TourOtherIncome.UniqueID)); /*团队其他收入*/ bool retBool = new BTour().UpdateTourStatus(info); if (retBool) { AjaxResponse(UtilsCommons.AjaxReturnJson("1", "提交成功!")); } else { if (info.OutputCode == -98) { RCWE(UtilsCommons.AjaxReturnJson("-1", "操作失败:有导游现收款,报销未完成的计划不能核算结束!")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "提交失败!")); } } }
/// <summary> /// 页面初始化 /// </summary> private void DataInit() { #region 分页参数 int pageSize = 40; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); #endregion MControlTourSearch queryString = new MControlTourSearch(); queryString.LDateS = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("lDateS")); queryString.LDateE = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("lDateE")); queryString.TourCode = Utils.GetQueryStringValue("tourCode"); queryString.TourType = (TourType?)Utils.GetEnumValueNull(typeof(TourType), Utils.GetQueryStringValue("tourType")); IList <MControlTour> ls = new BTour().GetControlTourList(CurrentUserCompanyID, pageSize, pageIndex, ref recordCount, queryString); if (ls != null && ls.Count > 0) { pan_msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); BindPage(pageSize, pageIndex); } else { ExporPageInfoSelect1.Visible = false; } }
/// <summary> /// 改变团队状态 /// </summary> /// <param name="tourStatus">计划状态</param> /// <param name="tourId">团队编号</param> private void UpdateTourStatus(EyouSoft.Model.EnumType.TourStructure.TourStatus tourStatus, string tourId) { var info = new MTourStatusChange { TourId = tourId, /*团队编号*/ CompanyId = CurrentUserCompanyID, /*系统公司编号*/ DeptId = SiteUserInfo.DeptId, /*操作人部门Id*/ Operator = SiteUserInfo.Name, /*操作人*/ OperatorId = SiteUserInfo.UserId, /*操作人ID*/ IssueTime = System.DateTime.Now, /*操作时间*/ TourStatus = tourStatus /*团队状态*/ }; bool bllRetCode = new BTour().UpdateTourStatus(info); if (bllRetCode) { RCWE(UtilsCommons.AjaxReturnJson("1", "提交成功")); } else if (info.OutputCode == -99) { RCWE(UtilsCommons.AjaxReturnJson("-1", "存在未报账的订单信息,请先进行订单报账后再提交报账。")); } else if (info.OutputCode == -97) { RCWE(UtilsCommons.AjaxReturnJson("-1", "存在导游收入-导游实收未保存的信息,请先保存导游实收信息再提交报账。")); } else if (info.OutputCode == -96) { RCWE(UtilsCommons.AjaxReturnJson("-1", "该计划下存在未处理(或已留位、或留位过期、或资金超限、或垫付申请中、或垫付申请未通过)的订单,请先处理好订单后再提交报账。")); } else { RCWE(UtilsCommons.AjaxReturnJson("-1", "提交失败!")); } }
/// <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> /// <param name="model">赋值实体</param> /// <param name="msg">验证提示语</param> /// <returns></returns> private string UpdateModel() { BFinance bll = new BFinance(); MBill model = new MBill(); string msg = string.Empty; #region 表单验证 if (Utils.GetFormValue("doType") == "Update" && Utils.GetFormValue("Id").Trim() == "") { msg = "无法修改该数据!<br/>"; } if (Utils.GetDateTimeNullable(Utils.GetFormValue("openInvoiceDate")) == null) { msg += "请输入开票时间!<br/>"; } if (Utils.GetDecimal(Utils.GetFormValue("openInvoiceMoney")) == 0) { msg += "请输入开票金额!"; } if (msg != "") { return(msg); } #endregion #region 实体赋值 model.Id = Utils.GetInt(Utils.GetFormValue("Id"), 0); model.TourId = Utils.GetFormValue("TourId"); model.TourCode = Utils.GetFormValue("TourCode"); if (model.TourCode.Length <= 0) { MTourBaseInfo tourModel = new BTour().GetTourInfo(model.TourId); if (tourModel != null) { model.TourCode = tourModel.TourCode; } } //订单编号 model.OrderId = Utils.GetFormValue("OrderId"); //开票单位Id model.CustomerId = Utils.GetFormValue("CustomerId"); //开票单位 model.Customer = Utils.GetFormValue("Customer"); //销售员 model.SellerName = Server.UrlDecode(Utils.GetFormValue("SellerName")); model.SellerId = Utils.GetFormValue("SellerId"); //开票人 model.DealerId = SiteUserInfo.UserId; model.Dealer = SiteUserInfo.Name; //操作员名称 model.Operator = SiteUserInfo.Name; model.OperatorId = SiteUserInfo.UserId; //客户单位联系电话 model.ContactName = Server.UrlDecode(Utils.GetFormValue("Contact")); model.ContactPhone = Utils.GetFormValue("Phone"); //操作时间 model.IssueTime = DateTime.Now; //操作员部门编号 model.DeptId = SiteUserInfo.DeptId; //系统公司 model.CompanyId = CurrentUserCompanyID; //开票时间 model.BillTime = Utils.GetDateTime(Utils.GetFormValue("openInvoiceDate")); //开票金额 model.BillAmount = Utils.GetDecimal(Utils.GetFormValue("openInvoiceMoney")); model.Remark = Utils.GetFormValue("openInvoiceRemar"); #endregion if (!bll.AddOrUpdBill(model)) { msg = "开票失败!"; } return(msg); }
/// <summary> /// 获取实体 /// </summary> /// <param name="model"></param> /// <param name="msg"></param> private bool GetModel(MKingDeeProof model) { model.KingDeeProofDetailLst = null; //系统公司 model.FCompanyId = CurrentUserCompanyID; //凭证日期 model.FDate = Utils.GetDateTime(Utils.GetFormValue("txt_FDate")); //业务日期 model.FTransDate = DateTime.Now; //序号(此处序号是浮云) model.FSerialNum = 0; //制单人 model.FPreparerId = SiteUserInfo.Name; //操作者部门编号 model.DeptId = SiteUserInfo.DeptId; //操作者编号 model.OperatorId = SiteUserInfo.UserId; MTourBaseInfo tourModel = new BTour().GetBasicTourInfo(Utils.GetFormValue("tourId")); if (tourModel != null) { model.FTourCode = tourModel.TourCode; } model.FTourId = Utils.GetFormValue("tourId") != "" ? Utils.GetFormValue("tourId") : Utils.GetFormValue("KeyId"); model.FItemId = Utils.GetFormValue("KeyId"); //凭证类型 团队状态为 封团之后的的类型为 后期收款,其余用传值 model.FItemType = (DefaultProofType)Utils.GetInt(Utils.GetFormValue("DefaultProofType")); if (model.FItemType == DefaultProofType.单团核算) { model.FItemId = model.FTourId; } IList <MKingDeeProofDetail> ls = new List <MKingDeeProofDetail>(); string[] fExplanation = Utils.GetFormValues("txtZy"); string[] fAccountNum = Utils.GetFormValues("hide_KmCode"); string[] fAccountName = Utils.GetFormValues("hide_KmName"); string[] fItem = Utils.GetFormValues("hide_Xm"); string[] fDebit = Utils.GetFormValues("txtJieFang"); string[] fCredit = Utils.GetFormValues("txtDaiFang"); string[] fId = Utils.GetFormValues("hide_KmID"); if (fExplanation.Length > 0) { model.FId = fId[0]; for (int i = 0; i < fExplanation.Length; i++) { MKingDeeProofDetail detailModel = new MKingDeeProofDetail(); if (fAccountNum[i].Split('|').Length > 1) { detailModel.FDetailId = Utils.GetInt(fAccountNum[i].Split('|')[0]); detailModel.FAccountNum = fAccountNum[i].Split('|')[1]; } detailModel.FAccountName = fAccountName[i]; detailModel.FExplanation = fExplanation[i]; detailModel.FDebit = Utils.GetDecimal(fDebit[i]); detailModel.FCredit = Utils.GetDecimal(fCredit[i]); detailModel.FAmountFor = detailModel.FDebit + detailModel.FCredit; detailModel.FEntryId = i; detailModel.FItem = GetJsonByForm(fItem[i]); ls.Add(detailModel); } model.KingDeeProofDetailLst = ls; } return(model.KingDeeProofDetailLst != null && model.KingDeeProofDetailLst.Count > 0); }
/// <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.封团; } } }
protected void InitPage(string tourId) { //核算单 MTourBaseInfo model = new BTour().GetTourInfo(tourId); if (model != null) { this.lbRouteName.Text = model.RouteName; this.lbTourCode.Text = model.TourCode; this.lbLDate.Text = model.LDate.HasValue ? model.LDate.Value.ToString("yyyy-MM-dd") : ""; this.lbTourDays.Text = model.TourDays.ToString(); this.lbPersonNum.Text = string.Format("<b class=fontblue>{0}</b><sup class=fontred>+{1}</sup>", model.Adults, model.Childs); this.lbSeller.Text = model.SaleInfo.Name; if (model.GuideList != null && model.GuideList.Count > 0) { this.lbGuid.Text = UtilsCommons.PingGuide(model.GuideList); } if (model.TourPlaner != null && model.TourPlaner.Count > 0) { this.lbTourPlaner.Text = UtilsCommons.PingPlaner(model.TourPlaner); } } //团款收入 EyouSoft.Model.TourStructure.MOrderSum orders = new EyouSoft.Model.TourStructure.MOrderSum(); IList <EyouSoft.Model.TourStructure.MTourOrder> tourOrder = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(ref orders, tourId); if (tourOrder != null && tourOrder.Count > 0) { this.rpt_tuankuan.DataSource = tourOrder; this.rpt_tuankuan.DataBind(); this.lbConfirmMoneyCount.Text = UtilsCommons.GetMoneyString(orders.ConfirmMoney, ProviderToMoney); this.lbSettlementMoneyCount.Text = UtilsCommons.GetMoneyString(orders.ConfirmSettlementMoney, ProviderToMoney); this.lbGuideIncomeCount.Text = UtilsCommons.GetMoneyString(orders.GuideRealIncome, ProviderToMoney); this.lbCheckMoneyCount.Text = UtilsCommons.GetMoneyString(orders.ConfirmMoney - orders.GuideRealIncome, ProviderToMoney); this.lbProfitCount.Text = UtilsCommons.GetMoneyString(orders.Profit, ProviderToMoney); } else { this.ph_tuankuan.Visible = false; } //其他收入 IList <MOtherFeeInOut> otherList = new EyouSoft.BLL.PlanStructure.BPlan().GetOtherIncome(tourId); if (otherList != null && otherList.Count > 0) { this.rpt_qita.DataSource = otherList; this.rpt_qita.DataBind(); } else { this.ph_qita.Visible = false; } //团队支出 IList <EyouSoft.Model.PlanStructure.MPlanBaseInfo> payList = new EyouSoft.BLL.PlanStructure.BPlan().GetList(tourId); if (payList != null && payList.Count > 0) { this.rpt_zhichu.DataSource = payList; this.rpt_zhichu.DataBind(); int Count = 0; decimal TotalMoney = 0; foreach (var item in payList) { Count += item.Num; TotalMoney += item.Confirmation; } //this.lbNumCount.Text = Count.ToString(); this.lbSettlementMoney.Text = UtilsCommons.GetMoneyString(TotalMoney, ProviderToMoney); } else { this.ph_zhichu.Visible = false; } //利润分配 IList <MProfitDistribute> profitList = new EyouSoft.BLL.FinStructure.BFinance().GetProfitDistribute(tourId); if (profitList != null && profitList.Count > 0) { this.rpt_lirun.DataSource = profitList; this.rpt_lirun.DataBind(); } else { this.ph_lirun.Visible = false; } //报帐汇总 MBZHZ BZmodel = new EyouSoft.BLL.PlanStructure.BPlan().GetBZHZ(tourId); if (model != null) { this.lb_guidesIncome.Text = UtilsCommons.GetMoneyString(BZmodel.GuideIncome, ProviderToMoney); this.lb_guidesBorrower.Text = UtilsCommons.GetMoneyString(BZmodel.GuideBorrow, ProviderToMoney); this.lb_guidesSpending.Text = UtilsCommons.GetMoneyString(BZmodel.GuideOutlay, ProviderToMoney); this.lb_replacementOrReturn.Text = UtilsCommons.GetMoneyString(BZmodel.GuideMoneyRtn, ProviderToMoney); this.lb_RCSN.Text = BZmodel.GuideRelSign.ToString(); this.lb_HUSN.Text = BZmodel.GuideUsed.ToString(); this.lb_RSN.Text = BZmodel.GuideSignRtn.ToString(); } //团队汇总信息 EyouSoft.Model.PlanStructure.MTourTotalInOut tourModel = new EyouSoft.BLL.PlanStructure.BPlan().GetTourTotalInOut(tourId); /*团队收入*/ this.lb_tourMoneyIn.Text = UtilsCommons.GetMoneyString(tourModel.TourIncome + tourModel.QiTaShouRu, ProviderToMoney); /*团队支出*/ this.lb_tourMoneyOut.Text = UtilsCommons.GetMoneyString(tourModel.TourOutlay, ProviderToMoney); /*团队利润*/ this.lb_tourMoney.Text = UtilsCommons.GetMoneyString(tourModel.TourProfit, ProviderToMoney); /*团队利润率*/ this.lb_tourMoneyRate.Text = tourModel.TourProRate.ToString("F2") + "%"; }
/// <summary> /// 初始化 /// </summary> private void DataInit() { //获取分页参数并强转 pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page")); #region 获取配置是否显示短线 if (type == 1) { //配置短线的实体 EyouSoft.Model.ComStructure.MComSetting model = new EyouSoft.Model.ComStructure.MComSetting(); EyouSoft.BLL.ComStructure.BComSetting bllset = new EyouSoft.BLL.ComStructure.BComSetting(); model = bllset.GetModel(this.SiteUserInfo.CompanyId); if (model != null) { if (model.IsEnableDuanXian) { this.phForAddShort.Visible = true; } else { this.phForAddShort.Visible = false; this.addRoute.InnerText = "新增"; } } } else { this.phForAddShort.Visible = false; this.addRoute.InnerText = "新增"; } #endregion #region 获取查询条件 //线路区域 int areaId = Utils.GetInt(Utils.GetQueryStringValue("ddlArea")); //团号 string tourCode = Utils.GetQueryStringValue("txtTourCode"); //线路名称 string routeName = Utils.GetQueryStringValue("txtRouteName"); //出发时间 DateTime?txtBeginDateF = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtBeginDateF")); DateTime?txtBeginDateS = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtBeginDateS")); //回团时间 DateTime?txtEndDateF = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtEndDateF")); DateTime?txtEndDateS = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtEndDateS")); //销售员 string sellerId = Utils.GetQueryStringValue(this.SellsSelect1.SellsIDClient); string sellerName = Utils.GetQueryStringValue(this.SellsSelect1.SellsNameClient); this.SellsSelect1.SellsID = sellerId; this.SellsSelect1.SellsName = sellerName; //团队状态 string tourState = Utils.GetQueryStringValue("sltTourState"); EyouSoft.Model.TourStructure.MTourSanPinSearch searchModel = new EyouSoft.Model.TourStructure.MTourSanPinSearch(); searchModel.AreaId = areaId; searchModel.LLDate = txtBeginDateS; searchModel.LRDate = txtEndDateS; searchModel.RouteName = routeName; searchModel.SellerName = sellerName; searchModel.SLDate = txtBeginDateF; searchModel.SRDate = txtEndDateF; searchModel.TourCode = tourCode; if (tourState != "") { searchModel.TourStatus = (EyouSoft.Model.EnumType.TourStructure.TourStatus)Utils.GetInt(tourState); } #endregion BTour bll = new BTour(); IList <EyouSoft.Model.TourStructure.MTourSanPinInfo> list = bll.GetTourSanPinList(SiteUserInfo.CompanyId, pageSize, pageIndex, ref recordCount, (EyouSoft.Model.EnumType.TourStructure.ModuleType)(type - 1), searchModel, false); if (list != null && list.Count > 0) { rpt_List.DataSource = list; rpt_List.DataBind(); //绑定分页 BindPage(); this.litMsg.Visible = false; } else { this.litMsg.Visible = true; this.ExporPageInfoSelect1.Visible = false; this.ExporPageInfoSelect2.Visible = false; } }
/// <summary> /// 保存按钮点击事件执行方法 /// </summary> private string PageSave() { string msg = string.Empty; //获取表单 string[] sellsArray = Utils.GetFormValue(this.SellsSelect1.SellsIDClient).Split(','); //string[] sellsNameArray = Utils.GetFormValue(this.SellsSelect1.SellsNameClient).Split(','); //string[] sellsDeptArray = Utils.GetFormValue(this.hideDeptId.UniqueID).Split(','); string[] item = Utils.GetFormValues("chk_item"); string tourId = Utils.GetQueryStringValue("tourID"); string insiderInfor = Utils.GetFormValue(this.txtInsiderInfor.UniqueID); //验证 if (sellsArray.Length == 0) { return(UtilsCommons.AjaxReturnJson("0", "请选择计调员!")); } if (item.Length == 0) { return(UtilsCommons.AjaxReturnJson("0", "请选择计调安排项目!")); } BTour bll = new BTour(); IList <EyouSoft.Model.TourStructure.MTourPlaner> TourPlaner = new List <EyouSoft.Model.TourStructure.MTourPlaner>(); for (int i = 0; i < sellsArray.Length; i++) { EyouSoft.Model.TourStructure.MTourPlaner planerModel = new EyouSoft.Model.TourStructure.MTourPlaner(); planerModel.PlanerId = sellsArray[i]; //planerModel.Planer = sellsNameArray[i]; //planerModel.DeptId = Utils.GetInt(sellsDeptArray[i]); planerModel.TourId = tourId; TourPlaner.Add(planerModel); } IList <EyouSoft.Model.TourStructure.MTourPlanItem> TourPlanItem = new List <EyouSoft.Model.TourStructure.MTourPlanItem>(); for (int i = 0; i < item.Length; i++) { EyouSoft.Model.TourStructure.MTourPlanItem tpiModel = new EyouSoft.Model.TourStructure.MTourPlanItem(); tpiModel.TourId = tourId; tpiModel.PlanType = (EyouSoft.Model.EnumType.PlanStructure.PlanProject)Utils.GetInt(item[i]); TourPlanItem.Add(tpiModel); } EyouSoft.Model.TourStructure.MTourBaseInfo tourModel = bll.GetTourInfo(tourId); if (tourModel != null) { EyouSoft.Model.TourStructure.MSendTour sendTourModel = new EyouSoft.Model.TourStructure.MSendTour(); sendTourModel.CompanyId = SiteUserInfo.CompanyId; sendTourModel.DeptId = SiteUserInfo.DeptId; sendTourModel.InsiderInfor = insiderInfor; sendTourModel.LDate = Convert.ToDateTime(tourModel.LDate); sendTourModel.Operator = SiteUserInfo.Name; sendTourModel.OperatorId = SiteUserInfo.UserId; sendTourModel.Planer = TourPlaner; sendTourModel.PlanItem = TourPlanItem; //sendTourModel.TourCode = bll.GenerateTourNo(SiteUserInfo.DeptId, SiteUserInfo.CompanyId, tourModel.TourType, sendTourModel.LDate); sendTourModel.TourId = tourId; sendTourModel.TourType = tourModel.TourType; bool result = false; lock (PaiTuanXuHaoLockHelper) { result = bll.SendTour(sendTourModel); } if (result) { msg = UtilsCommons.AjaxReturnJson("1", "安排计调成功!"); } else { msg = UtilsCommons.AjaxReturnJson("0", "安排计调失败!"); } } return(msg); }
/// <summary> /// 初始化 /// </summary> private void DataInit() { this.Title = "财务管理-报销报账"; #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion #region 查询实体 MBZSearch queryModel = new MBZSearch(); //团号 queryModel.TourCode = Utils.GetQueryStringValue("txt_teamNumber"); //线路名称 queryModel.RouteName = Utils.GetQueryStringValue("txt_lineName"); //出团时间--始 queryModel.SLDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txt_SDate")); //出团时间--终 queryModel.LLDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txt_EDate")); //导游 queryModel.Guide = txt_Guide.GuidName = Utils.GetQueryStringValue(txt_Guide.GuidNameClient); //导游Id queryModel.GuideId = txt_Guide.GuidID = Utils.GetQueryStringValue(txt_Guide.GuidIDClient); //计调 queryModel.Planer = txt_Plan.SellsName = Utils.GetQueryStringValue(txt_Plan.SellsNameClient); //计调Id queryModel.PlanerId = txt_Plan.SellsID = Utils.GetQueryStringValue(txt_Plan.SellsIDClient); //销售 queryModel.SellerName = txt_Seller.SellsName = Utils.GetQueryStringValue(txt_Seller.SellsNameClient); //销售Id queryModel.SellerId = txt_Seller.SellsID = Utils.GetQueryStringValue(txt_Seller.SellsIDClient); string baoxiaoorbaozhang = Utils.GetQueryStringValue("isDealt"); //是否已报销或报账 queryModel.IsDealt = (baoxiaoorbaozhang == "1" || baoxiaoorbaozhang == "2"); #endregion IList <MBZInfo> ls = new List <MBZInfo>(); if (baoxiaoorbaozhang == "-2" || baoxiaoorbaozhang == "2")//报销 { ls = new BTour().GetFincBXList( CurrentUserCompanyID, pageSize, pageIndex, ref recordCount, queryModel, SiteUserInfo.DeptId); } else//报账 { ls = new BTour().GetFincBZList( CurrentUserCompanyID, pageSize, pageIndex, ref recordCount, queryModel, SiteUserInfo.DeptId); } 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; if (baoxiaoorbaozhang == "-2") { CaoZuoString = "<a data-class=\"a_ExamineA\" href=\"javascript:void(0);\">报销</a>"; } else if (baoxiaoorbaozhang == "2") { CaoZuoString = "<a data-class=\"a_ExamineA\" href=\"javascript:void(0);\">查看</a>"; } else if (baoxiaoorbaozhang == "1") { CaoZuoString = "<a data-class=\"a_Apply\" href=\"javascript:void(0);\">查看</a>"; } else { CaoZuoString = "<a data-class=\"a_Apply\" href=\"javascript:void(0);\">审批</a>"; } }
/// <summary> /// 初始化 /// </summary> private void DataInit() { //获取分页参数并强转 pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); #region 获取查询条件 //线路区域 int areaId = Utils.GetInt(Utils.GetQueryStringValue("ddlArea")); //线路名称 string routeName = Utils.GetQueryStringValue("txtRouteName"); //出发时间 DateTime?txtBeginDateF = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtBeginDateF")); DateTime?txtBeginDateS = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtBeginDateS")); //回团时间 DateTime?txtEndDateF = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtEndDateF")); DateTime?txtEndDateS = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtEndDateS")); //客户单位 string comId = Utils.GetQueryStringValue(this.CustomerUnitSelect1.ClientNameKHBH); string comName = Utils.GetQueryStringValue(this.CustomerUnitSelect1.ClientNameKHMC); this.CustomerUnitSelect1.CustomerUnitId = comId; this.CustomerUnitSelect1.CustomerUnitName = comName; //销售员 string sellerId = Utils.GetQueryStringValue(this.SellsSelect1.SellsIDClient); string sellerName = Utils.GetQueryStringValue(this.SellsSelect1.SellsNameClient); this.SellsSelect1.SellsID = sellerId; this.SellsSelect1.SellsName = sellerName; //计调员 string opterId = Utils.GetQueryStringValue(this.SellsSelect2.SellsIDClient); string opterName = Utils.GetQueryStringValue(this.SellsSelect2.SellsNameClient); this.SellsSelect2.SellsID = opterId; this.SellsSelect2.SellsName = opterName; //团队状态 string tourState = Utils.GetQueryStringValue("sltTourState"); #endregion BTour bll = new BTour(); MTourTeamSearch searchModel = new MTourTeamSearch(); searchModel.AreaId = areaId; searchModel.BuyCompanyName = comName; searchModel.LDateStart = txtBeginDateF; searchModel.LDateEnd = txtBeginDateS; searchModel.Planer = opterName; searchModel.RDateStart = txtEndDateF; searchModel.RDateEnd = txtEndDateS; searchModel.RouteName = routeName; searchModel.SellerName = sellerName; if (tourState != "") { searchModel.TourStatus = (EyouSoft.Model.EnumType.TourStructure.TourStatus)Utils.GetInt(tourState); } searchModel.OperatorId = txtFaBuRen.SellsID = Utils.GetQueryStringValue(this.txtFaBuRen.SellsIDClient); searchModel.OperatorName = txtFaBuRen.SellsName = Utils.GetQueryStringValue(this.txtFaBuRen.SellsNameClient); searchModel.TourCode = Utils.GetQueryStringValue("txtTourCode"); IList <MTourTeamInfo> list = bll.GetTourTeamList(SiteUserInfo.CompanyId, pageSize, pageIndex, ref recordCount, (EyouSoft.Model.EnumType.TourStructure.ModuleType)(type - 1), searchModel); if (list != null && list.Count > 0) { rpt_List.DataSource = list; rpt_List.DataBind(); //绑定分页 BindPage(); this.litMsg.Visible = false; } else { this.litMsg.Visible = true; this.ExporPageInfoSelect1.Visible = false; this.ExporPageInfoSelect2.Visible = false; } }