예제 #1
0
        /// <summary>
        /// 订单详细信息页面
        /// </summary>
        /// <param name="id">订单Id</param>
        public ActionResult Detail(long id)
        {
            OrderDetailView view = OrderApplication.Detail(id, UserId, PlatformType, Request.Url.Host);

            ViewBag.Detail          = view.Detail;
            ViewBag.Bonus           = view.Bonus;
            ViewBag.ShareHref       = view.ShareHref;
            ViewBag.IsRefundTimeOut = view.IsRefundTimeOut;
            ViewBag.Logo            = CurrentSiteSetting.Logo;
            view.Order.FightGroupOrderJoinStatus = view.FightGroupJoinStatus;
            view.Order.FightGroupCanRefund       = view.FightGroupCanRefund;

            var customerServices = CustomerServiceApplication.GetMobileCustomerService(view.Order.ShopId);
            var meiqia           = CustomerServiceApplication.GetPreSaleByShopId(view.Order.ShopId).FirstOrDefault(p => p.Tool == CustomerServiceInfo.ServiceTool.MeiQia);

            if (meiqia != null)
            {
                customerServices.Insert(0, meiqia);
            }
            ViewBag.CustomerServices = customerServices;
            #region 门店信息
            if (view.Order.ShopBranchId.HasValue && view.Order.ShopBranchId > 0)
            {
                ViewBag.ShopBranchInfo = ShopBranchApplication.GetShopBranchById(view.Order.ShopBranchId.Value);
            }
            #endregion
            return(View(view.Order));
        }
예제 #2
0
        public ActionResult Detail(long id)
        {
            long?           nullable;
            OrderDetailView view = OrderApplication.Detail(id, base.UserId, base.PlatformType, base.Request.Url.Host);

            ViewBag.Detail          = view.Detail;
            ViewBag.Bonus           = view.Bonus;
            ViewBag.ShareHref       = view.ShareHref;
            ViewBag.IsRefundTimeOut = view.IsRefundTimeOut;
            ViewBag.Logo            = base.CurrentSiteSetting.Logo;
            view.Order.FightGroupOrderJoinStatus = new FightGroupOrderJoinStatus?(view.FightGroupJoinStatus);
            view.Order.FightGroupCanRefund       = new bool?(view.FightGroupCanRefund);
            List <CustomerService> mobileCustomerService = CustomerServiceApplication.GetMobileCustomerService(view.Order.ShopId);
            CustomerService        item = CustomerServiceApplication.GetPreSaleByShopId(view.Order.ShopId).FirstOrDefault <CustomerService>(p => p.Tool == CustomerServiceInfo.ServiceTool.MeiQia);

            if (item != null)
            {
                mobileCustomerService.Insert(0, item);
            }
            ViewBag.CustomerServices = mobileCustomerService;
            if (view.Order.ShopBranchId.HasValue && (((nullable = view.Order.ShopBranchId).GetValueOrDefault() > 0L) && nullable.HasValue))
            {
                ViewBag.ShopBranchInfo = ShopBranchApplication.GetShopBranchById(view.Order.ShopBranchId.Value);
            }
            return(base.View(view.Order));
        }
예제 #3
0
        /// <summary>
        /// 订单详细信息页面
        /// </summary>
        /// <param name="id">订单Id</param>
        public ActionResult Detail(long id)
        {
            OrderDetailView view = OrderApplication.Detail(id, UserId, PlatformType, Request.Host.ToString());

            ViewBag.Detail          = view.Detail;
            ViewBag.Bonus           = view.Bonus;
            ViewBag.ShareHref       = view.ShareHref;
            ViewBag.IsRefundTimeOut = view.IsRefundTimeOut;
            ViewBag.Logo            = SiteSettings.Logo;
            view.Order.FightGroupOrderJoinStatus = view.FightGroupJoinStatus;
            view.Order.FightGroupCanRefund       = view.FightGroupCanRefund;

            var customerServices = CustomerServiceApplication.GetMobileCustomerServiceAndMQ(view.Order.ShopId);

            ViewBag.CustomerServices = customerServices;
            #region 门店信息
            if (view.Order.ShopBranchId > 0)
            {
                ViewBag.ShopBranchInfo = ShopBranchApplication.GetShopBranchById(view.Order.ShopBranchId);
            }
            #endregion
            return(View(view.Order));
        }
