public ActionResult EditProfile4()
 {
     ViewBag.Step                 = 3;
     ViewBag.Frame                = "Step4";
     ViewBag.Manager              = CurrentUser;
     ViewBag.Username             = CurrentSellerManager.UserName;
     ViewBag.SellerAdminAgreement = ShopApplication.GetSellerAgreement();
     return(View("EditProfile"));
 }
Example #2
0
        public JsonResult UpdateCartItem(string skuId, int count)
        {
            long userId       = CurrentUser != null ? CurrentUser.Id : 0;
            var  orderService = _iOrderService;
            var  skuinfo      = orderService.GetSkuByID(skuId);
            var  product      = ProductManagerApplication.GetProduct(skuinfo.ProductId);

            if (product != null)
            {
                if (product.MaxBuyCount > 0 && count > product.MaxBuyCount && !product.IsOpenLadder)
                {
                    return(Json(new { success = false, msg = string.Format("每个ID限购{0}件", product.MaxBuyCount), stock = product.MaxBuyCount }));
                }
            }

            if (skuinfo.Stock < count)
            {
                return(Json(new { success = false, msg = "库存不足", stock = skuinfo.Stock }));
            }

            cartHelper.UpdateCartItem(skuId, count, userId);

            #region 购物车修改数量阶梯价变动--张宇枫
            //获取产品详情
            var price = 0m;
            if (product.IsOpenLadder)
            {
                var shop = ShopApplication.GetShop(product.ShopId);

                var groupCartByProduct = cartHelper.GetCart(userId).Items.Where(item => item.ShopBranchId == 0).Select(c =>
                {
                    var cItem   = new Himall.Entities.ShoppingCartItem();
                    var skuInfo = _iProductService.GetSku(c.SkuId);
                    if (skuInfo != null)
                    {
                        cItem = c;
                    }
                    return(cItem);
                }).GroupBy(i => i.ProductId).ToList();
                var quantity = groupCartByProduct.Where(i => i.Key == product.Id).ToList().Sum(cartitem => cartitem.Sum(i => i.Quantity));

                decimal discount = 1M;
                if (CurrentUser != null)
                {
                    discount = CurrentUser.MemberDiscount;
                }
                price = ProductManagerApplication.GetProductLadderPrice(product.Id, quantity);
                if (shop.IsSelf)
                {
                    price = price * discount;
                }
            }

            #endregion

            return(Json(new { success = true, saleprice = price.ToString("F2"), productid = product.Id, isOpenLadder = product.IsOpenLadder }));
        }
 public ActionResult EditProfile0()
 {
     ViewBag.Step                 = 0;
     ViewBag.MenuStep             = 0;
     ViewBag.Frame                = "Step0";
     ViewBag.Manager              = CurrentUser;
     ViewBag.SellerAdminAgreement = ShopApplication.GetSellerAgreement();
     return(View("EditProfile"));
 }
 public object PostUpdteAutoPrint(ShopBranch info)
 {
     ShopApplication.SetAutoPrint(CurrentUser.ShopId, info.IsAutoPrint);
     string userkey = WebHelper.GetFormString("userkey");
     var currentInfo = PrintHub.ConnectedUsers.FirstOrDefault(p => p.UserKey == userkey);
     if (currentInfo != null)
         currentInfo.IsAutoPrint = info.IsAutoPrint;
     return new { success = true };
 }
Example #5
0
        /// <summary>
        /// 门店设置
        /// </summary>
        /// <returns></returns>
        public ActionResult Setting()
        {
            var shopInfo = ShopApplication.GetShop(CurrentSellerManager.ShopId);

            if (shopInfo != null)
            {
                ViewBag.AutoAllotOrder = shopInfo.AutoAllotOrder;
            }
            return(View());
        }
        /// <summary>
        /// 提现申请页面初始
        /// </summary>
        /// <returns></returns>
        public ActionResult ApplyWithDraw()
        {
            Himall.Model.ShopInfo.ShopStage Stage = Himall.Model.ShopInfo.ShopStage.Agreement;
            var shop = ShopApplication.GetShopProfileStep2(CurrentSellerManager.ShopId, out Stage);

            Himall.DTO.MemberAccountSafety mMemberAccountSafety = MemberApplication.GetMemberAccountSafety(CurrentUser.Id);
            ViewBag.MemberEmail = mMemberAccountSafety.Email;
            ViewBag.MemberPhone = mMemberAccountSafety.Phone;
            return(View(shop));
        }
