|
@ -35,6 +35,9 @@ namespace BBWYB.Client.ViewModels |
|
|
public IList<ProductSku> ProductSkuList { get; set; } |
|
|
public IList<ProductSku> ProductSkuList { get; set; } |
|
|
|
|
|
|
|
|
public string PurchaserId { get; set; } |
|
|
public string PurchaserId { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
public string PurchaserId2 { get; set; } |
|
|
|
|
|
|
|
|
public string PurchaserName { get => purchaserName; set { SetProperty(ref purchaserName, value); } } |
|
|
public string PurchaserName { get => purchaserName; set { SetProperty(ref purchaserName, value); } } |
|
|
public string PurchaserLocation { get; set; } |
|
|
public string PurchaserLocation { get; set; } |
|
|
public bool IsLoading { get => isLoading; set { SetProperty(ref isLoading, value); } } |
|
|
public bool IsLoading { get => isLoading; set { SetProperty(ref isLoading, value); } } |
|
@ -85,11 +88,12 @@ namespace BBWYB.Client.ViewModels |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void SetData(IList<ProductSku> productSkuList, string purchaserId, string purchaserName, Platform purchasePlatform) |
|
|
public void SetData(IList<ProductSku> productSkuList, string purchaserId, string purchaserId2, string purchaserName, Platform purchasePlatform) |
|
|
{ |
|
|
{ |
|
|
this.ProductSkuList = productSkuList; |
|
|
this.ProductSkuList = productSkuList; |
|
|
//this.Product = product;
|
|
|
//this.Product = product;
|
|
|
this.PurchaserId = purchaserId; |
|
|
this.PurchaserId = purchaserId; |
|
|
|
|
|
this.PurchaserId2 = purchaserId2; |
|
|
this.PurchaserName = purchaserName; |
|
|
this.PurchaserName = purchaserName; |
|
|
this.PurchasePlatform = purchasePlatform; |
|
|
this.PurchasePlatform = purchasePlatform; |
|
|
} |
|
|
} |
|
@ -177,6 +181,7 @@ namespace BBWYB.Client.ViewModels |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
PurchaserId = data.Value.purchaser.Id; |
|
|
PurchaserId = data.Value.purchaser.Id; |
|
|
|
|
|
PurchaserId2 = data.Value.purchaser.Id2; |
|
|
PurchaserName = data.Value.purchaser.Name; |
|
|
PurchaserName = data.Value.purchaser.Name; |
|
|
PurchaserLocation = data.Value.purchaser.Location; |
|
|
PurchaserLocation = data.Value.purchaser.Location; |
|
|
|
|
|
|
|
@ -315,6 +320,7 @@ namespace BBWYB.Client.ViewModels |
|
|
|
|
|
|
|
|
var productSku = ProductSkuList.FirstOrDefault(sku => sku.Id == purchaseSchemeProduct.SkuId); |
|
|
var productSku = ProductSkuList.FirstOrDefault(sku => sku.Id == purchaseSchemeProduct.SkuId); |
|
|
productSku.SelectedPurchaseScheme.PurchaserId = PurchaserId; |
|
|
productSku.SelectedPurchaseScheme.PurchaserId = PurchaserId; |
|
|
|
|
|
productSku.SelectedPurchaseScheme.PurchaserId2 = PurchaserId2; |
|
|
productSku.SelectedPurchaseScheme.PurchaserName = PurchaserName; |
|
|
productSku.SelectedPurchaseScheme.PurchaserName = PurchaserName; |
|
|
productSku.SelectedPurchaseScheme.PurchaserLocation = PurchaserLocation; |
|
|
productSku.SelectedPurchaseScheme.PurchaserLocation = PurchaserLocation; |
|
|
productSku.SelectedPurchaseScheme.DefaultCost = productSku.SelectedPurchaseScheme.PurchaseSchemeProductList.Sum(p => p.PurchaseSchemeProductSkuList.Count() == 0 ? 0 : p.PurchaseSchemeProductSkuList.Sum(s => s.Price)); |
|
|
productSku.SelectedPurchaseScheme.DefaultCost = productSku.SelectedPurchaseScheme.PurchaseSchemeProductList.Sum(p => p.PurchaseSchemeProductSkuList.Count() == 0 ? 0 : p.PurchaseSchemeProductSkuList.Sum(s => s.Price)); |
|
|