liulb@mesnac.com 1 year ago
parent c99973ec31
commit 0e846b372a

@ -81,9 +81,6 @@
<Compile Update="Views\PalletizPageView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\SearchCriteriaView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\StatisticsPageView.xaml.cs">
<SubType>Code</SubType>
</Compile>

@ -7,9 +7,6 @@
</ApplicationDefinition>
</ItemGroup>
<ItemGroup>
<Page Update="Views\PlanPageView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\PalletizPageView.xaml">
<SubType>Designer</SubType>
</Page>
@ -19,12 +16,6 @@
<Page Update="Views\MainWindow.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\QuantityIssuedView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\SearchCriteriaView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\SplitPlanView.xaml">
<SubType>Designer</SubType>
</Page>

@ -85,15 +85,16 @@ namespace Aucma.Core.Palletiz.ViewModels
{
ChartValues<double> achievement = new ChartValues<double>();
Random random = new Random();
for (int i = 0; i < 2; i++)
{
achievement.Add(random.Next(1, 50));
}
//for (int i = 0; i < 2; i++)
//{
// achievement.Add(random.Next(1, 50));
//}
var column = new ColumnSeries();
column.DataLabels = true;
column.Title = "小时产量";
column.Values = achievement;
column.ScalesYAt = 0;
column.Foreground = Brushes.White;
ModelStatistics.Add(column);
@ -109,13 +110,14 @@ namespace Aucma.Core.Palletiz.ViewModels
ChartValues<double> achievement2 = new ChartValues<double>();
Random random2 = new Random();
for (int i = 0; i < 5; i++)
{
achievement2.Add(random2.Next(0, 30));
}
//for (int i = 0; i < 5; i++)
//{
// achievement2.Add(random2.Next(0, 30));
//}
var column2 = new ColumnSeries();
column2.DataLabels = true;
column2.Title = "型号统计";
column2.ScalesYAt = 0;
column2.Values = achievement2;
column2.Foreground = Brushes.White;

@ -11,6 +11,10 @@ using Admin.Core.Common;
using Aucma.Core.PLc;
using Aucma.Core.Scanner;
using System.Linq;
using System.Windows.Threading;
using System.Threading.Tasks;
using Admin.Core.IService;
using Microsoft.Extensions.DependencyInjection;
namespace Aucma.Core.Palletiz.ViewModels
{
@ -20,10 +24,19 @@ namespace Aucma.Core.Palletiz.ViewModels
private IndexPageView firstPage = new IndexPageView();//首页
private StatisticsPageView recordPage = new StatisticsPageView();
private PalletizPageView palletizPage = new PalletizPageView();
ISysUserInfoServices _sysUserInfoServices;
public MainWindowViewModel()
{
_sysUserInfoServices = App.ServiceProvider.GetService<ISysUserInfoServices>();
UserContent = firstPage;
init();
Task.Run(async () =>
{
await RefreshTeamTime();//班组时间
});
}
public void init()
@ -34,6 +47,11 @@ namespace Aucma.Core.Palletiz.ViewModels
timer.AutoReset = true;
timer.Enabled = true;
timer.Start();
DispatcherTimer timer2 = new DispatcherTimer();
timer2.Interval = new TimeSpan(0, 0, 1); //间隔1秒
timer2.Tick += new EventHandler(timer_Tick);
timer2.Start();
}
#region 设备状态刷新
@ -368,5 +386,51 @@ namespace Aucma.Core.Palletiz.ViewModels
}
#endregion
#region 刷新时间
public string _currentDateTime;
public string CurrentDateTime
{
get => _currentDateTime;
set => SetProperty(ref _currentDateTime, value);
}
#endregion
#region 班组信息
/// <summary>
/// 班组信息
/// </summary>
public string _teamName;
public string TeamName
{
get => _teamName;
set => SetProperty(ref _teamName, value);
}
#endregion
public async Task RefreshTeamTime()
{
while (true)
{
var list = await _sysUserInfoServices.GetTeamData();
if (list != null && list.Count > 0)
{
var sysUserInfo = list.First();
TeamName = $"{sysUserInfo.TeamName}({list.Min(d => d.StartTime).ToString("HH:mm")}~{list.Max(d => d.EndTime).ToString("HH:mm")})";
//TeamName = $"{sysUserInfo.TeamName}";
}
Thread.Sleep(5000);
}
}
void timer_Tick(object sender, EventArgs e)
{
System.Windows.Application.Current.Dispatcher.Invoke((Action)(() =>
{
CurrentDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
}));
}
}
}

