修改钣金样式

dev
liulb@mesnac.com 1 year ago
parent ebef86d1b3
commit ee5a9a5ae9

@ -115,7 +115,8 @@
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox Grid.RowSpan="2" Height="Auto" Margin="0" Padding="0" VerticalAlignment="Stretch" VerticalContentAlignment="Center" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Value}">
<TextBox Grid.RowSpan="2" Height="Auto" Margin="0" Padding="0" VerticalAlignment="Stretch"
VerticalContentAlignment="Center" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Value}">
<!-- 给TextBox绑定上下命令 -->
<TextBox.InputBindings>
<KeyBinding Gesture="Up" Command="{x:Static Slider.IncreaseSmall}" />
@ -124,10 +125,12 @@
<KeyBinding Gesture="PageDown" Command="{x:Static Slider.DecreaseLarge}" />
</TextBox.InputBindings>
</TextBox>
<RepeatButton Grid.Row="0" Grid.Column="1" Command="{x:Static Slider.IncreaseSmall}" Style="{StaticResource RepeatButtonStyle}">
<RepeatButton Grid.Row="0" Grid.Column="1" Command="{x:Static Slider.IncreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M4,0 L0,4 8,4 Z" Fill="Black" />
</RepeatButton>
<RepeatButton Grid.Row="1" Grid.Column="1" Command="{x:Static Slider.DecreaseSmall}" Style="{StaticResource RepeatButtonStyle}">
<RepeatButton Grid.Row="1" Grid.Column="1" Command="{x:Static Slider.DecreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M0,0 L4,4 8,0 Z" Fill="Black" />
</RepeatButton>
<!-- 由于Slider的内部实现要求存在这些必要组件,所以必须保留,但是设置为隐藏即可 -->
@ -147,9 +150,9 @@
<ColumnDefinition Width="1.8*"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<UniformGrid Grid.Column="0" Margin="3" >
<Border BorderBrush="#0288d1" BorderThickness="1" Padding="5" CornerRadius="5">
<Grid>
<UniformGrid Grid.Column="0" Margin="10" >
<Border BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="Transparent">
<Grid Margin="3">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
@ -157,16 +160,14 @@
<WrapPanel Grid.Row="0" Margin="5 5 0 0">
<Label Content="查询条件" Width="60" VerticalAlignment="Center" Foreground="white" />
<TextBox x:Name="queryParam" Text="" Style="{x:Null}" Width="200" HorizontalAlignment="Left" VerticalContentAlignment="Center" />
<Button Content="查询" Background="#4285DE" Margin="9,0,4,0" Width="100" Command="{Binding QueryStringCommand}" CommandParameter="{Binding ElementName=queryParam,Path=Text}">
</Button>
<Button Content="查询" Background="#4285DE" Margin="9,0,4,0" Width="100" Command="{Binding QueryStringCommand}" CommandParameter="{Binding ElementName=queryParam,Path=Text}"/>
</WrapPanel>
<UniformGrid Grid.Row="1" Margin="5 5 0 0" x:Name="HeightPanel">
<!--
AlternationCount="2" 表示两行交替显示背景色;
AutoGenerateColumns="False" 表示不让DataGrid自动生成列。如果设置成true则效果 多出了不需要的列;
HorizontalAlignment="Left" 不显示多余的空白列;
-->
-->
<DataGrid x:Name="dgvMH" Height="{Binding Path=ActualHeight, ElementName=HeightPanel}"
HorizontalAlignment="Center" VerticalAlignment="Top" AlternationCount="2" RowHeaderWidth="0"
ItemsSource="{Binding Datalist}" ColumnWidth="*" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False" SelectionMode="Single"
@ -190,8 +191,8 @@
</Grid>
</Border>
</UniformGrid>
<UniformGrid Grid.Column="1" Margin="0 5 3 3">
<Border BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5">
<UniformGrid Grid.Column="1" Margin="0 5 3 5">
<Border BorderBrush="#0288d1" BorderThickness="1" Margin="0 0 0 5" CornerRadius="5">
<Grid Margin="0 30">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
@ -223,9 +224,9 @@
<!--<TextBox x:Name="PlanAmount" Foreground="white" Text="{Binding SelectedItem.StandardAmount, ElementName=dgvMH}" Margin="15 0 0 0" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="{Binding Path=ActualWidth, ElementName=ProductNo}"
materialDesign:HintAssist.Hint="打印数量"/>-->
<Slider x:Name="PlanAmount" Minimum="0" Maximum="500" Value="{Binding SelectedItem.StandardAmount, ElementName=dgvMH}" Foreground="white" Height="30" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15 0 0 0" FontSize="15" Width="340"/>
<TextBlock Text="1~500" Width="50" Margin="10 0 0 0" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="1~500" Width="50" Margin="10 0 0 0" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
</WrapPanel>
<Border Grid.Row="4" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Margin="30 5" >
<Border Grid.Row="4" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Margin="100 5" >
<StackPanel >
<WrapPanel Height="300">
<RadioButton Content="内胆码-L" Foreground="white" FontSize="15" x:Name="内胆" Margin="10 5" Command="{Binding RadioQueryCommand}" CommandParameter="{Binding Name, ElementName=内胆}"/>

