2025-01-06 09:40:32 +08:00
|
|
|
<UserControl x:Class="DM_Weight.Views.AdditionWindow"
|
|
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
xmlns:convert="clr-namespace:DM_Weight.Converter"
|
|
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
|
|
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"
|
|
|
|
mc:Ignorable="d"
|
|
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
|
|
<Grid>
|
|
|
|
<Grid.Resources>
|
|
|
|
<CollectionViewSource x:Key="GroupedDataList" Source="{Binding ChannelStocks}">
|
|
|
|
<CollectionViewSource.GroupDescriptions>
|
|
|
|
<PropertyGroupDescription PropertyName="ChannelLst" />
|
|
|
|
</CollectionViewSource.GroupDescriptions>
|
|
|
|
</CollectionViewSource>
|
|
|
|
<convert:GroupSumConverter x:Key="GroupSumConverter" />
|
|
|
|
<convert:TotalCountConverter x:Key="TotalCountConverter" />
|
|
|
|
<convert:StatusConverter x:Key="StatusConverter" />
|
|
|
|
<convert:StockStatusConverter x:Key="StockStatusConverter" />
|
|
|
|
</Grid.Resources>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Margin="0 6 0 6" Grid.Row="0">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="1*" />
|
|
|
|
<ColumnDefinition Width="2*" />
|
|
|
|
<ColumnDefinition Width="7*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
|
|
|
|
|
|
|
|
<!--<Button
|
|
|
|
Margin="6 0 6 0"
|
|
|
|
ToolTip="一键补药"
|
|
|
|
Content="一键补药"
|
|
|
|
Command="{Binding OpenDragCommand}"
|
|
|
|
IsEnabled="{Binding IsEnable}"
|
|
|
|
materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
|
|
|
|
materialDesign:ButtonProgressAssist.IsIndeterminate="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
|
|
|
|
Style="{StaticResource MaterialDesignOutlinedLightButton}" />
|
|
|
|
<Button
|
|
|
|
Margin="0 0 6 0"
|
|
|
|
Visibility="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CompleteBtn}"
|
|
|
|
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
|
|
|
Content="完成"
|
|
|
|
Command="{Binding AddFinish}"/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
Margin="0 0 6 0"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Command="{Binding CancleAdd}"
|
|
|
|
Visibility="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CancelBtn}"
|
|
|
|
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
|
|
|
Content="取消" />-->
|
|
|
|
|
|
|
|
<Button
|
|
|
|
Margin="3 0 3 0"
|
|
|
|
VerticalAlignment="Center"
|
2025-01-15 18:51:32 +08:00
|
|
|
Command="{Binding OpenBoxCommand}"
|
|
|
|
materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding OpenStatusBtn}"
|
|
|
|
materialDesign:ButtonProgressAssist.IsIndeterminate="{Binding OpenStatusBtn}"
|
2025-01-06 09:40:32 +08:00
|
|
|
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
|
|
|
Content="开手术间" />
|
|
|
|
<Button
|
|
|
|
Margin="0 0 6 0"
|
|
|
|
Visibility="{Binding FinishStatus}"
|
|
|
|
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
|
|
|
Content="完成"
|
|
|
|
Command="{Binding AddFinish}"/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
Margin="6 0 6 0"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
|
|
|
ToolTip="刷新" Command="{Binding QueryCommand}">
|
|
|
|
<materialDesign:PackIcon
|
|
|
|
Kind="Refresh" />
|
|
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
<DataGrid
|
|
|
|
Grid.Row="1"
|
|
|
|
materialDesign:DataGridAssist.ColumnHeaderPadding="15"
|
|
|
|
ItemsSource="{Binding Source={StaticResource GroupedDataList}}"
|
|
|
|
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="Center"/>
|
|
|
|
</Trigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
|
|
</Style>-->
|
|
|
|
<Style TargetType="DataGridCell">
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="DataGridCell">
|
|
|
|
<TextBlock TextAlignment="Center" VerticalAlignment="Center" >
|
|
|
|
<ContentPresenter Margin="13" />
|
|
|
|
</TextBlock>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
<Style.Triggers>
|
|
|
|
<Trigger Property="IsSelected" Value="True">
|
|
|
|
<Setter Property="Foreground" Value="Black"/>
|
|
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
|
|
</Trigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
</DataGrid.Resources>
|
|
|
|
<DataGrid.GroupStyle>
|
|
|
|
<GroupStyle>
|
|
|
|
<GroupStyle.ContainerStyle>
|
|
|
|
<Style TargetType="{x:Type GroupItem}">
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="{x:Type GroupItem}">
|
|
|
|
<Expander IsExpanded="True"
|
|
|
|
materialDesign:ExpanderAssist.HeaderBackground="PaleTurquoise" Collapsed="Expander_Collapsed">
|
|
|
|
<Expander.Header >
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<CheckBox Margin="0 0 3 0" IsChecked="{Binding Path=Name.IsSelected}" IsEnabled="{Binding Name.State,Converter={StaticResource StockStatusConverter},ConverterParameter=EnableState}" FontSize="24" />
|
|
|
|
<TextBlock Text="{Binding Path=Name.DrawerNo,StringFormat={}{0}号手术间}" FontWeight="Bold" />
|
|
|
|
</StackPanel>
|
|
|
|
</Expander.Header>
|
|
|
|
<ItemsPresenter/>
|
|
|
|
</Expander>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
</GroupStyle.ContainerStyle>
|
|
|
|
|
|
|
|
</GroupStyle>
|
|
|
|
</DataGrid.GroupStyle>
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTextColumn IsReadOnly="True" Header="药品名称" Binding="{Binding DrugInfo.DrugName}"/>
|
|
|
|
<DataGridTextColumn IsReadOnly="True" Header="规格" Binding="{Binding DrugInfo.DrugSpec}"/>
|
|
|
|
<DataGridTextColumn IsReadOnly="True" Header="批次" Binding="{Binding ManuNo}"/>
|
|
|
|
<DataGridTextColumn IsReadOnly="True" Header="效期" Binding="{Binding EffDate}"/>
|
|
|
|
<DataGridTextColumn IsReadOnly="True" Header="厂家" Binding="{Binding DrugInfo.Manufactory}"/>
|
|
|
|
<!--<DataGridTextColumn IsReadOnly="True" Header="药品基数" Binding="{Binding BaseQuantity}"/>-->
|
|
|
|
<DataGridTextColumn IsReadOnly="True" Header="需补药数量" Binding="{Binding AddToJJNum}"/>
|
|
|
|
<DataGridTextColumn IsReadOnly="True" Header="状态" Binding="{Binding ChannelLst.State,Converter={StaticResource StockStatusConverter},ConverterParameter=TextState}"/>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
</Grid>
|
|
|
|
</UserControl>
|