@ -273,12 +273,12 @@ namespace Aucma.Core.Palletiz.ViewModels
[RelayCommand]
public async Task SearchCriteriaSet()
{
SearchCriteriaView searchCriteriaWindow = new SearchCriteriaView();
bool? dialogResult = searchCriteriaWindow.ShowDialog();
if (dialogResult == false) // 用户点击了“取消”按钮或关闭窗口
{
//SearchCriteriaView searchCriteriaWindow = new SearchCriteriaView();
//bool? dialogResult = searchCriteriaWindow.ShowDialog();
//if (dialogResult == false) // 用户点击了“取消”按钮或关闭窗口
//{
await LoadData();
}
//}
}
#endregion
@ -324,9 +324,9 @@ namespace Aucma.Core.Palletiz.ViewModels
var info = SelectedDataItem as ProductPlanInfoModel;
if (info != null)
{
info.PlanType = _radioButtonStatus;
QuantityIssuedView quantityIssuedWindow = new QuantityIssuedView(info, ObjId);
quantityIssuedWindow.ShowDialog();
//info.PlanType = _radioButtonStatus;
//QuantityIssuedView quantityIssuedWindow = new QuantityIssuedView(info, ObjId);
//quantityIssuedWindow.ShowDialog();
}
}

@ -159,13 +159,6 @@
<Border Grid.Row="1" Grid.RowSpan="2" Grid.Column="5">
<TextBlock Text="255" Foreground="White" FontSize="40" FontWeight="Bold"/>
</Border>
<!--<Border Grid.Row="4" Grid.Column="5">
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<RadioButton Content="A库" Margin="5 0"/>
<RadioButton Content="B库" Margin="5 0"/>
</WrapPanel>
</Border>-->
</Grid>
</Border>
<Border Grid.Row="1">
@ -202,7 +195,7 @@
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="15">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" Step="1" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
@ -225,7 +218,7 @@
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding MaterialNameList}" FontSize="15">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="0" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
@ -233,7 +226,7 @@
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="15">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" Step="1">
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>

@ -34,17 +34,16 @@
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="澳柯玛产品分垛控制系统" FontSize="45" Foreground="White" FontWeight="Bold"/>
</StackPanel>
<StackPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right">
<StackPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 20 0 0" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="白班" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,30,0"/>
<!--<TextBlock Grid.Column="1" Text="|" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,30,0"/>
<TextBlock Grid.Column="2" Text="SCADA" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,10,0"/>-->
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Grid.Column="0" Text="{Binding TeamName}" FontSize="25" Foreground="White" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBlock Grid.Column="1" Text="{Binding CurrentDateTime}" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</StackPanel>
</Grid>
</StackPanel>
</Grid>

