public ActionResult RefundDetail(long id) { var refundinfo = _iRefundService.GetOrderRefund(id, CurrentUser.Id); ViewBag.RefundPayType = refundinfo.RefundPayType.ToDescription(); refundinfo.IsOrderRefundTimeOut = _iOrderService.IsRefundTimeOut(refundinfo.OrderId); var order = _iOrderService.GetOrder(refundinfo.OrderId, CurrentUser.Id); string status = refundinfo.RefundStatus; if (order.DeliveryType == DeliveryType.SelfTake || order.ShopBranchId > 0) { status = refundinfo.RefundStatus.Replace("商家", "门店"); } var shopBranch = ShopBranchApplication.GetShopBranchById(order.ShopBranchId); var branchName = shopBranch == null ? "" : shopBranch.ShopBranchName; ViewBag.OrderInfo = order; ViewBag.ShopBranchId = order.ShopBranchId; ViewBag.ShopBranchName = branchName; ViewBag.RefundStatus = status; if (order.OrderType == OrderInfo.OrderTypes.Virtual) { var list = refundinfo.VerificationCodeIds.Split(',').ToList(); if (list.Count > 0) { list = list.Select(a => a = Regex.Replace(a, @"(\d{4})", "$1 ")).ToList(); ViewBag.VerificationCodeIds = list; } } return(View(refundinfo)); }
public ActionResult RefundDetail(long id) { var refundinfo = _iRefundService.GetOrderRefund(id, CurrentUser.Id); ViewBag.RefundPayType = refundinfo.RefundPayType.ToDescription(); refundinfo.IsOrderRefundTimeOut = _iOrderService.IsRefundTimeOut(refundinfo.OrderId); var order = _iOrderService.GetOrder(refundinfo.OrderId, CurrentUser.Id); string status = refundinfo.RefundStatus; if (order.DeliveryType == CommonModel.Enum.DeliveryType.SelfTake || (order.ShopBranchId.HasValue && order.ShopBranchId.Value > 0)) { status = refundinfo.RefundStatus.Replace("诊所", "门店"); } ViewBag.RefundStatus = status; return(View(refundinfo)); }
public ActionResult Detail(long id) { var refund = _iRefundService.GetOrderRefund(id, CurrentUser.Id); if (refund == null) { refund = _iRefundService.GetOrderRefundById(id); if (refund == null) { throw new MallException("错误的退款服务号"); } } ViewBag.UserName = CurrentUser.UserName; int curappnum = refund.ApplyNumber; refund.IsOrderRefundTimeOut = _iOrderService.IsRefundTimeOut(refund.OrderId); var order = OrderApplication.GetOrder(refund.OrderId); var refundLogs = RefundApplication.GetRefundLogs(refund.Id, curappnum, true); if (order.DeliveryType == DeliveryType.SelfTake || order.ShopBranchId > 0) { foreach (var item in refundLogs) { var temp = item.OperateContent.Split('】'); item.OperateContent = temp[0].Replace("商家", "门店") + '】' + temp[1]; } } ViewBag.Order = order; ViewBag.RefundLogs = refundLogs; ViewBag.Keyword = string.IsNullOrWhiteSpace(SiteSettings.SearchKeyword) ? SiteSettings.Keyword : SiteSettings.SearchKeyword; ViewBag.Keywords = SiteSettings.HotKeyWords; return(View(refund)); }
public ActionResult Detail(long id) { var refund = _iRefundService.GetOrderRefund(id, CurrentUser.Id); if (refund == null) { throw new HimallException("错误的退款服务号"); } ViewBag.UserName = CurrentUser.UserName; int curappnum = refund.ApplyNumber.HasValue ? refund.ApplyNumber.Value : 1; refund.IsOrderRefundTimeOut = _iOrderService.IsRefundTimeOut(refund.OrderId); var order = OrderApplication.GetOrder(refund.OrderId); refund.Order = order; var refundLogs = RefundApplication.GetRefundLogs(refund.Id, curappnum, false); if (order.DeliveryType == Himall.CommonModel.Enum.DeliveryType.SelfTake || (order.ShopBranchId.HasValue && order.ShopBranchId.Value > 0)) { foreach (var item in refundLogs) { var temp = item.OperateContent.Split('】'); item.OperateContent = temp[0].Replace("诊所", "门店") + '】' + temp[1]; } } ViewBag.RefundLogs = refundLogs; return(View(refund)); }
/// <summary> /// 获取一条退货记录 /// </summary> /// <param name="id"></param> public static OrderRefund GetOrderRefund(long id, long?userId = null, long?shopId = null) { var result = _iRefundService.GetOrderRefund(id, userId).Map <DTO.OrderRefund>(); return(result); }