220 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			220 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| 
								 | 
							
								<UserControl x:Class="DM_Weight.Views.DrugListWindow"
							 | 
						||
| 
								 | 
							
								             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" 
							 | 
						||
| 
								 | 
							
								             xmlns:pagination="clr-namespace:DM_Weight.Components.pagination"
							 | 
						||
| 
								 | 
							
								             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:prism="http://prismlibrary.com/"
							 | 
						||
| 
								 | 
							
								             mc:Ignorable="d">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <Grid>
							 | 
						||
| 
								 | 
							
								        <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								            <ColumnDefinition Width="3*" />
							 | 
						||
| 
								 | 
							
								            <ColumnDefinition Width="2*" />
							 | 
						||
| 
								 | 
							
								        </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								        <Grid Grid.Column="0">
							 | 
						||
| 
								 | 
							
								            <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								            </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            <Grid Margin="0 6 0 6" Grid.Row="0">
							 | 
						||
| 
								 | 
							
								                <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition Width="110" />
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition Width="180" />
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								                </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                <ComboBox
							 | 
						||
| 
								 | 
							
								                Grid.Column="0"
							 | 
						||
| 
								 | 
							
								                Margin="6 0 0 0"
							 | 
						||
| 
								 | 
							
								                Style="{StaticResource MaterialDesignOutlinedComboBox}"
							 | 
						||
| 
								 | 
							
								                SelectedItem="{Binding SelectedItem}"
							 | 
						||
| 
								 | 
							
								                DisplayMemberPath="Name"
							 | 
						||
| 
								 | 
							
								                ItemsSource="{Binding Selects}"
							 | 
						||
| 
								 | 
							
								                />
							 | 
						||
| 
								 | 
							
								                <TextBox
							 | 
						||
| 
								 | 
							
								                Grid.Column="1"
							 | 
						||
| 
								 | 
							
								                Text="{Binding SearchValue}"
							 | 
						||
| 
								 | 
							
								                materialDesign:HintAssist.Hint="{Binding SelectedItem.Name}"
							 | 
						||
| 
								 | 
							
								                Margin="6 0 0 0"
							 | 
						||
| 
								 | 
							
								                Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                <StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                    <Button
							 | 
						||
| 
								 | 
							
								                Margin="0 0 6 0"
							 | 
						||
| 
								 | 
							
								                VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                ToolTip="刷新" Command="{Binding Query}">
							 | 
						||
| 
								 | 
							
								                        <materialDesign:PackIcon
							 | 
						||
| 
								 | 
							
								                    Kind="Refresh" />
							 | 
						||
| 
								 | 
							
								                    </Button>
							 | 
						||
| 
								 | 
							
								                </StackPanel>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								            <ListView
							 | 
						||
| 
								 | 
							
								                    Grid.Row="1"
							 | 
						||
| 
								 | 
							
								                    ItemsSource="{Binding DrugInfos}"
							 | 
						||
| 
								 | 
							
								                    SelectedItem="{Binding SelectedDrug}"
							 | 
						||
| 
								 | 
							
								                    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>
							 | 
						||
| 
								 | 
							
								                <ListView.View>
							 | 
						||
| 
								 | 
							
								                    <GridView>
							 | 
						||
| 
								 | 
							
								                        <!--<GridViewColumn
							 | 
						||
| 
								 | 
							
								                                Header="药品编码"
							 | 
						||
| 
								 | 
							
								                                DisplayMemberBinding="{Binding DrugId}"/>-->
							 | 
						||
| 
								 | 
							
								                        <GridViewColumn
							 | 
						||
| 
								 | 
							
								                                Header="药品名称"
							 | 
						||
| 
								 | 
							
								                                DisplayMemberBinding="{Binding DrugName}"/>
							 | 
						||
| 
								 | 
							
								                        <GridViewColumn
							 | 
						||
| 
								 | 
							
								                                Header="规格"
							 | 
						||
| 
								 | 
							
								                                DisplayMemberBinding="{Binding DrugSpec}"
							 | 
						||
| 
								 | 
							
								                            />
							 | 
						||
| 
								 | 
							
								                        <GridViewColumn
							 | 
						||
| 
								 | 
							
								                                Header="厂家"
							 | 
						||
| 
								 | 
							
								                                DisplayMemberBinding="{Binding Manufactory}"
							 | 
						||
| 
								 | 
							
								                             />
							 | 
						||
| 
								 | 
							
								                        <GridViewColumn
							 | 
						||
| 
								 | 
							
								                                Header="拼音码" 
							 | 
						||
| 
								 | 
							
								                                DisplayMemberBinding="{Binding PyCode}"
							 | 
						||
| 
								 | 
							
								                            />
							 | 
						||
| 
								 | 
							
								                        <GridViewColumn
							 | 
						||
| 
								 | 
							
								                                Header="单位"
							 | 
						||
| 
								 | 
							
								                                DisplayMemberBinding="{Binding PackUnit}"
							 | 
						||
| 
								 | 
							
								                            />
							 | 
						||
