152 lines
9.6 KiB
XML
152 lines
9.6 KiB
XML
<UserControl x:Class="DM_Weight.Views.ExchangeWindow"
|
|
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:local="clr-namespace:DM_Weight.Views"
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:convert="clr-namespace:DM_Weight.Converter"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
<UserControl.Resources>
|
|
<convert:DrawerSelectConverter x:Key="DrawerSelectConverter" />
|
|
<Style x:Key="st" TargetType="GridViewColumnHeader">
|
|
<Style.Setters>
|
|
<Setter Property="Height">
|
|
<Setter.Value>55</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Background">
|
|
<Setter.Value>#31ccec</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Foreground">
|
|
<Setter.Value>white</Setter.Value>
|
|
</Setter>
|
|
</Style.Setters>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="15*" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid Margin="6" Grid.Column="0" >
|
|
<Grid.Resources>
|
|
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignPaperLightButton}">
|
|
<Setter Property="Foreground" Value="#00a0ea" />
|
|
<Setter Property="BorderBrush" Value="#00a0ea" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="#d1e7f5" />
|
|
<Setter Property="BorderBrush" Value="#d1e7f5" />
|
|
</Trigger>
|
|
<DataTrigger Value="True">
|
|
<DataTrigger.Binding>
|
|
<MultiBinding Converter="{StaticResource DrawerSelectConverter}">
|
|
<Binding RelativeSource="{ RelativeSource Mode=Self }" Path="Content" />
|
|
<Binding Path="DrawerNo" />
|
|
</MultiBinding>
|
|
</DataTrigger.Binding>
|
|
<Setter Property="Background" Value="#d1e7f5" />
|
|
<Setter Property="BorderBrush" Value="#d1e7f5" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Grid.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<!--<RowDefinition />-->
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button Margin="0 0 3 0" Grid.Row="0" Grid.Column="0" Width="120" Content="一号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="0" />
|
|
<Button Margin="0 0 3 0" Grid.Row="1" Grid.Column="0" Width="120" Content="二号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="1" />
|
|
<Button Margin="0 0 3 0" Grid.Row="2" Grid.Column="0" Width="120" Content="三号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="2" />
|
|
<Button Margin="0 0 3 0" Grid.Row="3" Grid.Column="0" Width="120" Content="四号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="3" />
|
|
<Button Margin="0 0 3 0" Grid.Row="4" Grid.Column="0" Width="120" Content="五号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="4" />
|
|
<Button Margin="0 0 3 0" Grid.Row="5" Grid.Column="0" Width="120" Content="六号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="5" />
|
|
<Button Margin="0 0 3 0" Grid.Row="6" Grid.Column="0" Width="120" Content="七号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="6" />
|
|
<Button Margin="0 0 3 0" Grid.Row="7" Grid.Column="0" Width="120" Content="八号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="7" />
|
|
|
|
<Button Margin="0 0 3 0" Grid.Row="8" Grid.Column="0" Width="120" Content="九号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="8" />
|
|
<Button Margin="0 0 3 0" Grid.Row="0" Grid.Column="1" Width="120" Content="十号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="9" />
|
|
<Button Margin="0 0 3 0" Grid.Row="1" Grid.Column="1" Width="120" Content="十一号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="10" />
|
|
<Button Margin="0 0 3 0" Grid.Row="2" Grid.Column="1" Width="120" Content="十二号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="11" />
|
|
<Button Margin="0 0 3 0" Grid.Row="3" Grid.Column="1" Width="120" Content="十三号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="12" />
|
|
<Button Margin="0 0 3 0" Grid.Row="4" Grid.Column="1" Width="120" Content="十四号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="13" />
|
|
<Button Margin="0 0 3 0" Grid.Row="5" Grid.Column="1" Width="120" Content="十五号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="14" />
|
|
<Button Margin="0 0 3 0" Grid.Row="6" Grid.Column="1" Width="120" Content="十六号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="15" />
|
|
<Button Margin="0 0 3 0" Grid.Row="7" Grid.Column="1" Width="120" Content="十七号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="16" />
|
|
<Button Margin="0 0 3 0" Grid.Row="8" Grid.Column="1" Width="120" Content="十八号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="17" />
|
|
<!--<Button Grid.Row="8" Grid.Column="1" Width="120" Content="19号药箱" Command="{Binding UpdateDrawerNo}" CommandParameter="19" />
|
|
<Button Grid.Row="9" Grid.Column="1" Width="120" Content="20号药箱" Command="{Binding UpdateDrawerNo}" CommandParameter="20" />-->
|
|
|
|
</Grid>
|
|
</Grid>
|
|
<Grid Grid.Column="1" Margin="6">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.ColumnSpan="2">
|
|
<Button Margin="6 0 6 6"
|
|
Content="替换药品"
|
|
Command="{Binding ExchangeCommand}"
|
|
Style="{StaticResource MaterialDesignOutlinedLightButton}" />
|
|
<Button
|
|
Margin="0 0 6 6"
|
|
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
|
Content="移出药品"
|
|
Command="{Binding RemoveCommand}"/>
|
|
</StackPanel>
|
|
<ListView Grid.ColumnSpan="2"
|
|
Padding="0 6 0 0" Grid.Row="1"
|
|
ItemsSource="{Binding _ChannelStocks, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
|
|
SelectedItem="{Binding _ChannelStock}"
|
|
materialDesign:ListViewAssist.HeaderRowBackground="#31ccec"
|
|
materialDesign:DataGridAssist.ColumnHeaderPadding="10"
|
|
materialDesign:ListViewAssist.ListViewItemPadding="13">
|
|
<ListView.Resources>
|
|
<Style TargetType="{x:Type GridViewColumnHeader}" BasedOn="{StaticResource {x:Type GridViewColumnHeader}}">
|
|
<Setter Property="Foreground" Value="White" />
|
|
</Style>
|
|
</ListView.Resources>
|
|
<!--<i:Interaction.Triggers>
|
|
<i:EventTrigger EventName="SelectionChanged">
|
|
<i:InvokeCommandAction Command="{Binding RowSelected}" />
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>-->
|
|
<ListView.View>
|
|
<GridView ColumnHeaderContainerStyle="{StaticResource st}">
|
|
<GridViewColumn Header="药品名称" Width="150" DisplayMemberBinding="{Binding DrugInfo.DrugName}"/>
|
|
|
|
<GridViewColumn Header="规格" Width="150" DisplayMemberBinding="{Binding DrugInfo.DrugSpec}"/>
|
|
|
|
<GridViewColumn Header="批次" Width="130" DisplayMemberBinding="{Binding ManuNo}"/>
|
|
|
|
<GridViewColumn Header="库存" Width="50" DisplayMemberBinding="{Binding Quantity}"/>
|
|
|
|
</GridView>
|
|
</ListView.View>
|
|
</ListView>
|
|
<!--<materialDesign:Snackbar
|
|
Background="{Binding SnackbarBackground}"
|
|
MessageQueue="{Binding SnackbarMessageQueue}"/>-->
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl>
|