1.出库界面展示当前正在进行出库的单据
2.后台退出了入库模式 通知前台扫码枪退出入库 3.对接盟讯公司登录Mes接口 4.接口记录增加本地日志排查问题
This commit is contained in:
@ -71,6 +71,8 @@ namespace 货架标准上位机
|
||||
/// 是否在入库模式中
|
||||
/// </summary>
|
||||
public bool IsInstoreMode { get; set; }
|
||||
|
||||
public DateTime IsInstoreModeTime { get; set; } = DateTime.MinValue;
|
||||
/// <summary>
|
||||
/// 串口号
|
||||
/// </summary>
|
||||
|
@ -184,6 +184,7 @@ namespace 货架标准上位机.ViewModel
|
||||
{
|
||||
Logs.Write($"扫码模组{scanner.TempCode},进入入库模式成功!", LogsType.Scanner);
|
||||
scanner.IsInstoreMode = true;
|
||||
scanner.IsInstoreModeTime = DateTime.Now;
|
||||
scanner.ShelfCode = Result.Data.ShelfCode;
|
||||
scanner.ModulesStr = Result.Data.ModulesStr;
|
||||
|
||||
@ -233,7 +234,6 @@ namespace 货架标准上位机.ViewModel
|
||||
scanner.IsInstoreMode = false;
|
||||
scanner.ShelfCode = string.Empty;
|
||||
scanner.ModulesStr = string.Empty;
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -159,7 +159,7 @@ namespace 货架标准上位机.ViewModel
|
||||
if (Result != null && Result.Code == 200)
|
||||
{
|
||||
Growl.Warning("已成功开始出库!");
|
||||
RefreshDataGridItemSource();
|
||||
RefreshOutOrderList(SelectedOutOrderNumber);
|
||||
}
|
||||
else if (Result != null)
|
||||
{
|
||||
@ -203,7 +203,8 @@ namespace 货架标准上位机.ViewModel
|
||||
if (Result != null && Result.Code == 200)
|
||||
{
|
||||
Growl.Warning("已成功结束出库!");
|
||||
RefreshDataGridItemSource();
|
||||
RefreshOutOrderList(SelectedOutOrderNumber);
|
||||
//RefreshDataGridItemSource();
|
||||
}
|
||||
else if (Result != null)
|
||||
{
|
||||
|
@ -52,8 +52,8 @@
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Margin="5" FontWeight="Bold" FontSize="24" Text="停止入库扫码"></TextBlock>
|
||||
<Image Margin="5" Width="120" Height="120" Source="/Resources/goOutInstore.png"></Image>
|
||||
<TextBlock Margin="5" FontWeight="Bold" FontSize="24" Text="停止入库码"></TextBlock>
|
||||
<Image Margin="5" Width="125" Height="125" Source="/Resources/goOutInstore.png"></Image>
|
||||
</StackPanel>
|
||||
<!--<GroupBox Grid.Column="1" Header="停止入库码" Padding="10">-->
|
||||
<!--<Border Background="{DynamicResource RegionBrush}" CornerRadius="4">-->
|
||||
|
@ -94,7 +94,6 @@
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Visible">
|
||||
<ListView FontSize="18" ItemsSource="{Binding OutOrderList}" SelectedItem="{Binding SelectedOutOrder,Mode=TwoWay}" PreviewMouseWheel="ListView_PreviewMouseWheel">
|
||||
<ListView.View>
|
||||
|
||||
<GridView AllowsColumnReorder="False">
|
||||
<GridView.ColumnHeaderContainerStyle>
|
||||
<Style TargetType="{x:Type GridViewColumnHeader}">
|
||||
@ -104,6 +103,30 @@
|
||||
<GridViewColumn DisplayMemberBinding="{Binding OrderNumber}"/>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource ListViewItemBaseStyle}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="ListBoxItem.IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="CadetBlue"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="ListBoxItem.IsSelected" Value="true" />
|
||||
<Condition Property="Selector.IsSelectionActive" Value="false" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" Value="CadetBlue"/>
|
||||
</MultiTrigger>
|
||||
<DataTrigger Binding="{Binding IsOuting}" Value="True">
|
||||
<!--<Setter Property="Background" Value="Green"/>-->
|
||||
<Setter Property="Foreground" Value="Red" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsOuting}" Value="False">
|
||||
<!--<Setter Property="Background" Value="White"/>-->
|
||||
<Setter Property="Foreground" Value="Black" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
</ListView>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
@ -112,17 +135,9 @@
|
||||
<Border CornerRadius="3" Margin="1" Grid.Row="0" Grid.Column="1" Background="AliceBlue" BorderBrush="CadetBlue" BorderThickness="1.5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<!--<RowDefinition Height="1*"></RowDefinition>-->
|
||||
<RowDefinition Height="12*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--<StackPanel VerticalAlignment="Center" Orientation="Horizontal" >
|
||||
<TextBlock FontSize="24">
|
||||
</TextBlock>
|
||||
<TextBlock Text="{Binding SelectedOutOrderNumber}" FontSize="24">
|
||||
</TextBlock>
|
||||
</StackPanel>-->
|
||||
|
||||
<DataGrid Grid.Row="0"
|
||||
SelectedCellsChanged="DataGrid_SelectedCellsChanged"
|
||||
ItemsSource="{Binding DataGridItemSource}"
|
||||
@ -164,6 +179,10 @@
|
||||
<ColumnDefinition Width="5*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="5*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0">
|
||||
<Rectangle Width="12" Height="12" Fill="Red"></Rectangle>
|
||||
<TextBlock Text="列表中红色字体表示单据正在发料" FontSize="14"></TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1">
|
||||
<TextBlock Text="当前状态:" FontSize="22">
|
||||
</TextBlock>
|
||||
|
@ -55,11 +55,12 @@ namespace 货架标准上位机
|
||||
HandyControl.Controls.MessageBox.Warning("请输入账号!", "提示");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(pass))
|
||||
{
|
||||
HandyControl.Controls.MessageBox.Warning("请输入密码!", "提示");
|
||||
return;
|
||||
}
|
||||
if (!LocalFile.Config.IsMx)
|
||||
if (string.IsNullOrEmpty(pass))
|
||||
{
|
||||
HandyControl.Controls.MessageBox.Warning("请输入密码!", "提示");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@ -73,9 +74,11 @@ namespace 货架标准上位机
|
||||
PassWord = pass,
|
||||
IsNoLogin = false,
|
||||
};
|
||||
if (LocalFile.Config.IsMx)
|
||||
body.IsNoLogin = true;
|
||||
var Result = ApiHelp.GetDataFromHttp<ResponseBase<UserModel>>(LocalFile.Config.ApiIpHost + "user/userLogin",
|
||||
body, "POST");
|
||||
if (Result!= null && Result.Code != 200)
|
||||
if (Result != null && Result.Code != 200)
|
||||
{
|
||||
HandyControl.Controls.MessageBox.Warning(Result.Message, "提示");
|
||||
return;
|
||||
|
@ -13,6 +13,7 @@ using TouchSocket.Core;
|
||||
using TouchSocket.Http.WebSockets;
|
||||
using TouchSocket.Sockets;
|
||||
using WCS.Model.WebSocketModel;
|
||||
using 货架标准上位机.Views.Controls;
|
||||
|
||||
namespace 货架标准上位机
|
||||
{
|
||||
@ -41,8 +42,8 @@ namespace 货架标准上位机
|
||||
//自定义实现心跳和重连
|
||||
Task.Run(async () =>
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
await Task.Delay(4000);
|
||||
try
|
||||
{
|
||||
@ -53,7 +54,7 @@ namespace 货架标准上位机
|
||||
WebSocket.client.TryConnect();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
@ -121,6 +122,18 @@ namespace 货架标准上位机
|
||||
TextBoxLog.AddLog(warning.WarningMessage, "InstoreLog", DateTime.Now);
|
||||
client.Send(e.DataFrame.ToText());
|
||||
break;
|
||||
case WarningTypeEnum.通知前台结束入库:
|
||||
var scanner = ScannerManager.Scanners.Where(t => t.IsInstoreMode && t.ShelfCode == warning.ShelfCode && t.IsInstoreModeTime < warning.CreateTime)
|
||||
.FirstOrDefault();
|
||||
if (scanner != null)
|
||||
{
|
||||
scanner.IsInstoreMode = false;
|
||||
scanner.ShelfCode = string.Empty;
|
||||
scanner.ModulesStr = string.Empty;
|
||||
|
||||
scanner.ScannerDisplayControl.RefreshValues(string.Empty, string.Empty);
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
return;
|
||||
|
@ -2,9 +2,9 @@
|
||||
//连接不上加:SslMode=none;
|
||||
"MySql": "server=localhost;Database=db1;Uid=root;Pwd=123456;Convert Zero Datetime=True",
|
||||
//货架服务器的IP和端口号
|
||||
"ApiIpHost": "http://127.0.0.1:8888/",
|
||||
"ApiIpHost": "http://192.168.9.183:8888/",
|
||||
//WebSocket的地址
|
||||
"WebSocketUrl": "ws://127.0.0.1:7789/ws",
|
||||
"WebSocketUrl": "ws://192.168.9.183:7789/ws",
|
||||
//货架分区
|
||||
"GroupName": [ "C0"],
|
||||
//设备类型 可以配置为每个电脑不一样
|
||||
|
Reference in New Issue
Block a user