|
|
@ -325,7 +325,7 @@ namespace BBWYB.Client.ViewModels |
|
|
|
public string ShopId { get; set; } |
|
|
|
|
|
|
|
public string UserName { get; set; } |
|
|
|
public void Test(Order order) |
|
|
|
public void Test(OrderSku order) |
|
|
|
{ |
|
|
|
SearchSku(order); |
|
|
|
|
|
|
@ -432,21 +432,23 @@ namespace BBWYB.Client.ViewModels |
|
|
|
/// </summary>
|
|
|
|
public void SearchSku(object obj) |
|
|
|
{ |
|
|
|
|
|
|
|
Order order = (Order)obj; |
|
|
|
|
|
|
|
SkuId = order.SourceSku; |
|
|
|
OrderId = order.Id; |
|
|
|
SkuPurchaseSchemeId = "416647656341573"; |
|
|
|
OriginShopName = order.SourceShopName; |
|
|
|
InitData(); |
|
|
|
var objList = (object[])obj; |
|
|
|
|
|
|
|
//SkuPurchaseSchemeId = "416647656341573";
|
|
|
|
OriginShopName = (string)objList[0]; |
|
|
|
OrderSku order= (OrderSku)objList[1]; |
|
|
|
|
|
|
|
SkuId = order.BelongSkuId; |
|
|
|
OrderId = order.OrderId; |
|
|
|
//string PurchaseProductId = "687352811674";
|
|
|
|
Platform = order.Platform; |
|
|
|
ShopId = "11"; |
|
|
|
UserName = order.BuyerAccount; |
|
|
|
//Platform = order.Platform;
|
|
|
|
//ShopId = "11";
|
|
|
|
//UserName = order.BuyerAccount;
|
|
|
|
var shopList = globalContext.User.ShopList; |
|
|
|
var shop = shopList.SingleOrDefault(s => s.ShopName == OriginShopName); |
|
|
|
Logo = order.ItemList[0].Logo; |
|
|
|
SkuName = order.ItemList[0].Title; |
|
|
|
Logo = order.Logo; |
|
|
|
SkuName = order.Title; |
|
|
|
if (string.IsNullOrEmpty(SkuId)) |
|
|
|
return; |
|
|
|
|
|
|
@ -478,11 +480,16 @@ namespace BBWYB.Client.ViewModels |
|
|
|
Brand = productApiResponse.Data.Items[0].BrandName; |
|
|
|
|
|
|
|
} |
|
|
|
var productSku = packPurchaseTaskService.GetConfigPack(SkuId, SkuPurchaseSchemeId); |
|
|
|
var productSku = packPurchaseTaskService.GetConfigPack(SkuId, "", OrderId); |
|
|
|
|
|
|
|
if (productSku == null || !productSku.Success || productSku.Data == null) |
|
|
|
{ |
|
|
|
new TipsWindow(productSku.Msg).Show(); |
|
|
|
return; |
|
|
|
BrandName = productSku.Data.BrandName; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
SkuPurchaseSchemeId = productSku.Data.SkuPurchaseSchemeId; |
|
|
|
BarCodeModel = productSku.Data.BarCode; |
|
|
|
if (BarCodeModel == null) |
|
|
|
{ |
|
|
@ -521,7 +528,7 @@ namespace BBWYB.Client.ViewModels |
|
|
|
{ |
|
|
|
var config = productSku.Data.PackConfig; |
|
|
|
SkuTitle = config.SkuGoodsTitle; |
|
|
|
brandName = config.BrandName; |
|
|
|
BrandName = config.BrandName; |
|
|
|
GoodsNumber = config.GoodsNumber; |
|
|
|
PackType = (PackType)config.PackType; |
|
|
|
BasicPack = (BasicPack)config.BasicPack; |
|
|
@ -603,55 +610,19 @@ namespace BBWYB.Client.ViewModels |
|
|
|
public void InitData() |
|
|
|
{ |
|
|
|
|
|
|
|
//IncreateList = new ObservableCollection<IncreateModel>();
|
|
|
|
//SpuId = string.Empty;
|
|
|
|
|
|
|
|
//SaveTask = "保存";
|
|
|
|
//Logo = model.ItemList[0].Logo;
|
|
|
|
//SearchSkuId = model.SkuId;
|
|
|
|
//SkuId = model.SkuId;
|
|
|
|
//SkuCount = model.SkuCount;
|
|
|
|
//SkuName = model.ItemList[0].SkuName;
|
|
|
|
//ProductNo = model.ItemList[0].GoodsNo;
|
|
|
|
//Brand = model.Brand;
|
|
|
|
//BrandName = model.ItemList[0].BrandName;
|
|
|
|
//this.MarkMessage = model.MarkMessage;
|
|
|
|
//IsSetBarCode = model.BarCodeModel != null ? false : true;
|
|
|
|
//IsSetCertificate = model.CertificateModel != null ? false : true;
|
|
|
|
//BarCodeModel = model.BarCodeModel;
|
|
|
|
//CertificateModel = model.CertificateModel;
|
|
|
|
//SkuTitle = model.SkuTitle;
|
|
|
|
//GoodsNumber = model.GoodsNumber;
|
|
|
|
//Availability = model.Availability;
|
|
|
|
//IsWorry = model.IsWorry;
|
|
|
|
//PositionType = model.PositionType;
|
|
|
|
//PackType = model.PackType;
|
|
|
|
//BasicPack = model.BasicPack;
|
|
|
|
//IsNeedBarCode = model.BarCodeModel == null ? Need.不需要 : Need.需要;
|
|
|
|
//IsNeedCertificateModel = model.CertificateModel == null ? Need.不需要 : Need.需要;
|
|
|
|
//CertificatePosition = model.CertificatePosition;
|
|
|
|
//TaskId = model.TaskId;
|
|
|
|
//string[] increateDatas = model.Increment1.Split(',');
|
|
|
|
|
|
|
|
//bool isTrue = false;
|
|
|
|
//foreach (var item in increates)
|
|
|
|
//{
|
|
|
|
// isTrue = false;
|
|
|
|
// if (increateDatas.Contains(item))
|
|
|
|
// {
|
|
|
|
// isTrue = true;
|
|
|
|
// }
|
|
|
|
// App.Current.Dispatcher.Invoke(() =>
|
|
|
|
// {
|
|
|
|
// IncreateList.Add(new IncreateModel
|
|
|
|
// {
|
|
|
|
// IncreateName = item,
|
|
|
|
// IsSelected = isTrue
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//}
|
|
|
|
// SearchSku(SkuId);
|
|
|
|
|
|
|
|
IsSetBarCode = true; |
|
|
|
SkuTitle = ""; |
|
|
|
BrandName = ""; |
|
|
|
GoodsNumber = 0; |
|
|
|
PackType = PackType.单件; |
|
|
|
BasicPack = BasicPack.快递袋; |
|
|
|
// Availability = (TaskState.)config.Availability;
|
|
|
|
//MarkMessage = config.MarkMessage;
|
|
|
|
CertificatePosition = CertificatePosition.无; |
|
|
|
// Increment1 = config.Increment1;
|
|
|
|
|
|
|
|
IsNeedBarCode = Need.需要 ; |
|
|
|
IsNeedCertificateModel = Need.不需要; |
|
|
|
} |
|
|
|
private void OpenSkuDetail(object param) |
|
|
|
{ |
|
|
@ -691,12 +662,11 @@ namespace BBWYB.Client.ViewModels |
|
|
|
Availability = (int)Availability, |
|
|
|
BasicPack = (int)BasicPack, |
|
|
|
SkuId = SkuId, |
|
|
|
//CreateTime = DateTime.Now,
|
|
|
|
Increment1 = increateStr, |
|
|
|
//Increment2 = (int)Increment2,
|
|
|
|
|
|
|
|
CertificatePosition = (int)CertificatePosition, |
|
|
|
PackType = (int)PackType, |
|
|
|
MarkMessage = MarkMessage, |
|
|
|
// MarkMessage = MarkMessage,
|
|
|
|
PositionType = (int)PositionType, |
|
|
|
GoodsNumber = GoodsNumber, |
|
|
|
SkuGoodsTitle = SkuTitle, |
|
|
@ -711,12 +681,6 @@ namespace BBWYB.Client.ViewModels |
|
|
|
|
|
|
|
//IsWorry = IsWorry
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (IsNeedBarCode == Need.需要) |
|
|
|
{ |
|
|
|
if (BarCodeModel == null || IsSetBarCode || BarCodeModel.Id <= 0) |
|
|
@ -746,7 +710,10 @@ namespace BBWYB.Client.ViewModels |
|
|
|
|
|
|
|
var win = obj as System.Windows.Window; |
|
|
|
win.Close(); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
MessageBox.Show(res.Msg); |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
} |
|
|
|