| 
								 | 
							
								                        <GridViewColumn
							 | 
						||
| 
								 | 
							
								                                Header="基数"
							 | 
						||
| 
								 | 
							
								                                DisplayMemberBinding="{Binding MaxStock}"
							 | 
						||
| 
								 | 
							
								                            />
							 | 
						||
| 
								 | 
							
								                    </GridView>
							 | 
						||
| 
								 | 
							
								                </ListView.View>
							 | 
						||
| 
								 | 
							
								            </ListView>
							 | 
						||
| 
								 | 
							
								            <pagination:Pagination Grid.Row="2"
							 | 
						||
| 
								 | 
							
								                                   CurrentPage="{Binding PageNum}"
							 | 
						||
| 
								 | 
							
								                                   PageSize="{Binding PageSize}"
							 | 
						||
| 
								 | 
							
								                                   TotalPages="{Binding TotalCount}"
							 | 
						||
| 
								 | 
							
								                                   InfoTextIsEnabel="True"
							 | 
						||
| 
								 | 
							
								                                />
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								        <materialDesign:Card Grid.Column="1" Margin="6">
							 | 
						||
| 
								 | 
							
								            <TabControl HorizontalContentAlignment="Left" Style="{StaticResource MaterialDesignFilledTabControl}">
							 | 
						||
| 
								 | 
							
								                <!--<TabItem Header="新增/编辑">
							 | 
						||
| 
								 | 
							
								                    <Grid>
							 | 
						||
| 
								 | 
							
								                        <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                            <RowDefinition Height="Auto"/>
							 | 
						||
| 
								 | 
							
								                            <RowDefinition Height="Auto"/>
							 | 
						||
| 
								 | 
							
								                            <RowDefinition Height="Auto"/>
							 | 
						||
| 
								 | 
							
								                            <RowDefinition Height="Auto"/>
							 | 
						||
| 
								 | 
							
								                            <RowDefinition Height="Auto"/>
							 | 
						||
| 
								 | 
							
								                            <RowDefinition Height="Auto"/>
							 | 
						||
| 
								 | 
							
								                            <RowDefinition Height="Auto"/>
							 | 
						||
| 
								 | 
							
								                        </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                        <TextBox
							 | 
						||
| 
								 | 
							
								                            Grid.Row="0"
							 | 
						||
| 
								 | 
							
								                            Text="{Binding SelectedDrug.DrugName, UpdateSourceTrigger=PropertyChanged}"
							 | 
						||
| 
								 | 
							
								                            materialDesign:HintAssist.Hint="药品名称"
							 | 
						||
| 
								 | 
							
								                            Margin="12 12 12 6"
							 | 
						||
| 
								 | 
							
								                            Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                        <TextBox
							 | 
						||
| 
								 | 
							
								                            Grid.Row="1"
							 | 
						||
| 
								 | 
							
								                            Text="{Binding SelectedDrug.Manufactory, UpdateSourceTrigger=PropertyChanged}"
							 | 
						||
| 
								 | 
							
								                            materialDesign:HintAssist.Hint="厂家"
							 | 
						||
| 
								 | 
							
								                            Margin="12 6"
							 | 
						||
| 
								 | 
							
								                            Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                        <TextBox
							 | 
						||
| 
								 | 
							
								                            Grid.Row="2"
							 | 
						||
| 
								 | 
							
								                            Text="{Binding SelectedDrug.PackUnit, UpdateSourceTrigger=PropertyChanged}"
							 | 
						||
| 
								 | 
							
								                            materialDesign:HintAssist.Hint="单位"
							 | 
						||
| 
								 | 
							
								                            Margin="12 6"
							 | 
						||
| 
								 | 
							
								                            Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                        <TextBox
							 | 
						||
| 
								 | 
							
								                            Grid.Row="3"
							 | 
						||
| 
								 | 
							
								                            Text="{Binding SelectedDrug.DrugSpec, UpdateSourceTrigger=PropertyChanged}"
							 | 
						||
| 
								 | 
							
								                            materialDesign:HintAssist.Hint="规格"
							 | 
						||
| 
								 | 
							
								                            Margin="12 6"
							 | 
						||
| 
								 | 
							
								                            Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                        <TextBox
							 | 
						||
| 
								 | 
							
								                            Grid.Row="4"
							 | 
						||
| 
								 | 
							
								                            Text="{Binding SelectedDrug.PyCode, UpdateSourceTrigger=PropertyChanged}"
							 | 
						||
| 
								 | 
							
								                            materialDesign:HintAssist.Hint="拼音码"
							 | 
						||
| 
								 | 
							
								                            Margin="12 6"
							 | 
						||
| 
								 | 
							
								                            Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                        <TextBox
							 | 
						||
| 
								 | 
							
								                            Grid.Row="5"
							 | 
						||
| 
								 | 
							
								                            Text="{Binding SelectedDrug.MaxStock, UpdateSourceTrigger=PropertyChanged}"
							 | 
						||
