Browse Source

客户端提示

pjzs_starttask_update
sanji 2 years ago
parent
commit
8d4c72a2bc
  1. 2
      BBWY.Client/GlobalContext.cs
  2. 13
      BBWY.Client/ViewModels/Purchase/1688PreviewPurchaseViewModel.cs

2
BBWY.Client/GlobalContext.cs

@ -13,7 +13,7 @@ namespace BBWY.Client
{ {
ShopServiceGroupList = new List<string>(); ShopServiceGroupList = new List<string>();
ShopServiceGroupLowerList = new List<string>(); ShopServiceGroupLowerList = new List<string>();
ClientVersion = "10221"; ClientVersion = "10222";
} }

13
BBWY.Client/ViewModels/Purchase/1688PreviewPurchaseViewModel.cs

@ -76,6 +76,7 @@ namespace BBWY.Client.ViewModels
/// 扩展数据,暂用于拳探 /// 扩展数据,暂用于拳探
/// </summary> /// </summary>
private string extensions; private string extensions;
private bool isSkuMatchError;
public _1688PreviewPurchaseViewModel(OneBoundAPIService oneBoundAPIService, public _1688PreviewPurchaseViewModel(OneBoundAPIService oneBoundAPIService,
PurchaseService purchaseService, PurchaseService purchaseService,
@ -117,7 +118,7 @@ namespace BBWY.Client.ViewModels
protected override void Load() protected override void Load()
{ {
IsLoading = true; IsLoading = true;
isSkuMatchError = false;
Task.Factory.StartNew(() => purchaseService.GetPurchaseSchemeList(order.ItemList.Select(osku => osku.Id).ToList(), purchaser.Id, globalContext.User.Shop.ShopId)) Task.Factory.StartNew(() => purchaseService.GetPurchaseSchemeList(order.ItemList.Select(osku => osku.Id).ToList(), purchaser.Id, globalContext.User.Shop.ShopId))
.ContinueWith(r => .ContinueWith(r =>
{ {
@ -150,7 +151,10 @@ namespace BBWY.Client.ViewModels
else else
{ {
IsLoading = false; IsLoading = false;
App.Current.Dispatcher.Invoke(() => MessageBox.Show("采购方案商品加载失败,请重新打开预览窗口", "提示")); if (isSkuMatchError)
App.Current.Dispatcher.Invoke(() => MessageBox.Show("采购方案与当前商品页的数据匹配失败,请删除旧采购方案后重新绑定采购方案", "提示"));
else
App.Current.Dispatcher.Invoke(() => MessageBox.Show("采购方案商品加载失败,请重新打开预览窗口", "提示"));
} }
}); });
} }
@ -195,6 +199,11 @@ namespace BBWY.Client.ViewModels
} }
} }
}); });
if (purchaseSchemeProduct.SelectedSkuIdList.Any(s => !data.Value.purchaseSchemeProductSkus.Any(s1 => s1.PurchaseSkuId == s)))
{
isSkuMatchError = true;
}
} }
ewh.Set(); ewh.Set();

Loading…
Cancel
Save