@ -24,18 +24,18 @@
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" VerticalAlignment="Top" Background="Red">
<StackPanel Height="100" >
<DockPanel Grid.Row="0" VerticalAlignment="Top">
<StackPanel Height="100">
<StackPanel.Background>
<ImageBrush Stretch="UniformToFill" ImageSource="/Assets/Images/headbg.png"/>
<ImageBrush Stretch="Fill" ImageSource="/Assets/Images/headbg.png" />
</StackPanel.Background>
<StackPanel HorizontalAlignment="Center" Margin="0 5 0 0" >
<TextBlock Text="澳柯玛生产控制系统" Margin="0" Foreground="White" FontSize="35" HorizontalAlignment="Center" VerticalAlignment="Center" />
<StackPanel HorizontalAlignment="Center" Margin="0 3 0 0" >
<TextBlock Text="澳柯玛生产控制系统" Margin="0" Foreground="White" FontSize="49" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
<WrapPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -30 20 0">
<TextBlock x:Name="TestTB" Text="白班" VerticalAlignment="Center" Foreground="White" FontSize="15" />
<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="15" />
<TextBlock x:Name="loginUser" Text="李四" VerticalAlignment="Center" Foreground="White" FontSize="25" Margin="5 0"/>
</WrapPanel>
</StackPanel>
</DockPanel>

@ -52,8 +52,7 @@
<Border Grid.Row="1" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,25,2,2">
<ContentControl Content="{Binding UserContent}"/>
</Border>
<DockPanel Grid.Row="2" Margin="5 0 5 3">
<Border BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
<Grid>

@ -17,13 +17,13 @@
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
</ResourceDictionary.MergedDictionaries>
<!--重写框架主体色-->
<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="#0288d1" />
<SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="#0288d1" />
<SolidColorBrush x:Key="PrimaryHueMidBrush" Color="#0288d1" />
<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="#4285DE" />
<SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="#4285DE" />
<SolidColorBrush x:Key="PrimaryHueMidBrush" Color="#4285DE" />
<!--字体颜色设置-->
<SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="#DDFFFFFF" />
<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="#0288d1" />
<SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="#0288d1" />
<SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="White" />
<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="White" />
<SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="White" />
</ResourceDictionary>
</Application.Resources>
</Application>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

@ -21,10 +21,10 @@
<ItemGroup>
<None Remove="appsettings.json" />
<None Remove="Assets\Images\Green.png" />
<None Remove="Assets\Images\logo.png" />
<None Remove="Assets\Images\Newlog.png" />
<None Remove="Assets\Images\Red.png" />
<None Remove="Assets\Images\background.jpg" />
<None Remove="Assets\Images\headbg.jpg" />
<None Remove="Assets\Images\headbg.png" />
<None Remove="Assets\Images\Icon.png" />
<None Remove="Log4net.config" />
</ItemGroup>
@ -42,6 +42,10 @@
</ItemGroup>
<ItemGroup>
<Resource Include="Assets\Images\background.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>

@ -18,6 +18,9 @@
</Compile>
</ItemGroup>
<ItemGroup>
<Page Update="Assets\Styles\DefaultStyles.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\IndexPage.xaml">
<SubType>Designer</SubType>
</Page>