@ -6,366 +6,99 @@
xmlns:local="clr-namespace:Aucma.Core.Palletiz.Views"
mc:Ignorable="d" Background="#1152AC"
d:DesignHeight="1080" d:DesignWidth="1920">
<Border x:Name="HeightHelperPanel" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="5">
<Grid>
<Grid.Resources>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontFamily" Value="Microsoft YaHei"/>
</Style>
<Style TargetType="Border">
<Setter Property="BorderBrush" Value="#0288d1"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.1*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0"></Border>
<Border Grid.Row="1" Grid.Column="0" >
<TextBlock Text="1" x:Name="Set1" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="2" Grid.Column="0">
<TextBlock Text="2" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="3" Grid.Column="0" >
<TextBlock Text="3" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="4" Grid.Column="0" >
<TextBlock Text="4" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="5" Grid.Column="0" >
<TextBlock Text="5" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="6" Grid.Column="0" >
<TextBlock Text="6" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="7" Grid.Column="0" >
<TextBlock Text="7" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="8" Grid.Column="0" >
<TextBlock Text="8" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="9" Grid.Column="0" >
<TextBlock Text="9" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="10" Grid.Column="0" >
<TextBlock Text="10" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="11" Grid.Column="0" >
<TextBlock Text="11" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="12" Grid.Column="0" >
<TextBlock Text="12" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="0" Grid.Column="1" >
<TextBlock Text="物料编号" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="0" Grid.Column="2" >
<TextBlock Text="物料名称" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="0" Grid.Column="3" >
<TextBlock Text="转向角度" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="0" Grid.Column="4" >
<TextBlock Text="是否占用多货道" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="0" Grid.Column="5" >
<TextBlock Text="操作" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="1" Grid.Column="1" >
<TextBlock Text="9002006859" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="1" Grid.Column="2" >
<TextBlock Text="SC-439,YZXGWBC元气森林,C" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="1" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="180" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="1" Grid.Column="4" >
<TextBlock Text="是" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="1" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=Set1}"/>
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
<Border Grid.Row="2" Grid.Column="1" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="2" Grid.Column="2" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="2" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="0" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="2" Grid.Column="4" >
<TextBlock Text="否" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="2" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
<Border Grid.Row="3" Grid.Column="1" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="3" Grid.Column="2" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="3" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="0" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="3" Grid.Column="4" >
<TextBlock Text="否" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="3" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
<UserControl.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="30" />
</Style>
<Border Grid.Row="4" Grid.Column="1" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="4" Grid.Column="2" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="4" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="0" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="4" Grid.Column="4" >
<TextBlock Text="否" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="4" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
<Style TargetType="DataGrid">
<!--网格线颜色-->
<Setter Property="CanUserResizeColumns" Value="false"/>
<Setter Property="Background" Value="#1152AC" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Foreground" Value="White"/>
<Setter Property="HorizontalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#4285DE"/>
</Setter.Value>
</Setter>
<Setter Property="VerticalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#1152AC"/>
</Setter.Value>
</Setter>
</Style>
<!--列头标题栏样式-->
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="BorderBrush" Value="#dddddd" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Border Grid.Row="5" Grid.Column="1" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="5" Grid.Column="2" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="5" Grid.Column="3" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="5" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="0" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="5" Grid.Column="4" >
<TextBlock Text="否" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="5" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
<!--单元格样式-->
<Style TargetType="DataGridCell">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}" >
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="#dddddd"/>
</Trigger>
</Style.Triggers>
<Border Grid.Row="6" Grid.Column="1" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="6" Grid.Column="2" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="6" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="0" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="6" Grid.Column="4" >
<TextBlock Text="否" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="6" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
</Style>
<Border Grid.Row="7" Grid.Column="1" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="7" Grid.Column="2" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="7" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="0" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="7" Grid.Column="4" >
<TextBlock Text="否" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="7" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
<Style TargetType="{x:Type DatePickerTextBox}">
<Setter Property="Background" Value="#0288d1" />
</Style>
</UserControl.Resources>
<Border Grid.Row="8" Grid.Column="1" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="8" Grid.Column="2" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="8" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="0" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="8" Grid.Column="4" >
<TextBlock Text="否" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="8" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
<Border Grid.Row="9" Grid.Column="1" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="9" Grid.Column="2" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="9" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="0" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="9" Grid.Column="4" >
<TextBlock Text="否" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="9" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
<Border Grid.Row="10" Grid.Column="1" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="10" Grid.Column="2" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="10" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="0" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="10" Grid.Column="4" >
<TextBlock Text="否" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="10" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
<Border Grid.Row="11" Grid.Column="1" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="11" Grid.Column="2" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="11" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="0" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="11" Grid.Column="4" >
<TextBlock Text="否" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="11" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
<Border Grid.Row="12" Grid.Column="1" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="12" Grid.Column="2" >
<TextBlock Text="" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="12" Grid.Column="3" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="0" Foreground="White" FontSize="20"/>
<TextBlock Text="°" Foreground="White" FontSize="20"/>
</WrapPanel>
</Border>
<Border Grid.Row="12" Grid.Column="4" >
<TextBlock Text="否" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="12" Grid.Column="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}"/>
</WrapPanel>
</Border>
</Grid>
</Border>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.6*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Margin="1,1,5,5" >
<TextBlock Text="分垛库设置" FontSize="25" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" x:Name="HeightHelperPanel" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Margin="5">
<StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Left">
<Button Content="设置货道" Width="200" VerticalAlignment="Stretch" HorizontalAlignment="Left" Margin="5" FontSize="18"/>
<DataGrid Grid.Row="0" ItemsSource="{Binding PlanInfoDataGrid}"
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White" >
<!--修改选中字体颜色-->
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="0.5*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding OrderCode}" Header="SAP订单编号" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding PlanCode}" Header="产品条码" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding MaterialName}" Header="产品型号" Width="3*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding MaterialName}" Header="入库货道" Width="*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding EnterSpace}" Header="转向角度" Width="*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</Border>
</Grid>
</UserControl>

@ -1,89 +0,0 @@
<UserControl x:Class="Aucma.Core.Palletiz.Views.PlanPageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Aucma.Core.Palletiz.Views"
mc:Ignorable="d" Background="#1152AC"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<!--<Setter Property="Height" Value="40"/>-->
<Setter Property="FontSize" Value="16"/>
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style TargetType="DataGrid">
<!--网格线颜色-->
<Setter Property="CanUserResizeColumns" Value="false"/>
<Setter Property="Background" Value="#1152AC" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Foreground" Value="White"/>
<Setter Property="HorizontalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#4285DE"/>
</Setter.Value>
</Setter>
<Setter Property="VerticalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#1152AC"/>
</Setter.Value>
</Setter>
</Style>
<!--列头标题栏样式-->
<Style TargetType="DataGridColumnHeader">
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>-->
<!--<Setter Property="Background" Value="#dddddd"/>
<Setter Property="Foreground" Value="Black"/>-->
<!--<Setter Property="BorderThickness" Value="1" />-->
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="BorderBrush" Value="#dddddd" />
<Setter Property="Height" Value="48"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<!--单元格样式-->
<Style TargetType="DataGridCell">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}" >
<ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<Border x:Name="HeightHelperPanel" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="5">
<DataGrid x:Name="dgvMH" Height="{Binding Path=ActualHeight, ElementName=HeightPanel}"
HorizontalAlignment="Left" VerticalAlignment="Top" AlternationCount="2" RowHeaderWidth="0"
ItemsSource="{Binding Datalist}" ColumnWidth="*" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False" SelectionMode="Single"
SelectedItem="{Binding SelectedCells, Mode=OneWayToSource}">
<DataGrid.Columns>
<DataGridTextColumn Width="*" Binding="{Binding OrderCode}" Header="编号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding ProductCode}" Header="产品编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding ProductName}" Header="产品型号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
</Border>
</UserControl>

