|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377 |
- <UserControl
- x:Class="BPASmartClient.JXJFoodSmallStation.View.BomOfMaterialView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:con="clr-namespace:BPASmartClient.JXJFoodSmallStation.Converter"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
- d:DesignHeight="1080"
- d:DesignWidth="1920"
- mc:Ignorable="d">
- <UserControl.DataContext>
- <vm:BomOfMaterialViewModel />
- </UserControl.DataContext>
-
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.JXJFoodSmallStation;component/Resource/MyStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
-
- <!--<UserControl.Resources>
- <SolidColorBrush x:Key="tabColor" Color="#FF2AB2E7" />
- -->
- <!--<SolidColorBrush x:Key="bordColor" Color="#33ffffff" />-->
- <!--
- <SolidColorBrush x:Key="bordColor" Color="#332AB2E7" />
- <con:DataTableRedundantConverter x:Key="tabConvert" />
-
- <Style x:Key="RowRadioButtonStyle" TargetType="{x:Type RadioButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <Border
- x:Name="NvaBor"
- Background="Transparent"
- BorderBrush="#FF2AB2E7"
- BorderThickness="0">
- <ContentControl
- Margin="10,4"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Content="{TemplateBinding Content}"
- FontSize="16" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="True">
- <Setter TargetName="NvaBor" Property="Background" Value="#22ffffff" />
- <Setter TargetName="NvaBor" Property="BorderThickness" Value="0" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsChecked" Value="false" />
- <Condition Property="IsMouseOver" Value="True" />
- </MultiTrigger.Conditions>
- <MultiTrigger.Setters>
- <Setter TargetName="NvaBor" Property="Background" Value="#22ffffff" />
- </MultiTrigger.Setters>
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="InputTextboxStyle" TargetType="TextBox">
- <Setter Property="Margin" Value="5,0,0,0" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="HorizontalAlignment" Value="Left" />
- <Setter Property="Width" Value="150" />
- <Setter Property="Height" Value="40" />
- <Setter Property="CaretBrush" Value="{StaticResource TitleBorderColor}" />
- <Setter Property="Foreground" Value="{StaticResource TitleBorderColor}" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="FontSize" Value="14" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="VerticalAlignment" Value="Center" />
- </Style>
-
- <Style x:Key="ControlButtonStyle" TargetType="Button">
- <Setter Property="Margin" Value="0" />
- <Setter Property="FontSize" Value="18" />
- <Setter Property="Foreground" Value="#FFF53F62" />
- <Setter Property="FontWeight" Value="SemiBold" />
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border
- Name="TitleBarBr"
- BorderBrush="#00c2f4"
- BorderThickness="0"
- CornerRadius="0"
- Opacity="0.8">
-
- <ContentPresenter
- Margin="{TemplateBinding Margin}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- <Border.Background>
- <ImageBrush
- ImageSource="/BPASmartClient.CustomResource;component/Image/组合边框1.1.png"
- Opacity="0.8"
- Stretch="Fill" />
- </Border.Background>
-
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="TitleBarBr" Property="Opacity" Value="1" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="TitleTextblockStyle" TargetType="TextBlock">
- <Setter Property="FontSize" Value="16" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="Foreground" Value="{StaticResource tabColor}" />
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="FontWeight" Value="SemiBold" />
- </Style>
-
- </UserControl.Resources>-->
-
- <Grid Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="60" />
- <RowDefinition Height="50" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <!--#region 表格标题栏设置-->
- <Grid>
- <StackPanel
- Margin="0,0,10,0"
- HorizontalAlignment="Right"
- Orientation="Horizontal">
- <Button
- Width="200"
- Height="50"
- Margin="5"
- Command="{Binding GetBomMaterialData}"
- Content="拉取本地数据"
- FontSize="28"
- Foreground="DeepSkyBlue"
- Style="{StaticResource ImageButtonStyle}" />
- <Button
- Width="200"
- Height="50"
- Margin="5"
- Command="{Binding DeleteAllMaterial}"
- Content="删除所有数据"
- FontSize="28"
- Foreground="DeepSkyBlue"
- Style="{StaticResource ImageButtonStyle}" />
- <Button
- Width="200"
- Height="50"
- Margin="5"
- Command="{Binding AddMaterial}"
- Content="新增数据"
- FontSize="28"
- Foreground="DeepSkyBlue"
- Style="{StaticResource ImageButtonStyle}" />
- <Button
- Width="200"
- Height="50"
- Margin="5"
- Command="{Binding SaveMaterials}"
- Content="保存参数"
- FontSize="28"
- Foreground="DeepSkyBlue"
- Style="{StaticResource ImageButtonStyle}" />
- </StackPanel>
-
- </Grid>
- <Grid
- Grid.Row="1"
- Margin="0,10,17,0"
- Background="#ff0C255F">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- FontSize="24"
- Style="{StaticResource TitleTextblockStyle}"
- Text="序号" />
-
- <TextBlock
- Grid.Column="1"
- FontSize="24"
- Style="{StaticResource TitleTextblockStyle}"
- Text="原料编号" />
-
- <TextBlock
- Grid.Column="2"
- FontSize="24"
- Style="{StaticResource TitleTextblockStyle}"
- Text="原料名称" />
-
- <TextBlock
- Grid.Column="3"
- FontSize="24"
- Style="{StaticResource TitleTextblockStyle}"
- Text="操作" />
-
- <Border
- Grid.Column="0"
- Grid.ColumnSpan="4"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,1,1,1" />
- <Border
- Grid.Column="1"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
- <Border
- Grid.Column="3"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
-
-
-
- <!--<Grid Grid.Column="0">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="24"
- Foreground="Aqua"
- Text="序号" />
- -->
- <!--<Border BorderThickness="1,1,1,1" Cursor="SizeWE"
- BorderBrush="{StaticResource bordColor}" />-->
- <!--
- </Grid>
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="24"
- Foreground="Aqua"
- Text="原料编号" />
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="24"
- Foreground="Aqua"
- Text="原料名称" />
- <TextBlock
- Grid.Column="3"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="24"
- Foreground="Aqua"
- Text="操作" />-->
- </Grid>
- <Grid Grid.Row="2">
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Visible">
- <ItemsControl Foreground="DeepSkyBlue" ItemsSource="{Binding RawMaterialInfo}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding Count}" />
-
- <TextBox
- Grid.Column="1"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding MaterialCode}" />
-
- <TextBox
- Grid.Column="2"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding MaterialName}" />
-
- <Button
- Grid.Column="3"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RawMaterialLocation}"
- Content="删除"
- FontSize="16"
- Style="{StaticResource ControlButtonStyle}" />
-
- <Border
- Grid.Column="0"
- Grid.ColumnSpan="4"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,1" />
- <Border
- Grid.Column="1"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
- <Border
- Grid.Column="3"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
-
-
- <!--<Grid Grid.Column="0" Margin="5">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding Count}" />
- </Grid>
- <Grid Grid.Column="1" Margin="5">
- <TextBox
- Width="50"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding MaterialCode}" />
- </Grid>
- <Grid Grid.Column="2" Margin="5">
- <TextBox
- Width="200"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding MaterialName}" />
- </Grid>
- <Grid Grid.Column="3" Margin="5">
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <pry:IcoButton
- Margin="3,4,4,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#11F53F62"
- BorderThickness="0"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding Count}"
- Content="删除"
- EnterBackground="#22F53F62"
- Foreground="#FFF53F62"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
- </StackPanel>
- </Grid>-->
- </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>
- </UserControl>
|