@ -19,6 +19,7 @@ using LiveCharts.Wpf;
using Admin.Core.Service;
using Admin.Core.Model;
using System.Reflection.Metadata.Ecma335;
using System.Windows.Media;
/*
*
*
@ -36,14 +37,15 @@ namespace Aucma.Core.SheetMetal.ViewModels
StationName = "U壳/侧板钣金生产";
Job_SheetMetalTask_Quartz.SmEverDayDelegateEvent += InitEveryDayMethod;
//Job_SheetMetalTask_Quartz.SmEverDayDelegateEvent += InitEveryDayMethod;
Job_SheetMetalTask_Quartz.SmShowDelegateEvent += UpdatePlanSHow;//计划内容展示
WeakReferenceMessenger.Default.Register<string>(this, Recive);
InitEveryDayMethod();
Task.Run(async () =>
{
await LoadData();
await InitExecMethod();
await InitEveryDayMethod();
});
}
@ -69,7 +71,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
/// 每日生产
/// </summary>
/// <returns></returns>
private async Task InitEveryDayMethod()
private void InitEveryDayMethod()
{
ChartValues<double> achievement = new ChartValues<double>();
Random random = new Random();
@ -82,7 +84,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
column.DataLabels = true;
column.Title = "型号";
column.Values = achievement;
column.Foreground = Brushes.White;
ModelStatistics.Add(column);
@ -105,11 +107,11 @@ namespace Aucma.Core.SheetMetal.ViewModels
column2.DataLabels = true;
column2.Title = "产量";
column2.Values = achievement2;
column2.Foreground = Brushes.White;
Achievement.Add(column2);
await InitExecMethod();
//await InitExecMethod();
}

@ -12,13 +12,153 @@
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="ColumnHeaderStyle" TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="#dddddd"/>
<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="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>
<!--单元格样式-->
<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>
</Style>
<!--背景色改变必须先设置cellStyle 因为cellStyle会覆盖rowStyle样式换行换色-->
<!--<Style TargetType="DataGridRow">
<Setter Property="Height" Value="30"/>
<Style.Triggers>
<Trigger Property="AlternationIndex" Value="0">
<Setter Property="Background" Value="#e7e7e7"/>
</Trigger>
<Trigger Property="AlternationIndex" Value="1">
<Setter Property="Background" Value="#f2f2f2" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#f1ef9f" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#05c4ff"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="Background" Value="#05c4ff"/>
</Trigger>
</Style.Triggers>
</Style>-->
<Style TargetType="{x:Type Slider}">
<Style.Resources>
<!-- 重写重复触发按钮的样式 -->
<Style x:Key="RepeatButtonStyle" TargetType="{x:Type RepeatButton}">
<Setter Property="Focusable" Value="false" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Padding" Value="0" />
<Setter Property="Width" Value="30" />
</Style>
</Style.Resources>
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
<Setter Property="SmallChange" Value="1" />
<!-- 重写Slider的模板 -->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Slider}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox Grid.RowSpan="2" Height="Auto" Margin="0" Padding="0" VerticalAlignment="Stretch"
VerticalContentAlignment="Center" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Value}">
<!-- 给TextBox绑定上下命令 -->
<TextBox.InputBindings>
<KeyBinding Gesture="Up" Command="{x:Static Slider.IncreaseSmall}" />
<KeyBinding Gesture="Down" Command="{x:Static Slider.DecreaseSmall}" />
<KeyBinding Gesture="PageUp" Command="{x:Static Slider.IncreaseLarge}" />
<KeyBinding Gesture="PageDown" Command="{x:Static Slider.DecreaseLarge}" />
</TextBox.InputBindings>
</TextBox>
<RepeatButton Grid.Row="0" Grid.Column="1" Command="{x:Static Slider.IncreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M4,0 L0,4 8,4 Z" Fill="Black" />
</RepeatButton>
<RepeatButton Grid.Row="1" Grid.Column="1" Command="{x:Static Slider.DecreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M0,0 L4,4 8,0 Z" Fill="Black" />
</RepeatButton>
<!-- 由于Slider的内部实现要求存在这些必要组件,所以必须保留,但是设置为隐藏即可 -->
<Border x:Name="TrackBackground" Visibility="Collapsed">
<Rectangle x:Name="PART_SelectionRange" Visibility="Collapsed" />
</Border>
<Thumb x:Name="Thumb" Visibility="Collapsed" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid Margin="5,5">
<Grid.Resources>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontFamily" Value="微软雅黑"/>
</Style>
<Style TargetType="Border">
<Setter Property="BorderBrush" Value="#0288d1"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
@ -35,7 +175,7 @@
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
<TextBlock Text="计划执行" FontSize="20" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="计划执行" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--计划执行-->
@ -57,28 +197,28 @@
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Text="工位名称" FontSize="15" Foreground="Gray" />
<TextBox FontSize="15" Text="{Binding StationName}" Foreground="Gray" Width="200" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
<TextBlock Text="工位名称" FontSize="15" Foreground="White" />
<TextBox FontSize="15" Text="{Binding StationName}" Foreground="White" Width="200" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Text="订单编号" FontSize="15" Foreground="Gray"/>
<TextBox FontSize="15" Text="{Binding OrderCode}" Foreground="Gray" Width="200" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<TextBlock Text="订单编号" FontSize="15" Foreground="White"/>
<TextBox FontSize="15" Text="{Binding OrderCode}" Foreground="White" Width="200" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Text="计划编号" FontSize="15" Foreground="Gray"/>
<TextBox FontSize="15" Text="{Binding PlanCode}" Foreground="Gray" Width="200" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<TextBlock Text="计划编号" FontSize="15" Foreground="White"/>
<TextBox FontSize="15" Text="{Binding PlanCode}" Foreground="White" Width="200" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Row="3" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Text="产品型号" FontSize="15" Foreground="Gray"/>
<TextBox FontSize="15" Text="{Binding ProductModel}" Foreground="Gray" Width="200" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<TextBlock Text="产品型号" FontSize="15" Foreground="White"/>
<TextBox FontSize="15" Text="{Binding ProductModel}" Foreground="White" Width="200" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Row="4" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Text="开始时间" FontSize="15" Foreground="Gray"/>
<TextBox FontSize="15" Text="{Binding BeginTime}" Foreground="Gray" Width="200" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<TextBlock Text="开始时间" FontSize="15" Foreground="White"/>
<TextBox FontSize="15" Text="{Binding BeginTime}" Foreground="White" Width="200" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
@ -101,12 +241,12 @@
<RowDefinition Height="7*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<TextBlock Text="计划数量" FontSize="15" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="计划数量" FontSize="15" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<lvc:Gauge Margin="5" Uses360Mode="True" From="0" To="{Binding PlanMaxNum,Mode=TwoWay}"
Value="{Binding PlanNum,Mode=TwoWay}"
Foreground="#0288d1"/>
Foreground="White"/>
</Border>
</Grid>
</Border>
@ -118,12 +258,12 @@
<RowDefinition Height="7*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<TextBlock Text="实际数量" FontSize="15" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="实际数量" FontSize="15" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<lvc:Gauge Margin="5" Uses360Mode="True" From="0" To="{Binding PlanMaxNum,Mode=TwoWay}"
<lvc:Gauge GaugeBackground="Green" Margin="5" Uses360Mode="True" From="0" To="{Binding PlanMaxNum,Mode=TwoWay}"
Value="{Binding RealQuantity,Mode=TwoWay}"
Foreground="#0288d1"/>
Foreground="White"/>
</Border>
</Grid>
</Border>
@ -134,11 +274,11 @@
<RowDefinition Height="2*"/>
<RowDefinition Height="7*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<TextBlock Text="差异数量" FontSize="15" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Border Grid.Row="0" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<TextBlock Text="差异数量" FontSize="15" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<lvc:Gauge Margin="5" Uses360Mode="True" From="0" To="{Binding PlanMaxNum,Mode=TwoWay}"
<Border Grid.Row="1" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<lvc:Gauge GaugeBackground="Red" Margin="5" Uses360Mode="True" From="0" To="{Binding PlanMaxNum,Mode=TwoWay}"
Value="{Binding DiffQuantity,Mode=TwoWay}"
Foreground="Red"/>
</Border>
@ -151,13 +291,13 @@
<RowDefinition Height="2*"/>
<RowDefinition Height="7*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="CadetBlue" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<TextBlock Text="完成率" FontSize="15" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Border Grid.Row="0" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<TextBlock Text="完成率" FontSize="15" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="CadetBlue" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<lvc:Gauge Margin="5" Uses360Mode="True" From="0" To="100"
<Border Grid.Row="1" BorderThickness="0" CornerRadius="0" Background="Transparent" Margin="1,1,0,0" >
<lvc:Gauge GaugeBackground="Orange" Margin="5" Uses360Mode="True" From="0" To="100"
Value="{Binding CompletionRate,Mode=TwoWay}"
Foreground="#0288d1"/>
Foreground="White"/>
</Border>
</Grid>
</Border>
@ -177,19 +317,29 @@
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
<TextBlock Text="当日产量" FontSize="20" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="当日产量" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--日产量-->
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,5,5">
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,5,5">
<Grid Margin="10,10">
<lvc:CartesianChart Series="{Binding Achievement, UpdateSourceTrigger=PropertyChanged}">
<lvc:CartesianChart Series="{Binding Achievement, UpdateSourceTrigger=PropertyChanged}" Foreground="Red" >
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding ProductionHourList}" FontSize="15"/>
<lvc:Axis Labels="{Binding ProductionHourList}" FontSize="15">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="15"/>
<lvc:Axis FontSize="15">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
</Grid>
@ -206,7 +356,7 @@
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
<TextBlock Text="计划列表" FontSize="20" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="计划列表" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--计划列表-->
@ -222,85 +372,15 @@
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="Gray" >
Foreground="White" >
<DataGrid.Columns >
<DataGridTextColumn Binding="{Binding ID}" Header="主键" Width="auto" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" Visibility="Hidden" />
<DataGridTextColumn Binding="{Binding PlanCode}" Header="计划编号" Width="auto" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" Visibility="Hidden" />
<DataGridTextColumn Binding="{Binding ID}" Header="主键" Width="auto" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" Visibility="Hidden" />
<DataGridTextColumn Binding="{Binding PlanCode}" Header="计划编号" Width="auto" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" Visibility="Hidden" />
<!--<DataGridTextColumn Binding="{Binding IsExec}" x:Name="ExecControl" Header="执行" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />-->
<!--<DataGridTextColumn Binding="{Binding MaterialName}" Header="产品型号" Width="3.5*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />-->
<DataGridTemplateColumn Header="产品型号" Width="3.5*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Border x:Name="levelControl" VerticalAlignment="Center" >
<StackPanel >
<TextBlock x:Name="txtName" TextWrapping="Wrap" Text="{Binding MaterialName}" ToolTip="{Binding MaterialName}" />
<TextBlock Text="{Binding IsExec}" Visibility="Collapsed" />
</StackPanel>
</Border>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsExec}" Value="2">
<Setter TargetName="txtName" Property="Foreground" Value="Green" ></Setter>
<!--<Setter TargetName="levelControl" Property="Background" Value="Green" ></Setter>-->
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="计划" Width="0.95*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Border x:Name="levelControl" VerticalAlignment="Center">
<StackPanel >
<TextBlock x:Name="txtName" TextWrapping="Wrap" Text="{Binding TaskAmount}" ToolTip="{Binding TaskAmount}" />
<TextBlock Text="{Binding IsExec}" Visibility="Collapsed" />
</StackPanel>
</Border>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsExec}" Value="2">
<Setter TargetName="txtName" Property="Foreground" Value="Green" ></Setter>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="完成" Width="0.95*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Border x:Name="levelControl" VerticalAlignment="Center">
<StackPanel >
<TextBlock x:Name="txtName" TextWrapping="Wrap" Text="{Binding CompleteAmount}" ToolTip="{Binding CompleteAmount}" />
<TextBlock Text="{Binding IsExec}" Visibility="Collapsed" />
</StackPanel>
</Border>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsExec}" Value="2">
<Setter TargetName="txtName" Property="Foreground" Value="Green" ></Setter>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="开始时间" Width="2*" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Border x:Name="levelControl" VerticalAlignment="Center">
<StackPanel >
<TextBlock x:Name="txtName" TextWrapping="Wrap" Text="{Binding BeginTime,StringFormat=\{0:MM-dd HH:mm\}}" ToolTip="{Binding BeginTime}" MinWidth="20" />
<TextBlock Text="{Binding IsExec}" Visibility="Collapsed" />
</StackPanel>
</Border>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsExec}" Value="2">
<Setter TargetName="txtName" Property="Foreground" Value="Green" ></Setter>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--<DataGridTextColumn Binding="{Binding TaskAmount}" Header="计划" Width="0.95*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding MaterialName}" Header="产品型号" Width="3.5*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding TaskAmount}" Header="计划" Width="0.95*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding CompleteAmount}" Header="完成" Width="0.95*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding BeginTime ,StringFormat=\{0:MM-dd HH:mm\}}" Header="开始时间" Width="1.7*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<DataGridTextColumn Binding="{Binding BeginTime ,StringFormat=\{0:MM-dd HH:mm\}}" Header="开始时间" Width="1.7*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTemplateColumn Header="操作" Width="4*" >
<DataGridTemplateColumn.CellTemplate>
@ -321,12 +401,11 @@
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0,0,0,1">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0">
<TextBlock Text="执行方式" VerticalAlignment="Center" Foreground="Gray" FontSize="15" Margin="20,0,0,0"/>
<ComboBox Text="{Binding MaterialTypeCombox}" Width="200" Height="25" Margin="10 0 0 0" Foreground="Black" VerticalAlignment="Center" FontSize="15">
<TextBlock Text="执行方式" VerticalAlignment="Center" Foreground="White" FontSize="15" Margin="20,0,0,0"/>
<ComboBox Text="{Binding MaterialTypeCombox}" Width="200" Height="25" Margin="10 0 0 0" VerticalAlignment="Center" FontSize="15">
<ComboBoxItem Content="手动" IsSelected="True"/>
<ComboBoxItem Content="自动" />
</ComboBox>
<Button Content="计划维护" Command="{Binding SplitPlanCommand}" Margin="20,0,0,0" BorderBrush="DeepSkyBlue" BorderThickness="1" />
</StackPanel>
</Border>
@ -343,7 +422,7 @@
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
<TextBlock Text="型号统计" FontSize="20" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="型号统计" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--型号统计-->
@ -351,10 +430,20 @@
<Grid Margin="10,10">
<lvc:CartesianChart Series="{Binding ModelStatistics, UpdateSourceTrigger=PropertyChanged}">
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding MaterialNameList}" FontSize="15"/>
<lvc:Axis Labels="{Binding MaterialNameList}" FontSize="15">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="15"/>
<lvc:Axis FontSize="15">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
</Grid>

@ -18,7 +18,7 @@
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,5,5">
<Grid Margin="10,10">
<ListBox Grid.Row="1" x:Name="listBox" ItemsSource="{Binding LogInfoListBox}" Foreground="Gray" Background="Transparent" BorderBrush="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
<ListBox Grid.Row="1" x:Name="listBox" ItemsSource="{Binding LogInfoListBox}" Foreground="White" Background="Transparent" BorderBrush="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
</Grid>
</Border>
</Grid>

@ -5,13 +5,13 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Background="White"
Title="澳柯玛生产控制系统"
MinHeight="700" MinWidth="1100" WindowState="Maximized"
WindowStartupLocation="CenterScreen"
>
<Border CornerRadius="5" >
Title="澳柯玛生产控制系统" Icon="/Assets/images/Icon.png"
MinHeight="1080" MinWidth="1800" WindowState="Maximized" WindowStyle="None"
WindowStartupLocation="CenterScreen" >
<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>
@ -21,41 +21,40 @@
<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">
<materialDesign:ColorZone Padding="15 10 0 0"
materialDesign:ElevationAssist.Elevation="Dp4"
DockPanel.Dock="Top"
Mode="PrimaryMid">
<DockPanel Height="60" >
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="澳柯玛钣金控制系统" FontSize="50" Foreground="White" FontWeight="Bold"/>
</StackPanel>
<Image Height="46" VerticalAlignment="Top" Source="/Assets/Images/Newlog.png" />
<StackPanel Height="50" Margin="15 0 0 0" >
<StackPanel Orientation="Horizontal">
<TextBlock Text="澳柯玛生产控制系统" Foreground="White" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
</StackPanel>
<!--右侧信息-->
<DockPanel HorizontalAlignment="Right" VerticalAlignment="Stretch">
<TextBlock x:Name="TestTB" Text="白班" VerticalAlignment="Center" Foreground="White" FontSize="15" Margin="10,0"/>
<TextBlock Text="|" VerticalAlignment="Center" Foreground="White" FontSize="15" Margin="10,0"/>
<TextBlock x:Name="loginUser" Text="李四" VerticalAlignment="Center" Foreground="White" FontSize="15" Margin="10,0"/>
</DockPanel>
</DockPanel>
<StackPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right">
<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>
</StackPanel>
</Grid>
</materialDesign:ColorZone>
</DockPanel>
</Border>
<DockPanel Grid.Row="1">
<!--<ScrollViewer x:Name="MainScrollViewer"
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True">-->
<ContentControl Content="{Binding UserContent}" Height="auto" />
<!--</ScrollViewer>-->
</DockPanel>
<Border Grid.Row="1" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,25,2,2">
<ContentControl Content="{Binding UserContent}"/>
</Border>
<DockPanel Grid.Row="2" >
<Border BorderBrush="#0288d1" Margin="5" BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
<DockPanel Grid.Row="2" Margin="5 0 5 3">
<Border BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
@ -75,23 +74,23 @@
<ImageBrush x:Name="PlcStatus" ImageSource="/Assets/Images/Green.png"/>
</Border.Background>
</Border>
<TextBlock x:Name="PLCState" Text="PLC连接成功" VerticalAlignment="Center" Foreground="Green" FontSize="15" Margin="10,0"/>
<TextBlock x:Name="PLCState" Text="PLC连接成功" VerticalAlignment="Center" Foreground="white" FontSize="15" Margin="10,0"/>
<Border Width="30" Height="30" CornerRadius="15">
<Border.Background>
<ImageBrush x:Name="PlcStatusImage" ImageSource="/Assets/Images/Green.png"/>
</Border.Background>
</Border>
<TextBlock x:Name="DB" Text="数据库连接成功" VerticalAlignment="Center" Foreground="Green" FontSize="15" Margin="10,0"/>
<TextBlock x:Name="DB" Text="数据库连接成功" VerticalAlignment="Center" Foreground="white" FontSize="15" Margin="10,0"/>
<Border Width="30" Height="30" CornerRadius="15">
<Border.Background>
<ImageBrush x:Name="BarCodeStatus" ImageSource="/Assets/Images/Green.png"/>
</Border.Background>
</Border>
<TextBlock x:Name="BarCodeStatusTxt" Text="扫描器连接成功" VerticalAlignment="Center" Foreground="Green" FontSize="15" Margin="10,0"/>
<TextBlock x:Name="BarCodeStatusTxt" Text="扫描器连接成功" VerticalAlignment="Center" Foreground="white" FontSize="15" Margin="10,0"/>
</StackPanel>
</Grid>
</Border>
</DockPanel>
</Grid>
</Border>

@ -7,18 +7,92 @@
xmlns:local="clr-namespace:Aucma.Core.SheetMetal.Views"
x:Class="Aucma.Core.SheetMetal.Views.SplitPlanView"
mc:Ignorable="d"
Background="White"
Background="#1152AC"
Title="计划维护" MinHeight="600" MinWidth="1000">
<Window.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="ColumnHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="#dddddd"/>
<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="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>
<!--单元格样式-->
<Style TargetType="DataGridCell">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="White" />
<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>
</Style>
<!--背景色改变必须先设置cellStyle 因为cellStyle会覆盖rowStyle样式换行换色-->
<!--<Style TargetType="DataGridRow">
<Setter Property="Height" Value="30"/>
<Style.Triggers>
<Trigger Property="AlternationIndex" Value="0">
<Setter Property="Background" Value="#e7e7e7"/>
</Trigger>
<Trigger Property="AlternationIndex" Value="1">
<Setter Property="Background" Value="#f2f2f2" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#f1ef9f" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#05c4ff"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="Background" Value="#05c4ff"/>
</Trigger>
</Style.Triggers>
</Style>-->
<Style TargetType="{x:Type Slider}">
<Style.Resources>
<!-- 重写重复触发按钮的样式 -->
@ -44,7 +118,8 @@
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox Grid.RowSpan="2" Height="Auto" Margin="0" Padding="0" VerticalAlignment="Stretch" VerticalContentAlignment="Center" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Value}">
<TextBox Grid.RowSpan="2" Height="Auto" Margin="0" Padding="0" VerticalAlignment="Stretch"
VerticalContentAlignment="Center" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Value}">
<!-- 给TextBox绑定上下命令 -->
<TextBox.InputBindings>
<KeyBinding Gesture="Up" Command="{x:Static Slider.IncreaseSmall}" />
@ -53,10 +128,12 @@
<KeyBinding Gesture="PageDown" Command="{x:Static Slider.DecreaseLarge}" />
</TextBox.InputBindings>
</TextBox>
<RepeatButton Grid.Row="0" Grid.Column="1" Command="{x:Static Slider.IncreaseSmall}" Style="{StaticResource RepeatButtonStyle}">
<RepeatButton Grid.Row="0" Grid.Column="1" Command="{x:Static Slider.IncreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M4,0 L0,4 8,4 Z" Fill="Black" />
</RepeatButton>
<RepeatButton Grid.Row="1" Grid.Column="1" Command="{x:Static Slider.DecreaseSmall}" Style="{StaticResource RepeatButtonStyle}">
<RepeatButton Grid.Row="1" Grid.Column="1" Command="{x:Static Slider.DecreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M0,0 L4,4 8,0 Z" Fill="Black" />
</RepeatButton>
<!-- 由于Slider的内部实现要求存在这些必要组件,所以必须保留,但是设置为隐藏即可 -->
@ -71,6 +148,7 @@
</Style>
</Window.Resources>
<Border Grid.Row="1" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Margin="5">
<Grid>
<Grid.RowDefinitions>
@ -78,7 +156,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="20" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="计划维护" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Margin="1,1,5,5">
<Grid>
@ -92,8 +170,8 @@
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" Margin="5 5 0 0">
<Label Content="查询条件" Width="60" VerticalAlignment="Center" />
<WrapPanel Grid.Row="0" Margin="5">
<Label Content="查询条件" Width="60" VerticalAlignment="Center" Foreground="White" />
<TextBox x:Name="queryParam" Text="" Style="{x:Null}" Width="200" HorizontalAlignment="Left" VerticalContentAlignment="Center" />
<Button Content="查询" Margin="9,0,4,0" Width="100" Command="{Binding QueryPlanCommand}" CommandParameter="{Binding Text, ElementName=queryParam}"/>
</WrapPanel>
@ -104,7 +182,7 @@
GridLinesVisibility="None" VerticalAlignment="Stretch"
ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible"
BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="Gray" SelectedItem="{Binding SelectedCells, Mode=OneWayToSource}">
Foreground="White" SelectedItem="{Binding SelectedCells, Mode=OneWayToSource}">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
@ -131,32 +209,32 @@
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="计划编码" FontSize="15" Foreground="Gray" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="PlanCode" Text="{Binding SelectedItem.PlanCode, ElementName=dgvMH}" IsReadOnly="True" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="15 0 0 0" MinWidth="200"
<TextBlock Text="计划编码" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="PlanCode" Foreground="White" Text="{Binding SelectedItem.PlanCode, ElementName=dgvMH}" IsReadOnly="True" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Margin="15 0 0 0" MinWidth="200"
materialDesign:HintAssist.Hint="计划编码" />
</WrapPanel>
<WrapPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="订单编码" FontSize="15" Foreground="Gray" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="OrderCode" Text="{Binding SelectedItem.OrderCode, ElementName=dgvMH}" IsReadOnly="True" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="15 0 0 0" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"
<TextBlock Text="订单编码" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="OrderCode" Foreground="White" Text="{Binding SelectedItem.OrderCode, ElementName=dgvMH}" IsReadOnly="True" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Margin="15 0 0 0" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"
materialDesign:HintAssist.Hint="订单编码" />
</WrapPanel>
<WrapPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 5">
<TextBlock Text="物料编码" FontSize="15" Foreground="Gray" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="OrderNo" Text="{Binding SelectedItem.MaterialCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"
<TextBlock Text="物料编码" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="OrderNo" Foreground="White" Text="{Binding SelectedItem.MaterialCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"
materialDesign:HintAssist.Hint="物料编码" />
</WrapPanel>
<WrapPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="物料名称" FontSize="15" Foreground="Gray" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialName" Text="{Binding SelectedItem.MaterialName, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"
<TextBlock Text="物料名称" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialName" Foreground="White" Text="{Binding SelectedItem.MaterialName, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"
materialDesign:HintAssist.Hint="物料名称" />
</WrapPanel>
<WrapPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="可拆分数量" FontSize="15" Foreground="Gray" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text="可拆分数" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<!--<TextBox x:Name="SpliteResidueAmount" Text="{Binding SelectedItem.SpliteResidueAmount, ElementName=dgvMH}" Margin="15 0 0 0" materialDesign:HintAssist.Hint="可拆分数量" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"/>-->
<Slider x:Name="SpliteResidueAmount" Minimum="0" Maximum="100" Value="90" Foreground="white" Height="30" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15 0 0 0" FontSize="15" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"/>
<Slider x:Name="SpliteResidueAmount" Minimum="0" Maximum="100" Value="{Binding SelectedItem.SpliteResidueAmount, ElementName=dgvMH}" Foreground="white" Height="30" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15 0 0 0" FontSize="15" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"/>
</WrapPanel>
<WrapPanel Grid.Row="5" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<Button Content="手动创建" Margin="5" Command="{Binding CreateTaskCommand}" CommandParameter="{Binding Text, ElementName=OrderCode}"/>

@ -15,6 +15,137 @@
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
</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="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>
<!--单元格样式-->
<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>
</Style>
<!--背景色改变必须先设置cellStyle 因为cellStyle会覆盖rowStyle样式换行换色-->
<!--<Style TargetType="DataGridRow">
<Setter Property="Height" Value="30"/>
<Style.Triggers>
<Trigger Property="AlternationIndex" Value="0">
<Setter Property="Background" Value="#e7e7e7"/>
</Trigger>
<Trigger Property="AlternationIndex" Value="1">
<Setter Property="Background" Value="#f2f2f2" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#f1ef9f" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#05c4ff"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="Background" Value="#05c4ff"/>
</Trigger>
</Style.Triggers>
</Style>-->
<Style TargetType="{x:Type Slider}">
<Style.Resources>
<!-- 重写重复触发按钮的样式 -->
<Style x:Key="RepeatButtonStyle" TargetType="{x:Type RepeatButton}">
<Setter Property="Focusable" Value="false" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Padding" Value="0" />
<Setter Property="Width" Value="30" />
</Style>
</Style.Resources>
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
<Setter Property="SmallChange" Value="1" />
<!-- 重写Slider的模板 -->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Slider}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox Grid.RowSpan="2" Height="Auto" Margin="0" Padding="0" VerticalAlignment="Stretch"
VerticalContentAlignment="Center" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Value}">
<!-- 给TextBox绑定上下命令 -->
<TextBox.InputBindings>
<KeyBinding Gesture="Up" Command="{x:Static Slider.IncreaseSmall}" />
<KeyBinding Gesture="Down" Command="{x:Static Slider.DecreaseSmall}" />
<KeyBinding Gesture="PageUp" Command="{x:Static Slider.IncreaseLarge}" />
<KeyBinding Gesture="PageDown" Command="{x:Static Slider.DecreaseLarge}" />
</TextBox.InputBindings>
</TextBox>
<RepeatButton Grid.Row="0" Grid.Column="1" Command="{x:Static Slider.IncreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M4,0 L0,4 8,4 Z" Fill="Black" />
</RepeatButton>
<RepeatButton Grid.Row="1" Grid.Column="1" Command="{x:Static Slider.DecreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M0,0 L4,4 8,0 Z" Fill="Black" />
</RepeatButton>
<!-- 由于Slider的内部实现要求存在这些必要组件,所以必须保留,但是设置为隐藏即可 -->
<Border x:Name="TrackBackground" Visibility="Collapsed">
<Rectangle x:Name="PART_SelectionRange" Visibility="Collapsed" />
</Border>
<Thumb x:Name="Thumb" Visibility="Collapsed" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Border Grid.Row="1" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="Transparent" Margin="5">
@ -25,7 +156,7 @@
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
<TextBlock Text="数据统计" FontSize="20" FontWeight="Bold" Foreground="#0288d1" 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" Background="Transparent" Margin="1,1,5,5">
<Grid Margin="10,5">
@ -34,12 +165,11 @@
<RowDefinition Height="8*"/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center">
<TextBlock Text="开始时间" Margin="10 0" Foreground="Gray" FontSize="15" VerticalAlignment="Center"/>
<TextBlock Text="开始时间" Margin="10 0" Foreground="White" FontSize="15" VerticalAlignment="Center"/>
<DatePicker
x:Name="BeginTime"
x:Name="BeginTime"
Width="200" Margin="10 0" Text="2023-10-09"
materialDesign:CalendarAssist.IsHeaderVisible="False"
materialDesign:HintAssist.Hint="开始日期">
materialDesign:CalendarAssist.IsHeaderVisible="False">
<DatePicker.SelectedDate>
<Binding
Path="FutureValidatingDate"
@ -50,12 +180,11 @@
</DatePicker.SelectedDate>
</DatePicker>
<TextBlock Text="结束时间" Margin="10 0" Foreground="Gray" FontSize="15" VerticalAlignment="Center"/>
<TextBlock Text="结束时间" Margin="10 0" Foreground="White" FontSize="15" VerticalAlignment="Center"/>
<DatePicker
x:Name="EndTime" Margin="10 0" Text="2023-10-09"
Width="200"
materialDesign:CalendarAssist.IsHeaderVisible="False"
materialDesign:HintAssist.Hint="结束日期">
Width="200"
materialDesign:CalendarAssist.IsHeaderVisible="False">
<DatePicker.SelectedDate>
<Binding
Path="FutureValidatingDate"
@ -84,7 +213,7 @@
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="Gray" >
Foreground="White" >
<DataGrid.Columns>
<!--<DataGridTextColumn Binding="{Binding No}" Header="序号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<DataGridTextColumn Binding="{Binding ProductPlanCode}" Header="计划编号" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>

Loading…
Cancel
Save