private string UpdateOrderState(string orderID, string state) { //声明操作BLL EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); bool result = false; switch (state) { //定金收取 case "1": result = orderBll.SetPaymentStatus(orderID, EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付定金); break; //全款收取 case "2": result = orderBll.SetPaymentStatus(orderID, EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付全款); break; //专线已退款 case "3": result = orderBll.SetPaymentStatus(orderID, EyouSoft.Model.NewTourStructure.PaymentStatus.已退款); break; //订单取消 case "4": //组团取消订单时,如果订单支付状态为专线定金已收或全收,那么支付状态设为申请退款 EyouSoft.Model.NewTourStructure.MTourOrder orderModel = orderBll.GetModel(orderID); if (orderModel != null) { if (orderModel.PaymentStatus == EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付定金 || orderModel.PaymentStatus == EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付全款) { orderBll.SetPaymentStatus(orderID, EyouSoft.Model.NewTourStructure.PaymentStatus.申请退款); } } result = orderBll.SetOrderStatus(orderID, EyouSoft.Model.NewTourStructure.PowderOrderStatus.取消, DateTime.Now); break; } if (result) { return("ok"); } return("服务器忙,请稍后再试!"); }
private string FormSave() { //声明操作BLL EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); //创建新的订单 EyouSoft.Model.NewTourStructure.MTourOrder orderModel = new EyouSoft.Model.NewTourStructure.MTourOrder(); string tourID = Utils.GetQueryStringValue("tourID"); //成人数 int adultCount = Utils.GetInt(Utils.GetFormValue(this.txtAdultCount.UniqueID)); if (adultCount == 0) { return("请输入成人数!"); } //儿童数 int childCount = Utils.GetInt(Utils.GetFormValue(this.txtChildCount.UniqueID)); //单房差 int otherCount = Utils.GetInt(Utils.GetFormValue(this.txtOtherCount.UniqueID)); //游客联系人 string contact = Utils.GetFormValue(this.txtContact.UniqueID); //游客联系电话 string conTactTel = Utils.GetFormValue(this.txtConTactTel.UniqueID); //负责人 string travelID = Utils.GetFormValue(this.hideTravelID.UniqueID); string travelName = Utils.GetFormValue(this.txtTravel.UniqueID); string fzr = Utils.GetFormValue(this.txtFzr.UniqueID); //负责人电话 string fzrTel = Utils.GetFormValue(this.txtFzrTel.UniqueID); //增减结算价 decimal addPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtAddPrice.UniqueID)); //游客备注 //组团备注 string remark = Utils.GetFormValue(this.txtRemark.UniqueID); #region 处理旅客 string[] txtName = Utils.GetFormValues("txtName"); string[] txtTel = Utils.GetFormValues("txtTel"); string[] txtCard = Utils.GetFormValues("txtCard"); string[] txtCardS = Utils.GetFormValues("txtCardS"); string[] txtCardT = Utils.GetFormValues("txtCardT"); string[] sltSex = Utils.GetFormValues("sltSex"); string[] sltChild = Utils.GetFormValues("sltChild"); string[] txtNumber = Utils.GetFormValues("txtNumber"); string[] txtRemarks = Utils.GetFormValues("txtRemarks"); string[] cbxVisitor = Utils.GetFormValues("cbxVisitor"); IList <EyouSoft.Model.NewTourStructure.MTourOrderCustomer> customerList = new List <EyouSoft.Model.NewTourStructure.MTourOrderCustomer>(); if (txtName.Length > 0) { for (int i = 0; i < txtName.Length; i++) { EyouSoft.Model.NewTourStructure.MTourOrderCustomer model = new EyouSoft.Model.NewTourStructure.MTourOrderCustomer(); model.CertificatesType = EyouSoft.Model.TicketStructure.TicketCardType.身份证; model.CompanyId = "";//SiteUserInfo.CompanyID if (cbxVisitor.Contains((i + 1).ToString())) { model.IsSaveToTicketVistorInfo = true; } model.ContactTel = txtTel[i]; model.CradType = sltChild[i] == "1" ? EyouSoft.Model.TicketStructure.TicketVistorType.成人 : EyouSoft.Model.TicketStructure.TicketVistorType.儿童; model.IdentityCard = txtCard[i]; model.IssueTime = DateTime.Now; model.Notes = txtRemarks[i]; model.OtherCard = txtCardT[i]; model.Passport = txtCardS[i]; model.Sex = sltSex[i] == "0" ? EyouSoft.Model.CompanyStructure.Sex.男 : EyouSoft.Model.CompanyStructure.Sex.女; model.SiteNo = txtNumber[i]; model.VisitorName = txtName[i]; customerList.Add(model); } } #endregion #region 订单实体赋值 orderModel.Reduction = addPrice; orderModel.AdultNum = adultCount; #region 获得计划中价格信息 decimal reAdultPrice = 0; decimal reChilePrice = 0; decimal reOtherPrice = 0; decimal seAdultPrice = 0; decimal seChildPrice = 0; EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(tourID); if (tourModel != null) { reAdultPrice = tourModel.RetailAdultPrice; reChilePrice = tourModel.RetailChildrenPrice; reOtherPrice = tourModel.MarketPrice; seAdultPrice = tourModel.SettlementAudltPrice; seChildPrice = tourModel.SettlementChildrenPrice; //订单实体赋值 orderModel.BusinessNotes = ""; orderModel.DayNum = tourModel.Day; orderModel.LateNum = tourModel.Late; orderModel.LeaveDate = tourModel.LeaveDate; orderModel.RouteId = tourModel.RouteId; orderModel.RouteName = tourModel.RouteName; orderModel.ScheduleNum = tourModel.OrderPeopleNum; orderModel.TourId = tourModel.TourId; orderModel.TourNo = tourModel.TourNo; } #endregion orderModel.ChildPrice = reChilePrice; orderModel.ChildrenNum = childCount; orderModel.Customers = customerList; orderModel.IssueTime = DateTime.Now; orderModel.MarketPrice = reOtherPrice; orderModel.OperationMsg = ""; orderModel.OperatorId = ""; //SiteUserInfo.ID; orderModel.OperatorName = ""; // SiteUserInfo.ContactInfo.ContactName; orderModel.OrderStatus = EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理; orderModel.PaymentStatus = EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付; orderModel.PersonalPrice = reAdultPrice; orderModel.SaveDate = null; orderModel.SettlementAudltPrice = seAdultPrice; orderModel.SettlementChildrenPrice = seChildPrice; orderModel.SingleRoomNum = otherCount; orderModel.Travel = travelID; orderModel.TravelName = travelName; orderModel.TravelContact = fzr; orderModel.TravelTel = fzrTel; orderModel.VisitorContact = contact; orderModel.VisitorTel = conTactTel; orderModel.BusinessNotes = remark; orderModel.TotalSalePrice = adultCount * reAdultPrice + childCount * reChilePrice + otherCount * reOtherPrice + addPrice; orderModel.TotalSettlementPrice = adultCount * seAdultPrice + childCount * seChildPrice; if (EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance().AddOrUpdTourOrder(orderModel)) { return("ok"); } else { return("服务器忙,请稍后再试!"); } #endregion }
private string FormSave() { //声明操作BLL EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); //创建新的订单 EyouSoft.Model.NewTourStructure.MTourOrder orderModel = new EyouSoft.Model.NewTourStructure.MTourOrder(); string tourID = Utils.GetQueryStringValue("tourID"); //成人数 int adultCount = Utils.GetInt(Utils.GetFormValue(this.txtAdultCount.UniqueID)); if (adultCount == 0) { return("请输入成人数!"); } //儿童数 int childCount = Utils.GetInt(Utils.GetFormValue(this.txtChildCount.UniqueID)); //单房差 int otherCount = Utils.GetInt(Utils.GetFormValue(this.txtOtherCount.UniqueID)); //游客联系人 string contact = Utils.GetFormValue(this.txtContact.UniqueID); //游客联系电话 string conTactTel = Utils.GetFormValue(this.txtConTactTel.UniqueID); //负责人 string fzr = Utils.GetFormValue(this.txtFzr.UniqueID); if (fzr == "") { fzr = SiteUserInfo.ContactInfo.ContactName; } //负责人电话 string fzrTel = Utils.GetFormValue(this.txtFzrTel.UniqueID); if (fzrTel == "") { fzrTel = SiteUserInfo.ContactInfo.Tel; } //增减价格 decimal addPrice = 0; decimal.TryParse(Utils.GetFormValue(this.txtAddPrice.UniqueID), out addPrice); //增减结算价 decimal reductPrice = 0; decimal.TryParse(Utils.GetFormValue(this.txtReductPrice.UniqueID), out reductPrice); //游客备注 string cusRemark = Utils.GetFormValue(this.txtCusRemark.UniqueID); //组团备注 string remark = Utils.GetFormValue(this.txtRemark.UniqueID); #region 处理旅客 string[] txtName = Utils.GetFormValues("txtName"); string[] txtTel = Utils.GetFormValues("txtTel"); string[] txtCard = Utils.GetFormValues("txtCard"); string[] txtCardS = Utils.GetFormValues("txtCardS"); string[] txtCardT = Utils.GetFormValues("txtCardT"); string[] sltSex = Utils.GetFormValues("sltSex"); string[] sltChild = Utils.GetFormValues("sltChild"); string[] txtNumber = Utils.GetFormValues("txtNumber"); string[] txtRemarks = Utils.GetFormValues("txtRemarks"); string[] cbxVisitor = Utils.GetFormValues("cbxVisitor"); IList <EyouSoft.Model.NewTourStructure.MTourOrderCustomer> customerList = new List <EyouSoft.Model.NewTourStructure.MTourOrderCustomer>(); if (txtName.Length > 0) { for (int i = 0; i < txtName.Length; i++) { EyouSoft.Model.NewTourStructure.MTourOrderCustomer model = new EyouSoft.Model.NewTourStructure.MTourOrderCustomer(); model.CertificatesType = EyouSoft.Model.TicketStructure.TicketCardType.身份证; model.CompanyId = SiteUserInfo.CompanyID; if (cbxVisitor.Contains((i + 1).ToString())) { model.IsSaveToTicketVistorInfo = true; } model.Mobile = txtTel[i]; model.CradType = sltChild[i] == "0" ? EyouSoft.Model.TicketStructure.TicketVistorType.成人 : EyouSoft.Model.TicketStructure.TicketVistorType.儿童; model.IdentityCard = txtCard[i]; model.IssueTime = DateTime.Now; model.Notes = txtRemarks[i]; model.OtherCard = txtCardT[i]; model.Passport = txtCardS[i]; model.Sex = sltSex[i] == "0" ? EyouSoft.Model.CompanyStructure.Sex.男 : EyouSoft.Model.CompanyStructure.Sex.女; model.SiteNo = txtNumber[i]; model.VisitorName = txtName[i]; customerList.Add(model); } } #endregion #region 订单实体赋值 orderModel.Add = addPrice; orderModel.AdultNum = adultCount; orderModel.Reduction = reductPrice; #region 获得计划中价格信息 decimal reAdultPrice = 0; decimal reChilePrice = 0; decimal reOtherPrice = 0; decimal seAdultPrice = 0; decimal seChildPrice = 0; EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(tourID); if (tourModel != null) { reAdultPrice = tourModel.RetailAdultPrice; reChilePrice = tourModel.RetailChildrenPrice; reOtherPrice = tourModel.MarketPrice; seAdultPrice = tourModel.SettlementAudltPrice; seChildPrice = tourModel.SettlementChildrenPrice; //订单实体赋值 orderModel.BusinessNotes = ""; orderModel.DayNum = tourModel.Day; orderModel.LateNum = tourModel.Late; orderModel.LeaveDate = tourModel.LeaveDate; orderModel.RouteId = tourModel.RouteId; orderModel.RouteName = tourModel.RouteName; orderModel.ScheduleNum = tourModel.OrderPeopleNum; orderModel.TourId = tourModel.TourId; orderModel.TourNo = tourModel.TourNo; } else { Response.Clear(); Response.Write("error"); Response.End(); } #endregion orderModel.ChildPrice = reChilePrice; orderModel.ChildrenNum = childCount; orderModel.Customers = customerList; orderModel.IssueTime = DateTime.Now; orderModel.MarketPrice = reOtherPrice; orderModel.OperationMsg = ""; orderModel.OperatorId = SiteUserInfo.ID; orderModel.OperatorName = SiteUserInfo.ContactInfo.ContactName; orderModel.OrderStatus = EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理; orderModel.PaymentStatus = EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付; orderModel.PersonalPrice = reAdultPrice; orderModel.SaveDate = null; orderModel.SettlementAudltPrice = seAdultPrice; orderModel.SettlementChildrenPrice = seChildPrice; orderModel.SingleRoomNum = otherCount; orderModel.VisitorNotes = cusRemark; orderModel.Travel = SiteUserInfo.CompanyID; orderModel.TravelContact = fzr; orderModel.TravelName = SiteUserInfo.CompanyName; orderModel.TravelNotes = remark; orderModel.TravelTel = fzrTel; orderModel.VisitorContact = contact; orderModel.VisitorNotes = cusRemark; orderModel.VisitorTel = conTactTel; //计划销售总价 orderModel.TotalSalePrice = adultCount * reAdultPrice + childCount * reChilePrice + otherCount * reOtherPrice + addPrice; //计算结算总价 orderModel.TotalSettlementPrice = adultCount * seAdultPrice + childCount * seChildPrice + reductPrice; if (EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance().AddOrUpdTourOrder(orderModel)) { #region 发送短信模块 EyouSoft.Model.SystemStructure.MSysSettingInfo SettingInfoModel = EyouSoft.BLL.SystemStructure.SystemInfo.CreateInstance().GetSysSetting(); //获得组团公司实体 EyouSoft.Model.CompanyStructure.CompanyDetailInfo travelComModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID); ////获得专线或地接公司实体 EyouSoft.Model.CompanyStructure.CompanyDetailInfo tourComModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(tourModel.Publishers); if (SettingInfoModel != null && travelComModel != null && tourComModel != null) { if (SettingInfoModel.OrderSmsCompanyTypes.Contains(travelComModel.CompanyLev)) { string sendMsg = SettingInfoModel.OrderSmsTemplate; sendMsg = sendMsg.Replace("[预订公司]", SiteUserInfo.CompanyName); sendMsg = sendMsg.Replace("[预订联系电话]", SiteUserInfo.ContactInfo.Mobile); sendMsg = sendMsg.Replace("[预订出发时间]", tourModel.LeaveDate.ToString("yyyy-MM-dd")); sendMsg = sendMsg.Replace("[预订产品]", tourModel.RouteName); sendMsg = sendMsg.Replace("[预订数量]", orderModel.AdultNum.ToString() + "成," + orderModel.ChildrenNum.ToString() + "儿"); #region 发送操作 EyouSoft.Model.SMSStructure.SendMessageInfo sendMessageInfo = new EyouSoft.Model.SMSStructure.SendMessageInfo(); sendMessageInfo.CompanyId = orderModel.Travel; sendMessageInfo.CompanyName = orderModel.TravelName; sendMessageInfo.UserId = this.SiteUserInfo.ID; sendMessageInfo.UserFullName = SiteUserInfo.ContactInfo.ContactName; sendMessageInfo.SMSContent = sendMsg; sendMessageInfo.SendTime = DateTime.Now; //添加要发送的手机号码 List <EyouSoft.Model.SMSStructure.AcceptMobileInfo> moblieList = new List <EyouSoft.Model.SMSStructure.AcceptMobileInfo>(); EyouSoft.Model.SMSStructure.AcceptMobileInfo mobileModel = new EyouSoft.Model.SMSStructure.AcceptMobileInfo(); mobileModel.IsEncrypt = false; if (tourComModel.ContactInfo != null) { mobileModel.Mobile = tourComModel.ContactInfo.Mobile; } moblieList.Add(mobileModel); sendMessageInfo.Mobiles = moblieList; //发送通道 EyouSoft.Model.SMSStructure.SMSChannel sendChannel = new EyouSoft.Model.SMSStructure.SMSChannelList()[Convert.ToInt32(SettingInfoModel.OrderSmsChannelIndex)]; sendMessageInfo.SendChannel = sendChannel; sendMessageInfo.SendType = EyouSoft.Model.SMSStructure.SendType.直接发送; EyouSoft.IBLL.SMSStructure.ISendMessage sBll = EyouSoft.BLL.SMSStructure.SendMessage.CreateInstance(); EyouSoft.Model.SMSStructure.SendResultInfo SendResultModel = sBll.Send(sendMessageInfo); SendResultModel = null; sendMessageInfo = null; #endregion } } #endregion return("ok"); } else { return("服务器忙,请稍后再试!"); } #endregion }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourID"></param> /// <param name="adultCount"></param> /// <param name="childCount"></param> /// <param name="contact"></param> /// <param name="tel"></param> private void PageInit(string orderID) { EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); EyouSoft.Model.NewTourStructure.MTourOrder model = orderBll.GetModel(orderID); if (model != null) { EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(model.TourId); if (tourModel == null) { Utils.Show("error"); return; } this.lblRouteName.Text = "<a href='/PrintPage/LineTourInfo.aspx?RouteID=" + model.RouteId + "' target='_blank'>" + model.RouteName + "</a>"; this.lblLeaveDate.Text = model.LeaveDate.ToString("yyyy-MM-dd"); this.lblCompanyName.Text = " <a target=\"_blank\" href=\"" + Utils.GetCompanyDomain(model.Travel, EyouSoft.Model.CompanyStructure.CompanyType.组团) + "\">" + model.TravelName + "</a>"; #region 获得组团公司信息 EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(model.Travel); if (comModel != null && comModel.ContactInfo != null) { this.lblMq.Text = Utils.GetMQ(comModel.ContactInfo.MQ); this.lblQQ.Text = Utils.GetQQ(comModel.ContactInfo.QQ); } #endregion this.lblOrderNo.Text = model.OrderNo; this.lblTourState.Text = tourModel.PowderTourStatus.ToString(); this.lblCount.Text = tourModel.MoreThan.ToString(); this.lblLeaveCity.Text = tourModel.StartCityName; this.lblRemarks.Text = model.BusinessNotes; this.lblCar.Text = tourModel.StartTraffic + " " + tourModel.EndTraffic; this.lblLeaveCon.Text = tourModel.StartDate; this.lblBackCon.Text = tourModel.EndDate; this.lblMsg.Text = tourModel.SetDec; this.lblAllMsg.Text = tourModel.TeamLeaderDec; this.lblContact.Text = model.VisitorContact; this.lblConTactTel.Text = model.VisitorTel; this.lblFzr.Text = model.TravelContact; this.lblFzrTel.Text = model.TravelTel; this.txtAdultCount.Value = model.AdultNum.ToString(); this.txtChildCount.Value = model.ChildrenNum.ToString(); this.txtOtherCount.Value = model.SingleRoomNum.ToString(); this.lblAddDate.Text = model.IssueTime.ToString("yyyy-MM-dd") + " " + model.OperatorName; #region 团队 价格信息 //市场价 this.lblRetailAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.PersonalPrice); this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.ChildPrice); this.lblMarketPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.MarketPrice); //结算价 this.lblSettlementAudltPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementAudltPrice); this.lblSettlementChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementChildrenPrice); #endregion //处理总金额 //市场价总价 this.lblReailPriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSalePrice); //结算总价 this.lblSettlePriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSettlementPrice); // this.OrderCustomer1.TourOrderCustomer = model.Customers; #region 处理订单状态和支付状态 this.pnlSave.Visible = false; this.pnlYuLiu.Visible = false; this.pnlQueDing.Visible = false; this.pnlJieDan.Visible = false; switch (model.OrderStatus) { case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理: this.lblOrderState.Text = "未处理"; this.pnlSave.Visible = true; this.pnlYuLiu.Visible = true; this.pnlQueDing.Visible = true; this.pnlJieDan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留: this.lblOrderState.Text = "专线预留,留位日期:" + Convert.ToDateTime(model.SaveDate).ToString("yyyy-MM-dd"); this.pnlSave.Visible = true; this.pnlQueDing.Visible = true; this.pnlJieDan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.预留过期: this.lblOrderState.Text = "留位过期"; this.pnlSave.Visible = true; this.pnlQueDing.Visible = true; this.pnlJieDan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单: this.lblOrderState.Text = "已结单"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.取消: this.lblOrderState.Text = "已取消"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定: this.lblOrderState.Text = "专线已确定"; this.pnlJieDan.Visible = true; break; } this.pnlLitPay.Visible = false; this.pnlAllPay.Visible = false; switch (model.PaymentStatus) { case EyouSoft.Model.NewTourStructure.PaymentStatus.游客待支付: case EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付: this.lblPayState.Text = "游客未付款"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付定金: this.lblPayState.Text = "游客已支付定金"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付全款: this.lblPayState.Text = "游客已支付全款"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付定金: this.lblPayState.Text = "已收定金"; this.pnlAllPay.Visible = true; this.pnlSave.Visible = false; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付全款: this.lblPayState.Text = "已收全款"; this.pnlSave.Visible = false; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.结账: this.lblPayState.Text = "该单已结账"; this.pnlSave.Visible = false; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.申请退款: this.lblPayState.Text = "申请退款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.已退款: this.lblPayState.Text = "已退款"; break; } #endregion } }
/// <summary> /// 修改订单 /// </summary> /// <returns></returns> private string FormSave() { string orderID = Utils.GetQueryStringValue("orderID"); //声明操作BLL EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); //获得订单实体 EyouSoft.Model.NewTourStructure.MTourOrder orderModel = orderBll.GetModel(orderID); //成人数 int adultCount = Utils.GetInt(Utils.GetFormValue(this.txtAdultCount.UniqueID)); if (adultCount == 0) { return("请输入成人数!"); } //儿童数 int childCount = Utils.GetInt(Utils.GetFormValue(this.txtChildCount.UniqueID)); //单房差 int otherCount = Utils.GetInt(Utils.GetFormValue(this.txtOtherCount.UniqueID)); //增减结算价 decimal addReduction = Utils.GetDecimal(Utils.GetFormValue(this.txtAddPrice.UniqueID)); //专线备注 string routeRemarks = Utils.GetFormValue(this.txtRouteRemarks.UniqueID); #region 处理旅客 string[] txtName = Utils.GetFormValues("txtName"); string[] txtTel = Utils.GetFormValues("txtTel"); string[] txtCard = Utils.GetFormValues("txtCard"); string[] txtCardS = Utils.GetFormValues("txtCardS"); string[] txtCardT = Utils.GetFormValues("txtCardT"); string[] sltSex = Utils.GetFormValues("sltSex"); string[] sltChild = Utils.GetFormValues("sltChild"); string[] txtNumber = Utils.GetFormValues("txtNumber"); string[] txtRemarks = Utils.GetFormValues("txtRemarks"); string[] cbxVisitor = Utils.GetFormValues("cbxVisitor"); IList <EyouSoft.Model.NewTourStructure.MTourOrderCustomer> customerList = new List <EyouSoft.Model.NewTourStructure.MTourOrderCustomer>(); if (txtName.Length > 0) { for (int i = 0; i < txtName.Length; i++) { EyouSoft.Model.NewTourStructure.MTourOrderCustomer model = new EyouSoft.Model.NewTourStructure.MTourOrderCustomer(); model.CertificatesType = EyouSoft.Model.TicketStructure.TicketCardType.身份证; model.CompanyId = "";//SiteUserInfo.CompanyID if (cbxVisitor.Contains((i + 1).ToString())) { model.IsSaveToTicketVistorInfo = true; } model.ContactTel = txtTel[i]; model.CradType = sltChild[i] == "1" ? EyouSoft.Model.TicketStructure.TicketVistorType.成人 : EyouSoft.Model.TicketStructure.TicketVistorType.儿童; model.IdentityCard = txtCard[i]; model.IssueTime = DateTime.Now; model.Notes = txtRemarks[i]; model.OtherCard = txtCardT[i]; model.Passport = txtCardS[i]; model.Sex = sltSex[i] == "0" ? EyouSoft.Model.CompanyStructure.Sex.男 : EyouSoft.Model.CompanyStructure.Sex.女; model.SiteNo = txtNumber[i]; model.VisitorName = txtName[i]; customerList.Add(model); } } #endregion #region 订单实体赋值 orderModel.Reduction = addReduction; orderModel.AdultNum = adultCount; orderModel.ChildrenNum = childCount; orderModel.Customers = customerList; orderModel.IssueTime = DateTime.Now; orderModel.OperatorId = ""; //SiteUserInfo.ID; orderModel.OperatorName = ""; // SiteUserInfo.ContactInfo.ContactName; orderModel.OrderStatus = EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理; orderModel.PaymentStatus = EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付; orderModel.SaveDate = null; orderModel.SingleRoomNum = otherCount; orderModel.Travel = ""; orderModel.BusinessNotes = routeRemarks; orderModel.TotalSalePrice = adultCount * orderModel.PersonalPrice + childCount * orderModel.ChildPrice + otherCount * orderModel.MarketPrice; //专线计算结算价 需要加减结算价 orderModel.TotalSettlementPrice = adultCount * orderModel.SettlementAudltPrice + childCount * orderModel.SettlementChildrenPrice + addReduction; if (EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance().AddOrUpdTourOrder(orderModel)) { return("ok"); } else { return("服务器忙,请稍后再试!"); } #endregion }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourID"></param> /// <param name="adultCount"></param> /// <param name="childCount"></param> /// <param name="contact"></param> /// <param name="tel"></param> private void PageInit(string orderID) { EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); EyouSoft.Model.NewTourStructure.MTourOrder model = orderBll.GetModel(orderID); if (model != null) { EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(model.TourId); this.lblRouteName.Text = "<a href='/PrintPage/LineTourInfo.aspx?RouteID=" + model.RouteId + "' target='_blank'>" + model.RouteName + "</a>"; this.lblLeaveDate.Text = model.LeaveDate.ToString("yyyy-MM-dd") + "(" + Utils.GetDayOfWeek((int)model.LeaveDate.DayOfWeek) + ") ";//出团日期(周几) this.lblCount.Text = tourModel.MoreThan.ToString(); this.lblTourState.Text = tourModel.PowderTourStatus.ToString(); this.lblCompanyName.Text = " <a target=\"_blank\" href=\"" + Utils.GetShopUrl(tourModel.Publishers) + "\">" + tourModel.PublishersName + "</a>"; #region 获得专线公司信息 EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(tourModel.Publishers); if (comModel != null && comModel.ContactInfo != null) { this.lblMq.Text = Utils.GetMQ(comModel.ContactInfo.MQ); this.lblQQ.Text = Utils.GetQQ(comModel.ContactInfo.QQ); } #endregion this.txtAddPrice.Value = model.Add.ToString("0.00"); this.txtReductPrice.Value = model.Reduction.ToString("0.00"); this.lblLeaveCityandTracffic.Text = tourModel.StartTraffic + " " + tourModel.StartCityName; //出发交通和城市 this.lbEndCityandTracffic.Text = tourModel.EndTraffic + " " + tourModel.EndCityName; //返程交通和城市 //this.lbPrice_d.Text = tourModel.AdultPrice.ToString("F0"); this.lbEnddate.Text = tourModel.EndDate; this.lbLeavedate.Text = tourModel.StartDate; this.lblOrder.Text = model.OrderNo; this.lblMsg.Text = tourModel.SetDec; this.lblAllMsg.Text = tourModel.TeamLeaderDec; this.txtContact.Value = model.VisitorContact; this.txtConTactTel.Value = model.VisitorTel; this.txtFzr.Value = model.TravelContact; this.txtFzrTel.Value = model.TravelTel; this.txtAdultCount.Value = model.AdultNum.ToString(); this.txtChildCount.Value = model.ChildrenNum.ToString(); this.txtOtherCount.Value = model.SingleRoomNum.ToString(); this.lblAddDate.Text = model.IssueTime.ToString("yyyy-MM-dd") + " " + model.OperatorName; this.txtRemark.Value = model.TravelNotes; this.lblCusRemark.Text = model.VisitorNotes; #region 团队 价格信息 //市场价 this.lblRetailAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.PersonalPrice); this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.ChildPrice); this.lblMarketPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.MarketPrice); //结算价 this.lblSettlementAudltPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementAudltPrice); this.lblSettlementChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementChildrenPrice); #endregion //处理总金额 //市场价总价 this.lblReailPriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSalePrice); //结算总价 this.lblSettlePriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSettlementPrice); this.OrderCustomer1.TourOrderCustomer = model.Customers; #region 处理订单状态和支付状态 this.pnlSave.Visible = false; this.pnlCanel.Visible = false; switch (model.OrderStatus) { case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理: this.lblOrderState.Text = "专线待处理"; this.pnlSave.Visible = true; this.pnlCanel.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留: this.lblOrderState.Text = "专线预留,留位日期:" + model.SaveDate == null ? "" : Convert.ToDateTime(model.SaveDate).ToString("yyyy-MM-dd"); this.pnlCanel.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.预留过期: this.lblOrderState.Text = "留位过期"; this.pnlCanel.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单: this.lblOrderState.Text = "已结单"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.取消: this.lblOrderState.Text = "已取消"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定: this.lblOrderState.Text = "专线已确定"; this.pnlCanel.Visible = true; break; } this.pnlLitPay.Visible = false; this.pnlAllPay.Visible = false; this.pnlTuiKuan.Visible = false; switch (model.PaymentStatus) { case EyouSoft.Model.NewTourStructure.PaymentStatus.游客待支付: case EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付: this.lblPayState.Text = "待支付"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付定金: this.lblPayState.Text = "已支付定金"; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付全款: this.lblPayState.Text = "已支付全款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付定金: this.lblPayState.Text = "专线已收定金"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付全款: this.lblPayState.Text = "专线已收全款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.结账: this.lblPayState.Text = "已付全款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.申请退款: this.lblPayState.Text = "申请退款"; this.pnlTuiKuan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.已退款: this.lblPayState.Text = "已退款"; break; } #endregion } }