From 87b98274919d89750e010a1aa9d86ee929a517e1 Mon Sep 17 00:00:00 2001 From: "506583276@qq.com" <506583276@qq.com> Date: Tue, 29 Aug 2023 15:25:52 +0800 Subject: [PATCH] 10175 --- BBWY.Client/GlobalContext.cs | 2 +- .../QualityTask/QualityViewModel.cs | 64 ++++++++++--------- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/BBWY.Client/GlobalContext.cs b/BBWY.Client/GlobalContext.cs index eafd54fd..ee3a617f 100644 --- a/BBWY.Client/GlobalContext.cs +++ b/BBWY.Client/GlobalContext.cs @@ -13,7 +13,7 @@ namespace BBWY.Client { ShopServiceGroupList = new List(); ShopServiceGroupLowerList = new List(); - ClientVersion = "10174"; + ClientVersion = "10175"; } private User user; diff --git a/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs b/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs index 7a6f5cf5..5dae0e15 100644 --- a/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs +++ b/BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs @@ -451,41 +451,47 @@ namespace BBWY.Client.ViewModels TaskId = TaskId, FloorDragNumber = FloorDragNumber }; - if (IsNeedBarCode == Need.需要) + + + if (CreateTime>Convert.ToDateTime("2023-08-21")) { - if (BarCodeModel == null || BarCodeModel.Id <= 0) + if (IsNeedBarCode == Need.需要) { - MessageBox.Show("条形码不能为空"); - return; + if (BarCodeModel == null || BarCodeModel.Id <= 0) + { + 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 () - //{ - // MessageBox.Show("无可用的合格证打印!"); - // return; - //} - if (PurchaseSkuList.Where(p => p.IsSetCertificate).Count() > 0) + if (PurchaseSkuList != null && PurchaseSkuList.Count > 0 && purchaseSkuList.Any(p => p.IsNeedCer)) //(IsNeedCertificateModel == Need.需要) { - MessageBox.Show("存在未确认的合格证,请先完成确认!"); - return; - } + //if () + //{ + // MessageBox.Show("无可用的合格证打印!"); + // return; + //} + if (PurchaseSkuList.Where(p => p.IsSetCertificate).Count() > 0) + { + MessageBox.Show("存在未确认的合格证,请先完成确认!"); + return; + } - if (purchaseSkuList.Any(p => p.IsNeedCer && p.CerDTO == null)) - { - MessageBox.Show("有未设置的合格证,请设置完所有的合格证再保存"); - return; - } - if (PurchaseSkuList.Where(p => p.IsNeedCer && p.CerDTO.Id > 0).Count() <= 0) - { - MessageBox.Show("无可选的合格证打印!"); - return; - } - request.CerId = string.Join(",", PurchaseSkuList.Where(p => p.IsNeedCer && p.CerDTO.Id > 0).Select(p => p.CerDTO.Id)); + if (purchaseSkuList.Any(p => p.IsNeedCer && p.CerDTO == null)) + { + MessageBox.Show("有未设置的合格证,请设置完所有的合格证再保存"); + return; + } + if (PurchaseSkuList.Where(p => p.IsNeedCer && p.CerDTO.Id > 0).Count() <= 0) + { + MessageBox.Show("无可选的合格证打印!"); + return; + } + request.CerId = string.Join(",", PurchaseSkuList.Where(p => p.IsNeedCer && p.CerDTO.Id > 0).Select(p => p.CerDTO.Id)); + } } + try { var competeRes = packPurchaseTaskService.CompeteQualityTask(request); @@ -507,7 +513,7 @@ namespace BBWY.Client.ViewModels // BarCodeModel.ShopName = OriginShopName; //} 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); batchPrint.ShowDialog();