/// <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 id = Utils.GetQueryStringValue("id"); 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); }
/// <summary> /// 保存操作 /// </summary> /// <returns></returns> private string Save() { string msg = string.Empty; EyouSoft.Model.TourStructure.MTourOrderExpand order = new EyouSoft.Model.TourStructure.MTourOrderExpand(); IList <EyouSoft.Model.TourStructure.MTourOrderCarTypeSeat> list = null; if (PageValidate(ref order, ref msg)) { //判断客户单位是否欠款、单团账龄是否超限 EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); EyouSoft.Model.FinStructure.MCustomerWarning customerWarningModel = bll.GetCustomerOverrunDetail(SiteUserInfo.TourCompanyInfo.CompanyId, order.SumPrice, SiteUserInfo.CompanyId); if (customerWarningModel != null) { msg = UtilsCommons.AjaxReturnJson("0", "您的欠款已经超过限额,暂不可报名。"); } else { EyouSoft.BLL.TourStructure.BTourOrder bOrder = new EyouSoft.BLL.TourStructure.BTourOrder(); string IsShortRoute = Utils.GetQueryStringValue("IsShort"); int flg = 0; if (!string.IsNullOrEmpty(IsShortRoute)) { flg = bOrder.AddTourOrderExpand(order, ref list); } else { flg = bOrder.AddTourOrderExpand(order); } if (flg == 3) { msg = UtilsCommons.AjaxReturnJson("1", "订单报名成功! 正在跳转..."); } else if (flg == 5) { msg = UtilsCommons.AjaxReturnJson("0", "计划自动客满,不允许报名!"); } else if (flg == 6) { msg = UtilsCommons.AjaxReturnJson("0", "计划自动停收,不允许报名!"); } else if (flg == 7) { msg = UtilsCommons.AjaxReturnJson("0", "计划手动客满,不允许报名!"); } else if (flg == 8) { msg = UtilsCommons.AjaxReturnJson("0", "计划手动停收,不允许报名!"); } else if (flg == 1) { msg = UtilsCommons.AjaxReturnJson("0", "订单报名人数超过计划剩余人数!"); } else { msg = UtilsCommons.AjaxReturnJson("0", "订单报名失败!"); } } } else { msg = UtilsCommons.AjaxReturnJson("0", msg); } return(msg); }
/// <summary> /// 页面初始化 /// </summary> private void PageInit() { this.lblApplyMan.Text = SiteUserInfo.Name; this.lblApplyDateTime.Text = UtilsCommons.GetDateString(DateTime.Now, this.ProviderToDate); EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); string tourId = Utils.GetQueryStringValue("tourId"); string orderId = Utils.GetQueryStringValue("orderId"); string msg = string.Empty; //询价单位编号 string buyID = string.Empty; //销售员编号 string sellsID = string.Empty; //合计金额 decimal price = 0; decimal settePrice = 0; if (tourId != "") { this.hideTourId.Value = tourId; EyouSoft.BLL.TourStructure.BTour tourBll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.TourStructure.MTourTeamInfo model = (EyouSoft.Model.TourStructure.MTourTeamInfo)tourBll.GetTourInfo(tourId); if (model != null) { if (model.SaleInfo != null) { sellsID = model.SaleInfo.SellerId; } if (model.CompanyInfo != null) { buyID = model.CompanyInfo.CompanyId; } settePrice = price = model.SumPrice; } } if (orderId != "") { this.hideOrderId.Value = orderId; EyouSoft.BLL.TourStructure.BTourOrder orderBll = new EyouSoft.BLL.TourStructure.BTourOrder(); EyouSoft.Model.TourStructure.MTourOrderExpand orderModel = orderBll.GetTourOrderExpandByOrderId(orderId); if (orderModel != null) { sellsID = orderModel.SellerId; buyID = orderModel.BuyCompanyId; price = orderModel.SumPrice; settePrice = orderModel.ConfirmSettlementMoney; } } if (buyID != "" && sellsID != "" && price > 0) { EyouSoft.Model.FinStructure.MCustomerWarning customerWarningModel = bll.GetCustomerOverrunDetail(buyID, price, SiteUserInfo.CompanyId); EyouSoft.Model.FinStructure.MSalesmanWarning salesmanWarningModel = bll.GetSaleOverrunDetail(sellsID, settePrice, SiteUserInfo.CompanyId); if (customerWarningModel != null) { PageHtml[0] = "<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>"; } else { this.phdKehu.Visible = false; } if (salesmanWarningModel != null) { PageHtml[1] = "<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>"; } else { this.phdXiaoshou.Visible = false; } } else { this.phdKehu.Visible = false; this.phdXiaoshou.Visible = false; } }