396 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			396 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| 
								 | 
							
								<UserControl x:Class="DM_Weight.Views.AddDrugControl"
							 | 
						||
| 
								 | 
							
								             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:prism="http://prismlibrary.com/"
							 | 
						||
| 
								 | 
							
								             prism:ViewModelLocator.AutoWireViewModel="True"
							 | 
						||
| 
								 | 
							
								             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
							 | 
						||
| 
								 | 
							
								             xmlns:convert="clr-namespace:DM_Weight.Converter"
							 | 
						||
| 
								 | 
							
								             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
							 | 
						||
| 
								 | 
							
								             mc:Ignorable="d" 
							 | 
						||
| 
								 | 
							
								             d:DesignHeight="450" d:DesignWidth="800">
							 | 
						||
| 
								 | 
							
								    <UserControl.Resources>
							 | 
						||
| 
								 | 
							
								        <convert:QuantityCountConverter x:Key="QuantityCountConverter" />
							 | 
						||
| 
								 | 
							
								        <convert:BoardTypeConverter x:Key="BoardTypeConverter" />
							 | 
						||
| 
								 | 
							
								        <convert:DrawerSelectConverter x:Key="DrawerSelectConverter" />
							 | 
						||
| 
								 | 
							
								        <convert:StatusConverter x:Key="StatusConverter" />
							 | 
						||
| 
								 | 
							
								        <convert:InputQuantityConverter x:Key="InputQuantityConverter" />
							 | 
						||
| 
								 | 
							
								        <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="Auto" />
							 | 
						||
| 
								 | 
							
								            <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								        </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        <Grid Margin="0" Grid.Column="0"  Width="280" Height="570"  Visibility="{Binding Is8Drawer, Converter={StaticResource BooleanToVisibilityConverter}}">
							 | 
						||
| 
								 | 
							
								            <Grid.Background>
							 | 
						||
| 
								 | 
							
								                <ImageBrush ImageSource="/Images/box.png" />
							 | 
						||
| 
								 | 
							
								            </Grid.Background>
							 | 
						||
| 
								 | 
							
								            <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="200" />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								            </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								            <Grid Grid.Row="1">
							 | 
						||
| 
								 | 
							
								                <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <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>
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="0" Width="210" Content="1" Command="{Binding UpdateDrawerNo}" CommandParameter="1" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="1" Width="210" Content="2" Command="{Binding UpdateDrawerNo}" CommandParameter="2" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="2" Width="210" Content="3" Command="{Binding UpdateDrawerNo}" CommandParameter="3" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="3" Width="210" Content="4" Command="{Binding UpdateDrawerNo}" CommandParameter="4" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="4" Width="210" Content="5" Command="{Binding UpdateDrawerNo}" CommandParameter="5" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="5" Width="210" Content="6" Command="{Binding UpdateDrawerNo}" CommandParameter="6" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="6" Width="210" Content="7" Command="{Binding UpdateDrawerNo}" CommandParameter="7" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="7" Width="210" Content="8" Command="{Binding UpdateDrawerNo}" CommandParameter="8" />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								        <Grid Margin="0" Grid.Column="1" Width="300" Height="570" Visibility="{Binding Is16Drawer, Converter={StaticResource BooleanToVisibilityConverter}}">
							 | 
						||
| 
								 | 
							
								            <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.Background>
							 | 
						||
| 
								 | 
							
								                <ImageBrush ImageSource="/Images/box-16.jpg" />
							 | 
						||
| 
								 | 
							
								            </Grid.Background>
							 | 
						||
| 
								 | 
							
								            <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="200" />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								            </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								            <Grid Margin="10 0 0 0"  Visibility="{Binding Is17Drawer, Converter={StaticResource BooleanToVisibilityConverter}}" Grid.Row="0">
							 | 
						||
| 
								 | 
							
								                <Button  Width="110" Content="17" HorizontalAlignment="Left" Command="{Binding UpdateDrawerNo}" CommandParameter="17" />
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            <Grid Grid.Row="1">
							 | 
						||