@ -1,30 +0,0 @@
using Aucma.Core.Palletiz.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Aucma.Core.Palletiz.Views
{
/// <summary>
/// PlanPageView.xaml 的交互逻辑
/// </summary>
public partial class PlanPageView : UserControl
{
public PlanPageView()
{
InitializeComponent();
this.DataContext = new PlanPageViewModel();
}
}
}

@ -1,111 +0,0 @@
<Window x:Class="Aucma.Core.Palletiz.Views.QuantityIssuedView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d" Background="#1152AC"
Title="库存设置" Height="600" Width="800" Name="window"
ResizeMode="NoResize" Topmost="True">
<Border Margin="5" BorderBrush="#0288d1" CornerRadius="10">
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
</Border.Effect>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="#0288d1" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="5,5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="SN 码 " FontSize="18" Foreground="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="planCode" FontSize="18" Text="{Binding PlanInfo.PlanCode}" Foreground="#FFFFFF" BorderBrush="White" Width="150" IsReadOnly="True" />
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="产品编号" FontSize="18" Foreground="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="orderCode" FontSize="18" Text="{Binding PlanInfo.OrderCode}" Foreground="#FFFFFF" BorderBrush="White" Width="150" IsReadOnly="True" Margin="5,0,10,0"/>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="产品型号" FontSize="18" Foreground="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="materialCode" FontSize="18" Text="{Binding PlanInfo.MaterialName}" Foreground="#FFFFFF" BorderBrush="White" Width="150" IsReadOnly="True" Margin="5,0,10,0"/>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="多货道" FontSize="18" Foreground="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<ComboBox Width="150" Height="30" Margin="10 0 0 0"
Style="{x:Null}" Background="#1152AC" VerticalAlignment="Center" FontSize="15" Foreground="Black"
SelectedItem="{Binding SelectLocation,Mode=TwoWay}"
SelectedValuePath="SelectedModel"
DisplayMemberPath="TypeName"
SelectedValue="{Binding SelectLocation,Mode=TwoWay}">
<ComboBoxItem Content="是" IsSelected="True"/>
<ComboBoxItem Content="否" />
</ComboBox>
</StackPanel>
</Grid>
</Border>
<Border Grid.Column="1" BorderBrush="#0288d1" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="5,5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="9*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="转向角度" FontSize="18" Foreground="#FFFFFF" Margin="10,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="TransmitAmount" VerticalContentAlignment="Center" FontSize="18" Text="{Binding TransmitAmount}" Foreground="#FFFFFF" BorderBrush="White" Width="150" Height="40" IsReadOnly="True" Margin="5,0,10,0"/>
</StackPanel>
<Border Grid.Row="1" BorderBrush="Black" BorderThickness="0" Margin="10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Grid.Row="0" Grid.Column="0" Content="1" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100"/>
<Button Grid.Row="0" Grid.Column="1" Content="2" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="0" Grid.Column="2" Content="3" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="1" Grid.Column="0" Content="4" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="1" Grid.Column="1" Content="5" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="1" Grid.Column="2" Content="6" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="2" Grid.Column="0" Content="7" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="2" Grid.Column="1" Content="8" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="2" Grid.Column="2" Content="9" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="3" Grid.Column="0" Content="0" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="100" />
<Button Grid.Row="3" Grid.Column="2" Content="清除" FontSize="18" Margin="2,2" Background="#FF9900" Foreground="white" BorderBrush="#FF9900" Command="{Binding ClearTransmitAmountCommand}" Height="70" Width="100" />
</Grid>
</Border>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="确 定" Command="{Binding AddPlanInfoCommand}" Height="50" Width="140" />
<Button Content="取 消" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF9900" Margin="25,0,0,0" Height="50" BorderBrush="#FF9900" Width="140" />
</StackPanel>
</Grid>
</Border>
</Grid>
</Border>
</Window>

