|
|
@ -446,7 +446,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
Brand = productApiResponse.Data.Items[0].BrandName; |
|
|
|
|
|
|
|
} |
|
|
|
var productSku = packTaskService.GetProductSku(skuid); |
|
|
|
var productSku = packTaskService.SearchProduct(skuid); |
|
|
|
if (productSku == null || !productSku.Success || productSku.Data == null) |
|
|
|
return; |
|
|
|
if (TaskId <= 0) |
|
|
@ -476,6 +476,9 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
{ |
|
|
|
BarCodeModel = new BarCodeModel(); |
|
|
|
} |
|
|
|
if (BarCodeModel.LabelModel == BarcodeLabelModel.无型号模板) |
|
|
|
BarCodeModel.LabelModel = BarcodeLabelModel.精简模板; |
|
|
|
|
|
|
|
BarCodeModel.Brand = Brand; |
|
|
|
if (!string.IsNullOrEmpty(BrandName)) |
|
|
|
BarCodeModel.BrandName = BrandName; |
|
|
@ -487,9 +490,9 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
{ |
|
|
|
IsNeedBarCode = Need.需要; |
|
|
|
IsSetBarCode = true; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
if (productSku.Data.PackConfig != null&&TaskId<=0) |
|
|
|
if (productSku.Data.PackConfig != null && TaskId <= 0) |
|
|
|
{ |
|
|
|
var config = productSku.Data.PackConfig; |
|
|
|
SkuTitle = config.SkuGoodsTitle; |
|
|
@ -569,7 +572,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Action ReflashWindow { get; set; } |
|
|
|
public void InitData(PackTaskModel model = null) |
|
|
|
{ |
|
|
@ -611,7 +614,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
return; |
|
|
|
} |
|
|
|
SaveTask = "保存"; |
|
|
|
Logo = model.ItemList[0].Logo.Replace("80x80","200x200"); |
|
|
|
Logo = model.ItemList[0].Logo.Replace("80x80", "200x200"); |
|
|
|
SearchSkuId = model.SkuId; |
|
|
|
SkuId = model.SkuId; |
|
|
|
SkuCount = model.SkuCount; |
|
|
@ -726,7 +729,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
ShopId = globalContext.User.Shop.ShopId.ToString(), |
|
|
|
NeedBar = IsNeedBarCode == Need.需要, |
|
|
|
NeedCer = IsNeedCertificateModel == Need.需要 |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
if (IsNeedBarCode == Need.需要) |
|
|
|
{ |
|
|
@ -741,7 +744,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
{ |
|
|
|
if (CertificateModel == null || IsSetCertificate || CertificateModel.Count() <= 0) |
|
|
|
{ |
|
|
|
MessageBox.Show ("请设置合格证模板","提示"); |
|
|
|
MessageBox.Show("请设置合格证模板", "提示"); |
|
|
|
return; |
|
|
|
} |
|
|
|
createTaskModel.CerId = string.Join(",", CertificateModel.Where(c => c.Id > 0).Select(c => c.Id));//
|
|
|
@ -757,11 +760,12 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
res = packTaskService.CreateTask(createTaskModel); |
|
|
|
} |
|
|
|
|
|
|
|
if(res == null) { |
|
|
|
if (res == null) |
|
|
|
{ |
|
|
|
MessageBox.Show("未知错误"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!res .Success) |
|
|
|
if (!res.Success) |
|
|
|
{ |
|
|
|
MessageBox.Show(res.Msg); |
|
|
|
return; |
|
|
|