|
|
@ -222,18 +222,18 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
/// </summary>
|
|
|
|
public PositionType PositionType { get => positionType; set { Set(ref positionType, value); } } |
|
|
|
|
|
|
|
private string isNeedBarCode; |
|
|
|
private Need isNeedBarCode; |
|
|
|
/// <summary>
|
|
|
|
/// 是否需要合格证
|
|
|
|
/// </summary>
|
|
|
|
public string IsNeedBarCode { get => isNeedBarCode; set { Set(ref isNeedBarCode, value); } } |
|
|
|
public Need IsNeedBarCode { get => isNeedBarCode; set { Set(ref isNeedBarCode, value); } } |
|
|
|
|
|
|
|
|
|
|
|
private string isNeedCertificateModel; |
|
|
|
private Need isNeedCertificateModel; |
|
|
|
/// <summary>
|
|
|
|
/// 是否需要条形码
|
|
|
|
/// </summary>
|
|
|
|
public string IsNeedCertificateModel { get => isNeedCertificateModel; set { Set(ref isNeedCertificateModel, value); } } |
|
|
|
public Need IsNeedCertificateModel { get => isNeedCertificateModel; set { Set(ref isNeedCertificateModel, value); } } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -255,7 +255,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
{ |
|
|
|
|
|
|
|
Set(ref isSetBarCode, value); |
|
|
|
IsNeedBarCode = IsSetBarCode ? "不需要" : "需要"; |
|
|
|
IsNeedBarCode = IsSetBarCode ? Need.不需要 : Need.需要; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -269,7 +269,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
{ |
|
|
|
|
|
|
|
Set(ref isSetCertificate, value); |
|
|
|
IsNeedCertificateModel = IsSetCertificate ? "不需要" : "需要"; |
|
|
|
IsNeedCertificateModel = IsSetCertificate ? Need.不需要 : Need.需要; |
|
|
|
} |
|
|
|
} |
|
|
|
private string setSpuCerStatus; |
|
|
@ -427,8 +427,8 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
PositionType = model.PositionType; |
|
|
|
PackType = model.PackType; |
|
|
|
BasicPack = model.BasicPack; |
|
|
|
IsNeedBarCode = model.BarCodeModel != null ? "需要" : "不需要"; |
|
|
|
IsNeedCertificateModel = model.CertificateModel != null ? "需要" : "不需要"; |
|
|
|
IsNeedBarCode = model.BarCodeModel == null ? Need.不需要 : Need.需要; |
|
|
|
IsNeedCertificateModel = model.CertificateModel == null ? Need.不需要 : Need.需要; |
|
|
|
CertificatePosition = model.CertificatePosition; |
|
|
|
TaskId = model.TaskId; |
|
|
|
string[] increateDatas = model.Increment1.Split(','); |
|
|
@ -441,7 +441,8 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
{ |
|
|
|
isSelected = true; |
|
|
|
} |
|
|
|
App.Current.Dispatcher.Invoke(() => { |
|
|
|
App.Current.Dispatcher.Invoke(() => |
|
|
|
{ |
|
|
|
IncreateList.Add(new IncreateModel |
|
|
|
{ |
|
|
|
IncreateName = item, |
|
|
@ -545,6 +546,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
SpuCertificateModel.Brand = Brand; |
|
|
|
SpuCertificateModel.SkuId = SkuId; |
|
|
|
} |
|
|
|
if (!string.IsNullOrEmpty(BrandName)) |
|
|
|
SpuCertificateModel.BrandName = BrandName; |
|
|
|
setSpuCerWindow = new SetSpuCerWindow(); |
|
|
|
setSpuCerWindow.Show(); |
|
|
@ -678,31 +680,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
//throw new NotImplementedException();
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 设置合格证
|
|
|
|
/// </summary>
|
|
|
|
private void SetCertificate() |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(SearchSkuId)) |
|
|
|
{ |
|
|
|
new TipsWindow("请先查询skuId").Show(); |
|
|
|
return; |
|
|
|
} |
|
|
|
SearSpuCer(); |
|
|
|
|
|
|
|
if (CertificateModel == null) |
|
|
|
{ |
|
|
|
CertificateModel = new CertificateModel(); |
|
|
|
CertificateModel.ProductNo = ProductNo; |
|
|
|
CertificateModel.Brand = Brand; |
|
|
|
CertificateModel.SkuId = SkuId; |
|
|
|
|
|
|
|
} |
|
|
|
CertificateModel.BrandName = BrandName; |
|
|
|
setCerWindow = new SetCerWindow(); |
|
|
|
setCerWindow.Show(); |
|
|
|
//throw new NotImplementedException();
|
|
|
|
} |
|
|
|
/// <summary>
|
|
|
|
/// 保存合格证
|
|
|
|
/// </summary>
|
|
|
@ -738,18 +716,20 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
IsSetCertificate = false; |
|
|
|
return; |
|
|
|
} |
|
|
|
IsNeedCertificateModel = "需要"; |
|
|
|
IsNeedCertificateModel = Need.需要; |
|
|
|
CertificateModel.Id = resData.Data; |
|
|
|
IsSetCertificate = false; |
|
|
|
setCerWindow.Close(); |
|
|
|
} |
|
|
|
|
|
|
|
SetBarCodeWindow setBarCodeWindow = null; SetCerWindow setCerWindow = null; SetSpuCerWindow setSpuCerWindow = null; |
|
|
|
|
|
|
|
public BarcodeLabelModel LabelModel = BarcodeLabelModel.精简模板; |
|
|
|
|
|
|
|
private void SetBarCode() |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(SearchSkuId)) |
|
|
|
if (string.IsNullOrEmpty(SkuId)) |
|
|
|
{ |
|
|
|
new TipsWindow("请先查询skuId").Show(); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (BarCodeModel == null) |
|
|
@ -759,15 +739,54 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
BarCodeModel.Brand = Brand; |
|
|
|
BarCodeModel.SkuId = SkuId; |
|
|
|
BarCodeModel.SkuName = SkuName; |
|
|
|
|
|
|
|
} |
|
|
|
if (!string.IsNullOrEmpty(BrandName)) |
|
|
|
BarCodeModel.BrandName = BrandName; |
|
|
|
setBarCodeWindow = new SetBarCodeWindow(); |
|
|
|
|
|
|
|
|
|
|
|
SetBarCodeWindow setBarCodeWindow = new SetBarCodeWindow(); |
|
|
|
setBarCodeWindow.LoadData(BarCodeModel, packTaskService); |
|
|
|
setBarCodeWindow.SaveResult = b => |
|
|
|
{ |
|
|
|
BarCodeModel = b; |
|
|
|
IsSetBarCode = false; |
|
|
|
IsNeedBarCode = Need.需要; |
|
|
|
}; |
|
|
|
setBarCodeWindow.Show(); |
|
|
|
} |
|
|
|
|
|
|
|
public BarcodeLabelModel LabelModel = BarcodeLabelModel.精简模板; |
|
|
|
/// <summary>
|
|
|
|
/// 设置合格证
|
|
|
|
/// </summary>
|
|
|
|
private void SetCertificate() |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(SkuId)) |
|
|
|
return; |
|
|
|
|
|
|
|
SearSpuCer(); |
|
|
|
|
|
|
|
if (CertificateModel == null) |
|
|
|
{ |
|
|
|
CertificateModel = new CertificateModel(); |
|
|
|
CertificateModel.ProductNo = ProductNo; |
|
|
|
CertificateModel.Brand = Brand; |
|
|
|
CertificateModel.SkuId = SkuId; |
|
|
|
|
|
|
|
} |
|
|
|
if (!string.IsNullOrEmpty(BrandName)) |
|
|
|
CertificateModel.BrandName = BrandName; |
|
|
|
SetCerWindow setCerWindow = new SetCerWindow(); |
|
|
|
setCerWindow.LoadData(certificateModel, packTaskService, spuCertificateModel, IsSetSpuCertificate); |
|
|
|
setCerWindow.SaveResult = s => |
|
|
|
{ |
|
|
|
CertificateModel = s; |
|
|
|
IsSetCertificate = false; |
|
|
|
IsNeedCertificateModel = Need.需要; |
|
|
|
}; |
|
|
|
setCerWindow.Show(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void SaveBarCode() |
|
|
|
{ |
|
|
@ -785,12 +804,12 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
//保存到服务器中 返回id
|
|
|
|
var resData = packTaskService.SaveBarCode(new BarCodeRequest |
|
|
|
{ |
|
|
|
Brand = Brand, |
|
|
|
BrandName = BrandName, |
|
|
|
ProductNo = ProductNo, |
|
|
|
SkuId = SkuId, |
|
|
|
SkuName = SkuName, |
|
|
|
LabelModel = LabelModel |
|
|
|
Brand = BarCodeModel. Brand, |
|
|
|
BrandName = BarCodeModel.BrandName, |
|
|
|
ProductNo = BarCodeModel.ProductNo, |
|
|
|
SkuId = BarCodeModel.SkuId, |
|
|
|
SkuName = BarCodeModel.SkuName, |
|
|
|
LabelModel = BarCodeModel.LabelModel |
|
|
|
|
|
|
|
}); |
|
|
|
if (resData == null || !resData.Success) |
|
|
@ -800,7 +819,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
} |
|
|
|
|
|
|
|
BarCodeModel.Id = resData.Data; |
|
|
|
IsNeedBarCode = "需要"; |
|
|
|
IsNeedBarCode = Need.需要; |
|
|
|
IsSetBarCode = false; |
|
|
|
setBarCodeWindow.Close(); |
|
|
|
} |
|
|
@ -846,7 +865,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
Increment2 = (int)Increment2, |
|
|
|
CertificatePosition = (int)CertificatePosition, |
|
|
|
PackType = (int)PackType, |
|
|
|
MarkMessage = markMessage, |
|
|
|
MarkMessage = MarkMessage, |
|
|
|
PositionType = (int)PositionType, |
|
|
|
GoodsNumber = GoodsNumber, |
|
|
|
SkuGoodsTitle = SkuTitle, |
|
|
@ -855,7 +874,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
ShopId = globalContext.User.Shop.ShopId.ToString(), |
|
|
|
IsWorry = IsWorry |
|
|
|
}; |
|
|
|
if (IsNeedBarCode == "需要") |
|
|
|
if (IsNeedBarCode == Need.需要) |
|
|
|
{ |
|
|
|
if (BarCodeModel == null || BarCodeModel.Id <= 0) |
|
|
|
{ |
|
|
@ -864,7 +883,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
} |
|
|
|
createTaskModel.BarCodeId = BarCodeModel.Id; |
|
|
|
} |
|
|
|
if (IsNeedCertificateModel == "需要") |
|
|
|
if (IsNeedCertificateModel == Need.需要) |
|
|
|
{ |
|
|
|
if (CertificateModel == null || CertificateModel.Id <= 0) |
|
|
|
{ |
|
|
@ -961,7 +980,8 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
{ |
|
|
|
isSelected = true; |
|
|
|
} |
|
|
|
App.Current.Dispatcher.Invoke(() => { |
|
|
|
App.Current.Dispatcher.Invoke(() => |
|
|
|
{ |
|
|
|
IncreateList.Add(new IncreateModel |
|
|
|
{ |
|
|
|
IncreateName = item, |
|
|
@ -984,6 +1004,8 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
|
|
|
|
} |
|
|
|
CertificateModel.Brand = Brand; |
|
|
|
if (!string.IsNullOrEmpty(BrandName)) |
|
|
|
|
|
|
|
CertificateModel.BrandName = BrandName; |
|
|
|
CertificateModel.ProductNo = ProductNo; |
|
|
|
CertificateModel.SkuId = SkuId; |
|
|
@ -995,8 +1017,10 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
IsSetBarCode = true; |
|
|
|
} |
|
|
|
BarCodeModel.Brand = Brand; |
|
|
|
if (!string.IsNullOrEmpty(BrandName)) |
|
|
|
BarCodeModel.BrandName = BrandName; |
|
|
|
BarCodeModel.ProductNo = ProductNo; |
|
|
|
|
|
|
|
BarCodeModel.SkuId = SkuId; |
|
|
|
BarCodeModel.SkuName = SkuName; |
|
|
|
} |
|
|
@ -1035,6 +1059,7 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
SpuCertificateModel = new CertificateModel(); |
|
|
|
IsSetSpuCertificate = true; |
|
|
|
SpuCertificateModel.Brand = Brand; |
|
|
|
if (!string.IsNullOrEmpty(BrandName)) |
|
|
|
SpuCertificateModel.BrandName = BrandName; |
|
|
|
SpuCertificateModel.ProductNo = ProductNo; |
|
|
|
SpuCertificateModel.SpuId = SpuId; |
|
|
|