| 
								 | 
							
								                <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								                </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="0" Grid.Column="0" Width="120" Content="1" Command="{Binding UpdateDrawerNo}" CommandParameter="1" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="1" Grid.Column="0" Width="120" Content="2" Command="{Binding UpdateDrawerNo}" CommandParameter="2" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="2" Grid.Column="0" Width="120" Content="3" Command="{Binding UpdateDrawerNo}" CommandParameter="3" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="3" Grid.Column="0" Width="120" Content="4" Command="{Binding UpdateDrawerNo}" CommandParameter="4" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="4" Grid.Column="0" Width="120" Content="5" Command="{Binding UpdateDrawerNo}" CommandParameter="5" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="5" Grid.Column="0" Width="120" Content="6" Command="{Binding UpdateDrawerNo}" CommandParameter="6" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="6" Grid.Column="0" Width="120" Content="7" Command="{Binding UpdateDrawerNo}" CommandParameter="7" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="7" Grid.Column="0" Width="120" Content="8" Command="{Binding UpdateDrawerNo}" CommandParameter="8" />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="0" Grid.Column="1" Width="120" Content="9" Command="{Binding UpdateDrawerNo}" CommandParameter="9" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="1" Grid.Column="1" Width="120" Content="10" Command="{Binding UpdateDrawerNo}" CommandParameter="10" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="2" Grid.Column="1" Width="120" Content="11" Command="{Binding UpdateDrawerNo}" CommandParameter="11" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="3" Grid.Column="1" Width="120" Content="12" Command="{Binding UpdateDrawerNo}" CommandParameter="12" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="4" Grid.Column="1" Width="120" Content="13" Command="{Binding UpdateDrawerNo}" CommandParameter="13" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="5" Grid.Column="1" Width="120" Content="14" Command="{Binding UpdateDrawerNo}" CommandParameter="14" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="6" Grid.Column="1" Width="120" Content="15" Command="{Binding UpdateDrawerNo}" CommandParameter="15" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="7" Grid.Column="1" Width="120" Content="16" Command="{Binding UpdateDrawerNo}" CommandParameter="16" />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								        <Grid Grid.Column="2">
							 | 
						||
| 
								 | 
							
								            <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								            </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								            <StackPanel Grid.Row="0" Margin="6" Orientation="Horizontal" HorizontalAlignment="Right">
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                    Margin="0 0 3 0"
							 | 
						||
| 
								 | 
							
								                    VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                    Command="{Binding OpenDrawer}"
							 | 
						||
| 
								 | 
							
								                    Visibility="{Binding Status,Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnVisible}"
							 | 
						||
| 
								 | 
							
								                    materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
							 | 
						||
| 
								 | 
							
								                    materialDesign:ButtonProgressAssist.IsIndeterminate="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                    Content="加药" />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                <!--<TextBox Text="{Binding PZH, UpdateSourceTrigger=PropertyChanged}" materialDesign:HintAssist.Hint="凭证号"
							 | 
						||
| 
								 | 
							
								                materialDesign:HintAssist.IsFloating="True" Width="100"
							 | 
						||
| 
								 | 
							
								                Margin="0 0 3 0"
							 | 
						||
| 
								 | 
							
								                Visibility="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CompleteBtn}"
							 | 
						||
| 
								 | 
							
								                />-->
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                    Margin="0 0 3 0"
							 | 
						||
| 
								 | 
							
								                    VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                    Command="{Binding TakeFinish}"
							 | 
						||
| 
								 | 
							
								                    Visibility="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CompleteBtn}"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                    Content="完成" />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                    Margin="0 0 6 0"
							 | 
						||
| 
								 | 
							
								                    VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                    Command="{Binding CancleTake}"
							 | 
						||
| 
								 | 
							
								                    Visibility="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CancelBtn}"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                    Content="取消" />
							 | 
						||
