You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AUCMA_SCADA/Aucma.Core.BoxFoaming/Views/RealTimeInventoryPageView.xaml

156 lines
14 KiB
XML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:Aucma.Core.BoxFoaming.Views"
xmlns:UserPage="clr-namespace:Aucma.Core.BoxFoaming.UserPage" x:Class="Aucma.Core.BoxFoaming.Views.RealTimeInventoryPageView"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" Margin="10 5 0 0" HorizontalAlignment="Left" VerticalAlignment="Center" >
<Button Content="泡前库" Style="{StaticResource MaterialDesignRaisedButton}" Width="100" Margin="5"/>
<Button Content="泡后库" Style="{StaticResource MaterialDesignRaisedButton}" Width="100"/>
</WrapPanel>
<StackPanel Grid.Row="1">
<ItemsControl ItemsSource="{Binding Shapes}" VerticalAlignment="Center" HorizontalAlignment="Center" >
<ItemsControl.ItemsPanel>
<!--布局-->
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal"></WrapPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<!--控件模板-->
<ItemsControl.ItemTemplate>
<DataTemplate>
<Control x:Name="ctrl" MinWidth="450" MinHeight="160" ></Control>
<DataTemplate.Triggers>
<!--根据不同类型选择不同模板-->
<DataTrigger Binding="{Binding spaceType}" Value="1">
<!--矩形-->
<Setter Property="Template" TargetName="ctrl">
<Setter.Value>
<ControlTemplate >
<Border Margin="5,5" Background="#0288d1" BorderBrush="White" BorderThickness="2" >
<Grid Margin="3,3">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="White" BorderThickness="1">
<TextBlock Text="{Binding spaceCode}" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="1" BorderBrush="White" BorderThickness="1">
<TextBlock Text="在库" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="2" BorderBrush="White" BorderThickness="1">
<TextBlock Text="{Binding spaceStock}" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="3" BorderBrush="White" BorderThickness="1">
<TextBlock Text="在途" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="4" BorderBrush="White" BorderThickness="1">
<TextBlock Text="{Binding onTheWay}" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="5" BorderBrush="White" BorderThickness="1">
<TextBlock Text="合计" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="6" BorderBrush="White" BorderThickness="1">
<TextBlock Text="{Binding totalAmount}" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Grid>
</Border>
<Border Grid.Row="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="6*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="White" BorderThickness="1">
<TextBlock Text="型号" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="1" BorderBrush="White" BorderThickness="1">
<TextBlock Text="8307501015SC-349雪王爱喝水" FontSize="16" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Grid>
</Border>
<Border Grid.Row="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="White" BorderThickness="1" >
<TextBlock Text="状态" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="1" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.UpdateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{x:Null}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="入库" Foreground="{Binding inStoreFlag}" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
</Border>
<Border Grid.Column="2" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.UpdateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{x:Null}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="出库" Foreground="{Binding outStoreFlag}" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Button>
</Border>
<Border Grid.Column="3" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.UpdateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{x:Null}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="异常" Foreground="{Binding unusualFlag}" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Button>
</Border>
<Border Grid.Column="4" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.UpdateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{x:Null}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="禁用" Foreground="{Binding isFlag}" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Button>
</Border>
<Border Grid.Column="5" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.UpdateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{x:Null}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="明细" FontSize="18" Foreground="Green" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Button>
</Border>
<Border Grid.Column="6" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.UpdateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{x:Null}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="出一个" Foreground="{Binding onlyOne}" FontSize="17" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
</Border>
</Grid>
</Border>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Grid>
</UserControl>