Пример #1
0
        public ActionResult Complain(string orderId, string sku)
        {
            if (string.IsNullOrEmpty(orderId) || string.IsNullOrEmpty(sku))
            {
                return(Redirect("/home/error"));
            }
            var orderInfo = myOrderBll.GetMyOrderInfo(LoginUser.UserID, base.DeliveryRegion, base.language, orderId);

            if (orderInfo == null)
            {
                return(Redirect("/home/error"));
            }
            if (orderInfo.OrderStatus != 3)
            {
                return(Redirect("/home/error"));
            }
            //if (!refundBll.IsCanRefund(orderInfo.OrderCode, sku))
            //{
            //    return Json(new { Type = 1, Content = "该商品已全部申诉,不能再进行申诉", LinkUrl = "/Refund/Refund" });

            //}
            //判断订单是否用了优惠券
            ViewBag.isUsedGiftCard = 0;
            if (orderInfo.Coupon > 0)
            {
                ViewBag.isUsedGiftCard = 1;
            }
            ViewBag.OrderCode = orderId;
            ViewBag.Sku       = sku;
            ViewBag.IsReturn  = orderInfo.SkuInfos.FirstOrDefault(x => x.Sku == sku).IsReturn;
            return(View());
        }
Пример #2
0
        // 拆单 页面
        public ActionResult split(string orderCode)
        {
            try
            {
                MyBll Bll = new MyBll();
                List <MyOrderInfoDto>        myOrderInfoDtoList = new List <MyOrderInfoDto>();
                IList <MyOrderSkuInfoEntity> orderCodeList      = Bll.GetMyOrderInfoByParentOrderCode(orderCode);
                foreach (MyOrderSkuInfoEntity i in orderCodeList)
                {
                    if (string.IsNullOrEmpty(i.OrderCode))
                    {
                        return(this.HandleError("订单编号不能为空!"));
                    }

                    var model = Bll.GetMyOrderInfo(base.LoginUser.UserID, base.DeliveryRegion, base.language, i.OrderCode);
                    myOrderInfoDtoList.Add(model);
                    if (model.SkuInfos.Sum(s => s.RefundQuantity) > 0)
                    {
                        ViewBag.RefundStatus = true;
                    }
                }

                return(View(myOrderInfoDtoList));
            }
            catch (Exception ex)
            {
                return(this.HandleError(ex));
            }
        }
Пример #3
0
        /// <summary>
        /// 查看订单详情
        /// </summary>
        /// <param name="orderCode"></param>
        /// <returns></returns>
        public ActionResult Detail(string orderCode)
        {
            try
            {
                ViewBag.RefundStatus = false;

                if (string.IsNullOrEmpty(orderCode))
                {
                    return(this.HandleError("订单编号不能为空!"));
                }

                var model = Bll.GetMyOrderInfo(base.LoginUser.UserID, base.DeliveryRegion, base.language, orderCode);
                //检查是否有退款单
                //var modelRefund = Bll.GetMyOrderInfoAndRefund(orderCode);


                //检查退款单
                //foreach (RefundInfoModel refundInfoModel in modelRefund)
                //{
                //    if (refundInfoModel.RefundStatus != 6 && refundInfoModel.RefundStatus != 5 && refundInfoModel.RefundStatus != 4)
                //    {
                //        ViewBag.RefundStatus = true;
                //        break;
                //    }
                //}
                //检查用户是否上传了身份证图片
                //if (model.OrderStatus == OrderStatusEnum.Shipped.ToInt())
                //{
                //    ViewBag.IdentityStatus = accountBll.CheckUserIndentity(model.Receiver, model.Phone);
                //}
                return(View(model));
            }
            catch (Exception ex)
            {
                return(this.HandleError(ex));
            }
        }