| 
								 | 
							
								            </StackPanel>
							 | 
						||
| 
								 | 
							
								            <ScrollViewer  Grid.Row="1"  Margin="6">
							 | 
						||
| 
								 | 
							
								                <ItemsControl 
							 | 
						||
| 
								 | 
							
								                ItemsSource="{Binding ChannelLsts}"
							 | 
						||
| 
								 | 
							
								                Grid.IsSharedSizeScope="True"
							 | 
						||
| 
								 | 
							
								               >
							 | 
						||
| 
								 | 
							
								                    <!--<ItemsControl.ItemsPanel>
							 | 
						||
| 
								 | 
							
								                    <ItemsPanelTemplate>
							 | 
						||
| 
								 | 
							
								                        -->
							 | 
						||
| 
								 | 
							
								                    <!--<UniformGrid Columns="4" />-->
							 | 
						||
| 
								 | 
							
								                    <!--
							 | 
						||
| 
								 | 
							
								                    </ItemsPanelTemplate>
							 | 
						||
| 
								 | 
							
								                </ItemsControl.ItemsPanel>-->
							 | 
						||
| 
								 | 
							
								                    <ItemsControl.ItemTemplate>
							 | 
						||
| 
								 | 
							
								                        <DataTemplate>
							 | 
						||
| 
								 | 
							
								                            <!--<materialDesign:Card
							 | 
						||
| 
								 | 
							
								                                Background="{StaticResource MaterialDesignLightBackground}"
							 | 
						||
| 
								 | 
							
								                                Margin="4"
							 | 
						||
| 
								 | 
							
								                                Padding="0">-->
							 | 
						||
| 
								 | 
							
								                            <Grid>
							 | 
						||
| 
								 | 
							
								                                <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                                    <ColumnDefinition Width="200"/>
							 | 
						||
| 
								 | 
							
								                                    <ColumnDefinition/>
							 | 
						||
| 
								 | 
							
								                                </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                                <Border BorderBrush="White" BorderThickness="1">
							 | 
						||
| 
								 | 
							
								                                    <StackPanel Orientation="Horizontal" Background="#31ccec" Grid.Column="0">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                                        <Grid>
							 | 
						||
| 
								 | 
							
								                                            <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                                                <RowDefinition/>
							 | 
						||
| 
								 | 
							
								                                                <RowDefinition/>
							 | 
						||
| 
								 | 
							
								                                                <RowDefinition/>
							 | 
						||
| 
								 | 
							
								                                            </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                                            <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                                                <ColumnDefinition Width="200"/>
							 | 
						||
| 
								 | 
							
								                                            </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                                            <TextBlock TextWrapping="Wrap" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center"  Padding="0 10 0 0 " Text="{Binding Drug.DrugName}"/>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                                            <TextBlock TextWrapping="Wrap" Grid.Row="1"  HorizontalAlignment="Center" VerticalAlignment="Center"  Padding="0 0 0 1 " Text="{Binding Drug.DrugSpec}"/>
							 | 
						||
| 
								 | 
							
								                                            <Button  Grid.Row="2"   Padding="0 0 0 1 "  Style="{x:Null}" BorderBrush="{x:Null}" Background="{x:Null}" Click="Button_Click" CommandParameter="{Binding}">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                                                <Button.Content>
							 | 
						||
| 
								 | 
							
								                                                    <Border Width="32" Height="32" CornerRadius="16" Background="CornflowerBlue" VerticalAlignment="Center" HorizontalAlignment="Center">
							 | 
						||
| 
								 | 
							
								                                                        <Path Data="M0 11L22 11M11 0L11 22" Stroke="WhiteSmoke" StrokeThickness="4" VerticalAlignment="Center" HorizontalAlignment="Center"></Path>
							 | 
						||
| 
								 | 
							
								                                                    </Border>
							 | 
						||
| 
								 | 
							
								                                                </Button.Content>
							 | 
						||
| 
								 | 
							
								                                            </Button>
							 | 
						||
