1.报错机制增加未扫描上架的提供库位屏蔽机制

2.库位查询增加当前屏蔽模组库位百分比查询
3.货架库位屏蔽、模组屏蔽后增加当前禁用模组库位百分比查询
This commit is contained in:
hehaibing-1996
2024-11-05 16:32:33 +08:00
parent e197c32f52
commit 2f9ca87876
11 changed files with 350 additions and 9 deletions

View File

@ -102,7 +102,9 @@ namespace 智能仓储WCS管理系统.ViewModel
}
else if (Result != null && Result.Code == 200 && (Result.Data == null || Result.Data.Lists == null || Result.Data.Lists.Count == 0))
{
MessageBox.Show($"未查询到领料明细!所推荐物料在此货架上不存在,请确认是否在其他货架上!\r\n{string.Join(",\r\n", matSns)}");
var content = $"未查询到领料明细!所推荐物料在此货架上不存在,请确认是否在其他货架上!或者是否已经丢失?(复制物料条码后在[出入记录]功能中通过物料SN查询确认是否丢失\r\n{string.Join(",\r\n", matSns)}";
//MessageBox.Show($"未查询到领料明细!所推荐物料在此货架上不存在,请确认是否在其他货架上!或者是否已经丢失?(复制物料条码后在[出入记录]功能中即可查询)\r\n{string.Join(",\r\n", matSns)}");
TipView.Show(content, "提示", true);
DataGridItemSource = null;
}
else
@ -120,12 +122,12 @@ namespace 智能仓储WCS管理系统.ViewModel
}
else if (result != null && result.code == 200 && (result.data == null || result.data.Count == 0))
{
Growl.Warning("未查询到物料明细MES推荐物料明细为空");
Growl.Warning("未查询到物料明细MES推荐物料明细为空请确认该单据是否已发或咨询MES系统相关负责人");
DataGridItemSource = null;
}
else
{
Growl.Warning("未查询到领料明细请求MES接口失败");
Growl.Warning("未查询到领料明细请求MES接口失败请确认该单据是否已发或咨询MES系统相关负责人");
DataGridItemSource = null;
}
});

View File

@ -230,6 +230,37 @@ namespace 智能仓储WCS管理系统.ViewModel
}
#endregion
}
public ICommand BtnDisablePercentCommand { get => new DelegateCommand(DisablePercent); }
public void DisablePercent()
{
#region
try
{
var body = new DisableOrEnableStoreRequest()
{
};
var Result = ApiHelp.GetDataFromHttp<ResponseCommon>(LocalFile.Config.ApiIpHost + "storeInfo/getDisablePercent", body, "POST");
if (Result != null && Result.Code == 200)
{
HandyControl.Controls.MessageBox.Show(Result.Data.ToString());
}
else if (Result != null)
{
Growl.Warning(Result.Message);
}
else
{
Growl.Warning("操作失败:请重试!");
}
}
catch (Exception ex)
{
Growl.Error("操作失败:" + ex.Message);
}
#endregion
}
#endregion
#region PageOperation

View File

@ -67,6 +67,11 @@
Grid.Column="9" MinHeight="40" FontSize="18" Content="&#xe652; 重置" FontFamily="{StaticResource IconFont}"
Command="{Binding BtnResetCommand}">
</Button>
<Button Style="{StaticResource ButtonWarning}" hc:BorderElement.CornerRadius="12"
Grid.Column="8" Grid.Row="1" MinHeight="30" FontSize="18" Content="&#xe652; 屏蔽率" FontFamily="{StaticResource IconFont}"
Command="{Binding BtnDisablePercentCommand}">
</Button>
</Grid>
</Border>

View File

@ -32,7 +32,7 @@
<TextBlock Margin="5,0" Text="{Binding Title, FallbackValue=标题}" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<Button Grid.Column="1" Visibility="{Binding IsClose,Converter={StaticResource Boolean2VisibilityHiddenConverter}}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource CloseGeometry}" Click="closeClick"/>
</Grid>
<TextBlock Margin="5,0" Grid.Row="1" Text="{Binding Content, FallbackValue=我是内容}" FontSize="18" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBox Margin="5,0" Grid.Row="1" Text="{Binding Content, Mode=OneWay}" FontSize="18" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<hc:UniformSpacingPanel x:Name="spacingPanel" Grid.Row="2" Margin="5,0,5,10" Spacing="10" Width="auto" ChildWrapping="Wrap" HorizontalAlignment="Center">
<Button Content="确认"/>
<Button Content="取消"/>

View File

@ -66,6 +66,19 @@ namespace 智能仓储WCS管理系统
return Show(content, title, new string[] { "确认", "忽略" }, _warning, isVisCloseBut);
}
/// <summary>
/// 显示提示框
/// </summary>
/// <param name="content">内容</param>
/// <param name="title">标题</param>
/// <param name="isVisCloseBut">界面右上角是否显示关闭按钮</param>
/// <returns>点击的按钮文本</returns>
public static WarningWindow ShowNoScanError(string content, string title, WebSocketMessageModel _warning, bool isVisCloseBut = true, Window owner = null)
{
content = content + "\r\n确认对应无物料可点击[屏蔽库位]按钮进行库位屏蔽!";
return Show(content, title, new string[] { "确认","屏蔽库位", "忽略" }, _warning, isVisCloseBut);
}
/// <summary>
/// 显示提示框
/// </summary>
@ -92,6 +105,14 @@ namespace 智能仓储WCS管理系统
Content = item,
};
button.Margin = new Thickness(10, 0, 10, 0);
button.FontSize = 18;
if (item == "屏蔽库位")
{
button.Foreground = Brushes.Red;
button.FontWeight = FontWeights.DemiBold;
//WaningWindow.Content = WaningWindow.Content + "\r\n确认对应无物料可点击[屏蔽库位]按钮进行库位屏蔽!";
}
button.Click += (s, e) =>
{
clikename = ((Button)s).Content.ToString();
@ -99,10 +120,26 @@ namespace 智能仓储WCS管理系统
#region /
try
{
var solveType = SolveTypeEnum.;
switch (clikename)
{
case "确认":
solveType = SolveTypeEnum.;
break;
case "忽略":
solveType = SolveTypeEnum.;
break;
case "屏蔽库位":
solveType = SolveTypeEnum.;
break;
default:
solveType = SolveTypeEnum.;
break;
}
var body = new SolveWarningRequest()
{
Guid = _warning.Guid,
SolveType = clikename == "确认" ? SolveTypeEnum. : SolveTypeEnum.,
SolveType = solveType,
UserName = LocalStatic.CurrentUser,
DeviceType = "WCS前端",
};

View File

@ -26,7 +26,14 @@ namespace 智能仓储WCS管理系统
Logs.Write($"【添加报警信息弹窗】报警类型:{warningModel.WarningType} 报警信息:{warningModel.WarningMessage} Guid:{warningModel.Guid}", LogsType.WebSocket);
Application.Current.Dispatcher.Invoke(new Action(() =>
{
warnings.Add(WarningWindow.Show(warningModel.WarningMessage, "报警信息", warningModel));
if (warningModel.WarningType == WarningTypeEnum. || warningModel.WarningType == WarningTypeEnum. || warningModel.WarningType == WarningTypeEnum.)
{
warnings.Add(WarningWindow.ShowNoScanError(warningModel.WarningMessage, "报警信息", warningModel));
}
else
{
warnings.Add(WarningWindow.Show(warningModel.WarningMessage, "报警信息", warningModel));
}
}));
}
}