private void ClearRmaData()
 {
     if (RmaDetailList != null)
     {
         RmaDetailList.Clear();
     }
     if (RMADtoList != null)
     {
         RMADtoList.Clear();
     }
 }
        private async void SetAgreeReturnGoods()
        {
            if (RMADtoList == null)
            {
                await MvvmUtility.ShowMessageAsync("请选择退货单", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);

                return;
            }
            List <RMADto> rmaSelectedList = RMADtoList.Where(e => e.IsSelected).ToList();
            bool          flag            = AppEx.Container.GetInstance <ICustomerGoodsReturnQueryService>().AgreeReturnGoods(rmaSelectedList.Select(e => e.RMANo).ToList());
            await MvvmUtility.ShowMessageAsync(flag? "客服同意退货成功" : "客服同意退货失败", "提示", MessageBoxButton.OK, flag?MessageBoxImage.Information : MessageBoxImage.Error);

            if (flag)
            {
                SearchRmaDtoListInfo();
            }
        }
        public virtual async void SetCustomerMoneyGoods()
        {
            if (RMADtoList == null)
            {
                await MvvmUtility.ShowMessageAsync("请选择退货单", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);

                return;
            }

            List <RMADto> rmaSelectedList = RMADtoList.Where(e => e.IsSelected).ToList();

            if (rmaSelectedList.Count == 0)
            {
                await MvvmUtility.ShowMessageAsync("请选择退货单", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);

                return;
            }
            bool flag = false;

            try
            {
                flag =
                    AppEx.Container.GetInstance <ICustomerInquiryService>()
                    .SetCustomerMoneyGoods(rmaSelectedList.Select(e => e.RMANo).ToList());
            }
            catch (Exception Ex)
            {
                flag = false;
            }
            await MvvmUtility.ShowMessageAsync(flag? "设置赔偿金额复审成功" : "设置赔偿金额复审失败", "提示", MessageBoxButton.OK, flag?MessageBoxImage.Information : MessageBoxImage.Error);

            if (flag)
            {
                SearchRmaDtoListInfo();
            }
        }
        public virtual void SearchRmaDtoListInfo()
        {
            if (RmaDetailList != null)
            {
                RmaDetailList.Clear();
            }
            if (OrderDto == null)
            {
                if (RmaDetailList != null)
                {
                    RmaDetailList.Clear();
                }
                return;
            }
            RMADtoList = AppEx.Container.GetInstance <ICustomerGoodsReturnQueryService>().GetRmaByOrderNo(OrderDto.OrderNo).ToList();
            if (RMADtoList == null || RMADtoList.Count == 0)
            {
                MvvmUtility.WarnIfEmpty(RMADtoList, "退货单");
                return;
            }

            RmaDetailList = AppEx.Container.GetInstance <ICustomerGoodsReturnQueryService>().GetRmaDetailByRmaNo(RMADtoList.First().RMANo).ToList();
        }
示例#5
0
 private void ClearData()
 {
     RMADtoList.Clear();
     OrderList.Clear();
 }