Example #7
0
        public ActionResult Setting()
        {
            Shop shop = ShopApplication.GetShop(base.CurrentSellerManager.ShopId, false);

            if (shop != null)
            {
                ((dynamic)base.ViewBag).AutoAllotOrder = shop.AutoAllotOrder;
            }
            return(base.View());
        }
Example #8
0
        public ActionResult Invoice()
        {
            var shopinvoice = ShopApplication.GetShopInvoiceConfig(CurrentSellerManager.ShopId);

            if (shopinvoice == null)
            {
                shopinvoice        = new ShopInvoiceConfigInfo();
                shopinvoice.ShopId = CurrentSellerManager.ShopId;
            }
            return(View(shopinvoice));
        }
Example #9
0
        public ActionResult FreightSetting()
        {
            ShopInfo shop      = ShopApplication.GetShop(CurrentSellerManager.ShopId);
            var      shopModel = new ShopFreightModel()
            {
                FreeFreight = shop.FreeFreight,
                Freight     = shop.Freight,
            };

            return(View(shopModel));
        }
Example #10
0
        public ActionResult EditProfile2()
        {
            ViewBag.MenuStep             = 2;
            ViewBag.Step                 = 1;
            ViewBag.Frame                = "Step2";
            ViewBag.Manager              = CurrentUser;
            ViewBag.SellerAdminAgreement = ShopApplication.GetSellerAgreement();
            var step2 = new ShopProfileStep2();

            return(View("EditProfile", step2));
        }
Example #11
0
 public JsonResult EditProfile4(string payOrderPhoto, string remark)
 {
     Mall.DTO.Shop shopInfo = ShopApplication.GetShop(CurrentSellerManager.ShopId);
     shopInfo.Id         = CurrentSellerManager.ShopId;
     shopInfo.PayPhoto   = payOrderPhoto;
     shopInfo.PayRemark  = remark;
     shopInfo.Stage      = Entities.ShopInfo.ShopStage.Finish;
     shopInfo.ShopStatus = Entities.ShopInfo.ShopAuditStatus.WaitConfirm;
     ShopApplication.UpdateShop(shopInfo);
     return(Json(new { success = true }));
 }
Example #12
0
        public JsonResult Coupon()
        {
            int  memberIntegral = 0; List <Coupon> baseCoupons = new List <Coupon>();
            long shopId = CurrentSellerManager != null ? CurrentSellerManager.ShopId : 0;

            if (CurrentUser != null)
            {
                memberIntegral = MemberIntegralApplication.GetMemberIntegral(CurrentUser.Id).AvailableIntegrals;

                //优惠卷
                var coupons = CouponApplication.GetAllUserCoupon(CurrentUser.Id).ToList();
                coupons = coupons == null ? new List <UserCouponInfo>() : coupons;
                if (coupons != null)
                {
                    baseCoupons.AddRange(coupons.Select(p => new Coupon()
                    {
                        BasePrice    = p.Price,
                        BaseShopId   = p.ShopId,
                        BaseShopName = p.ShopName,
                        BaseType     = p.BaseType,
                        OrderAmount  = p.OrderAmount
                    }));
                }

                //红包
                var shopBonus = ShopBonusApplication.GetCanUseDetailByUserId(CurrentUser.Id);
                shopBonus = shopBonus == null ? new List <ShopBonusReceiveInfo>() : shopBonus;
                if (shopBonus != null)
                {
                    baseCoupons.AddRange(shopBonus.Select(p => {
                        var grant = _iShopBonusService.GetGrant(p.BonusGrantId);
                        var bonus = _iShopBonusService.GetShopBonus(grant.ShopBonusId);
                        var shop  = ShopApplication.GetShop(bonus.ShopId);

                        return(new Coupon()
                        {
                            BasePrice = p.Price,
                            BaseShopId = shop.Id,
                            BaseShopName = shop.ShopName,
                            BaseType = p.BaseType,
                            UseState = bonus.UseState,
                            UsrStatePrice = bonus.UsrStatePrice
                        });
                    }));
                }
            }
            return(Json(new
            {
                memberIntegral = memberIntegral,
                baseCoupons = baseCoupons,
                shopId = shopId
            }, true));
        }
