123 lines
		
	
	
		
			6.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			123 lines
		
	
	
		
			6.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| 
								 | 
							
								<UserControl x:Class="DM_Weight.Views.Dialog.CheckRecordDetailDialog"
							 | 
						|||
| 
								 | 
							
								             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/"
							 | 
						|||
| 
								 | 
							
								             xmlns:convert="clr-namespace:DM_Weight.Converter"
							 | 
						|||
| 
								 | 
							
								             mc:Ignorable="d" 
							 | 
						|||
| 
								 | 
							
								              Width="Auto"
							 | 
						|||
| 
								 | 
							
								             Height="Auto">
							 | 
						|||
| 
								 | 
							
								    
							 | 
						|||
| 
								 | 
							
								    <Grid>
							 | 
						|||
| 
								 | 
							
								        <Grid.Resources>
							 | 
						|||
| 
								 | 
							
								            <convert:GroupSumConverter x:Key="GroupSumConverter" />
							 | 
						|||
| 
								 | 
							
								            <convert:DrawerSelectConverter x:Key="DrawerSelectConverter" />
							 | 
						|||
| 
								 | 
							
								            <convert:StatusConverter x:Key="StatusConverter" />
							 | 
						|||
| 
								 | 
							
								        </Grid.Resources>
							 | 
						|||
| 
								 | 
							
								        <Grid.RowDefinitions>
							 | 
						|||
| 
								 | 
							
								            <RowDefinition Height="Auto" />
							 | 
						|||
| 
								 | 
							
								            <RowDefinition />
							 | 
						|||
| 
								 | 
							
								        </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>
							 | 
						|||
| 
								 | 
							
								        <DataGrid x:Name="dgv1"
							 | 
						|||
| 
								 | 
							
								                Grid.Row="1"
							 | 
						|||
| 
								 | 
							
								                materialDesign:DataGridAssist.ColumnHeaderPadding="15"
							 | 
						|||
| 
								 | 
							
								                ItemsSource="{Binding ChannelStocks}"
							 | 
						|||
| 
								 | 
							
								                SelectedItem="SelectedChannel"
							 | 
						|||
| 
								 | 
							
								                materialDesign:DataGridAssist.EnableEditBoxAssist="False"
							 | 
						|||
| 
								 | 
							
								                IsSynchronizedWithCurrentItem="True"
							 | 
						|||
| 
								 | 
							
								                materialDesign:DataGridAssist.CellPadding="13"
							 | 
						|||
| 
								 | 
							
								                CanUserAddRows="False"
							 | 
						|||
| 
								 | 
							
								                AutoGenerateColumns="False" >
							 | 
						|||
| 
								 | 
							
								            <!--<DataGrid.RowStyle>
							 | 
						|||
| 
								 | 
							
								                <Style  TargetType="DataGridRow" BasedOn="{StaticResource MaterialDesignDataGridRow}">
							 | 
						|||
| 
								 | 
							
								                    <EventSetter Event="GotFocus" Handler="Item_GotFocus"/>
							 | 
						|||
| 
								 | 
							
								                </Style>
							 | 
						|||
| 
								 | 
							
								            </DataGrid.RowStyle>-->
							 | 
						|||
| 
								 | 
							
								            <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="Background" Value="Transparent"/>
							 | 
						|||
| 
								 | 
							
								                            <!--<Setter Property="HorizontalAlignment" Value="Left"/>-->
							 | 
						|||
| 
								 | 
							
								                        </Trigger>
							 | 
						|||
| 
								 | 
							
								                    </Style.Triggers>
							 | 
						|||
| 
								 | 
							
								                </Style>
							 | 
						|||
| 
								 | 
							
								            </DataGrid.Resources>
							 | 
						|||
| 
								 | 
							
								            <!--GroupStyle to group data-->
							 | 
						|||
| 
								 | 
							
								            <DataGrid.GroupStyle>
							 | 
						|||
| 
								 | 
							
								                <GroupStyle>
							 | 
						|||