예제 #4
0
        /// <summary>
        /// 订单详细信息页面
        /// </summary>
        /// <param name="id">订单Id</param>
        public ActionResult Detail(long id)
        {
            OrderDetailView view = OrderApplication.Detail(id, UserId, PlatformType, Request.Url.Host);

            ViewBag.Detail          = view.Detail;
            ViewBag.Bonus           = view.Bonus;
            ViewBag.ShareHref       = view.ShareHref;
            ViewBag.IsRefundTimeOut = view.IsRefundTimeOut;
            ViewBag.Logo            = SiteSettings.Logo;
            view.Order.FightGroupOrderJoinStatus = view.FightGroupJoinStatus;
            view.Order.FightGroupCanRefund       = view.FightGroupCanRefund;

            var customerServices = CustomerServiceApplication.GetMobileCustomerServiceAndMQ(view.Order.ShopId);

            ViewBag.CustomerServices = customerServices;
            string shipperAddress = string.Empty, shipperTelPhone = string.Empty;

            #region 门店信息
            if (view.Order.ShopBranchId > 0)
            {
                var shopBranchInfo = ShopBranchApplication.GetShopBranchById(view.Order.ShopBranchId);
                ViewBag.ShopBranchInfo = shopBranchInfo;
                if (view.Order.OrderType == OrderInfo.OrderTypes.Virtual && shopBranchInfo != null)
                {
                    shipperAddress  = RegionApplication.GetFullName(shopBranchInfo.AddressId) + " " + shopBranchInfo.AddressDetail;
                    shipperTelPhone = shopBranchInfo.ContactPhone;
                }
            }
            else
            {
                if (view.Order.OrderType == OrderInfo.OrderTypes.Virtual)
                {
                    var verificationShipper = ShopShippersApplication.GetDefaultVerificationShipper(view.Order.ShopId);
                    if (verificationShipper != null)
                    {
                        shipperAddress  = RegionApplication.GetFullName(verificationShipper.RegionId) + " " + verificationShipper.Address;
                        shipperTelPhone = verificationShipper.TelPhone;
                    }
                }
            }
            #endregion
            ViewBag.isCanRefundOrder = OrderApplication.CanRefund(view.Order);
            #region 虚拟订单信息
            if (view.Order.OrderType == OrderInfo.OrderTypes.Virtual)
            {
                var orderItemInfo = view.Detail.OrderItems.FirstOrDefault();
                if (orderItemInfo != null)
                {
                    ViewBag.virtualProductInfo = ProductManagerApplication.GetVirtualProductInfoByProductId(orderItemInfo.ProductId);
                    var orderVerificationCodes = OrderApplication.GetOrderVerificationCodeInfosByOrderIds(new List <long>()
                    {
                        view.Order.Id
                    });
                    orderVerificationCodes.ForEach(a =>
                    {
                        a.QRCode = GetQRCode(a.VerificationCode);
                    });
                    ViewBag.orderVerificationCodes = orderVerificationCodes;
                    ViewBag.virtualOrderItemInfos  = OrderApplication.GetVirtualOrderItemInfosByOrderId(view.Order.Id);
                }
            }
            #endregion
            //发票信息
            ViewBag.OrderInvoiceInfo = OrderApplication.GetOrderInvoiceInfo(view.Order.Id);
            //统一显示支付方式名称
            view.Order.PaymentTypeName = PaymentApplication.GetPaymentTypeDescById(view.Order.PaymentTypeGateway) ?? view.Order.PaymentTypeName;
            ViewBag.ShipperAddress     = shipperAddress;
            ViewBag.ShipperTelPhone    = shipperTelPhone;
            return(View(view.Order));
        }