@ -1,24 +0,0 @@
using Aucma.Core.Palletiz.Models;
using Aucma.Core.Palletiz.ViewModels;
using System.Windows;
namespace Aucma.Core.Palletiz.Views
{
/// <summary>
/// QuantityIssuedView.xaml 的交互逻辑
/// </summary>
public partial class QuantityIssuedView : Window
{
public QuantityIssuedView()
{
InitializeComponent();
}
public QuantityIssuedView(ProductPlanInfoModel productPlanInfo,string objId)
{
InitializeComponent();
this.DataContext = new QuantityIssuedViewModel(productPlanInfo, objId);
}
}
}

@ -1,107 +0,0 @@
<Window x:Class="Aucma.Core.Palletiz.Views.SearchCriteriaView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Aucma.Core.Palletiz.Views"
mc:Ignorable="d"
Title="搜索条件配置" Name="window"
Background="#1152AC" Height="350" Width="600" WindowStartupLocation="CenterScreen"
d:DesignHeight="350"
d:DesignWidth="600"
ResizeMode="NoResize" Topmost="True">
<Window.Resources>
<Style x:Key="CustomTextBoxStyle" TargetType="TextBox">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="#CCCCCC" />
<Setter Property="Background" Value="#F2F2F2" />
<Setter Property="Padding" Value="5" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Foreground" Value="#333333" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Margin" Value="5" />
<Setter Property="MinWidth" Value="120" />
<Setter Property="MinHeight" Value="30" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ScrollViewer x:Name="PART_ContentHost" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Border Margin="5" Background="#1254AB" CornerRadius="10">
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="6*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#1254AB" BorderThickness="2" Margin="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" ShadowDepth="0" BlurRadius="5" Opacity="0.5" Direction="0"></DropShadowEffect>
</Border.Effect>
<!--<ItemsControl x:Name="YourItemsControl" ItemsSource="{Binding Configurations}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBox x:Name="YourTextBoxName" Style="{StaticResource CustomTextBoxStyle}" Text="{Binding Path=. , Mode=TwoWay ,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
<TextBox Text="{Binding Configurations[0], Mode=TwoWay}" FontSize="18" BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
<TextBox Text="{Binding Configurations[1], Mode=TwoWay}" FontSize="18" BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
<TextBox Text="{Binding Configurations[2], Mode=TwoWay}" FontSize="18" BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
<TextBox Text="{Binding Configurations[3], Mode=TwoWay}" FontSize="18" BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
<TextBox Text="{Binding Configurations[4], Mode=TwoWay}" FontSize="18" BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
</StackPanel>
<StackPanel Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
<TextBox Text="{Binding Configurations[5], Mode=TwoWay}" FontSize="18" BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
<TextBox Text="{Binding Configurations[6], Mode=TwoWay}" FontSize="18" BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
<TextBox Text="{Binding Configurations[7], Mode=TwoWay}" FontSize="18" BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
<TextBox Text="{Binding Configurations[8], Mode=TwoWay}" FontSize="18" BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
<TextBox Text="{Binding Configurations[9], Mode=TwoWay}" FontSize="18" BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
</StackPanel>
</Grid>
</Border>
<Border Grid.Row="1" BorderBrush="#1254AB" BorderThickness="2" Margin="5">
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.5" Direction="0"></DropShadowEffect>
</Border.Effect>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10 0">
<Button Content="保 存" Command="{Binding SaveSearchCriteriaCommand}" CommandParameter="{Binding ElementName=window}" Margin="5 0" />
<Button Content="取 消" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF9900" BorderBrush="#FF9900" Margin="5 0" />
</StackPanel>
</Border>
</Grid>
</Border>
</Window>

@ -1,17 +0,0 @@
using Aucma.Core.Palletiz.ViewModels;
using System.Windows;
namespace Aucma.Core.Palletiz.Views
{
/// <summary>
/// SearchCriteriaView.xaml 的交互逻辑
/// </summary>
public partial class SearchCriteriaView : Window
{
public SearchCriteriaView()
{
InitializeComponent();
this.DataContext = new SearchCriteriaViewModel();
}
}
}

@ -6,7 +6,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Background="#1152AC"
Title="计划维护" FontFamily="Microsoft YaHei" Height="700" Width="900"
Title="货道设置" FontFamily="Microsoft YaHei" Height="700" Width="900"
d:DesignHeight="800" WindowStartupLocation="CenterScreen"
d:DesignWidth="1500" ResizeMode="NoResize" Topmost="True" >
@ -129,7 +129,7 @@
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Margin="1,1,5,5" >
<TextBlock Text="库存设置" FontSize="25" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="货道设置" FontSize="25" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Margin="1,0,5,5">
<Grid>

@ -12,8 +12,7 @@
<UserControl.Resources>
<cvt:MultiBindingConverter x:Key="QueryConvert"></cvt:MultiBindingConverter>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
@ -36,10 +35,10 @@
</Style>
<!--列头标题栏样式-->
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="BorderBrush" Value="#dddddd" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="100"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Style>
@ -55,7 +54,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}" >
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
<ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
@ -90,35 +89,8 @@
<RowDefinition Height="8*"/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center">
<TextBlock Text="开始时间" Margin="10 0" Foreground="White" FontSize="18" VerticalAlignment="Center"/>
<DatePicker
x:Name="BeginTime"
Width="200" Margin="10 0" Text="2023-10-09" BorderBrush="White"
materialDesign:CalendarAssist.IsHeaderVisible="False">
<DatePicker.SelectedDate>
<Binding
Path="FutureValidatingDate"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
</Binding.ValidationRules>
</Binding>
</DatePicker.SelectedDate>
</DatePicker>
<TextBlock Text="结束时间" Margin="10 0" Foreground="White" FontSize="18" VerticalAlignment="Center"/>
<DatePicker
x:Name="EndTime" Margin="10 0" Text="2023-10-09"
Width="200" BorderBrush="White"
materialDesign:CalendarAssist.IsHeaderVisible="False">
<DatePicker.SelectedDate>
<Binding
Path="FutureValidatingDate"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
</Binding.ValidationRules>
</Binding>
</DatePicker.SelectedDate>
</DatePicker>
<TextBlock Text="查询条件" Margin="10 0" Foreground="White" FontSize="18" VerticalAlignment="Center"/>
<Button Margin="10 0"
Content="查询" Command="{Binding ExecQueryCommand}"
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}"
@ -134,13 +106,13 @@
</WrapPanel>
<UniformGrid Grid.Row="1">
<DataGrid Grid.Row="0" ItemsSource="{Binding MaterialDataGrid}"
ColumnHeaderHeight="45" FontSize="100"
ColumnHeaderHeight="45" FontSize="18"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White" >
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" />
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="0.5*"/>
<DataGridTextColumn Binding="{Binding ProductPlanCode}" Header="计划编号" Width="1*" />
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料编号" Width="1*" />
<DataGridTextColumn Binding="{Binding MaterialName}" Header="物料名称" Width="3*" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

