|
|
@ -320,9 +320,9 @@ namespace BBWYB.Client.ViewModels |
|
|
|
public string OriginShopName { get; set; } |
|
|
|
public string SkuPurchaseSchemeId { get; set; } |
|
|
|
public Platform Platform { get; set; } |
|
|
|
public string ShopId { get; set; } |
|
|
|
//public string ShopId { get; set; }
|
|
|
|
|
|
|
|
public string UserName { get; set; } |
|
|
|
//public string UserName { get; set; }
|
|
|
|
|
|
|
|
#region 方法
|
|
|
|
public ICommand SetBarCodeCommand { get; set; } |
|
|
@ -423,7 +423,7 @@ namespace BBWYB.Client.ViewModels |
|
|
|
/// <summary>
|
|
|
|
/// 搜索 skuId(todo:)
|
|
|
|
/// </summary>
|
|
|
|
public void SearchSku(PackTaskResponse obj, string shopname, OrderSku order) |
|
|
|
public bool SearchSku(PackTaskResponse obj, string shopname, OrderSku order) |
|
|
|
{ |
|
|
|
InitData(); |
|
|
|
|
|
|
@ -434,16 +434,13 @@ namespace BBWYB.Client.ViewModels |
|
|
|
|
|
|
|
SkuId = order.BelongSkuId; |
|
|
|
OrderId = order.OrderId; |
|
|
|
//string PurchaseProductId = "687352811674";
|
|
|
|
//Platform = order.Platform;
|
|
|
|
//ShopId = "11";
|
|
|
|
//UserName = order.BuyerAccount;
|
|
|
|
|
|
|
|
var shopList = globalContext.User.ShopList; |
|
|
|
var shop = shopList.SingleOrDefault(s => s.ShopName == OriginShopName); |
|
|
|
Logo = order.Logo; |
|
|
|
SkuName = order.Title; |
|
|
|
if (string.IsNullOrEmpty(SkuId)) |
|
|
|
return; |
|
|
|
return false; |
|
|
|
|
|
|
|
ApiResponse<ProductListResponse> productApiResponse = null; |
|
|
|
var skuResponse = productService.GetProductSkuList(string.Empty, SkuId, shop.Platform, shop.AppKey, shop.AppSecret, shop.AppToken); |
|
|
@ -451,7 +448,7 @@ namespace BBWYB.Client.ViewModels |
|
|
|
{ |
|
|
|
if (skuResponse.Data.Count() == 0) |
|
|
|
{ |
|
|
|
return; |
|
|
|
return false; |
|
|
|
} |
|
|
|
Logo = skuResponse.Data[0].Logo.Replace("80x80", "200x200"); |
|
|
|
SkuName = skuResponse.Data[0].Title; |
|
|
@ -466,7 +463,7 @@ namespace BBWYB.Client.ViewModels |
|
|
|
if (productApiResponse.Data.Count == 0) |
|
|
|
{ |
|
|
|
|
|
|
|
return; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
ProductNo = productApiResponse.Data.Items[0].ProductItemNum; |
|
|
@ -477,8 +474,8 @@ namespace BBWYB.Client.ViewModels |
|
|
|
|
|
|
|
if (productSku == null || !productSku.Success || productSku.Data == null) |
|
|
|
{ |
|
|
|
new TipsWindow(productSku.Msg).Show(); |
|
|
|
return; |
|
|
|
MessageBox.Show(productSku.Msg); |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -558,14 +555,17 @@ namespace BBWYB.Client.ViewModels |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
App.Current.Dispatcher.Invoke(() => MessageBox.Show(skuResponse.Msg, "加载sku")); |
|
|
|
return; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
//加载配置文件
|
|
|
|
} |
|
|
|
|
|
|
@ -605,13 +605,18 @@ namespace BBWYB.Client.ViewModels |
|
|
|
public Action ReflashWindow { get; set; } |
|
|
|
public void InitData() |
|
|
|
{ |
|
|
|
|
|
|
|
PurchaseSkuList = new ObservableCollection<Models.PackPurchaseTask.PurchaseSku>(); |
|
|
|
IsSetBarCode = true; |
|
|
|
SkuTitle = ""; |
|
|
|
BrandName = ""; |
|
|
|
GoodsNumber = 0; |
|
|
|
PackType = PackType.单件; |
|
|
|
BasicPack = BasicPack.快递袋; |
|
|
|
SkuPurchaseSchemeId = ""; |
|
|
|
SkuTitle = ""; |
|
|
|
BarCodeModel= null; |
|
|
|
OriginShopName = ""; |
|
|
|
|
|
|
|
// Availability = (TaskState.)config.Availability;
|
|
|
|
MarkMessage = ""; |
|
|
|
CertificatePosition = CertificatePosition.无; |
|
|
@ -694,7 +699,7 @@ namespace BBWYB.Client.ViewModels |
|
|
|
var cerList = purchaseSkuList.Where(p => p.IsNeedCer&&p.CerDTO!=null).Select(p => p.CerDTO).Select(c => c.Id).Where(c => c > 0).ToList(); |
|
|
|
if (purchaseSkuList.Count() <= 0 || cerList.Count <= 0) |
|
|
|
{ |
|
|
|
MessageBox.Show("请设置条形码模板"); |
|
|
|
MessageBox.Show("请设置合格证模板"); |
|
|
|
return; |
|
|
|
} |
|
|
|
createTaskModel.CerId = string.Join(",", cerList);//
|
|
|
|