diff --git a/BBWY.Client/Models/APIModel/Response/Order/OrderResponse.cs b/BBWY.Client/Models/APIModel/Response/Order/OrderResponse.cs index a8829c46..e10499ea 100644 --- a/BBWY.Client/Models/APIModel/Response/Order/OrderResponse.cs +++ b/BBWY.Client/Models/APIModel/Response/Order/OrderResponse.cs @@ -171,6 +171,11 @@ namespace BBWY.Client.Models /// public IList OrderDropShippingList { get; set; } + /// + /// 历史代发信息 + /// + public IList HistoryOrderDropShippingList { get; set; } + /// /// 售后信息 /// diff --git a/BBWY.Client/Models/Order/Order.cs b/BBWY.Client/Models/Order/Order.cs index c1b419d7..d1a22b7e 100644 --- a/BBWY.Client/Models/Order/Order.cs +++ b/BBWY.Client/Models/Order/Order.cs @@ -197,6 +197,11 @@ namespace BBWY.Client.Models /// public IList OrderDropShippingList { get; set; } + /// + /// 历史代发信息 + /// + public IList HistoryOrderDropShippingList { get; set; } + /// /// 售后信息 /// diff --git a/BBWY.Client/ViewModels/Order/OrderListViewModel.cs b/BBWY.Client/ViewModels/Order/OrderListViewModel.cs index 5fd4034f..98d4ed54 100644 --- a/BBWY.Client/ViewModels/Order/OrderListViewModel.cs +++ b/BBWY.Client/ViewModels/Order/OrderListViewModel.cs @@ -524,7 +524,7 @@ namespace BBWY.Client.ViewModels if (chooseDFType.DFType == DFType.关联订单) { - var relationPurchaseOrder = new RelationPurchaseOrder(orderId, globalContext.User.Shop.PurchaseAccountList, null, order.ItemList.Select(osku => new RelationPurchaseOrderSku() + var relationPurchaseOrder = new RelationPurchaseOrder(orderId, globalContext.User.Shop.PurchaseAccountList, null, null, order.ItemList.Select(osku => new RelationPurchaseOrderSku() { Logo = osku.Logo, ProductId = osku.ProductId, @@ -662,7 +662,7 @@ namespace BBWY.Client.ViewModels return; if (order.StorageType == StorageType.代发) { - var relationPurchaseOrder = new RelationPurchaseOrder(order.Id, globalContext.User.Shop.PurchaseAccountList, order.OrderDropShippingList, order.ItemList.Select(osku => new RelationPurchaseOrderSku() + var relationPurchaseOrder = new RelationPurchaseOrder(order.Id, globalContext.User.Shop.PurchaseAccountList, order.OrderDropShippingList, order.HistoryOrderDropShippingList, order.ItemList.Select(osku => new RelationPurchaseOrderSku() { Logo = osku.Logo, ProductId = osku.ProductId, diff --git a/BBWY.Client/Views/Order/RelationPurchaseOrder.xaml b/BBWY.Client/Views/Order/RelationPurchaseOrder.xaml index de7e2b67..6fbc7760 100644 --- a/BBWY.Client/Views/Order/RelationPurchaseOrder.xaml +++ b/BBWY.Client/Views/Order/RelationPurchaseOrder.xaml @@ -23,8 +23,7 @@ - + @@ -34,7 +33,34 @@ - + + + + + + + + + + + + + + + + + @@ -171,7 +197,7 @@ - + - + - - diff --git a/BBWY.Client/Views/Order/RelationPurchaseOrder.xaml.cs b/BBWY.Client/Views/Order/RelationPurchaseOrder.xaml.cs index 4f9bcea9..f9c314c3 100644 --- a/BBWY.Client/Views/Order/RelationPurchaseOrder.xaml.cs +++ b/BBWY.Client/Views/Order/RelationPurchaseOrder.xaml.cs @@ -23,9 +23,13 @@ namespace BBWY.Client.Views.Order public ICommand RePurchaseCommand { get; set; } + public ICommand CopyTextCommand { get; set; } + public IList OrderDropShippingList { get; set; } + public IList HistoryOrderDropShippingList { get; set; } + public IList RelationPurchaseOrderSkuList { get; set; } public IList ChooseRelationPurchaseOrderSkuList { get; set; } @@ -34,6 +38,8 @@ namespace BBWY.Client.Views.Order public string OrderId { get; set; } + public bool IsShowHistoryOrderDropShoppingList { get; set; } + public decimal TotalCost { get => totalCost; set { Set(ref totalCost, value); } } public bool IsShowChooseSkuPanel { @@ -55,7 +61,11 @@ namespace BBWY.Client.Views.Order public bool IsRePurchase { get; private set; } - public RelationPurchaseOrder(string orderId, IList purchaseAccountList, IList orderDropShippingList, IList relationPurchaseOrderSkuList) + public RelationPurchaseOrder(string orderId, + IList purchaseAccountList, + IList orderDropShippingList, + IList historyOrderDropShippingList, + IList relationPurchaseOrderSkuList) { InitializeComponent(); this.DataContext = this; @@ -63,6 +73,8 @@ namespace BBWY.Client.Views.Order this.PurchaseAccountList = purchaseAccountList; this.OrderId = orderId; OrderDropShippingList = new ObservableCollection(); + HistoryOrderDropShippingList = historyOrderDropShippingList; + IsShowHistoryOrderDropShoppingList = (historyOrderDropShippingList?.Count() ?? 0) > 0; if (orderDropShippingList != null) { foreach (var ods in orderDropShippingList) @@ -104,6 +116,20 @@ namespace BBWY.Client.Views.Order this.Close(); } }); + CopyTextCommand = new RelayCommand(s => + { + try + { + Clipboard.SetText(s); + } + catch (Exception ex) + { + Console.ForegroundColor = ConsoleColor.Red; + Console.WriteLine(ex); + Console.ResetColor(); + } + } + ); } private void OnSkuAmountChanged()