|
- <Window
- x:Class="BPASmartClient.JXJFoodBigStation.View.RecipeInfosView"
- 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.JXJFoodBigStation.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
- Title="RecipeInfosView"
- Width="1000"
- Height="620"
- AllowsTransparency="True"
- Background="{x:Null}"
- Topmost="True"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
-
- <Window.DataContext>
- <vm:RecipeInfosViewModel />
- </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-->
- </ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </Window.Resources>
-
- <!--<Border Name="br" BorderThickness="1" >
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
- </Border.Background>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid Grid.Row="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition Height="30" />
- <RowDefinition Height="30" />
- <RowDefinition />
- <RowDefinition Height="40" />
- </Grid.RowDefinitions>
- <WrapPanel>
- <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="配方名称:" />
- <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RecipeName}" />
- </WrapPanel>
- <WrapPanel Grid.Row="1">
- <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="配方编号:" />
- <TextBlock Grid.Row="1" Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RecipeCode}" />
- </WrapPanel>
- <WrapPanel Grid.Row="2">
- <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="托盘编号:" />
- <TextBlock Grid.Row="1" Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding TrayCode}" />
- </WrapPanel>
- <Grid Grid.Row="3">
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="9*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Row="0" HorizontalAlignment="Center">大料站</TextBlock>
- <Grid Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="20"></RowDefinition>
- <RowDefinition Height="9*"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="2*"/>
- </Grid.ColumnDefinitions>
- <TextBlock FontSize="16" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top">原料桶号</TextBlock>
- <TextBlock FontSize="16" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top">原料位置</TextBlock>
- <TextBlock FontSize="16" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Top">原料重量</TextBlock>
- </Grid>
- <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" >
- <ItemsControl ItemsSource="{Binding RawMaterialsInfo}" >
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid x:Name="grb" Height="25" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="2*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialBarrelNum}"></TextBlock>
- <TextBlock Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialLocation}"></TextBlock>
- <TextBlock Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialWeight}"></TextBlock>
- </Grid>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="grb" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- </Grid>
- <Grid Grid.Row="4">
- <Button Command="{Binding ReturnPage}" Width="200" >返回</Button>
- </Grid>
- </Grid>
- </Grid>
- </Border>-->
-
- <!--<Border Name="br">
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
- </Border.Background>
- <Grid >
- <Grid.RowDefinitions>
- <RowDefinition Height="50"></RowDefinition>
- <RowDefinition Height="88"></RowDefinition>
- <RowDefinition Height="40"></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
-
- <TextBlock Text="大料站配方信息" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF2AB2E7" FontSize="22" Margin="0,10"></TextBlock>
- <UniformGrid Grid.Row="1" Columns="2" Margin="0,0,0,8">
- <StackPanel Orientation="Vertical" Margin="0,0,-13,0">
- <StackPanel Orientation="Horizontal" Margin="0,8">
- <TextBlock Text="请输入配方名称:" Foreground="#FF2AB2E7" FontSize="16" Margin="5,0,5,0" VerticalAlignment="Center"></TextBlock>
- <TextBox Text="{Binding RecipeName}" Width="150" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
- VerticalContentAlignment="Center"
- BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="请输入托盘编号:" Foreground="#FF2AB2E7" FontSize="16" Margin="5,0,5,0" VerticalAlignment="Center"></TextBlock>
- <TextBox Text="{Binding TrayCode}" InputMethod.IsInputMethodEnabled="False" Width="150" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
- VerticalContentAlignment="Center"
- BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
- </StackPanel>
- </StackPanel>
- <Grid Width="260" HorizontalAlignment="Right">
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,5,0">
- <Button Content="添加原料" Width="120" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" Command="{Binding AddRecipe}" ></Button>
- <Button Content="确认更新" Height="30" Width="120" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Command="{Binding Comfirm}"></Button>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="0,3,5,0">
- <Button Content="另存为" Height="30" Width="120" Margin="0,0,10,0" Command="{Binding SaveAs}" Cursor="Hand"/>
- <Button Click="Button_Click" Content="取消" Height="30" FontSize="20" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Width="120" Cursor="Hand"></Button>
- </StackPanel>
- </Grid>
-
- </UniformGrid>
- <Grid Grid.Row="2" Background="#FF2AB2E7" Margin="0,0,0,10">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="130"/>
- <ColumnDefinition Width="145"/>
- <ColumnDefinition Width="145"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="原料桶号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
- <GridSplitter></GridSplitter>
- <TextBlock Grid.Column="1" Text="原料位置" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
- <GridSplitter Grid.Column="1"></GridSplitter>
- <TextBlock Grid.Column="2" Text="原料重量" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="14"></TextBlock>
- <GridSplitter Grid.Column="2"></GridSplitter>
- <TextBlock Grid.Column="3" Text="操作" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="14"/>
- </Grid>
- <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding RawMaterialsInfo}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <RadioButton>
- <RadioButton.Template>
- <ControlTemplate>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="130"/>
-
- <ColumnDefinition Width="145"></ColumnDefinition>
- <ColumnDefinition Width="145"></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <ComboBox ItemsSource="{Binding DataContext.materialNames,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" Text="{Binding RawMaterialBarrelNum}" Margin="5,0,0,5" Width="120" FontSize="14" KeyUp="ComboBox_KeyUp" LostFocus="ComboBox_LostFocus" >
- <ComboBox.ItemContainerStyle>
- <Style TargetType="{x:Type ComboBoxItem}">
- <Setter Property="Background" Value="White" />
- <Setter Property="Foreground" Value="#e69519"/>
-
-
- </Style>
- </ComboBox.ItemContainerStyle>
- </ComboBox>
- <StackPanel Grid.Column="1" Orientation="Horizontal" >
- <TextBox Text="{Binding RawMaterialLocation}" Background="Transparent" FontSize="14"
- BorderBrush="#e69519" Foreground="LightGray" Width="135" Margin="5,0,0,5" ></TextBox>
-
- </StackPanel>
- <StackPanel Orientation="Horizontal" Grid.Column="2">
- <TextBox Text="{Binding RawMaterialWeight}" Background="Transparent" FontSize="14"
- BorderBrush="#e69519" Foreground="LightGray" Width="125" Margin="5,0,0,5" ></TextBox>
- <TextBlock VerticalAlignment="Center" Margin="4,0,0,5" Text="g" Foreground="#e69519" ></TextBlock>
- </StackPanel>
- <Button Grid.Column="3"
- Content="删除"
- Width="94"
- FontSize="14"
- Margin="10,0,20,5"
- Background="Transparent"
- BorderBrush="#e69519" Foreground="LightGray" HorizontalAlignment="Right"
- Command="{Binding DataContext.RemoveRecipe,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
- CommandParameter="{Binding MaterialCode}"></Button>
- </Grid>
- </ControlTemplate>
- </RadioButton.Template>
- </RadioButton>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- </Border>-->
-
- <Border Name="br" BorderThickness="2" BorderBrush="#0CADF5">
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
- </Border.Background>
- <Grid >
- <Grid.RowDefinitions>
- <RowDefinition Height="50"></RowDefinition>
- <RowDefinition Height="85"></RowDefinition>
- <RowDefinition Height="40"></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
-
- <TextBlock Text="大配料站配方信息" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF2AB2E7" FontSize="25" Margin="0,10"></TextBlock>
- <UniformGrid Grid.Row="1" Columns="2" Margin="0,0,0,5">
- <StackPanel Orientation="Vertical" >
- <StackPanel Orientation="Horizontal" Margin="0,8">
- <TextBlock Text="请输入配方名称:" Foreground="#FF2AB2E7" FontSize="18" Margin="10,0,5,0" VerticalAlignment="Center"></TextBlock>
- <TextBox Text="{Binding RecipeName}" Width="230" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
- VerticalContentAlignment="Center"
- BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="请输入托盘编号:" Foreground="#FF2AB2E7" FontSize="18" Margin="10,0,5,0" VerticalAlignment="Center"></TextBlock>
- <TextBox Text="{Binding TrayCode}" InputMethod.IsInputMethodEnabled="False" Width="230" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
- VerticalContentAlignment="Center"
- BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
- </StackPanel>
- </StackPanel>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,4,0,0">
- <CheckBox Content="是否洗桶" FontSize="16" Foreground="#FF2AB2E7" Height="30" Width="180" Margin="0,0,10,0" IsChecked="{Binding IsWashingBarrel}"/>
- <Button Content="添加原料" Width="180" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" Command="{Binding AddRecipe}" ></Button>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0,4,0,0" HorizontalAlignment="Center">
- <Button Content="确认" Margin="0,0,10,0" Height="30" Width="180" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Command="{Binding Comfirm}"></Button>
- <Button Click="Button_Click" Content="取消" Margin="0,0,10,0" Height="30" FontSize="20" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Width="180" Cursor="Hand"></Button>
- </StackPanel>
- </Grid>
-
- </UniformGrid>
- <Grid Grid.Row="2" Background="#FF2AB2E7" Margin="0,0,0,10">
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition Width="120"/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" Text="原料位置" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
- <GridSplitter></GridSplitter>
- <TextBlock Grid.Column="1" Text="原料名称" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
- <GridSplitter Grid.Column="1"></GridSplitter>
- <TextBlock Grid.Column="2" Text="原料中文名" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
- <GridSplitter Grid.Column="1"></GridSplitter>
- <TextBlock Grid.Column="3" Text="托盘桶号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
- <GridSplitter Grid.Column="2"></GridSplitter>
- <TextBlock Grid.Column="4" Text="原料重量" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"></TextBlock>
- <GridSplitter Grid.Column="3"></GridSplitter>
- <TextBlock Grid.Column="5" Text="操作" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
- </Grid>
- <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding RawMaterialsInfo}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <RadioButton>
- <RadioButton.Template>
- <ControlTemplate>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition Width="120"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <!--<ComboBox ItemsSource="{Binding DataContext.materialNames,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" Text="{Binding RawMaterialLocation}" Margin="10,0,0,10" Width="190" FontSize="14" KeyUp="ComboBox_KeyUp" LostFocus="ComboBox_LostFocus">
- <ComboBox.ItemContainerStyle>
- <Style TargetType="{x:Type ComboBoxItem}">
- <Setter Property="Background" Value="White" />
- <Setter Property="Foreground" Value="#e69519"/>
-
-
- </Style>
- </ComboBox.ItemContainerStyle>-->
- <!--</ComboBox>-->
- <ComboBox
- Margin="3"
- VerticalAlignment="Center"
- BorderBrush="#FF074B92"
- BorderThickness="1"
- FontFamily="楷体"
- FontSize="14"
- Foreground="LightGray"
- IsEditable="False"
- ItemsSource="{Binding DataContext.RawMaterialLocation, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- SelectedValue="{Binding RawMaterialLocation}"
- MouseLeave="ComboBox_MouseLeave"
- Style="{StaticResource ComboBoxStyle}"
- Text="{Binding RawMaterialLocation}"/>
- <StackPanel
- VerticalAlignment="Center" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center" >
- <TextBlock Grid.Column="1" Text="{Binding RawMaterialName}" Background="Transparent" FontSize="14" Foreground="LightGray" ></TextBlock>
- </StackPanel>
- <StackPanel
- VerticalAlignment="Center" Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Center" >
- <TextBlock Grid.Column="1" Text="{Binding RawMaterialChineseName}" Background="Transparent" FontSize="14" Foreground="LightGray" ></TextBlock>
- </StackPanel>
- <!--<TextBox Text="{Binding RawMaterialName}" Background="Transparent" FontSize="14"
- BorderBrush="#e69519" Foreground="LightGray" Width="190" Margin="10,0,0,10" ></TextBox>-->
- <StackPanel
- Margin="3" Grid.Column="3" Orientation="Horizontal" HorizontalAlignment="Center">
- <TextBox Text="{Binding RawMaterialBarrelNum}" Background="Transparent" FontSize="14"
- BorderBrush="#e69519" Foreground="LightGray" Width="120" ></TextBox>
- </StackPanel>
- <StackPanel
- Margin="3" Orientation="Horizontal" Grid.Column="4" HorizontalAlignment="Center">
- <TextBox Text="{Binding RawMaterialWeight}" Background="Transparent" FontSize="14"
- BorderBrush="#e69519" Foreground="LightGray" Width="120" ></TextBox>
- <TextBlock FontSize="14" VerticalAlignment="Center" Margin="4,0,0,0" Text="Kg" Foreground="#e69519" ></TextBlock>
- </StackPanel>
- <Button Grid.Column="5"
- Content="删除"
- Width="94"
- FontSize="14"
- Background="Transparent"
- BorderBrush="#e69519" Foreground="LightGray" HorizontalAlignment="Center"
- Command="{Binding DataContext.RemoveRecipe,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
- CommandParameter="{Binding RawMaterialLocation}"></Button>
- </Grid>
- </ControlTemplate>
- </RadioButton.Template>
- </RadioButton>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- </Border>
- </Window>
|