From 230a59598a85e79c73659c603ae6809d4bf43616 Mon Sep 17 00:00:00 2001 From: "liulb@mesnac.com" Date: Tue, 5 Dec 2023 13:01:16 +0800 Subject: [PATCH] new --- .../ViewModels/IndexPageViewModel.cs | 22 +++---- .../ViewModels/PalletizPageViewModel.cs | 12 +++- .../ViewModels/SplitPlanViewModel.cs | 2 +- Aucma.Core.Palletiz/Views/IndexPageView.xaml | 4 +- .../Views/PalletizPageView.xaml | 12 ++-- .../Views/QuantityIssuedView.xaml | 27 +++++---- Aucma.Core.Palletiz/Views/SplitPlanView.xaml | 2 +- Aucma.Core.Palletiz/appsettings.json | 58 ++++++++++--------- Aucma.Core.PrintTo/App.xaml | 2 +- .../ViewModels/IndexPageViewModel.cs | 2 +- .../ViewModels/PrintToDevViewModel.cs | 4 +- Aucma.Core.PrintTo/Views/IndexPageView.xaml | 2 +- 12 files changed, 82 insertions(+), 67 deletions(-) diff --git a/Aucma.Core.Palletiz/ViewModels/IndexPageViewModel.cs b/Aucma.Core.Palletiz/ViewModels/IndexPageViewModel.cs index d3806825..5537a641 100644 --- a/Aucma.Core.Palletiz/ViewModels/IndexPageViewModel.cs +++ b/Aucma.Core.Palletiz/ViewModels/IndexPageViewModel.cs @@ -19,7 +19,7 @@ namespace Aucma.Core.Palletiz.ViewModels public IndexPageViewModel() { StationName = "成品分垛入库"; - MaterialName = "SC-AUCMA-农夫山泉,SC 门体"; + MaterialName = "SC-AUCMA-农夫山泉,SC"; OrderNo = "8512365486"; BeginTime = DateTime.Now.ToString("yyyy-mm-dd HH:mm:ss"); @@ -85,14 +85,14 @@ namespace Aucma.Core.Palletiz.ViewModels { 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(1, 50)); } var column = new ColumnSeries(); column.DataLabels = true; - column.Title = "型号"; + column.Title = "小时产量"; column.Values = achievement; column.Foreground = Brushes.White; @@ -100,22 +100,22 @@ namespace Aucma.Core.Palletiz.ViewModels ProductionHourList = new List() { - "12", - "13", - "14", - "15", - "16", + "7:30", + "8:30", + "9:30", + "10:30", + "11:30", }; ChartValues achievement2 = new ChartValues(); Random random2 = new Random(); for (int i = 0; i < 5; i++) { - achievement2.Add(random2.Next(60, 100)); + achievement2.Add(random2.Next(0, 30)); } var column2 = new ColumnSeries(); column2.DataLabels = true; - column2.Title = "产量"; + column2.Title = "型号统计"; column2.Values = achievement2; column2.Foreground = Brushes.White; diff --git a/Aucma.Core.Palletiz/ViewModels/PalletizPageViewModel.cs b/Aucma.Core.Palletiz/ViewModels/PalletizPageViewModel.cs index 5476d417..579ec16c 100644 --- a/Aucma.Core.Palletiz/ViewModels/PalletizPageViewModel.cs +++ b/Aucma.Core.Palletiz/ViewModels/PalletizPageViewModel.cs @@ -1,4 +1,6 @@ -using CommunityToolkit.Mvvm.ComponentModel; +using Aucma.Core.Palletiz.Views; +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; using System; using System.Collections.Generic; using System.Linq; @@ -9,7 +11,13 @@ namespace Aucma.Core.Palletiz.ViewModels { public partial class PalletizPageViewModel : ObservableObject { - public PalletizPageViewModel() { } + public PalletizPageViewModel() { } + [RelayCommand] + public void AddPlan(string objId) + { + SplitPlanView plan = new SplitPlanView(objId); + plan.Show(); + } } } diff --git a/Aucma.Core.Palletiz/ViewModels/SplitPlanViewModel.cs b/Aucma.Core.Palletiz/ViewModels/SplitPlanViewModel.cs index 09c978e9..d4cc2f4b 100644 --- a/Aucma.Core.Palletiz/ViewModels/SplitPlanViewModel.cs +++ b/Aucma.Core.Palletiz/ViewModels/SplitPlanViewModel.cs @@ -62,7 +62,7 @@ namespace Aucma.Core.Palletiz.ViewModels PlanAmount = item.PlanAmount, ResidueAmount = item.PlanAmount - item.CompleteAmount, SpliteResidueAmount = item.PlanAmount - residue, - StartDate = item.BeginTime + //StartDate = item.BeginTime }); i++; } diff --git a/Aucma.Core.Palletiz/Views/IndexPageView.xaml b/Aucma.Core.Palletiz/Views/IndexPageView.xaml index 8ebdfcd6..092df237 100644 --- a/Aucma.Core.Palletiz/Views/IndexPageView.xaml +++ b/Aucma.Core.Palletiz/Views/IndexPageView.xaml @@ -187,7 +187,7 @@ - + @@ -218,7 +218,7 @@ - + diff --git a/Aucma.Core.Palletiz/Views/PalletizPageView.xaml b/Aucma.Core.Palletiz/Views/PalletizPageView.xaml index d0e7f921..c78d9da3 100644 --- a/Aucma.Core.Palletiz/Views/PalletizPageView.xaml +++ b/Aucma.Core.Palletiz/Views/PalletizPageView.xaml @@ -46,7 +46,7 @@ - + @@ -116,25 +116,25 @@ -