| 
								 | 
							
								                                        </Grid>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                                    </StackPanel>
							 | 
						||
| 
								 | 
							
								                                </Border>
							 | 
						||
| 
								 | 
							
								                                <DataGrid
							 | 
						||
| 
								 | 
							
								                Margin="0"
							 | 
						||
| 
								 | 
							
								                 Grid.Column="1" 
							 | 
						||
| 
								 | 
							
								                materialDesign:DataGridAssist.ColumnHeaderPadding="15"
							 | 
						||
| 
								 | 
							
								                 ItemsSource="{Binding channelStocks}"  
							 | 
						||
| 
								 | 
							
								                materialDesign:DataGridAssist.EnableEditBoxAssist="False"
							 | 
						||
| 
								 | 
							
								                materialDesign:DataGridAssist.CellPadding="13"
							 | 
						||
| 
								 | 
							
								                SelectionUnit="Cell"
							 | 
						||
| 
								 | 
							
								                CanUserAddRows="False"
							 | 
						||
| 
								 | 
							
								                AutoGenerateColumns="False">
							 | 
						||
| 
								 | 
							
								                                    <DataGrid.Resources>
							 | 
						||
| 
								 | 
							
								                                        <Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}">
							 | 
						||
| 
								 | 
							
								                                            <Setter Property="Background" Value="#31ccec" />
							 | 
						||
| 
								 | 
							
								                                            <Setter Property="Foreground" Value="white" />
							 | 
						||
| 
								 | 
							
								                                            <Setter Property="Height" Value="56" />
							 | 
						||
| 
								 | 
							
								                                            <Setter Property="BorderBrush" Value="white"/>
							 | 
						||
| 
								 | 
							
								                                            <Setter Property="BorderThickness" Value="0.6"/>
							 | 
						||
| 
								 | 
							
								                                            <Setter Property="HorizontalContentAlignment" Value="Center"/>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                                        </Style>
							 | 
						||
| 
								 | 
							
								                                        <Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource MaterialDesignDataGridCell}">
							 | 
						||
| 
								 | 
							
								                                            <Style.Triggers>
							 | 
						||
| 
								 | 
							
								                                                <Trigger Property="IsReadOnly" Value="True">
							 | 
						||
| 
								 | 
							
								                                                    <Setter Property="BorderBrush" Value="Transparent" />
							 | 
						||
| 
								 | 
							
								                                                    <Setter Property="HorizontalAlignment" Value="Center"/>
							 | 
						||
| 
								 | 
							
								                                                </Trigger>
							 | 
						||
| 
								 | 
							
								                                            </Style.Triggers>
							 | 
						||
| 
								 | 
							
								                                        </Style>
							 | 
						||
| 
								 | 
							
								                                    </DataGrid.Resources>
							 | 
						||
| 
								 | 
							
								                                    <DataGrid.Columns>
							 | 
						||
| 
								 | 
							
								                                        <DataGridTextColumn Width="80"
							 | 
						||
| 
								 | 
							
								                        Binding="{Binding ColNo}"
							 | 
						||
| 
								 | 
							
								                        Header="库位"
							 | 
						||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						||
| 
								 | 
							
								                                        <DataGridTextColumn Width="180"
							 | 
						||
| 
								 | 
							
								                        Binding="{Binding DrugInfo.DrugName}"
							 | 
						||
| 
								 | 
							
								                        Header="药品名称"
							 | 
						||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						||
| 
								 | 
							
								                                        <DataGridTextColumn Width="100"
							 | 
						||
| 
								 | 
							
								                        Binding="{Binding DrugInfo.DrugSpec}"
							 | 
						||
| 
								 | 
							
								                        Header="规格"
							 | 
						||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						||
| 
								 | 
							
								                                        <DataGridTemplateColumn Width="200" IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        Header="批次">
							 | 
						||
| 
								 | 
							
								                                            <DataGridTemplateColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                                                <DataTemplate>
							 | 
						||
