Browse Source

移除质检是否合格证条件判断

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
aa2bef7665
  1. 2
      BBWY.Client/GlobalContext.cs
  2. 43
      BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs
  3. 4
      BBWY.Client/Views/PackTask/LookCerWindow.xaml.cs
  4. 2
      BBWY.Client/Views/QualityTask/QualityWindow.xaml

2
BBWY.Client/GlobalContext.cs

@ -9,7 +9,7 @@ namespace BBWY.Client
{ {
ShopServiceGroupList = new List<string>(); ShopServiceGroupList = new List<string>();
ShopServiceGroupLowerList = new List<string>(); ShopServiceGroupLowerList = new List<string>();
ClientVersion = "10124"; ClientVersion = "10125";
} }
private User user; private User user;

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

@ -446,20 +446,20 @@ namespace BBWY.Client.ViewModels
}; };
if (IsNeedBarCode == Need.) if (IsNeedBarCode == Need.)
{ {
if (BarCodeModel==null|| BarCodeModel.Id <= 0) if (BarCodeModel == null || BarCodeModel.Id <= 0)
{ {
MessageBox.Show("条形码不能为空"); MessageBox.Show("条形码不能为空");
return; return;
} }
request.BarcodeId = BarCodeModel.Id; request.BarcodeId = BarCodeModel.Id;
} }
if (IsNeedCertificateModel == Need.) if(PurchaseSkuList != null && PurchaseSkuList.Count > 0&&purchaseSkuList.Any(p=> p.IsNeedCer)) //(IsNeedCertificateModel == Need.需要)
{ {
if (PurchaseSkuList == null && PurchaseSkuList.Count <= 0) //if ()
{ //{
MessageBox.Show("无可用的合格证打印!"); // MessageBox.Show("无可用的合格证打印!");
return; // return;
} //}
if (PurchaseSkuList.Where(p => p.IsSetCertificate).Count() > 0) if (PurchaseSkuList.Where(p => p.IsSetCertificate).Count() > 0)
{ {
MessageBox.Show("存在未确认的合格证,请先完成确认!"); MessageBox.Show("存在未确认的合格证,请先完成确认!");
@ -507,7 +507,7 @@ namespace BBWY.Client.ViewModels
if (competeTime<DateTime.Now) if (competeTime < DateTime.Now)
{ {
MessageBox.Show($"预计完成时间不能小于当前时间,请重新选择预计完成时间"); MessageBox.Show($"预计完成时间不能小于当前时间,请重新选择预计完成时间");
return; return;
@ -517,7 +517,7 @@ namespace BBWY.Client.ViewModels
var now = DateTime.Now; var now = DateTime.Now;
if (now.Hour < 12) if (now.Hour < 12)
{ {
if (competeTime> now.AddDays(1).Date.AddHours(12)) if (competeTime > now.AddDays(1).Date.AddHours(12))
{ {
MessageBox.Show($"预计完成时间不能超过明天12点,请重新选择预计完成时间"); MessageBox.Show($"预计完成时间不能超过明天12点,请重新选择预计完成时间");
return; return;
@ -575,7 +575,8 @@ namespace BBWY.Client.ViewModels
if (ReflashWindow != null) ReflashWindow(); if (ReflashWindow != null) ReflashWindow();
var window = obj as BWindow; var window = obj as BWindow;
App.Current.Dispatcher.Invoke(new Action(() => { App.Current.Dispatcher.Invoke(new Action(() =>
{
window.Close(); window.Close();
})); }));
@ -717,6 +718,7 @@ namespace BBWY.Client.ViewModels
BasicPack = model.BasicPack; BasicPack = model.BasicPack;
CertificatePosition = model.CertificatePosition; CertificatePosition = model.CertificatePosition;
ArrivalQuantity = 0; ArrivalQuantity = 0;
GoodProductQuantity = 0; GoodProductQuantity = 0;
@ -744,16 +746,29 @@ namespace BBWY.Client.ViewModels
var packTaskRes = packPurchaseTaskService.GetQualityTask(model.TaskId); var packTaskRes = packPurchaseTaskService.GetQualityTask(model.TaskId);
if (packTaskRes==null)
{
MessageBox.Show("网络异常!");
return;
}
if (!packTaskRes.Success || packTaskRes.Data==null)
{
MessageBox.Show(packTaskRes.Msg);
return;
}
SkuPurchaseSchemeId = packTaskRes.Data.SkuPurchaseSchemeId;
saveType = packTaskRes.Data.SaveType; saveType = packTaskRes.Data.SaveType;
if (saveType==null) if (saveType == null)
{ {
saveType = OrderId.IsNullOrEmpty() ? SaveType.C端 : SaveType.B端; saveType = OrderId.IsNullOrEmpty() ? SaveType.C端 : SaveType.B端;
} }
if (packTaskRes == null || !packTaskRes.Success) return; if (packTaskRes == null || !packTaskRes.Success) return;
BarCodeModel = packTaskRes.Data.BarCodeDTO; BarCodeModel = packTaskRes.Data.BarCodeDTO;
IsNeedBarCode = packTaskRes.Data.IsNeedBar ? Need. : Need.; IsNeedBarCode = packTaskRes.Data.IsNeedBar ? Need. : Need.;
IsSetBarCode = packTaskRes.Data.BarCodeDTO==null ? true:false; IsSetBarCode = packTaskRes.Data.BarCodeDTO == null ? true : false;
IsNeedCertificateModel = packTaskRes.Data.IsNeedCer ? Need. : Need.; IsNeedCertificateModel = packTaskRes.Data.IsNeedCer ? Need. : Need.;
if (packTaskRes.Data.WareHourses != null) if (packTaskRes.Data.WareHourses != null)
packTaskRes.Data.WareHourses.ToList().ForEach(w => packTaskRes.Data.WareHourses.ToList().ForEach(w =>
@ -832,7 +847,7 @@ namespace BBWY.Client.ViewModels
if (hour<12) if (hour < 12)
{ {
PreCompeteTimeDayList.Add("今天"); PreCompeteTimeDayList.Add("今天");
PreCompeteTimeDayList.Add("明天"); PreCompeteTimeDayList.Add("明天");
@ -841,7 +856,7 @@ namespace BBWY.Client.ViewModels
PreCompeteTimeHour = "12点前"; PreCompeteTimeHour = "12点前";
} }
else if (hour<18) else if (hour < 18)
{ {
PreCompeteTimeDayList.Add("今天"); PreCompeteTimeDayList.Add("今天");
PreCompeteTimeDayList.Add("明天"); PreCompeteTimeDayList.Add("明天");

4
BBWY.Client/Views/PackTask/LookCerWindow.xaml.cs

@ -32,6 +32,10 @@ namespace BBWY.Client.Views.PackTask
int goodsNumberIndex = 0; int goodsNumberIndex = 0;
foreach (CertificateModel certificateModel in certificate) foreach (CertificateModel certificateModel in certificate)
{ {
if (certificateModel==null)
{
continue;
}
goodsNumberIndex++; goodsNumberIndex++;
certificateModel.GoodsNumberIndex = goodsNumberIndex; certificateModel.GoodsNumberIndex = goodsNumberIndex;
GoodsNumberCerList.Add(new GoodsNumberCer GoodsNumberCerList.Add(new GoodsNumberCer

2
BBWY.Client/Views/QualityTask/QualityWindow.xaml

@ -395,7 +395,7 @@
<ColumnDefinition Width="90"/> <ColumnDefinition Width="90"/>
<ColumnDefinition Width="140"/> <ColumnDefinition Width="140"/>
<ColumnDefinition Width="86"/> <ColumnDefinition Width="86"/>
<ColumnDefinition Width="86"/> <ColumnDefinition Width="0" />
<ColumnDefinition Width="100"/> <ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>

Loading…
Cancel
Save