|
- <UserControl
- x:Class="BPASmartClient.MorkCL.View.AddRawMaterialView"
- 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.MorkCL.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm="clr-namespace:BPASmartClient.MorkCL.ViewModel"
- Name="物料参数"
- mc:Ignorable="d">
- <UserControl.DataContext>
- <vm:AddRawMaterialViewModel />
- </UserControl.DataContext>
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.MorkCL;component/CustomStyle/CustomStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="1*" />
- <RowDefinition Height="1*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1.3*" />
- <ColumnDefinition Width="1*" />
- </Grid.ColumnDefinitions>
-
- <!--#region 辅料-->
-
- <pry:ImageBorder Margin="15" />
- <Grid Margin="20">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="40" />
- <RowDefinition Height="1*" />
- </Grid.RowDefinitions>
-
- <DockPanel LastChildFill="False">
- <TextBlock
- Margin="20,0"
- HorizontalAlignment="Center"
- Text="辅料参数设置" />
- <Button
- Margin="30,0"
- Command="{Binding AddMaterialCommand}"
- CommandParameter="辅料"
- Content="新增辅料数据"
- DockPanel.Dock="Right" />
- </DockPanel>
- <!--#region 表格标题栏设置-->
- <Grid
- Grid.Row="1"
- Margin="0,10,0,0"
- Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="330" />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition Width="80" />
- <ColumnDefinition Width="80" />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- Style="{StaticResource TitleTextblockStyle}"
- Text="ID" />
-
- <Grid Grid.Column="1">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="名称" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="2"
- Style="{StaticResource TitleTextblockStyle}"
- Text="位置" />
-
- <Grid Grid.Column="3">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="编辑" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Grid Grid.Column="4">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="删除" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Border
- Grid.ColumnSpan="10"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
- </Grid>
- <!--#endregion-->
-
- <!--#region 表格数据显示设置-->
- <Grid Grid.Row="2">
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding Accessories}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr" Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="330" />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition Width="80" />
- <ColumnDefinition Width="80" />
- </Grid.ColumnDefinitions>
-
- <TextBox
- Grid.Column="0"
- IsReadOnly="True"
- Style="{StaticResource DataShowTextBoxStyle}"
- Text="{Binding Id}"
- TextAlignment="Center" />
-
- <Grid Grid.Column="1">
- <TextBox
- MinWidth="150"
- IsReadOnly="True"
- Style="{StaticResource DataShowTextBoxStyle}"
- Text="{Binding Name}"
- TextAlignment="Center" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBox
- Grid.Column="2"
- Height="30"
- MinWidth="150"
- IsReadOnly="True"
- Style="{StaticResource DataShowTextBoxStyle}"
- Text="{Binding Loc}"
- TextAlignment="Center" />
-
- <Grid Grid.Column="3">
- <Button
- Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding}"
- Content="编辑"
- FontSize="16"
- Style="{StaticResource IssueRecipeButtonStyle}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Grid Grid.Column="4">
- <Button
- Command="{Binding DataContext.RemoveAccessoryCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding Id}"
- Content="删除"
- FontSize="16"
- Style="{StaticResource ControlButtonStyle}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Border
- Grid.ColumnSpan="10"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,1" />
- </Grid>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- <!--#endregion-->
- </Grid>
-
- <!--#endregion-->
-
- <!--#region 调料-->
- <pry:ImageBorder Grid.Row="1" Margin="15" />
- <Grid Grid.Row="1" Margin="20">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="40" />
- <RowDefinition Height="1*" />
- </Grid.RowDefinitions>
-
- <DockPanel LastChildFill="False">
- <TextBlock
- Margin="20,0"
- HorizontalAlignment="Center"
- Text="调料参数设置" />
- <Button
- Margin="30,0"
- Command="{Binding AddMaterialCommand}"
- CommandParameter="调料"
- Content="新增调料数据"
- DockPanel.Dock="Right" />
- </DockPanel>
- <!--#region 表格标题栏设置-->
- <Grid
- Grid.Row="1"
- Margin="0,10,0,0"
- Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="330" />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition Width="80" />
- <ColumnDefinition Width="80" />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- Style="{StaticResource TitleTextblockStyle}"
- Text="ID" />
-
- <Grid Grid.Column="1">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="名称" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="2"
- Style="{StaticResource TitleTextblockStyle}"
- Text="位置" />
-
- <Grid Grid.Column="3">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="编辑" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="4">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="删除" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <Border
- Grid.ColumnSpan="10"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
- </Grid>
- <!--#endregion-->
-
- <!--#region 表格数据显示设置-->
- <Grid Grid.Row="2">
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding Seasonings}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr" Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="330" />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition Width="80" />
- <ColumnDefinition Width="80" />
- </Grid.ColumnDefinitions>
-
- <TextBox
- Grid.Column="0"
- IsReadOnly="True"
- Style="{StaticResource DataShowTextBoxStyle}"
- Text="{Binding Id}"
- TextAlignment="Center" />
-
- <Grid Grid.Column="1">
- <TextBox
- MinWidth="150"
- IsReadOnly="True"
- Style="{StaticResource DataShowTextBoxStyle}"
- Text="{Binding Name}"
- TextAlignment="Center" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBox
- Grid.Column="2"
- Height="30"
- MinWidth="150"
- IsReadOnly="True"
- Style="{StaticResource DataShowTextBoxStyle}"
- Text="{Binding Loc}"
- TextAlignment="Center" />
-
- <Grid Grid.Column="3">
- <Button
- Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding}"
- Content="编辑"
- FontSize="16"
- Style="{StaticResource IssueRecipeButtonStyle}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Grid Grid.Column="4">
- <Button
- Command="{Binding DataContext.RemoveSeasoningCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding Id}"
- Content="删除"
- FontSize="16"
- Style="{StaticResource ControlButtonStyle}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Border
- Grid.ColumnSpan="10"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,1" />
- </Grid>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- <!--#endregion-->
- </Grid>
- <!--#endregion-->
-
- <!--#region 原料-->
- <pry:ImageBorder
- Grid.RowSpan="2"
- Grid.Column="1"
- Margin="15" />
- <Grid
- Grid.RowSpan="2"
- Grid.Column="1"
- Margin="20">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="40" />
- <RowDefinition Height="1*" />
- </Grid.RowDefinitions>
-
- <DockPanel LastChildFill="False">
- <TextBlock
- Margin="20,0"
- HorizontalAlignment="Center"
- Text="主料参数设置" />
- <Button
- Margin="30,0"
- Command="{Binding AddMaterialCommand}"
- CommandParameter="主料"
- Content="新增主料数据"
- DockPanel.Dock="Right" />
- </DockPanel>
- <!--#region 表格标题栏设置-->
- <Grid
- Grid.Row="1"
- Margin="0,10,0,0"
- Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="330" />
- <ColumnDefinition />
- <ColumnDefinition Width="80" />
- <ColumnDefinition Width="80" />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- Style="{StaticResource TitleTextblockStyle}"
- Text="ID" />
-
- <Grid Grid.Column="1">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="名称" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Grid Grid.Column="2">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="编辑" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Grid Grid.Column="3">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="删除" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Border
- Grid.ColumnSpan="10"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
- </Grid>
- <!--#endregion-->
-
- <!--#region 表格数据显示设置-->
- <Grid Grid.Row="2">
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding Ingredients}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr" Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="330" />
- <ColumnDefinition />
- <ColumnDefinition Width="80" />
- <ColumnDefinition Width="80" />
- </Grid.ColumnDefinitions>
-
- <TextBox
- Grid.Column="0"
- IsReadOnly="True"
- Style="{StaticResource DataShowTextBoxStyle}"
- Text="{Binding Id}"
- TextAlignment="Center" />
-
- <Grid Grid.Column="1">
- <TextBox
- MinWidth="100"
- IsReadOnly="True"
- Style="{StaticResource DataShowTextBoxStyle}"
- Text="{Binding Name}"
- TextAlignment="Center" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="2">
- <Button
- Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding}"
- Content="编辑"
- FontSize="16"
- Style="{StaticResource IssueRecipeButtonStyle}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Grid Grid.Column="3">
- <Button
- Command="{Binding DataContext.RemoveIngreditentCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding Id}"
- Content="删除"
- FontSize="16"
- Style="{StaticResource ControlButtonStyle}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Border
- Grid.ColumnSpan="10"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,1" />
- </Grid>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- <!--#endregion-->
- </Grid>
- <!--#endregion-->
- </Grid>
- </UserControl>
|