@ -21,10 +21,12 @@
<ItemGroup>
<None Remove="appsettings.json" />
<None Remove="Assets\Images\background.jpg" />
<None Remove="Assets\Images\bg.jpg" />
<None Remove="Assets\Images\Green.png" />
<None Remove="Assets\Images\headbg.jpg" />
<None Remove="Assets\Images\headbg.png" />
<None Remove="Assets\Images\Icon.png" />
<None Remove="Assets\Images\logo.png" />
<None Remove="Assets\Images\Newlog.png" />
<None Remove="Assets\Images\Red.png" />
@ -45,9 +47,11 @@
</ItemGroup>
<ItemGroup>
<Resource Include="Assets\Images\background.jpg" />
<Resource Include="Assets\Images\bg.jpg" />
<Resource Include="Assets\Images\headbg.jpg" />
<Resource Include="Assets\Images\headbg.png" />
<Resource Include="Assets\Images\Icon.png" />
<Resource Include="Assets\Images\Newlog.png" />
</ItemGroup>

@ -1,10 +1,16 @@
using Aucma.Core.PrintTo.Common;
using Admin.Core.IService;
using Aucma.Core.PrintTo.Common;
using Aucma.Core.PrintTo.Views;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using log4net;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Threading;
namespace Aucma.Core.PrintTo.ViewModels
{
@ -12,9 +18,21 @@ namespace Aucma.Core.PrintTo.ViewModels
{
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(MainWindowViewModel));
private IndexPageView firstPage = new IndexPageView();//首页
ISysUserInfoServices _sysUserInfoServices;
public MainWindowViewModel()
{
UserContent = firstPage;
_sysUserInfoServices = App.ServiceProvider.GetService<ISysUserInfoServices>();
Task.Run(async () =>
{
await RefreshTeamTime();//班组时间
});
DispatcherTimer timer = new DispatcherTimer();
timer.Interval = new TimeSpan(0, 0, 1); //间隔1秒
timer.Tick += new EventHandler(timer_Tick);
timer.Start();
}
#region 更换界面
@ -140,6 +158,55 @@ namespace Aucma.Core.PrintTo.ViewModels
}
#endregion
#region 刷新时间
public string _currentDateTime;
public string CurrentDateTime
{
get => _currentDateTime;
set => SetProperty(ref _currentDateTime, value);
}
#endregion
#region 班组信息
/// <summary>
/// 班组信息
/// </summary>
public string _teamName;
public string TeamName
{
get => _teamName;
set => SetProperty(ref _teamName, value);
}
#endregion
#region 切换班组
public async Task RefreshTeamTime()
{
while (true)
{
var list = await _sysUserInfoServices.GetTeamData();
if (list != null && list.Count > 0)
{
var sysUserInfo = list.First();
TeamName = $"{sysUserInfo.TeamName}({list.Min(d => d.StartTime).ToString("HH:mm")}~{list.Max(d => d.EndTime).ToString("HH:mm")})";
//TeamName = $"{sysUserInfo.TeamName}";
}
Thread.Sleep(5000);
}
}
#endregion
#region 定时刷新时间
void timer_Tick(object sender, EventArgs e)
{
System.Windows.Application.Current.Dispatcher.Invoke((Action)(() =>
{
CurrentDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
}));
}
#endregion
}
}