| 
								 | 
							
								                            materialDesign:HintAssist.Hint="基数"
							 | 
						||
| 
								 | 
							
								                            Margin="12 6"
							 | 
						||
| 
								 | 
							
								                            Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                        <StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Center" Margin="12">
							 | 
						||
| 
								 | 
							
								                            <Button Margin="6" Content="新增" Command="{Binding AddDrugCommand}" />
							 | 
						||
| 
								 | 
							
								                            <Button Margin="6" Content="修改" Command="{Binding EditDrugCommand}"/>
							 | 
						||
| 
								 | 
							
								                        </StackPanel>
							 | 
						||
| 
								 | 
							
								                    </Grid>
							 | 
						||
| 
								 | 
							
								                </TabItem>-->
							 | 
						||
| 
								 | 
							
								                <TabItem Header="批次信息">
							 | 
						||
| 
								 | 
							
								                    <Grid Grid.Column="0">
							 | 
						||
| 
								 | 
							
								                        <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                            <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								                            <RowDefinition />
							 | 
						||
| 
								 | 
							
								                        </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                        <ListBox Grid.Row="1" ItemsSource="{Binding Manunos}" SelectedItem="{Binding SelectedManuno}" Grid.IsSharedSizeScope="True">
							 | 
						||
| 
								 | 
							
								                            <ItemsControl.ItemTemplate>
							 | 
						||
| 
								 | 
							
								                                <DataTemplate>
							 | 
						||
| 
								 | 
							
								                                    <StackPanel Margin="8 0 0 0">
							 | 
						||
| 
								 | 
							
								                                        <TextBlock Text="{Binding ManuNo}" FontWeight="Bold" />
							 | 
						||
| 
								 | 
							
								                                        <TextBlock Text="{Binding EffDate, StringFormat=yyyy-MM-dd}" />
							 | 
						||
| 
								 | 
							
								                                    </StackPanel>
							 | 
						||
| 
								 | 
							
								                                </DataTemplate>
							 | 
						||
| 
								 | 
							
								                            </ItemsControl.ItemTemplate>
							 | 
						||
| 
								 | 
							
								                        </ListBox>
							 | 
						||
| 
								 | 
							
								                        <Border Padding="8" BorderThickness="0 0 0 1" BorderBrush="{DynamicResource MaterialDesignDivider}">
							 | 
						||
| 
								 | 
							
								                            <Grid Grid.Row="0">
							 | 
						||
| 
								 | 
							
								                                <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                                    <RowDefinition Height="Auto"/>
							 | 
						||
| 
								 | 
							
								                                    <RowDefinition Height="Auto"/>
							 | 
						||
| 
								 | 
							
								                                </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                                <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                                    <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								                                    <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								                                </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                                <TextBox
							 | 
						||
| 
								 | 
							
								                                    Grid.Row="0"
							 | 
						||
| 
								 | 
							
								                                    Grid.Column="0"
							 | 
						||
| 
								 | 
							
								                                    Text="{Binding SelectedManuno.ManuNo, UpdateSourceTrigger=PropertyChanged}"
							 | 
						||
| 
								 | 
							
								                                    materialDesign:HintAssist.Hint="批号"
							 | 
						||
| 
								 | 
							
								                                    Margin="12 6"
							 | 
						||
| 
								 | 
							
								                                    Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                                
							 | 
						||
| 
								 | 
							
								                                <DatePicker
							 | 
						||
| 
								 | 
							
								                                    Grid.Row="0"
							 | 
						||
| 
								 | 
							
								                                    Grid.Column="1"
							 | 
						||
| 
								 | 
							
								                                    SelectedDate="{Binding SelectedManuno.EffDate,UpdateSourceTrigger=PropertyChanged}"
							 | 
						||
| 
								 | 
							
								                                    SelectedDateFormat="Short"
							 | 
						||
| 
								 | 
							
								                                    Margin="6 0 0 0"
							 | 
						||
| 
								 | 
							
								                                    materialDesign:HintAssist.Hint="效期"
							 | 
						||
| 
								 | 
							
								                                    Style="{StaticResource MaterialDesignOutlinedDatePicker}" />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                                <StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="12">
							 | 
						||
| 
								 | 
							
								                                    <Button Margin="6" Content="新增" Command="{Binding AddManuCommand}" />
							 | 
						||
| 
								 | 
							
								                                    <Button Margin="6" Content="修改" Command="{Binding EditManuCommand}"/>
							 | 
						||
| 
								 | 
							
								                                </StackPanel>
							 | 
						||
| 
								 | 
							
								                            </Grid>
							 | 
						||
| 
								 | 
							
								                        </Border>
							 | 
						||
| 
								 | 
							
								                    </Grid>
							 | 
						||
| 
								 | 
							
								                </TabItem>
							 | 
						||
| 
								 | 
							
								            </TabControl>
							 | 
						||
| 
								 | 
							
								        </materialDesign:Card>
							 | 
						||
| 
								 | 
							
								    </Grid>
							 | 
						||
| 
								 | 
							
								</UserControl>
							 |