Example #13
0
        public JsonResult EditProfile3(string shopProfileStep3)
        {
            ShopProfileStep3 model = Newtonsoft.Json.JsonConvert.DeserializeObject <ShopProfileStep3>(shopProfileStep3);
            int result             = ShopApplication.UpdateShop(model, CurrentSellerManager.ShopId);

            if (result.Equals(-1))
            {
                var msg = string.Format("{0} 诊所名称已经存在", model.ShopName);
                return(Json(new { success = false, msg = msg }));
            }
            return(Json(new { success = true }));
        }
Example #14
0
        public ActionResult Step0()
        {
            if (CurrentSellerManager != null)
            {
                var shop = ShopApplication.GetShop(CurrentSellerManager.ShopId);
                ViewBag.ShopType = shop.BusinessType.HasValue ? (int)shop.BusinessType.Value : 99;
            }
            ViewBag.SellerAdminAgreement = ShopApplication.GetSellerAgreement();
            var model = ShopApplication.GetSettled();

            return(View(model));
        }
Example #15
0
        public JsonResult EditProfiles1(ShopProfileSteps1 shopProfileStep1)
        {
            //公司信息
            Cache.Remove(CacheKeyCollection.CACHE_SHOP(CurrentSellerManager.ShopId, false));
            Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(CurrentSellerManager.ShopId, false));
            Himall.DTO.Shop shopInfo = ShopApplication.GetShop(CurrentSellerManager.ShopId);
            shopInfo.Id                   = CurrentSellerManager.ShopId;
            shopInfo.CompanyName          = shopProfileStep1.CompanyName;
            shopInfo.CompanyAddress       = shopProfileStep1.Address;
            shopInfo.CompanyRegionId      = shopProfileStep1.CityRegionId;
            shopInfo.CompanyRegionAddress = shopProfileStep1.Address;
            shopInfo.Stage                = ShopInfo.ShopStage.FinancialInfo;
            shopInfo.BusinessLicenseCert  = Request.Form["BusinessLicenseCert"];
            shopInfo.ProductCert          = Request.Form["ProductCert"];
            shopInfo.OtherCert            = Request.Form["OtherCert"];
            shopInfo.IDCard               = shopProfileStep1.IDCard;
            shopInfo.IDCardUrl            = shopProfileStep1.IDCardUrl;
            shopInfo.IDCardUrl2           = shopProfileStep1.IDCardUrl2;
            ShopApplication.UpdateShop(shopInfo);

            long uid = ShopApplication.GetShopManagers(CurrentSellerManager.ShopId);
            //管理员信息
            var model = MemberApplication.GetMemberAccountSafety(uid);

            if (shopProfileStep1.MemberPhone.Equals(""))
            {
                return(Json(new { success = false, msg = "必须认证手机!" }));
            }

            //修改真实姓名
            var member = MemberApplication.GetMembers(uid);

            member.RealName = shopProfileStep1.RealName;
            MemberApplication.UpdateMember(member);

            if (shopProfileStep1.MemberPhone != null && !shopProfileStep1.MemberPhone.Equals(model.Phone))
            {
                string pluginId = "Himall.Plugin.Message.SMS";
                int    result   = MemberApplication.CheckMemberCode(pluginId, shopProfileStep1.PhoneCode, shopProfileStep1.MemberPhone, uid);
                string strMsg   = "";
                switch (result)
                {
                case 0: strMsg = "手机验证码错误!"; break;

                case -1: strMsg = "此手机号已绑定!"; break;
                }
                if (!strMsg.Equals(""))
                {
                    return(Json(new { success = false, msg = strMsg }));
                }
            }
            return(Json(new { success = true, msg = "成功!" }));
        }
