Browse Source

10175

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
87b9827491
  1. 2
      BBWY.Client/GlobalContext.cs
  2. 64
      BBWY.Client/ViewModels/QualityTask/QualityViewModel.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 = "10174"; ClientVersion = "10175";
} }
private User user; private User user;

64
BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs

@ -451,41 +451,47 @@ namespace BBWY.Client.ViewModels
TaskId = TaskId, TaskId = TaskId,
FloorDragNumber = FloorDragNumber FloorDragNumber = FloorDragNumber
}; };
if (IsNeedBarCode == Need.)
if (CreateTime>Convert.ToDateTime("2023-08-21"))
{ {
if (BarCodeModel == null || BarCodeModel.Id <= 0) if (IsNeedBarCode == Need.)
{ {
MessageBox.Show("条形码不能为空"); if (BarCodeModel == null || BarCodeModel.Id <= 0)
return; {
MessageBox.Show("条形码不能为空");
return;
}
request.BarcodeId = BarCodeModel.Id;
} }
request.BarcodeId = BarCodeModel.Id; if (PurchaseSkuList != null && PurchaseSkuList.Count > 0 && purchaseSkuList.Any(p => p.IsNeedCer)) //(IsNeedCertificateModel == Need.需要)
}
if (PurchaseSkuList != null && PurchaseSkuList.Count > 0 && purchaseSkuList.Any(p => p.IsNeedCer)) //(IsNeedCertificateModel == Need.需要)
{
//if ()
//{
// MessageBox.Show("无可用的合格证打印!");
// return;
//}
if (PurchaseSkuList.Where(p => p.IsSetCertificate).Count() > 0)
{ {
MessageBox.Show("存在未确认的合格证,请先完成确认!"); //if ()
return; //{
} // MessageBox.Show("无可用的合格证打印!");
// return;
//}
if (PurchaseSkuList.Where(p => p.IsSetCertificate).Count() > 0)
{
MessageBox.Show("存在未确认的合格证,请先完成确认!");
return;
}
if (purchaseSkuList.Any(p => p.IsNeedCer && p.CerDTO == null)) if (purchaseSkuList.Any(p => p.IsNeedCer && p.CerDTO == null))
{ {
MessageBox.Show("有未设置的合格证,请设置完所有的合格证再保存"); MessageBox.Show("有未设置的合格证,请设置完所有的合格证再保存");
return; return;
} }
if (PurchaseSkuList.Where(p => p.IsNeedCer && p.CerDTO.Id > 0).Count() <= 0) if (PurchaseSkuList.Where(p => p.IsNeedCer && p.CerDTO.Id > 0).Count() <= 0)
{ {
MessageBox.Show("无可选的合格证打印!"); MessageBox.Show("无可选的合格证打印!");
return; return;
} }
request.CerId = string.Join(",", PurchaseSkuList.Where(p => p.IsNeedCer && p.CerDTO.Id > 0).Select(p => p.CerDTO.Id)); request.CerId = string.Join(",", PurchaseSkuList.Where(p => p.IsNeedCer && p.CerDTO.Id > 0).Select(p => p.CerDTO.Id));
}
} }
try try
{ {
var competeRes = packPurchaseTaskService.CompeteQualityTask(request); var competeRes = packPurchaseTaskService.CompeteQualityTask(request);
@ -507,7 +513,7 @@ namespace BBWY.Client.ViewModels
// BarCodeModel.ShopName = OriginShopName; // BarCodeModel.ShopName = OriginShopName;
//} //}
batchPrint.SetData(GoodProductQuantity.Value, batchPrint.SetData(GoodProductQuantity.Value,
PurchaseSkuList.Where(p => p.IsNeedCer && p.CerDTO.Id > 0).Select(p => p.CerDTO).ToArray() PurchaseSkuList.Where(p => p.IsNeedCer&& p.CerDTO!=null && p.CerDTO.Id > 0).Select(p => p.CerDTO).ToArray()
, BarCodeModel); , BarCodeModel);
batchPrint.ShowDialog(); batchPrint.ShowDialog();

Loading…
Cancel
Save