182 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			182 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| 
								 | 
							
								<!--处方取药弹窗-->
							 | 
						||
| 
								 | 
							
								<UserControl x:Class="DM_Weight.Views.Dialog.InvoiceTakeDialog"
							 | 
						||
| 
								 | 
							
								             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:convert="clr-namespace:DM_Weight.Converter"
							 | 
						||
| 
								 | 
							
								             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
							 | 
						||
| 
								 | 
							
								             MinWidth="880"
							 | 
						||
| 
								 | 
							
								             Width="Auto"
							 | 
						||
| 
								 | 
							
								             Height="Auto"
							 | 
						||
| 
								 | 
							
								             mc:Ignorable="d" >
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <UserControl.Resources>
							 | 
						||
| 
								 | 
							
								        <convert:StatusConverter x:Key="StatusConverter" />
							 | 
						||
| 
								 | 
							
								    </UserControl.Resources>
							 | 
						||
| 
								 | 
							
								    <materialDesign:Card Padding="0">
							 | 
						||
| 
								 | 
							
								        <Grid>
							 | 
						||
| 
								 | 
							
								            <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="50" />
							 | 
						||
| 
								 | 
							
								                <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}"
							 | 
						||
| 
								 | 
							
								                        IsEnabled="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CloseBtn}"
							 | 
						||
| 
								 | 
							
								                        ToolTip="关闭"
							 | 
						||
| 
								 | 
							
								                    >
							 | 
						||
| 
								 | 
							
								                    <materialDesign:PackIcon Kind="Close" Width="34" Height="34" />
							 | 
						||
| 
								 | 
							
								                </Button>
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								            <Grid Grid.Row="1">
							 | 
						||
| 
								 | 
							
								                <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition Width="3*" />
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition Width="3*" />
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition Width="2*" />
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition Width="3*" />
							 | 
						||
| 
								 | 
							
								                </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                <TextBlock
							 | 
						||
| 
								 | 
							
								                      Grid.Column="0"
							 | 
						||
| 
								 | 
							
								                      Margin="16 0 16 8"
							 | 
						||
| 
								 | 
							
								                      VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                      HorizontalAlignment="Right"
							 | 
						||
| 
								 | 
							
								                      Style="{StaticResource MaterialDesignBody2TextBlock}"
							 | 
						||
| 
								 | 
							
								                      Text="凭证单号:" />
							 | 
						||
| 
								 | 
							
								                <TextBlock
							 | 
						||
| 
								 | 
							
								                      Grid.Column="1"
							 | 
						||
| 
								 | 
							
								                      Margin="16 0 16 8"
							 | 
						||
| 
								 | 
							
								                      VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                      HorizontalAlignment="Left"
							 | 
						||
| 
								 | 
							
								                      Style="{StaticResource MaterialDesignBody2TextBlock}"
							 | 
						||
| 
								 | 
							
								                      Text="{Binding Invoice.InvoiceNo}" />
							 | 
						||
| 
								 | 
							
								                <TextBlock
							 | 
						||
| 
								 | 
							
								                      Grid.Column="2"
							 | 
						||
| 
								 | 
							
								                      Margin="16 0 16 8"
							 | 
						||
| 
								 | 
							
								                      VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                      HorizontalAlignment="Right"
							 | 
						||
| 
								 | 
							
								                      Style="{StaticResource MaterialDesignBody2TextBlock}"
							 | 
						||
| 
								 | 
							
								                      Text="时间:" />
							 | 
						||
| 
								 | 
							
								                <TextBlock
							 | 
						||
| 
								 | 
							
								                      Grid.Column="3"
							 | 
						||
| 
								 | 
							
								                      Margin="16 0 16 8"
							 | 
						||
| 
								 | 
							
								                      VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                      HorizontalAlignment="Left"
							 | 
						||
| 
								 | 
							
								                      Style="{StaticResource MaterialDesignBody2TextBlock}"
							 | 
						||
| 
								 | 
							
								                      Text="{Binding Invoice.InvoiceDate}" />
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								            <DataGrid Grid.Row="2" ItemsSource="{Binding ChannelStocks}" AutoGenerateColumns="False" CanUserAddRows="False">
							 | 
						||
| 
								 | 
							
								                <DataGrid.Resources>
							 | 
						||
| 
								 | 
							
								                    <Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}">
							 | 
						||
| 
								 | 
							
								                        <Setter Property="HorizontalContentAlignment" Value="Center" />
							 | 
						||
| 
								 | 
							
								                        <Setter Property="Background" Value="#31ccec" />
							 | 
						||
| 
								 | 
							
								                        <Setter Property="Foreground" Value="white" />
							 | 
						||
| 
								 | 
							
								                        <Setter Property="Height" Value="48" />
							 | 
						||
| 
								 | 
							
								                        <Setter Property="BorderBrush" Value="white"/>
							 | 
						||
| 
								 | 
							
								                        <Setter Property="BorderThickness" Value="0.6"/>
							 | 
						||
| 
								 | 
							
								                    </Style>
							 | 
						||
| 
								 | 
							
								                    <Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource MaterialDesignDataGridCell}">
							 | 
						||
| 
								 | 
							
								                        <Setter Property="HorizontalAlignment" Value="Left" />
							 | 
						||
| 
								 | 
							
								                        <Setter Property="Padding" Value="13" />
							 | 
						||
| 
								 | 
							
								                    </Style>
							 | 
						||
| 
								 | 
							
								                </DataGrid.Resources>
							 | 
						||
| 
								 | 
							
								                <DataGrid.Columns>
							 | 
						||