Example #16
0
        /// <summary>
        /// 诊所信息
        /// </summary>
        /// <param name="ids">经营类目ID集</param>
        /// <returns></returns>
        public ActionResult Step5(string ids)
        {
            Cache.Remove(CacheKeyCollection.CACHE_SHOP(CurrentSellerManager.ShopId, true));
            Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(CurrentSellerManager.ShopId, true));
            var shop = ShopApplication.GetShop(CurrentSellerManager.ShopId, true);

            if (shop.Stage == ShopInfo.ShopStage.CompanyInfo)
            {
                return(RedirectToAction("step3"));
            }
            if (shop.Stage == ShopInfo.ShopStage.FinancialInfo)
            {
                return(RedirectToAction("step4"));
            }

            var step3 = new ShopProfileStep3();

            step3.ShopName  = shop.ShopName;
            step3.ShopGrade = shop.GradeId;
            var gradeInfo = ShopApplication.GetShopGrade(shop.GradeId);

            ViewBag.GradeName            = gradeInfo != null ? gradeInfo.Name : "未选择";//获取等级名称
            ViewBag.ShopBusinessCategory = "未选择";
            ViewBag.BusinessCategoryIds  = string.Empty;
            if (!string.IsNullOrWhiteSpace(ids))
            {
                var idArr = ids.Split(',');
                if (idArr.Length > 0)
                {
                    List <long> idList         = idArr.Select(p => long.Parse(p)).ToList();
                    var         categoriesList = _iCategoryService.GetCategories().Where(p => idList.Contains(p.Id));
                    if (categoriesList.Count() == idArr.Length)
                    {
                        string businessCategory = string.Join("、", categoriesList.Select(x => x.Name).ToArray());
                        ViewBag.ShopBusinessCategory = businessCategory.Length > 0 ? businessCategory : "未选择";
                        ViewBag.BusinessCategoryIds  = ids;
                    }
                }
            }
            else
            {
                var businessCategoryInfo = ShopApplication.GetBusinessCategory(CurrentSellerManager.ShopId);
                if (businessCategoryInfo != null && businessCategoryInfo.Count > 0)
                {
                    List <long> categoryIds = businessCategoryInfo.Select(p => p.CategoryId).ToList();
                    ViewBag.BusinessCategoryIds = string.Join(",", categoryIds.ToArray());
                    string businessCategory = string.Join("、", _iCategoryService.GetCategories().Where(p => categoryIds.Contains(p.Id)).Select(x => x.Name).ToArray());
                    ViewBag.ShopBusinessCategory = businessCategory.Length > 0 ? businessCategory : "未选择";
                }
            }

            return(View(step3));
        }
Example #17
0
        public JsonResult SendCode(string pluginId, string destination)
        {
            long uid    = ShopApplication.GetShopManagers(CurrentSellerManager.ShopId);
            var  member = MemberApplication.GetMembers(uid);
            var  status = MemberApplication.SendMemberCode(pluginId, destination, member.UserName, SiteSettings.SiteName);
            bool result = status == SendMemberCodeReturn.success;

            return(Json(new Result()
            {
                success = result, msg = status.ToDescription()
            }));
        }
Example #18
0
        public ActionResult Step6()
        {
            Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(CurrentSellerManager.ShopId, true));
            var shop = ShopApplication.GetShop(CurrentSellerManager.ShopId, true);

            if (shop.ShopStatus == ShopInfo.ShopAuditStatus.Refuse)
            {
                ViewBag.SellerAdminAgreement = ShopApplication.GetSellerAgreement();
                var model = ShopApplication.GetSettled();
                return(View("step1", model));
            }
            return(View());
        }
Example #19
0
        public JsonResult PendingSettlementList(StatisticsPendingSettlementQuery query)
        {
            var result = BillingApplication.StatisticsPendingSettlementOrders(query);

            if (result.Models != null)
            {
                foreach (var item in result.Models)
                {
                    item.ShopName = ShopApplication.GetShop(item.ShopId) == null ? item.ShopName : ShopApplication.GetShop(item.ShopId).ShopName;
                }
            }
            return(Json(new { rows = result.Models, result.Total }, true));
        }
 public object GetShopPrintInfo()
 {
     var shopInfo = ShopApplication.GetShop(CurrentUser.ShopId);
     if (shopInfo != null)
     {
         return new
         {
             PrintCount = shopInfo.PrintCount,
             IsAutoPrint = shopInfo.IsAutoPrint
         };
     }
     return null;
 }
