|
- <UserControl
- x:Class="BPASmartClient.MorkCL.View.ItemStorageView"
- 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"
- xmlns:converter="clr-namespace:BPASmartClient.MorkCL.Converter"
- Name="库位状态"
- d:DesignHeight="900"
- d:DesignWidth="1200"
- mc:Ignorable="d">
- <UserControl.DataContext>
- <vm:ItemStorageViewModel />
- </UserControl.DataContext>
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.MorkCL;component/CustomStyle/CustomStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <converter:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter" />
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="200" />
- <ColumnDefinition Width="1*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="0.3*" />
- <RowDefinition Height="0.7*" />
- </Grid.RowDefinitions>
-
- <!--#region 入库电子称状态-->
- <pry:ImageBorder Margin="5,15" />
- <StackPanel Margin="15,20">
- <TextBlock Width="200" Text="{Binding ScaleCurrentWeight, StringFormat=当前重量:{0:F2} Kg}" />
-
-
- <Button
- Height="40"
- Margin="0,30"
- Command="{Binding InitialStorageCommand}"
- Content="清空全部库位" />
-
- <Button
- Height="50"
- Margin="0,10"
- Command="{Binding ModifySelectStorageCommand}"
- CommandParameter="{Binding ElementName=List_Ingre, Path=SelectedIndex}"
- Content="修改所选库位信息" />
-
-
- <Button
- Height="40"
- Command="{Binding ClearSelectStorageCommand}"
- CommandParameter="{Binding ElementName=List_Ingre, Path=SelectedIndex}"
- Content="清空所选库位信息" />
- </StackPanel>
- <!--#endregion-->
-
- <!--#region 入库操作-->
- <pry:ImageBorder Grid.Row="1" Margin="5,15" />
- <StackPanel Grid.Row="1" Margin="15,20">
- <TextBlock Text="入库名称:" />
- <ComboBox
- x:Name="cmbSelectName"
- Height="50"
- Margin="0,5"
- DisplayMemberPath="Name"
- FontSize="26"
- IsEditable="False"
- ItemsSource="{Binding Ingredients}" />
-
- <Button
- Height="40"
- Margin="0,10"
- Command="{Binding InStorageCommand}"
- CommandParameter="{Binding ElementName=cmbSelectName, Path=SelectedItem}"
- Content="入库" />
- <!--<Button
- Height="40"
- Margin="0,30,0,10"
- Command="{Binding WeigherTareCommand}"
- Content="电子秤除皮"/>-->
- <Button
- Height="40"
- Margin="0,10"
- Command="{Binding WeigherZeroCommand}"
- Content="电子秤置零" />
- </StackPanel>
- <!--#endregion-->
- <!--#region 辅料仓不需要显示,整体注释。-->
- <!--<pry:ImageBorder Grid.Column="1" Margin="15" Visibility="Collapsed"/>
- <ItemsControl
- Grid.Column="1"
- Margin="3"
- Background="Transparent"
- BorderThickness="1"
- ItemsSource="{Binding AccessoriesItorage}" Visibility="Collapsed"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Columns="8" />
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
-
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Border Margin="5" Background="Transparent">
- <Grid Height="180">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <TextBlock
- Margin="0,0,0,25"
- HorizontalAlignment="Center"
- VerticalAlignment="Bottom"
- FontSize="25"
- Foreground="#ffccd61f"
- Text="{Binding Name}" />
-
- <TextBlock
- Grid.Row="1"
- Margin="0,0,0,35"
- HorizontalAlignment="Center"
- FontSize="20"
- Foreground="#FF0084FF"
- Text="{Binding Weight, StringFormat={}{0} g}" />
-
- <StackPanel
- Grid.Row="1"
- Margin="0,25"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- FontSize="20"
- Foreground="#FF0084FF"
- Text="{Binding ID, StringFormat={}{0} 号仓}" />
- </StackPanel>
- <Image
- Grid.RowSpan="2"
- Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
- Stretch="Fill" />
- </Grid>
- </Border>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>-->
- <!--#endregion-->
- <!--#region 原料仓-->
- <pry:ImageBorder
- Grid.Row="0"
- Grid.RowSpan="2"
- Grid.Column="1" />
- <ListView
- x:Name="List_Ingre"
- Grid.Row="0"
- Grid.RowSpan="2"
- Grid.Column="1"
- Margin="3"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding IngredientsItorage}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Disabled"
- SelectionMode="Single">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Columns="3"
- Rows="4">
- <UniformGrid.LayoutTransform>
- <TransformGroup>
- <RotateTransform Angle="90" />
- <ScaleTransform ScaleX="-1" />
- </TransformGroup>
- </UniformGrid.LayoutTransform>
- </UniformGrid>
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
-
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border Margin="5" Background="Transparent">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.LayoutTransform>
- <TransformGroup>
- <RotateTransform Angle="-90" />
- <ScaleTransform ScaleX="1" ScaleY="-1" />
- </TransformGroup>
- </Grid.LayoutTransform>
-
- <TextBlock
- Margin="0,0,0,55"
- HorizontalAlignment="Center"
- VerticalAlignment="Bottom"
- FontSize="25"
- Foreground="#ffccd61f"
- Text="{Binding Name}" />
-
- <TextBlock
- Grid.Row="1"
- Margin="0,0,0,35"
- HorizontalAlignment="Center"
- FontSize="20"
- Foreground="#FF0084FF"
- Text="{Binding Weight, StringFormat={}{0} Kg}" />
-
- <!--<StackPanel
- Grid.Row="1"
- Margin="0,25"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- FontSize="20"
- Foreground="#FF0084FF"
- Text="{Binding ID, StringFormat={}{0} 号仓}" />
- </StackPanel>-->
- <Image
- Grid.RowSpan="2"
- Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
- Stretch="Fill" />
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
-
- <!--#endregion-->
- </Grid>
- </UserControl>
|