@ -178,18 +178,18 @@
ItemsSource="{Binding Datalist}" ColumnWidth="*" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False" SelectionMode="Single"
SelectedItem="{Binding SelectedCells, Mode=OneWayToSource}">
<DataGrid.Columns>
<DataGridTextColumn Width="1.2*" Binding="{Binding CreatedTime, StringFormat=\{0:yyy-MM-dd\}}" Header="订单日期" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="1.2*" Binding="{Binding OrderCode}" Header="订单编号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="1.2*" Binding="{Binding ProductCode}" Header="产品编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="3*" Binding="{Binding ProductName}" Header="产品型号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding PlanAmount}" Header="订单数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding CompleteAmount}" Header="完成数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding LinerAmount}" Header="内胆编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Width="*" Binding="{Binding BoxAmount}" Header="箱体编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding LinerCodeNum}" Header="内胆码&#x0a;已打数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding BoxCodeNum}" Header="箱体码&#x0a;已打数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding ErrorNum}" Header="异常量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding PrintName}" Header="打印名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Width="1.2*" Binding="{Binding CreatedTime, StringFormat=\{0:yyy-MM-dd\}}" Header="订单日期" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="1.2*" Binding="{Binding OrderCode}" Header="SAP订单编号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="1.2*" Binding="{Binding ProductCode}" Header="产品编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="3*" Binding="{Binding ProductName}" Header="产品型号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding PlanAmount}" Header="订单数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding CompleteAmount}" Header="完成数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding LinerAmount}" Header="内胆编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Width="*" Binding="{Binding BoxAmount}" Header="箱体编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding LinerCodeNum}" Header="内胆码&#x0a;已打数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding BoxCodeNum}" Header="箱体码&#x0a;已打数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding ErrorNum}" Header="异常量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Width="*" Binding="{Binding PrintName}" Header="打印名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
</DataGrid.Columns>
</DataGrid>
</UniformGrid>
@ -198,7 +198,7 @@
</UniformGrid>
<UniformGrid Grid.Column="1" Margin="5">
<Border BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5">
<Grid Margin="0 30">
<Grid Margin="0 20">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
@ -211,28 +211,28 @@
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="订单编码" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text="SAP订单编号" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="OrderCode" Foreground="white" BorderBrush="White" Text="{Binding SelectedItem.OrderCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="{Binding Path=ActualWidth, ElementName=ProductNo}"
materialDesign:HintAssist.Hint="订单编码" />
materialDesign:HintAssist.Hint="SAP订单编号" />
</WrapPanel>
<WrapPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="产品编码" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="ProductNo" Foreground="white" BorderBrush="White" Text="{Binding SelectedItem.ProductCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="350"
materialDesign:HintAssist.Hint="产品编码" />
<TextBlock Text="&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;产品编码" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="ProductNo" Foreground="white" BorderBrush="White" Text="{Binding SelectedItem.ProductCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="250"
materialDesign:HintAssist.Hint="产品编码"/>
</WrapPanel>
<WrapPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="产品型号" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text="&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;产品型号" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="ProductName" Foreground="white" BorderBrush="White" Text="{Binding SelectedItem.ProductName, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0" FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="{Binding Path=ActualWidth, ElementName=ProductNo}"
materialDesign:HintAssist.Hint="产品型号" />
</WrapPanel>
<WrapPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="打印名称" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text="&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;打印名称" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="PrintName" Foreground="white" BorderBrush="White" Text="{Binding SelectedItem.PrintName, ElementName=dgvMH}" Margin="15 0 0 0" FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="{Binding Path=ActualWidth, ElementName=ProductNo}"
materialDesign:HintAssist.Hint="打印名称" />
</WrapPanel>
<WrapPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="打印数量" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text="&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;打印数量" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Slider x:Name="PlanAmount" FontSize="18" Minimum="0" Maximum="500" BorderBrush="White" Value="{Binding SelectedItem.CompleteAmount, ElementName=dgvMH}" Foreground="White" Height="30" VerticalContentAlignment="Center"
HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15 0 0 0" Width="{Binding Path=ActualWidth, ElementName=ProductNo}"/>
<!--<TextBlock Text="1~500" Width="60" Margin="10 0 0 0" Foreground="White" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" />-->

