131 lines
		
	
	
		
			6.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			131 lines
		
	
	
		
			6.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| 
								 | 
							
								<UserControl x:Class="DM_Weight.Views.Dialog.BindBoxDialog"
							 | 
						||
| 
								 | 
							
								             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.Dialog"
							 | 
						||
| 
								 | 
							
								             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"
							 | 
						||
| 
								 | 
							
								             MinWidth="880"
							 | 
						||
| 
								 | 
							
								             MinHeight="615"
							 | 
						||
| 
								 | 
							
								             Width="Auto"
							 | 
						||
| 
								 | 
							
								             Height="Auto"
							 | 
						||
| 
								 | 
							
								             mc:Ignorable="d">
							 | 
						||
| 
								 | 
							
								    <UserControl.Resources>
							 | 
						||
| 
								 | 
							
								        <convert:BoardTypeConverter x:Key="BoardTypeConverter" />
							 | 
						||
| 
								 | 
							
								    </UserControl.Resources>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <Grid>
							 | 
						||
| 
								 | 
							
								        <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								            <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								            <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								            <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								            <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								            <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								        </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								        <Grid Background="#03a9f4" Grid.Row="0">
							 | 
						||
| 
								 | 
							
								            <TextBlock VerticalAlignment="Center" Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}" Margin="16 4 16 4" Style="{StaticResource MaterialDesignHeadline5TextBlock}" Text="{Binding Title}" />
							 | 
						||
| 
								 | 
							
								            <Button
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignIconForegroundButton}"
							 | 
						||
| 
								 | 
							
								                        Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
							 | 
						||
| 
								 | 
							
								                        HorizontalAlignment="Right"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding BtnCloseCommand}"
							 | 
						||
| 
								 | 
							
								                        ToolTip="关闭" Cursor="Hand"
							 | 
						||
| 
								 | 
							
								                    >
							 | 
						||
| 
								 | 
							
								                <materialDesign:PackIcon Kind="Close" Width="34" Height="34" />
							 | 
						||
| 
								 | 
							
								            </Button>
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								        <Grid Grid.Row="1" Margin="0 4 0 4">
							 | 
						||
| 
								 | 
							
								            <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								                <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								                <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								            </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								            <ComboBox
							 | 
						||
| 
								 | 
							
								                    Margin="6 0 6 0"
							 | 
						||
| 
								 | 
							
								                    Grid.Column="0"
							 | 
						||
| 
								 | 
							
								                    materialDesign:HintAssist.Hint="药品名称/拼音码"
							 | 
						||
| 
								 | 
							
								                    IsEditable="True"
							 | 
						||
| 
								 | 
							
								                    ItemsSource="{Binding DrugInfos}"
							 | 
						||
| 
								 | 
							
								                    SelectedItem="{Binding DrugInfo}"
							 | 
						||
| 
								 | 
							
								                    DisplayMemberPath="DrugName" IsEnabled="True" IsTextSearchEnabled="False" KeyUp="ComboBox_KeyUp"
							 | 
						||
| 
								 | 
							
								                />
							 | 
						||
| 
								 | 
							
								            <StackPanel HorizontalAlignment="Right"  Grid.Column="2" Orientation="Horizontal">
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                        ToolTip="绑定库位"
							 | 
						||
| 
								 | 
							
								                        Content="添加"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding BindingDrug}"/>
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                        Margin="0 0 6 0"
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                        ToolTip="刷新"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding Query}"
							 | 
						||
| 
								 | 
							
								                        Content="{materialDesign:PackIcon Refresh}"/>
							 | 
						||
| 
								 | 
							
								            </StackPanel>
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        <DataGrid
							 | 
						||
| 
								 | 
							
								                Padding="0 6 0 0" Grid.Row="1"
							 | 
						||
| 
								 | 
							
								                materialDesign:DataGridAssist.ColumnHeaderPadding="15"
							 | 
						||
| 
								 | 
							
								                ItemsSource="{Binding Channels}"
							 | 
						||
| 
								 | 
							
								                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>
							 | 
						||
| 
								 | 
							
								                <DataGridTemplateColumn Width="200" IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        Header="药品名称">
							 | 
						||
| 
								 | 
							
								                    <DataGridTemplateColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                        <DataTemplate>
							 | 
						||
| 
								 | 
							
								                            <ComboBox
							 | 
						||
| 
								 | 
							
								                                    Style="{StaticResource MaterialDesignDataGridComboBox}"                  
							 | 
						||
| 
								 | 
							
								                                    ItemsSource="{Binding drugInfoList}"
							 | 
						||
| 
								 | 
							
								                                    SelectedItem="{Binding DrugName,UpdateSourceTrigger=PropertyChanged}"
							 | 
						||
| 
								 | 
							
								                                    DisplayMemberPath="ManuNo" 
							 | 
						||
| 
								 | 
							
								                                    IsEnabled="{Binding Quantity,Converter={StaticResource QuantityCountConverter}}">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                            </ComboBox>
							 | 
						||
| 
								 | 
							
								                        </DataTemplate>
							 | 
						||
| 
								 | 
							
								                    </DataGridTemplateColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                </DataGridTemplateColumn>
							 | 
						||
| 
								 | 
							
								                <DataGridTextColumn Width="100"
							 | 
						||
| 
								 | 
							
								                        Binding="{Binding DrugInfos.drugBase.BaseQuantity}"
							 | 
						||
| 
								 | 
							
								                        Header="药品基数"
							 | 
						||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            </DataGrid.Columns>
							 | 
						||
| 
								 | 
							
								        </DataGrid>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        <materialDesign:Snackbar
							 | 
						||
| 
								 | 
							
								                Background="{Binding SnackbarBackground}"
							 | 
						||
| 
								 | 
							
								                MessageQueue="{Binding SnackbarMessageQueue}"/>
							 | 
						||
| 
								 | 
							
								    </Grid>
							 | 
						||
| 
								 | 
							
								</UserControl>
							 |