diff --git a/SlnMesnac.WPF/MainWindow.xaml b/SlnMesnac.WPF/MainWindow.xaml
index bd5522e..3501201 100644
--- a/SlnMesnac.WPF/MainWindow.xaml
+++ b/SlnMesnac.WPF/MainWindow.xaml
@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SlnMesnac.WPF"
mc:Ignorable="d"
- Title="新宝龙输送带RFID数字化系统" WindowStartupLocation="CenterScreen" WindowState="Maximized" Height="1020" Width="1420" Topmost="False" Loaded="Window_Loaded" Closing="Window_Closing" Icon="/NOVOTON.ico">
+ Title="新宝龙输送带RFID数字化系统" WindowStartupLocation="CenterScreen" WindowState="Maximized" Height="1080" Width="1920" Topmost="False" Loaded="Window_Loaded" Closing="Window_Closing" Icon="/NOVOTON.ico">
diff --git a/SlnMesnac.WPF/MainWindow.xaml.cs b/SlnMesnac.WPF/MainWindow.xaml.cs
index 38c5a40..e330df1 100644
--- a/SlnMesnac.WPF/MainWindow.xaml.cs
+++ b/SlnMesnac.WPF/MainWindow.xaml.cs
@@ -74,6 +74,16 @@ namespace SlnMesnac.WPF
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
+ var result = System.Windows.MessageBox.Show("确认要关闭系统吗?", "确认", MessageBoxButton.OKCancel, MessageBoxImage.Question);
+ if (result != MessageBoxResult.OK)
+ {
+ e.Cancel = true;
+ return;
+ }
+ else
+ {
+ e.Cancel = false;
+ }
Log.Information("系统关闭!");
}
diff --git a/SlnMesnac.WPF/Page/IndexPage/ProductionLineUserControl.xaml b/SlnMesnac.WPF/Page/IndexPage/ProductionLineUserControl.xaml
index 4e2684b..baffb62 100644
--- a/SlnMesnac.WPF/Page/IndexPage/ProductionLineUserControl.xaml
+++ b/SlnMesnac.WPF/Page/IndexPage/ProductionLineUserControl.xaml
@@ -92,12 +92,34 @@
+
+
+
+
@@ -138,8 +160,10 @@
-
-
+
+
+
diff --git a/SlnMesnac.WPF/ViewModel/IndexPage/ChangeTypeViewModel.cs b/SlnMesnac.WPF/ViewModel/IndexPage/ChangeTypeViewModel.cs
index 29b67ad..93e8d0e 100644
--- a/SlnMesnac.WPF/ViewModel/IndexPage/ChangeTypeViewModel.cs
+++ b/SlnMesnac.WPF/ViewModel/IndexPage/ChangeTypeViewModel.cs
@@ -136,6 +136,7 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
if (res)
{
MessageBox.Show("停止盘点成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ WeakReferenceMessenger.Default.Send("Cancel", "Cancel");
}
else
{
@@ -168,8 +169,8 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
//调用MES接口获取生产订单信息
//MessageBox.Show("MES订单获取成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
List mesOrderInfos = new List();
- //string response = "{\"code\":200,\"msg\":\"success\",\"data\":[{\"OrderNo\":\"SS075\",\"ProductCode\":\"4030502500100006\",\"ProductType\":\"钢丝带-ST-井下阻燃钢丝带\",\"ProductName\":\"输送带-井下阻燃钢丝带-ST\",\"ProductSpec\":\"1400mm;ST/S2500*1;8+8;MT/MT;D7.2;P15;N89\",\"PlanQty\":130.00,\"NextProductNo\":1}]}\r\n";
- string response = await _httpclient.GetMesOrderInfo(lineno, BeginDate.ToString("yyyy-MM-dd"));
+ string response = "{\"code\":200,\"msg\":\"success\",\"data\":[{\"OrderNo\":\"SS076\",\"ProductCode\":\"4030502500100006\",\"ProductType\":\"钢丝带-ST-井下阻燃钢丝带\",\"ProductName\":\"输送带-井下阻燃钢丝带-ST\",\"ProductSpec\":\"1400mm;ST/S2500*1;8+8;MT/MT;D7.2;P15;N89\",\"PlanQty\":130.00,\"NextProductNo\":2}]}\r\n";
+ //string response = await _httpclient.GetMesOrderInfo(lineno, BeginDate.ToString("yyyy-MM-dd"));
Console.WriteLine("接收MES接口返回:"+ response);
// 反序列化
try
diff --git a/SlnMesnac.WPF/ViewModel/IndexPage/ProductionLineViewModel.cs b/SlnMesnac.WPF/ViewModel/IndexPage/ProductionLineViewModel.cs
index 8d8970e..d6f8065 100644
--- a/SlnMesnac.WPF/ViewModel/IndexPage/ProductionLineViewModel.cs
+++ b/SlnMesnac.WPF/ViewModel/IndexPage/ProductionLineViewModel.cs
@@ -29,6 +29,7 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Threading;
+using System.Xml.Serialization;
using TouchSocket.Core;
using static Microsoft.WindowsAPICodePack.Shell.PropertySystem.SystemProperties.System;
using Task = System.Threading.Tasks.Task;
@@ -96,12 +97,30 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
}
}
+ ///
+ /// 当前状态 空闲 盘点中 写入中
+ ///
+ private string _CurrentState = "空闲";
+ public string CurrentState
+ {
+ get => _CurrentState;
+ set
+ {
+ if (_CurrentState != value)
+ {
+ _CurrentState = value;
+ RaisePropertyChanged(() => CurrentState);
+ }
+ }
+ }
+
public ProductionLineViewModel()
{
GetOrderInfoCommand = new RelayCommand