Example #21
0
        public ActionResult Step6()
        {
            ShopApplication.ClearCacheShop(CurrentSellerManager.ShopId);
            var shop = ShopApplication.GetShop(CurrentSellerManager.ShopId, true);

            if (shop.ShopStatus == Entities.ShopInfo.ShopAuditStatus.Refuse)
            {
                ViewBag.SellerAdminAgreement = ShopApplication.GetSellerAgreement();
                var model = ShopApplication.GetSettled();
                return(View("step1", model));
            }
            return(View());
        }
        public object GetSKUInfo(long productId, long colloPid = 0)
        {
            var product = ServiceProvider.Instance <IProductService> .Create.GetProduct(productId);

            var limitBuy = ServiceProvider.Instance <ILimitTimeBuyService> .Create.GetLimitTimeMarketItemByProductId(productId);

            List <Himall.Model.CollocationSkuInfo> collProduct = null;

            if (colloPid != 0)
            {
                collProduct = ServiceProvider.Instance <ICollocationService> .Create.GetProductColloSKU(productId, colloPid);
            }
            decimal discount = 1M;

            if (CurrentUser != null)
            {
                discount = CurrentUser.MemberDiscount;
            }
            var shopInfo = ShopApplication.GetShop(product.ShopId);

            var skuArray = new List <ProductSKUModel>();

            foreach (var sku in product.SKUInfo.Where(s => s.Stock > 0))
            {
                var             price   = sku.SalePrice * discount;
                ProductSKUModel skuMode = new ProductSKUModel
                {
                    Price = shopInfo.IsSelf ? price : sku.SalePrice,
                    SkuId = sku.Id,
                    Stock = (int)sku.Stock
                };

                if (limitBuy != null)
                {
                    var limitSku = ServiceProvider.Instance <ILimitTimeBuyService> .Create.Get(limitBuy.Id);

                    var limitSkuItem = limitSku.Details.Where(r => r.SkuId.Equals(sku.Id)).FirstOrDefault();
                    if (limitSkuItem != null)
                    {
                        skuMode.Price = limitSkuItem.Price;
                    }
                }
                skuArray.Add(skuMode);
            }
            //foreach (var item in skuArray)
            //{
            //    var str = item.SkuId.Split('_');
            //    item.SkuId = string.Format("{0};{1};{2}", str[1], str[2], str[3]);
            //}
            return(Json(new { Success = "true", SkuArray = skuArray }));
        }
Example #23
0
        public JsonResult List(long?shopGradeId, int?shopStatus, int page, int rows, string shopName, string shopAccount, string type = "")
        {
            var queryModel = new ShopQuery()
            {
                Status      = (Himall.Model.ShopInfo.ShopAuditStatus?)shopStatus,
                PageSize    = rows,
                PageNo      = page,
                ShopAccount = shopAccount,
                ShopName    = shopName,
                ShopGradeId = shopGradeId
            };

            if (type == "Auditing")
            {
                if (shopStatus == null)
                {
                    queryModel.Status = Himall.Model.ShopInfo.ShopAuditStatus.WaitAudit;
                    queryModel.MoreStatus.Add(Himall.Model.ShopInfo.ShopAuditStatus.WaitConfirm);
                }
            }

            var shops        = ShopApplication.GetShops(queryModel);
            var shopGrades   = ShopApplication.GetShopGrades();
            var shopAccounts = ShopApplication.GetShopAccounts(shops.Models.Select(p => p.Id));

            var models = shops.Models.Select(item =>
            {
                var shopGrade        = shopGrades.FirstOrDefault(p => p.Id == item.GradeId);
                var shopAccountModel = shopAccounts.FirstOrDefault(p => p.ShopId == item.Id);

                return(new ShopModel()
                {
                    Id = item.Id,
                    Account = item.ShopAccount,
                    EndDate = type == "Auditing" ? "--" : item.EndDate.HasValue ? item.EndDate.Value.ToString("yyyy-MM-dd") : "",
                    Name = item.ShopName,
                    ShopGrade = shopGrade != null ? shopGrade.Name : "",
                    Status = item.EndDate < DateTime.Now ? "已过期" : item.ShowShopAuditStatus.ToDescription(),
                    IsSelf = item.IsSelf,
                    BusinessType = item.BusinessType == null ? Himall.CommonModel.ShopBusinessType.Enterprise : item.BusinessType.Value,
                    Balance = shopAccountModel != null ? shopAccountModel.Balance : 0
                });
            });

            var dataGrid = new DataGridModel <ShopModel>()
            {
                rows = models, total = shops.Total
            };

            return(Json(dataGrid));
        }