| 
								 | 
							
								                    <DataGridTextColumn  Width="100"
							 | 
						||
| 
								 | 
							
								                            Header="库位"
							 | 
						||
| 
								 | 
							
								                            IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                            Binding="{Binding Location}"
							 | 
						||
| 
								 | 
							
								                            ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
							 | 
						||
| 
								 | 
							
								                            EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
							 | 
						||
| 
								 | 
							
								                        />
							 | 
						||
| 
								 | 
							
								                    <DataGridTextColumn Width="180"
							 | 
						||
| 
								 | 
							
								                            Header="药品名称"
							 | 
						||
| 
								 | 
							
								                            IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                            Binding="{Binding DrugInfo.DrugName}"
							 | 
						||
| 
								 | 
							
								                            ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
							 | 
						||
| 
								 | 
							
								                            EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
							 | 
						||
| 
								 | 
							
								                        />
							 | 
						||
| 
								 | 
							
								                    <DataGridTextColumn  Width="180"
							 | 
						||
| 
								 | 
							
								                            Header="规格"
							 | 
						||
| 
								 | 
							
								                            IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                            Binding="{Binding DrugInfo.DrugSpec}"
							 | 
						||
| 
								 | 
							
								                            ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
							 | 
						||
| 
								 | 
							
								                            EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
							 | 
						||
| 
								 | 
							
								                         />
							 | 
						||
| 
								 | 
							
								                    <DataGridTextColumn Width="100"
							 | 
						||
| 
								 | 
							
								                            Header="数量" 
							 | 
						||
| 
								 | 
							
								                            IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                            Binding="{Binding Quantity}"
							 | 
						||
| 
								 | 
							
								                            ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
							 | 
						||
| 
								 | 
							
								                            EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
							 | 
						||
| 
								 | 
							
								                        />
							 | 
						||
| 
								 | 
							
								                    <DataGridTextColumn  Width="130"
							 | 
						||
| 
								 | 
							
								                            Header="批次"
							 | 
						||
| 
								 | 
							
								                            IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                            Binding="{Binding ManuNo}"
							 | 
						||
| 
								 | 
							
								                            ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
							 | 
						||
| 
								 | 
							
								                            EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
							 | 
						||
| 
								 | 
							
								                        />
							 | 
						||
| 
								 | 
							
								                    <DataGridTextColumn  Width="130"
							 | 
						||
| 
								 | 
							
								                            Header="效期"
							 | 
						||
| 
								 | 
							
								                            IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                            Binding="{Binding EffDate}"
							 | 
						||
| 
								 | 
							
								                            ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
							 | 
						||
| 
								 | 
							
								                            EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
							 | 
						||
| 
								 | 
							
								                        />
							 | 
						||
| 
								 | 
							
								                    <DataGridTextColumn Width="100"
							 | 
						||
| 
								 | 
							
								                            Header="取出数量"
							 | 
						||
| 
								 | 
							
								                            IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                            Binding="{Binding TakeQuantity}"
							 | 
						||
| 
								 | 
							
								                            ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
							 | 
						||
| 
								 | 
							
								                            EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
							 | 
						||
| 
								 | 
							
								                        />
							 | 
						||
| 
								 | 
							
								                </DataGrid.Columns>
							 | 
						||
| 
								 | 
							
								            </DataGrid>
							 | 
						||
| 
								 | 
							
								            <Grid Grid.Row="3">
							 | 
						||
| 
								 | 
							
								                <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								                    <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								                </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Center">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                    <Button
							 | 
						||
| 
								 | 
							
								                            Margin="2"
							 | 
						||
| 
								 | 
							
								                            Style="{StaticResource MaterialDesignRaisedAccentButton}"
							 | 
						||
| 
								 | 
							
								                            Visibility="{Binding Status,Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnVisible}"
							 | 
						||
| 
								 | 
							
								                            materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
							 | 
						||
| 
								 | 
							
								                            materialDesign:ButtonProgressAssist.IsIndeterminate="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
							 | 
						||
| 
								 | 
							
								                            Content="取药"
							 | 
						||
| 
								 | 
							
								                            Command="{Binding OpenDrawer}">
							 | 
						||
| 
								 | 
							
								                    </Button>
							 | 
						||
| 
								 | 
							
								                    <Button
							 | 
						||
| 
								 | 
							
								                            Margin="2"
							 | 
						||
| 
								 | 
							
								                            Visibility="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CompleteBtn}"
							 | 
						||
| 
								 | 
							
								                            Style="{StaticResource MaterialDesignRaisedAccentButton}"
							 | 
						||
| 
								 | 
							
								                            Content="完成"
							 | 
						||
| 
								 | 
							
								                            Command="{Binding TakeFinish}"/>
							 | 
						||
| 
								 | 
							
								                    <Button
							 | 
						||
| 
								 | 
							
								                            Margin="2"
							 | 
						||
| 
								 | 
							
								                            Visibility="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CancelBtn}"
							 | 
						||
| 
								 | 
							
								                            Style="{StaticResource MaterialDesignRaisedButton}"
							 | 
						||
| 
								 | 
							
								                            Background="Orange"
							 | 
						||
| 
								 | 
							
								                            BorderBrush="Orange"
							 | 
						||
| 
								 | 
							
								                            Content="取消"
							 | 
						||
| 
								 | 
							
								                            Command="{Binding CancleTake}" />
							 | 
						||
| 
								 | 
							
								                </StackPanel>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								    </materialDesign:Card>
							 | 
						||
| 
								 | 
							
								</UserControl>
							 |