207 lines
11 KiB
Plaintext
207 lines
11 KiB
Plaintext
|
<UserControl x:Class="DM_Weight.Views.CheckOrderWindow"
|
|||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|||
|
xmlns:pagination="clr-namespace:DM_Weight.Components.pagination"
|
|||
|
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|||
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|||
|
xmlns:local="clr-namespace:DM_Weight.Views"
|
|||
|
mc:Ignorable="d"
|
|||
|
xmlns:convert="clr-namespace:DM_Weight.Converter"
|
|||
|
xmlns:prism="http://prismlibrary.com/">
|
|||
|
<UserControl.Resources>
|
|||
|
<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.Resources>
|
|||
|
<!--<CollectionViewSource x:Key="GroupedDataList" Source="{Binding OrderDetailList}">
|
|||
|
<CollectionViewSource.GroupDescriptions>
|
|||
|
<PropertyGroupDescription PropertyName="_OrderInfo" />
|
|||
|
</CollectionViewSource.GroupDescriptions>
|
|||
|
</CollectionViewSource>-->
|
|||
|
<convert:GroupSumConverter x:Key="GroupSumConverter" />
|
|||
|
<convert:StatusConverter x:Key="StatusConverter" />
|
|||
|
</Grid.Resources>
|
|||
|
<Grid.RowDefinitions>
|
|||
|
<RowDefinition Height="Auto" />
|
|||
|
<RowDefinition/>
|
|||
|
<RowDefinition Height="Auto"/>
|
|||
|
</Grid.RowDefinitions>
|
|||
|
<Grid Margin="0 6 0 6" Grid.Row="0">
|
|||
|
<Grid.ColumnDefinitions>
|
|||
|
<ColumnDefinition Width="2*" />
|
|||
|
<ColumnDefinition Width="3*" />
|
|||
|
<ColumnDefinition Width="5*"/>
|
|||
|
</Grid.ColumnDefinitions>
|
|||
|
<DatePicker
|
|||
|
Grid.Column="0"
|
|||
|
SelectedDate="{Binding OrderDate, StringFormat=yyyy-MM-dd, TargetNullValue='',UpdateSourceTrigger=PropertyChanged}"
|
|||
|
SelectedDateFormat="Short"
|
|||
|
Margin="6 0 0 0"
|
|||
|
materialDesign:HintAssist.Hint="开方日期"
|
|||
|
Style="{StaticResource MaterialDesignOutlinedDatePicker}" />
|
|||
|
<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>
|
|||
|
<Button
|
|||
|
Margin="6 0 16 0"
|
|||
|
VerticalAlignment="Center"
|
|||
|
IsEnabled="{Binding BtnEnable}"
|
|||
|
Command="{Binding ConfirmCommand}"
|
|||
|
Content="确认"
|
|||
|
materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
|
|||
|
materialDesign:ButtonProgressAssist.IsIndeterminate="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
|
|||
|
Style="{StaticResource MaterialDesignOutlinedLightButton}"/>
|
|||
|
</StackPanel>
|
|||
|
|
|||
|
|
|||
|
</Grid>
|
|||
|
<DataGrid
|
|||
|
Grid.Row="1"
|
|||
|
materialDesign:DataGridAssist.ColumnHeaderPadding="15"
|
|||
|
ItemsSource="{Binding OrderDetailList}"
|
|||
|
SelectedItem="SelectDrugPleaseClaim"
|
|||
|
materialDesign:DataGridAssist.EnableEditBoxAssist="False"
|
|||
|
IsSynchronizedWithCurrentItem="True"
|
|||
|
materialDesign:DataGridAssist.CellPadding="13"
|
|||
|
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="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">
|
|||
|
<CheckBox IsChecked="{Binding Path=Name.ItemIsChecked}" FontSize="24" />
|
|||
|
<TextBlock Text="{Binding Path=Name.OrderNo,StringFormat=处方号:{0},}" FontWeight="Bold" />
|
|||
|
<TextBlock Text="{Binding Path=Name.PatientId,StringFormat=患者ID:{0},}" FontWeight="Bold" />
|
|||
|
<TextBlock FontWeight="Bold" Text="{Binding Path=Name.PName,StringFormat=姓名:{0},}" />
|
|||
|
<TextBlock FontWeight="Bold" Text="{Binding Path=Name.Sex,StringFormat=性别:{0},}" />
|
|||
|
<TextBlock FontWeight="Bold" Text="{Binding Path=Name.Age,StringFormat=年龄:{0},}" />
|
|||
|
<TextBlock FontWeight="Bold" Text="{Binding Path=Name.IdNumber,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="180"
|
|||
|
Binding="{Binding DrugInfo.DrugName}"
|
|||
|
Header="药品名称"
|
|||
|
IsReadOnly="True"
|
|||
|
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
|||
|
<DataGridTextColumn Width="130"
|
|||
|
Binding="{Binding DrugInfo.DrugSpec}"
|
|||
|
Header="规格"
|
|||
|
IsReadOnly="True"
|
|||
|
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
|||
|
<DataGridTextColumn Width="241"
|
|||
|
Binding="{Binding DrugInfo.Manufactory}"
|
|||
|
Header="厂家"
|
|||
|
IsReadOnly="True"
|
|||
|
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
|||
|
<DataGridTextColumn Width="241"
|
|||
|
Binding="{Binding SetManuNo}"
|
|||
|
Header="批次"
|
|||
|
IsReadOnly="True"
|
|||
|
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
|||
|
<DataGridTextColumn Width="241"
|
|||
|
Binding="{Binding SetEffDate}"
|
|||
|
Header="效期"
|
|||
|
IsReadOnly="True"
|
|||
|
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
|||
|
<DataGridTextColumn Width="241"
|
|||
|
Binding="{Binding Quantity}"
|
|||
|
Header="数量"
|
|||
|
IsReadOnly="True"
|
|||
|
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
|||
|
|
|||
|
<!--<DataGridTemplateColumn Header="批次" IsReadOnly="True">
|
|||
|
<DataGridTemplateColumn.CellTemplate>
|
|||
|
<DataTemplate>
|
|||
|
<ListBox ItemsSource="{Binding SetManuNo}" DisplayMemberPath="SetManuNo" materialDesign:ListBoxItemAssist.ShowSelection="False"></ListBox>
|
|||
|
</DataTemplate>
|
|||
|
</DataGridTemplateColumn.CellTemplate>
|
|||
|
</DataGridTemplateColumn>
|
|||
|
|
|||
|
<DataGridTemplateColumn Header="效期" IsReadOnly="True">
|
|||
|
<DataGridTemplateColumn.CellTemplate>
|
|||
|
<DataTemplate>
|
|||
|
<ListBox ItemsSource="{Binding SetEffDate}" DisplayMemberPath="SetManuNo" materialDesign:ListBoxItemAssist.ShowSelection="False"></ListBox>
|
|||
|
</DataTemplate>
|
|||
|
</DataGridTemplateColumn.CellTemplate>
|
|||
|
</DataGridTemplateColumn>
|
|||
|
|
|||
|
<DataGridTemplateColumn Header="数量" IsReadOnly="True">
|
|||
|
<DataGridTemplateColumn.CellTemplate>
|
|||
|
<DataTemplate>
|
|||
|
<ListBox ItemsSource="{Binding Quantity}" DisplayMemberPath="Quantity" materialDesign:ListBoxItemAssist.ShowSelection="False"></ListBox>
|
|||
|
</DataTemplate>
|
|||
|
</DataGridTemplateColumn.CellTemplate>
|
|||
|
</DataGridTemplateColumn>-->
|
|||
|
|
|||
|
|
|||
|
</DataGrid.Columns>
|
|||
|
</DataGrid>
|
|||
|
<!--<pagination:Pagination Grid.Row="2" Grid.ColumnSpan="3"
|
|||
|
CurrentPage="{Binding PageNum}"
|
|||
|
PageSize="{Binding PageSize}"
|
|||
|
TotalPages="{Binding TotalCount}"
|
|||
|
InfoTextIsEnabel="True"
|
|||
|
/>-->
|
|||
|
</Grid>
|
|||
|
</UserControl>
|