Example #24
0
        bool CheckShopIsExpired(ActionExecutingContext filterContext)
        {
            var flag = true;

            if (ShopApplication.IsExpiredShop(CurrentSellerManager.ShopId))
            {
                string controllerName = filterContext.RouteData.Values["controller"].ToString().ToLower();
                string actionName     = filterContext.RouteData.Values["action"].ToString().ToLower();
                // string areaName = filterContext.RouteData.DataTokens["area"].ToString().ToLower();
                object area     = null;
                string areaName = "";
                if (filterContext.RouteData.Values.TryGetValue("area", out area))
                {
                    areaName = area.ToString().ToLower();
                }



                if ((controllerName == "shop" || controllerName == "accountsettings") && areaName == "selleradmin")
                {
                    return(true);//店铺和申请调用控制器返回验证通过
                }
                var result = new ViewResult()
                {
                    ViewName = "IsExpired"
                };
                // result.TempData.Add("Message", "你的店铺已过期;");
                // result.TempData.Add("Title", "你的店铺已过期!");
                TempData["Message"]  = "你的店铺已过期;";
                TempData["Title"]    = "你的店铺已过期!";
                filterContext.Result = result;
                flag = false;
            }
            if (ShopApplication.IsFreezeShop(CurrentSellerManager.ShopId))
            {
                var result = new ViewResult()
                {
                    ViewName = "IsFreeze"
                };
                // result.TempData.Add("Message", "抱歉,你的店铺已冻结,请与平台管理员联系…");
                // result.TempData.Add("Title", "你的店铺已冻结!");
                TempData["Message"] = "抱歉,你的店铺已冻结,请与平台管理员联系…";
                TempData["Title"]   = "你的店铺已冻结!";


                filterContext.Result = result;
                flag = false;
            }
            return(flag);
        }
Example #25
0
        public ActionResult SendPhoneCode(string pluginId, string destination)
        {
            long uid   = ShopApplication.GetShopManagers(CurrentSellerManager.ShopId);
            var  model = MemberApplication.GetMembers(uid);

            Himall.CommonModel.SendMemberCodeReturn status = MemberApplication.SendMemberCode(pluginId, destination, model.UserName, SiteSettings.SiteName);

            bool bo = status.Equals(Himall.CommonModel.SendMemberCodeReturn.success);

            return(Json(new Result()
            {
                success = bo, msg = status.ToDescription()
            }));
        }
Example #26
0
        /// <summary>
        /// 获取店铺信息
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        private DTO.Shop GetShopByShopId(long shopId)
        {
            string cachekey = CACHE_KEY_PREFIX + shopId;
            var result = Cache.Get<DTO.Shop>(cachekey);
            if (result == null)
            {
				if (shopId != 0)
				{
					result = ShopApplication.GetShop(shopId);
					Cache.Insert<DTO.Shop>(cachekey, result);
				}
            }
            return result;
        }
Example #27
0
        public ActionResult Step5()
        {
            ViewBag.Text = "付款凭证已经提交,请等待管理员核对后为您开通店铺";
            var shop = ShopApplication.GetShop(CurrentSellerManager.ShopId);

            if (shop.ShopStatus == Entities.ShopInfo.ShopAuditStatus.WaitConfirm)
            {
                return(View("step4"));
            }
            else
            {
                return(RedirectToAction("Finish"));
            }
        }
Example #28
0
        public ActionResult Management()
        {
            var model = _iCashDepositsService.GetCashDepositByShopId(CurrentSellerManager.ShopId);

            ViewBag.NeedPayCashDeposit = _iCashDepositsService.GetNeedPayCashDepositByShopId(CurrentSellerManager.ShopId);
            var shopAccount = ShopApplication.GetShopAccount(CurrentSellerManager.ShopId);

            ViewBag.ShopAccountAmount = shopAccount.Balance.ToString("F2");
            if (ViewBag.NeedPayCashDeposit == -1)
            {
                return(View("UnSet"));
            }
            return(View(model));
        }
