|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412 |
- <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>
|