| 
								 | 
							
								                                                    <ComboBox
							 | 
						||
| 
								 | 
							
								                                    Style="{StaticResource MaterialDesignDataGridComboBox}"                  
							 | 
						||
| 
								 | 
							
								                                    ItemsSource="{Binding DrugInfo.DrugManuNos}"
							 | 
						||
| 
								 | 
							
								                                    SelectedItem="{Binding drugManuNo,UpdateSourceTrigger=PropertyChanged}"
							 | 
						||
| 
								 | 
							
								                                    DisplayMemberPath="ManuNo" 
							 | 
						||
| 
								 | 
							
								                                    IsEnabled="{Binding Quantity,Converter={StaticResource QuantityCountConverter}}">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                                                    </ComboBox>
							 | 
						||
| 
								 | 
							
								                                                </DataTemplate>
							 | 
						||
| 
								 | 
							
								                                            </DataGridTemplateColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                                        </DataGridTemplateColumn>
							 | 
						||
| 
								 | 
							
								                                        <DataGridTextColumn Width="100"
							 | 
						||
| 
								 | 
							
								                        Binding="{Binding drugManuNo.EffDate}"
							 | 
						||
| 
								 | 
							
								                        Header="效期"
							 | 
						||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						||
| 
								 | 
							
								                                        <DataGridTextColumn Width="100"
							 | 
						||
| 
								 | 
							
								                        Binding="{Binding Quantity}"
							 | 
						||
| 
								 | 
							
								                        Header="库存"
							 | 
						||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						||
| 
								 | 
							
								                                        <DataGridTemplateColumn Width="100"
							 | 
						||
| 
								 | 
							
								                        Header="添加数量">
							 | 
						||
| 
								 | 
							
								                                            <DataGridTemplateColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                                                <DataTemplate>
							 | 
						||
| 
								 | 
							
								                                                    <TextBox Style="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}" IsReadOnly="{Binding BoardType, Converter={StaticResource InputQuantityConverter}}">
							 | 
						||
| 
								 | 
							
								                                                        <TextBox.Text>
							 | 
						||
| 
								 | 
							
								                                                            <Binding Path="AddQuantity" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
							 | 
						||
| 
								 | 
							
								                                                                <Binding.ValidationRules>
							 | 
						||
| 
								 | 
							
								                                                                    <ExceptionValidationRule />
							 | 
						||
| 
								 | 
							
								                                                                </Binding.ValidationRules>
							 | 
						||
| 
								 | 
							
								                                                            </Binding>
							 | 
						||
| 
								 | 
							
								                                                        </TextBox.Text>
							 | 
						||
| 
								 | 
							
								                                                    </TextBox>
							 | 
						||
| 
								 | 
							
								                                                </DataTemplate>
							 | 
						||
| 
								 | 
							
								                                            </DataGridTemplateColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                                        </DataGridTemplateColumn>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                                    </DataGrid.Columns>
							 | 
						||
| 
								 | 
							
								                                </DataGrid>
							 | 
						||
| 
								 | 
							
								                                <!--<ListView Padding="0 6 0 0"  Grid.Column="1" 
							 | 
						||
| 
								 | 
							
								                                     materialDesign:ListViewAssist.ListViewItemPadding="15"
							 | 
						||
| 
								 | 
							
								                                        ItemsSource="{Binding channelStocks}"  SelectedItem="{Binding channelStock}"
							 | 
						||
| 
								 | 
							
								                                        materialDesign:ListViewAssist.HeaderRowBackground="#31ccec">
							 | 
						||
| 
								 | 
							
								                                    <ListView.Resources>
							 | 
						||
| 
								 | 
							
								                                        <Style TargetType="{x:Type GridViewColumnHeader}" BasedOn="{StaticResource {x:Type GridViewColumnHeader}}">
							 | 
						||
| 
								 | 
							
								                                            <Setter Property="Background" Value="#31ccec" />
							 | 
						||