@ -4,62 +4,75 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
Icon="/Assets/images/Icon.png"
mc:Ignorable="d"
Title="澳柯玛条码打印系统"
d:DesignHeight="1920"
d:DesignWidth="1080"
Background="#1152AC"
FontFamily="Microsoft YaHei"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
WindowStyle="None"
>
<Border CornerRadius="5">
<Window.Background>
<ImageBrush ImageSource="/Assets/images/background.jpg" />
</Window.Background>
<Border Margin="5" Background="Transparent" CornerRadius="10" >
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="6*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="7*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<DockPanel Grid.Row="0" VerticalAlignment="Top">
<StackPanel Height="100">
<StackPanel.Background>
<ImageBrush Stretch="Fill" ImageSource="/Assets/Images/headbg.png" />
</StackPanel.Background>
<StackPanel HorizontalAlignment="Center" Margin="0 3 0 0" >
<TextBlock Text="澳柯玛MES条码打印系统" Margin="0" Foreground="White" FontSize="42" HorizontalAlignment="Center" VerticalAlignment="Center" />
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="澳柯玛MES条码打印系统" FontSize="42" Foreground="White" FontWeight="Bold"/>
</StackPanel>
<WrapPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -30 20 0">
<!--<TextBlock x:Name="TestTB" Text="白班" VerticalAlignment="Center" Foreground="White" FontSize="25" Margin="5 0"/>
<TextBlock Text="|" VerticalAlignment="Center" Foreground="White" FontSize="15" />
<TextBlock x:Name="loginUser" Text="李四" VerticalAlignment="Center" Foreground="White" FontSize="25" Margin="5 0"/>-->
</WrapPanel>
</StackPanel>
</DockPanel>
<DockPanel Grid.Row="1">
<!--<ScrollViewer x:Name="MainScrollViewer"
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True">-->
<ContentControl Content="{Binding UserContent}" Height="auto" />
<!--</ScrollViewer>-->
</DockPanel>
<StackPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 20 0 0" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" >
<TextBlock Grid.Column="0" Text="{Binding TeamName}" FontSize="25" Foreground="White" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBlock Grid.Column="1" Text="{Binding CurrentDateTime}" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</Border>
<DockPanel Grid.Row="2">
<Border Margin="5" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
<Border Grid.Row="1" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" >
<ContentControl Content="{Binding UserContent}"/>
</Border>
<DockPanel Grid.Row="2" Margin="5 0 5 5">
<Border BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" Height="60" Orientation="Horizontal" Margin="5 0" HorizontalAlignment="Left">
<Button Content="首 页" Margin="5 0" Height="40"/>
<Button Content="键 盘" x:Name="TabTip" Height="40" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TabTip}" />
<Button Content="最小化" x:Name="Minimized" Height="40" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Width="100" Background="#FF9900" BorderBrush="#FF9900" />
<Button Content="退 出" x:Name="Exit" Height="40" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Width="100" Background="#FF0033" BorderBrush="#FF0033" />
</StackPanel>
</Grid>
</Border>
</DockPanel>

@ -87,8 +87,8 @@ namespace Aucma.Core.RunPlc
{
var item = PlcHelper.melsecList.Where(c => c.Id == i).FirstOrDefault();
if (item == null) continue;
var test= item.plc.ReadInt16("D6050");
if (item.plc.Read("M100").Result)
if (item.plc.Read("D6050").Result)
{
item.IsConnect = true;
item.plc.IsConnected = true;

@ -261,7 +261,7 @@
<lvc:CartesianChart.AxisX >
<lvc:Axis Labels="{Binding ProductionHourList}" FontSize="18" Foreground="White" LabelsRotation="0" DisableAnimations="True" Position="LeftBottom" >
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" Step="1" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
<lvc:Separator Visibility="Hidden" Step="1" StrokeThickness="1" StrokeDashArray="0" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
@ -377,7 +377,7 @@
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding MaterialNameList}" FontSize="18" Foreground="White">
<lvc:Axis.Separator>
<lvc:Separator Step="1" Visibility="Hidden" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
<lvc:Separator Step="1" Visibility="Hidden" StrokeThickness="1" StrokeDashArray="0" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>

@ -47,7 +47,6 @@
<TextBlock Grid.Column="0" Text="{Binding TeamName}" FontSize="25" Foreground="White" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBlock Grid.Column="1" Text="{Binding CurrentDateTime}" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</StackPanel>
</Grid>
</StackPanel>
</Grid>

Loading…
Cancel
Save