| 
								 | 
							
								                    <!--Group DataItems into DataGroup-->
							 | 
						|||
| 
								 | 
							
								                    <GroupStyle.ContainerStyle>
							 | 
						|||
| 
								 | 
							
								                        <Style TargetType="{x:Type GroupItem}">
							 | 
						|||
| 
								 | 
							
								                            <Setter Property="Template">
							 | 
						|||
| 
								 | 
							
								                                <Setter.Value>
							 | 
						|||
| 
								 | 
							
								                                    <ControlTemplate TargetType="{x:Type GroupItem}">
							 | 
						|||
| 
								 | 
							
								                                        <Expander IsExpanded="True"
							 | 
						|||
| 
								 | 
							
								                                                  materialDesign:ExpanderAssist.HeaderBackground="PaleTurquoise">
							 | 
						|||
| 
								 | 
							
								                                            <Expander.Header >
							 | 
						|||
| 
								 | 
							
								                                                <StackPanel Orientation="Horizontal">
							 | 
						|||
| 
								 | 
							
								                                                    <TextBlock Text="{Binding Path=Name.DrugName,StringFormat=药品:{0},}" FontWeight="Bold" />
							 | 
						|||
| 
								 | 
							
								                                                    <TextBlock FontWeight="Bold" Text="{Binding Path=Name.DrugSpec,StringFormat=规格:{0},}" />
							 | 
						|||
| 
								 | 
							
								                                                    <TextBlock FontWeight="Bold" Text="{Binding Path=Name.Manufactory,StringFormat=厂家:{0},}" />
							 | 
						|||
| 
								 | 
							
								                                                    <TextBlock FontWeight="Bold" Text="{Binding Path=Items[0].quantity,StringFormat=总库存:{0},}" />
							 | 
						|||
| 
								 | 
							
								                                                    <!--<TextBlock FontWeight="Bold" Text="{Binding Path=Items,Converter={StaticResource GroupSumConverter}}" />-->
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								                                                </StackPanel>
							 | 
						|||
| 
								 | 
							
								                                            </Expander.Header>
							 | 
						|||
| 
								 | 
							
								                                            <ItemsPresenter/>
							 | 
						|||
| 
								 | 
							
								                                        </Expander>
							 | 
						|||
| 
								 | 
							
								                                    </ControlTemplate>
							 | 
						|||
| 
								 | 
							
								                                </Setter.Value>
							 | 
						|||
| 
								 | 
							
								                            </Setter>
							 | 
						|||
| 
								 | 
							
								                        </Style>
							 | 
						|||
| 
								 | 
							
								                    </GroupStyle.ContainerStyle>
							 | 
						|||
| 
								 | 
							
								                </GroupStyle>
							 | 
						|||
| 
								 | 
							
								            </DataGrid.GroupStyle>
							 | 
						|||
| 
								 | 
							
								            <DataGrid.Columns>
							 | 
						|||
| 
								 | 
							
								                <DataGridTextColumn Width="250"
							 | 
						|||
| 
								 | 
							
								                        Binding="{Binding manuNo}"
							 | 
						|||
| 
								 | 
							
								                        Header="批次"
							 | 
						|||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						|||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						|||
| 
								 | 
							
								                <DataGridTextColumn Width="250"
							 | 
						|||
| 
								 | 
							
								                        Binding="{Binding effDate}"
							 | 
						|||
| 
								 | 
							
								                        Header="效期"
							 | 
						|||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						|||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						|||
| 
								 | 
							
								                <DataGridTextColumn Width="241"
							 | 
						|||
| 
								 | 
							
								                        Binding="{Binding ManuQuantity}"
							 | 
						|||
| 
								 | 
							
								                        Header="库存"
							 | 
						|||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						|||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								            </DataGrid.Columns>
							 | 
						|||
| 
								 | 
							
								        </DataGrid>
							 | 
						|||
| 
								 | 
							
								    </Grid>
							 | 
						|||
| 
								 | 
							
								</UserControl>
							 |