| 
								 | 
							
								                                            <Setter Property="Foreground" Value="white" />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                                            <Setter Property="BorderBrush" Value="white"/>
							 | 
						||
| 
								 | 
							
								                                            <Setter Property="BorderThickness" Value="0.6"/>
							 | 
						||
| 
								 | 
							
								                                            <Setter Property="HorizontalContentAlignment" Value="Center"/>
							 | 
						||
| 
								 | 
							
								                                        </Style>
							 | 
						||
| 
								 | 
							
								                                    </ListView.Resources>
							 | 
						||
| 
								 | 
							
								                                    <ListView.View>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                                        <GridView ColumnHeaderContainerStyle="{StaticResource st}">
							 | 
						||
| 
								 | 
							
								                                            <GridView.Columns>
							 | 
						||
| 
								 | 
							
								                                                <GridViewColumn Width="80" Header="库位" DisplayMemberBinding="{Binding ColNo}" />
							 | 
						||
| 
								 | 
							
								                                                <GridViewColumn Width="130"  Header="批次">
							 | 
						||
| 
								 | 
							
								                                                    <GridViewColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                                                        <DataTemplate>
							 | 
						||
| 
								 | 
							
								                                                            <ComboBox Style="{StaticResource MaterialDesignComboBox}"                  
							 | 
						||
| 
								 | 
							
								                                                                    ItemsSource="{Binding DrugInfo.DrugManuNos}" SelectedItem="{Binding drugManuNo,UpdateSourceTrigger=PropertyChanged}"
							 | 
						||
| 
								 | 
							
								                                                                    DisplayMemberPath="ManuNo" IsEnabled="{Binding Quantity,Converter={StaticResource QuantityCountConverter}}">
							 | 
						||
| 
								 | 
							
								                                                            </ComboBox>
							 | 
						||
| 
								 | 
							
								                                                        </DataTemplate>
							 | 
						||
| 
								 | 
							
								                                                    </GridViewColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                                                </GridViewColumn>
							 | 
						||
| 
								 | 
							
								                                                <GridViewColumn Width="130" Header="效期" DisplayMemberBinding="{Binding drugManuNo.EffDate}" />
							 | 
						||
| 
								 | 
							
								                                                <GridViewColumn Width="80" Header="库存" DisplayMemberBinding="{Binding Quantity}" />
							 | 
						||
| 
								 | 
							
								                                                <GridViewColumn Width="80" Header="添加数量">
							 | 
						||
| 
								 | 
							
								                                                    <GridViewColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                                                        <DataTemplate>
							 | 
						||
| 
								 | 
							
								                                                            <TextBox  Width="80" Padding="10" Grid.Column="1"
							 | 
						||
| 
								 | 
							
								                                                                    Text="{Binding AddQuantity}"
							 | 
						||
| 
								 | 
							
								                                                                    materialDesign:HintAssist.Hint="添加数量"
							 | 
						||
| 
								 | 
							
								                                                                    Style="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"/>
							 | 
						||
| 
								 | 
							
								                                                        </DataTemplate>
							 | 
						||
| 
								 | 
							
								                                                    </GridViewColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                                                </GridViewColumn>
							 | 
						||
| 
								 | 
							
								                                            </GridView.Columns>
							 | 
						||
| 
								 | 
							
								                                        </GridView>
							 | 
						||
| 
								 | 
							
								                                    </ListView.View>
							 | 
						||
| 
								 | 
							
								                                </ListView>-->
							 | 
						||
| 
								 | 
							
								                            </Grid>
							 | 
						||
| 
								 | 
							
								                        </DataTemplate>
							 | 
						||
| 
								 | 
							
								                    </ItemsControl.ItemTemplate>
							 | 
						||
| 
								 | 
							
								                </ItemsControl>
							 | 
						||
| 
								 | 
							
								            </ScrollViewer>
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								    </Grid>
							 | 
						||
| 
								 | 
							
								</UserControl>
							 |