diff --git a/Aucma.Core.DoorFoam/ViewModels/MainWindowViewModel.cs b/Aucma.Core.DoorFoam/ViewModels/MainWindowViewModel.cs
index 13fba3d9..d61bddc0 100644
--- a/Aucma.Core.DoorFoam/ViewModels/MainWindowViewModel.cs
+++ b/Aucma.Core.DoorFoam/ViewModels/MainWindowViewModel.cs
@@ -19,7 +19,7 @@ namespace Aucma.Core.DoorFoam.ViewModels
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(MainWindowViewModel));
private IndexPageView firstPage = new IndexPageView();//首页
private StatisticsPageView recordPage = new StatisticsPageView();
-
+
public MainWindowViewModel()
{
UserContent = firstPage;
@@ -95,6 +95,7 @@ namespace Aucma.Core.DoorFoam.ViewModels
Scanner1State(flag1);
}
#endregion
+
#region 更换界面
public System.Windows.Controls.UserControl _content;
@@ -186,11 +187,12 @@ namespace Aucma.Core.DoorFoam.ViewModels
{
switch (page)
{
- case "FirstPage":
+ case "FoamLinePage":
UserContent = firstPage;
break;
- case "RecordPage":
- UserContent = recordPage;
+ case "RealTimePage":
+ RealTimePageView realTimePageView = new RealTimePageView();
+ UserContent = realTimePageView;
break;
default:
break;
diff --git a/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs b/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs
index fbac5dd9..a83e83d7 100644
--- a/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs
+++ b/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs
@@ -22,47 +22,28 @@ namespace Aucma.Core.DoorFoam.ViewModels
///
private void InitEveryDayMethodAsync()
{
- DateTime startTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
- DateTime endTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
-
- //var list = await _doorFoamRecordServices.QueryAsync(d => d.BeginTime >= startTime && d.EndTime <= endTime);
-
ChartValues achievement = new ChartValues();
Random random = new Random();
- for (int i = 0; i < 5; i++)
+ for (int i = 0; i < 2; i++)
{
- achievement.Add(random.Next(60, 100));
+ achievement.Add(random.Next(0, 50));
}
- var column = new ColumnSeries();
- column.DataLabels = true;
- column.Title = "型号";
- column.Values = achievement;
- column.Foreground = Brushes.White;
-
- ModelStatistics.Add(column);
-
- ProductionHourList = new List()
+ ModelStatistics.Add(new ColumnSeries()
{
- "12",
- "13",
- "14",
- "15",
- "16",
- };
-
- ChartValues achievement2 = new ChartValues();
- Random random2 = new Random();
- for (int i = 0; i < 5; i++)
+ DataLabels = true,
+ Title = "型号",
+ Values = achievement,
+ Fill = new SolidColorBrush(Color.FromRgb(15, 209, 226)),
+ Foreground = Brushes.White,
+ FontSize = 18
+ });
+
+ MaterialNameList = new List()
{
- achievement2.Add(random2.Next(60, 100));
- }
- var column2 = new ColumnSeries();
- column2.DataLabels = true;
- column2.Title = "产量";
- column2.Values = achievement2;
- column2.Foreground = Brushes.White;
+ "BCD-287CHN",
+ "BCD-287CHN"
+ };
- Achievement.Add(column2);
}
#region 扫描信息
diff --git a/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml.cs b/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml.cs
index 695c467e..6a65b351 100644
--- a/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml.cs
+++ b/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml.cs
@@ -1,4 +1,5 @@
-using System;
+using Aucma.Core.DoorFoam.ViewModels;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -23,7 +24,7 @@ namespace Aucma.Core.DoorFoam.Views
public RealTimePageView()
{
InitializeComponent();
- this.DataContext = new RealTimePageView();
+ this.DataContext = new RealTimePageViewModel();
}
}
}
diff --git a/Aucma.Core.PrintTo/ViewModels/PrintToDevViewModel.cs b/Aucma.Core.PrintTo/ViewModels/PrintToDevViewModel.cs
index 9b7f1c5d..eade9e78 100644
--- a/Aucma.Core.PrintTo/ViewModels/PrintToDevViewModel.cs
+++ b/Aucma.Core.PrintTo/ViewModels/PrintToDevViewModel.cs
@@ -314,7 +314,7 @@ namespace Aucma.Core.PrintTo.ViewModels
#endregion
- printBarCode.ProductCode = ProductCode;
+ printBarCode.OrderCode = ProductCode;
printBarCode.MaterialCode = item.MaterialCode;
printBarCode.MaterialName = item.MaterialName;
printBarCode.PrintTime = DateTime.Now;
diff --git a/Aucma.Core.PrintTo/ViewModels/SupplementPrintPageViewModel.cs b/Aucma.Core.PrintTo/ViewModels/SupplementPrintPageViewModel.cs
index 9995b649..8a9728e6 100644
--- a/Aucma.Core.PrintTo/ViewModels/SupplementPrintPageViewModel.cs
+++ b/Aucma.Core.PrintTo/ViewModels/SupplementPrintPageViewModel.cs
@@ -100,7 +100,7 @@ namespace Aucma.Core.PrintTo.ViewModels
if (!string.IsNullOrEmpty(queryStr))
{
Datalist.Clear();
- var list = await _barCodeServices.QueryAsync(d => d.MaterialName.Contains(queryStr) ||d.MaterialBarcode.Equals(ProductNo) || d.ProductCode.Equals(ProductNo));
+ var list = await _barCodeServices.QueryAsync(d => d.MaterialName.Contains(queryStr) ||d.MaterialBarcode.Equals(ProductNo) || d.OrderCode.Equals(ProductNo));
foreach (var item in list)
{
@@ -126,7 +126,7 @@ namespace Aucma.Core.PrintTo.ViewModels
#region 加载DataGrid数据
private async Task LoadData(string productCode,string material_code)
{
- var list = await _barCodeServices.QueryAsync(d => d.ProductCode.Contains(productCode)&& d.MaterialCode.Contains(material_code));
+ var list = await _barCodeServices.QueryAsync(d => d.OrderCode.Contains(productCode)&& d.MaterialCode.Contains(material_code));
foreach (var item in list)
{
diff --git a/Aucma.Core.SheetMetal/Views/IndexPageView.xaml b/Aucma.Core.SheetMetal/Views/IndexPageView.xaml
index 0c23cabd..026b445b 100644
--- a/Aucma.Core.SheetMetal/Views/IndexPageView.xaml
+++ b/Aucma.Core.SheetMetal/Views/IndexPageView.xaml
@@ -13,7 +13,7 @@