Example #29
0
        /// <summary>
        /// 进入购物车提交页面
        /// </summary>
        /// <param name="cartItemIds">购物车物品id集合</param>
        public ActionResult SubmiteByCart(string cartItemIds, long shippingAddressId = 0, string couponIds = "")
        {
            var coupons = CouponApplication.ConvertUsedCoupon(couponIds);
            var result  = OrderApplication.GetMobileSubmiteByCart(UserId, cartItemIds, shippingAddressId, coupons);

            ViewBag.InvoiceContext   = result.InvoiceContext;
            ViewBag.InvoiceTitle     = result.InvoiceTitle;
            ViewBag.IsCashOnDelivery = result.IsCashOnDelivery;
            ViewBag.address          = null == result.Address || result.Address.NeedUpdate ? null : result.Address;
            ViewBag.ConfirmModel     = result;
            if (result.products.Count == 0)
            {
                return(Redirect("/" + ViewBag.AreaName));
            }

            if (result.shopBranchInfo == null)
            {
                throw new MallException("获取门店信息失败,不可提交非门店商品");
            }


            var orderTag = Guid.NewGuid().ToString("N");

            ViewBag.OrderTag = orderTag;
            HttpContext.Session.Set <string>("OrderTag", orderTag);

            InitOrderSubmitModel(result);
            #region 是否开启门店授权
            ViewBag.IsOpenStore = SiteSettingApplication.SiteSettings != null && SiteSettingApplication.SiteSettings.IsOpenStore;
            #endregion
            #region 是否提供发票
            bool ProvideInvoice = false;
            if (result.products != null)
            {
                ProvideInvoice = ShopApplication.HasProvideInvoice(result.products.Select(p => p.shopId).ToList());
            }
            ViewBag.ProvideInvoice = ProvideInvoice;
            #endregion

            bool canIntegralPerMoney = true, canCapital = true;
            CanDeductible(out canIntegralPerMoney, out canCapital);
            ViewBag.CanIntegralPerMoney = canIntegralPerMoney;
            ViewBag.CanCapital          = canCapital;
            ViewBag.productType         = 0;
            ViewBag.ShipperAddress      = "";
            ViewBag.ShipperTelPhone     = "";

            return(View("submit"));
        }
        /// <summary>
        /// 页面加载时处理
        /// </summary>
        /// <param name="filterContext"></param>
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            base.OnActionExecuting(filterContext);
            ViewBag.Logo = SiteSettings.MemberLogo;
            string controllerName = filterContext.RouteData.Values["controller"].ToString().ToLower();
            string actionName     = filterContext.RouteData.Values["action"].ToString().ToLower();
            // string areaName = filterContext.RouteData.DataTokens["area"].ToString().ToLower();


            object area     = null;
            string areaName = "";

            if (filterContext.RouteData.Values.TryGetValue("area", out area))
            {
                areaName = area.ToString().ToLower();
            }



            if (CurrentSellerManager == null && CurrentUser == null)
            {
                var result = RedirectToAction("Entrance", "Login", new { returnUrl = filterContext.HttpContext.Request.GetDisplayUrl() });
                filterContext.Result = result;
                return;
            }
            if (CurrentSellerManager == null && actionName.IndexOf("step") != 0 && filterContext.HttpContext.Request.Method.ToUpper() != "POST")
            {
                if (actionName != ("step1").ToLower())
                {
                    var result = RedirectToAction("step1", "shopregister", new { area = "Mobile" });
                    filterContext.Result = result;
                    return;
                }
            }
            else if (CurrentSellerManager != null)
            {
                var shop  = ShopApplication.GetShop(CurrentSellerManager.ShopId);
                int stage = (int)shop.Stage;
                if (shop.Stage == Entities.ShopInfo.ShopStage.Finish && shop.ShopStatus == Entities.ShopInfo.ShopAuditStatus.Open || shop.ShopStatus == Entities.ShopInfo.ShopAuditStatus.WaitAudit)//完成且审核通过,跳首页
                {
                    if (actionName != ("step1").ToLower() && actionName != ("step6").ToLower())
                    {
                        var result = RedirectToAction("step1", "shopregister", new { area = "Mobile" });
                        filterContext.Result = result;
                        return;
                    }
                }
            }
        }