|
- <Window
- x:Class="BPASmartClient.JXJFoodSmallStation.View.NewLocalRecipeView"
- 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:local="clr-namespace:BPASmartClient.JXJFoodSmallStation.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
- Title="NewRemoteRecipeView"
- Width="900"
- Height="700"
- AllowsTransparency="True"
- Background="{x:Null}"
- Topmost="True"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
-
- <Window.DataContext>
- <vm:NewLocalRecipeViewModel />
- </Window.DataContext>
-
- <Window.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
-
- <ResourceDictionary>
- <!--#region ListBox样式-->
- <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
- <Setter Property="OverridesDefaultStyle" Value="True" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="BorderBrush" Value="{x:Null}" />
- <Setter Property="Foreground" Value="White" />
- <Setter Property="FontSize" Value="20" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border x:Name="border" CornerRadius="8">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
-
- <Style x:Key="tbStyle" TargetType="TextBox">
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Foreground" Value="DeepSkyBlue" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="CaretBrush" Value="Orange" />
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="Margin" Value="5,0,0,0" />
- <Setter Property="FontSize" Value="18" />
- </Style>
-
- </ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </Window.Resources>
-
- <Border
- Name="br"
- BorderBrush="#0CADF5"
- BorderThickness="0">
- <Border.Background>
- <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />-->
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹框/z4.png" />
- <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹窗2.png" />-->
- </Border.Background>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="150" />
- <RowDefinition Height="10" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="DeepSkyBlue"
- Text="配方编辑" />
-
- <Button
- Name="Close"
- Width="50"
- HorizontalAlignment="Right"
- Content=""
- FontSize="25"
- Foreground="Red"
- Style="{StaticResource TitleBarStyle}" />
-
-
- <!--#region 信息录入-->
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <Grid Grid.Column="0" Margin="5,0">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹框/ch.png" />
- </Grid.Background>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Background="Transparent"
- FontSize="18"
- Foreground="DeepSkyBlue"
- Text="配方名称:" />
- <TextBox
- Grid.Row="0"
- Grid.Column="1"
- Grid.ColumnSpan="3"
- Height="30"
- Margin="0,0,11,0"
- FontSize="16"
- Foreground="DeepSkyBlue"
- Text="{Binding RecipeName}" />
-
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Right"
- Background="Transparent"
- FontSize="18"
- Foreground="DeepSkyBlue"
- Text="托盘编号:" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Width="100"
- Height="30"
- HorizontalAlignment="Left"
- FontSize="16"
- Foreground="DeepSkyBlue"
- Text="{Binding TrayNum}" />
-
- <TextBlock
- Grid.Row="1"
- Grid.Column="2"
- HorizontalAlignment="Right"
- Background="Transparent"
- FontSize="18"
- Foreground="DeepSkyBlue"
- Text="配方编码:" />
- <TextBox
- Grid.Row="1"
- Grid.Column="3"
- Width="100"
- Height="30"
- HorizontalAlignment="Left"
- FontSize="16"
- Foreground="DeepSkyBlue"
- Text="{Binding RecipeCode}" />
-
- </Grid>
-
- <Grid Grid.Column="1" Margin="5,0">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹框/ch.png" />
- </Grid.Background>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <Button
- Grid.Row="0"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- Height="35"
- Margin="20,0"
- Command="{Binding SaveCommand}"
- Content="保存配方"
- FontSize="16"
- Style="{StaticResource ImageButtonStyle}" />
-
- <Button
- Grid.Row="1"
- Grid.Column="0"
- Height="35"
- Margin="20,0"
- Command="{Binding AddCommand}"
- Content="添加小料"
- FontSize="16"
- Style="{StaticResource ImageButtonStyle}" />
- <Button
- Grid.Row="1"
- Grid.Column="1"
- Height="35"
- Margin="20,0"
- Command="{Binding AddFLCommand}"
- Content="添加粉料"
- FontSize="16"
- Style="{StaticResource ImageButtonStyle}" />
-
- </Grid>
-
- </Grid>
- <!--#endregion-->
-
- <!--#region 表格显示-->
- <Grid
- Grid.Row="3"
- Grid.RowSpan="2"
- Margin="5">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹框/bh.png" Stretch="Fill" />
- </Grid.Background>
-
- <Grid Margin="15,35,15,10">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <!--#region 表格标题栏设置-->
- <Grid
- Grid.Row="0"
- Margin="0,10,0,0"
- Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="0.4*" />
- <ColumnDefinition Width="0.4*" />
- <ColumnDefinition Width="0.4*" />
- <ColumnDefinition Width="0.4*" />
- <ColumnDefinition Width="0.4*" />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- HorizontalAlignment="Center"
- FontSize="16"
- Text="原料名称" />
-
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Center"
- FontSize="16"
- Text="原料类型" />
-
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- FontSize="16"
- Text="原料位置" />
-
- <TextBlock
- Grid.Column="3"
- HorizontalAlignment="Center"
- FontSize="16"
- Text="原料桶号" />
-
- <TextBlock
- Grid.Column="4"
- HorizontalAlignment="Center"
- FontSize="16"
- Text="重量(kg)" />
-
- <TextBlock
- Grid.Column="5"
- HorizontalAlignment="Center"
- FontSize="16"
- Text="功能操作" />
-
- <Border
- Grid.ColumnSpan="6"
- BorderBrush="#8800bfff"
- BorderThickness="1" />
- <Border
- Grid.Column="1"
- BorderBrush="#8800bfff"
- BorderThickness="1,0,1,0" />
- <Border
- Grid.Column="3"
- BorderBrush="#8800bfff"
- BorderThickness="1,0,1,0" />
- <Border
- Grid.Column="5"
- BorderBrush="#8800bfff"
- BorderThickness="1,0,1,0" />
- </Grid>
-
- <!-- 表格信息显示 -->
- <Grid Grid.Row="1">
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding AllRawMaterial}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="0.4*" />
- <ColumnDefinition Width="0.4*" />
- <ColumnDefinition Width="0.4*" />
- <ColumnDefinition Width="0.4*" />
- <ColumnDefinition Width="0.4*" />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Margin="5,0,0,0"
- FontFamily="楷体"
- FontSize="18"
- Foreground="DeepSkyBlue"
- Text="{Binding RawMaterialName}" />
-
- <TextBlock
- Grid.Column="1"
- Margin="5,0,0,0"
- FontFamily="楷体"
- FontSize="18"
- Foreground="DeepSkyBlue"
- Text="{Binding RawMaterialType}" />
-
- <TextBox
- Grid.Column="2"
- Style="{StaticResource tbStyle}"
- Text="{Binding RawMaterialLocation}" />
-
- <TextBox
- Grid.Column="3"
- Style="{StaticResource tbStyle}"
- Text="{Binding RawMaterialBarrelNum}" />
-
- <TextBox
- Grid.Column="4"
- Style="{StaticResource tbStyle}"
- Text="{Binding RawMaterialWeight}" />
-
- <Button
- Grid.Column="5"
- Height="25"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RawMaterialName}"
- Content="删除"
- FontSize="16"
- Style="{StaticResource ControlButtonStyle}" />
-
- <!--<Button
- Grid.Column="5"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RawMaterialLocation}"
- Content="删除"
- FontSize="16" />-->
-
- <Border
- Grid.ColumnSpan="6"
- BorderBrush="#8800bfff"
- BorderThickness="1,0,1,1" />
-
- <Border
- Grid.Column="1"
- BorderBrush="#8800bfff"
- BorderThickness="1,0,1,0" />
-
- <Border
- Grid.Column="3"
- BorderBrush="#8800bfff"
- BorderThickness="1,0,1,0" />
-
- <Border
- Grid.Column="5"
- BorderBrush="#8800bfff"
- BorderThickness="1,0,1,0" />
-
- </Grid>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
-
- </Grid>
-
- </Grid>
- <!--#endregion-->
-
-
- </Grid>
- </Border>
- </Window>
|