/// <summary>
        /// 组合购提交页面
        /// </summary>
        /// <param name="skuIds">多个库存Id</param>
        /// <param name="counts">每个库存对应的数据量</param>
        /// <param name="regionId">客户收货地区的id</param>
        /// <param name="collpids">组合购Id集合</param>
        /// <returns>订单提交页面的数据</returns>
        public ActionResult SubmitByProductId(string skuIds, string counts, long?regionId, string collpids = null)
        {
            //Logo
            ViewBag.Logo = CurrentSiteSetting.Logo;//获取Logo
            //设置会员信息
            ViewBag.Member = CurrentUser;
            var result = OrderApplication.GetMobileCollocationBuy(UserId, skuIds, counts, regionId, collpids);

            ViewBag.collpids         = collpids;
            ViewBag.skuIds           = skuIds;
            ViewBag.counts           = counts;
            ViewBag.InvoiceContext   = result.InvoiceContext;
            ViewBag.IsCashOnDelivery = result.IsCashOnDelivery;
            ViewBag.address          = result.Address;
            ViewBag.ConfirmModel     = result;
            ViewBag.Islimit          = false;

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

            ViewBag.OrderTag    = orderTag;
            Session["OrderTag"] = orderTag;

            InitOrderSubmitModel(result);
            #region 是否开启门店授权
            ViewBag.IsOpenStore = SiteSettingApplication.GetSiteSettings() != null && SiteSettingApplication.GetSiteSettings().IsOpenStore;
            #endregion
            return(View("Submit"));
        }
Beispiel #2
0
        /// <summary>
        /// 组合购提交页面
        /// </summary>
        /// <param name="skuIds">多个库存Id</param>
        /// <param name="counts">每个库存对应的数据量</param>
        /// <param name="regionId">客户收货地区的id</param>
        /// <param name="collpids">组合购Id集合</param>
        /// <returns>订单提交页面的数据</returns>
        public ActionResult SubmitByProductId(string skuIds, string counts, long?regionId, string collpids = null, long shippingAddressId = 0, string couponIds = "")
        {
            var coupons = CouponApplication.ConvertUsedCoupon(couponIds);

            //Logo
            ViewBag.Logo = SiteSettings.Logo;//获取Logo
            //设置会员信息
            ViewBag.Member = CurrentUser;
            var result = OrderApplication.GetMobileCollocationBuy(UserId, skuIds, counts, regionId, collpids, shippingAddressId, coupons);

            ViewBag.collpids         = collpids;
            ViewBag.skuIds           = skuIds;
            ViewBag.counts           = counts;
            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;
            ViewBag.Islimit          = false;

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

            ViewBag.OrderTag    = orderTag;
            Session["OrderTag"] = orderTag;

            InitOrderSubmitModel(result);
            #region 是否开启门店授权
            ViewBag.IsOpenStore = SiteSettingApplication.SiteSettings != null && SiteSettingApplication.SiteSettings.IsOpenStore;
            #endregion

            #region TDO:ZYF 3.2注释是否提供发票
            //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;
            return(View("Submit"));
        }
Beispiel #3
0
        public ActionResult SubmitByProductId(string skuIds, string counts, long?regionId, string collpids = null)
        {
            ViewBag.Logo   = base.CurrentSiteSetting.Logo;
            ViewBag.Member = base.CurrentUser;
            MobileOrderDetailConfirmModel model = OrderApplication.GetMobileCollocationBuy(base.UserId, skuIds, counts, regionId, collpids);

            ViewBag.collpids         = collpids;
            ViewBag.skuIds           = skuIds;
            ViewBag.counts           = counts;
            ViewBag.InvoiceContext   = model.InvoiceContext;
            ViewBag.InvoiceTitle     = model.InvoiceTitle;
            ViewBag.IsCashOnDelivery = model.IsCashOnDelivery;
            ViewBag.address          = model.Address;
            ViewBag.ConfirmModel     = model;
            ViewBag.Islimit          = false;
            string str = Guid.NewGuid().ToString("N");

            ViewBag.OrderTag         = str;
            base.Session["OrderTag"] = str;
            this.InitOrderSubmitModel(model);
            ViewBag.IsOpenStore = (SiteSettingApplication.GetSiteSettings() != null) && SiteSettingApplication.GetSiteSettings().IsOpenStore;
            bool flag = false;

            if (model.products != null)
            {
                foreach (MobileShopCartItemModel model2 in model.products)
                {
                    if (model2.shopId > 0L)
                    {
                        ShopInfo shop = ShopApplication.GetShop(model2.shopId, false);
                        if (!(!shop.ProvideInvoice.HasValue ? true : !shop.ProvideInvoice.Value))
                        {
                            flag = true;
                        }
                    }
                }
            }
            ViewBag.ProvideInvoice = flag;
            return(base.View("Submit"));
        }