197 lines
9.5 KiB
Plaintext
197 lines
9.5 KiB
Plaintext
|
<UserControl x:Class="DM_Weight.Views.Dialog.DestoryEmptyDialog"
|
||
|
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"
|
||
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||
|
mc:Ignorable="d"
|
||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||
|
<UserControl.Resources>
|
||
|
<convert:StatusConverter x:Key="StatusConverter" />
|
||
|
<convert:InputQuantityConverter x:Key="InputQuantityConverter" />
|
||
|
<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>
|
||
|
<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}"
|
||
|
ToolTip="关闭"
|
||
|
>
|
||
|
<materialDesign:PackIcon Kind="Close" Width="34" Height="34" />
|
||
|
</Button>
|
||
|
</Grid>
|
||
|
<Grid Grid.Row="1">
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition Width="2*" />
|
||
|
<ColumnDefinition Width="3*" />
|
||
|
<ColumnDefinition Width="2*" />
|
||
|
<ColumnDefinition Width="*" />
|
||
|
<ColumnDefinition Width="2*" />
|
||
|
<ColumnDefinition Width="2*" />
|
||
|
<ColumnDefinition Width="3*" />
|
||
|
<ColumnDefinition Width="*" />
|
||
|
</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 _ChannelStock.DrugInfo.DrugName}" />
|
||
|
<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 _ChannelStock.DrugInfo.DrugSpec}" />
|
||
|
<TextBlock
|
||
|
Grid.Column="4"
|
||
|
Margin="16 0 16 8"
|
||
|
VerticalAlignment="Center"
|
||
|
HorizontalAlignment="Right"
|
||
|
Style="{StaticResource MaterialDesignBody2TextBlock}"
|
||
|
Text="厂家:" />
|
||
|
<TextBlock
|
||
|
Grid.Column="5"
|
||
|
Margin="16 0 16 8"
|
||
|
VerticalAlignment="Center"
|
||
|
HorizontalAlignment="Left"
|
||
|
Style="{StaticResource MaterialDesignBody2TextBlock}"
|
||
|
Text="{Binding _ChannelStock.DrugInfo.Manufactory}" />
|
||
|
<TextBlock
|
||
|
Grid.Column="6"
|
||
|
Margin="16 0 16 8"
|
||
|
VerticalAlignment="Center"
|
||
|
HorizontalAlignment="Right"
|
||
|
Style="{StaticResource MaterialDesignBody2TextBlock}"
|
||
|
Text="可销毁空瓶数:" />
|
||
|
<TextBlock
|
||
|
Grid.Column="7"
|
||
|
Margin="16 0 16 8"
|
||
|
VerticalAlignment="Center"
|
||
|
HorizontalAlignment="Left"
|
||
|
Style="{StaticResource MaterialDesignBody2TextBlock}"
|
||
|
Text="{Binding _ChannelStock.Quantity}" />
|
||
|
</Grid>
|
||
|
<ListView
|
||
|
Grid.Row="2" ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||
|
ItemsSource="{Binding _MachineRecords}"
|
||
|
SelectedItem="{Binding _MachineRecord}"
|
||
|
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>
|
||
|
|
||
|
<i:Interaction.Triggers>
|
||
|
<i:EventTrigger EventName="SelectionChanged">
|
||
|
<i:InvokeCommandAction Command="{Binding RowSelected}" />
|
||
|
</i:EventTrigger>
|
||
|
</i:Interaction.Triggers>
|
||
|
<ListView.View>
|
||
|
<GridView ColumnHeaderContainerStyle="{StaticResource st}">
|
||
|
<GridViewColumn Header="选择" Width="100">
|
||
|
<GridViewColumn.CellTemplate>
|
||
|
<DataTemplate>
|
||
|
<CheckBox IsChecked="{Binding IsSelected}" />
|
||
|
</DataTemplate>
|
||
|
</GridViewColumn.CellTemplate>
|
||
|
</GridViewColumn>
|
||
|
<GridViewColumn Width="100"
|
||
|
Header="操作人"
|
||
|
DisplayMemberBinding="{Binding User.Nickname}"/>
|
||
|
<GridViewColumn Width="150"
|
||
|
Header="时间"
|
||
|
DisplayMemberBinding="{Binding OperationTime, StringFormat='yyyy-MM-dd HH:mm:ss'}" />
|
||
|
<GridViewColumn Width="100"
|
||
|
DisplayMemberBinding="{Binding Quantity}"
|
||
|
Header="数量"/>
|
||
|
<GridViewColumn Width="150"
|
||
|
DisplayMemberBinding="{Binding ManuNo}"
|
||
|
Header="批次"/>
|
||
|
<GridViewColumn Width="150"
|
||
|
DisplayMemberBinding="{Binding EffDate, StringFormat=yyyy-MM-dd}"
|
||
|
Header="效期"/>
|
||
|
</GridView>
|
||
|
</ListView.View>
|
||
|
</ListView>
|
||
|
|
||
|
<Grid Grid.Row="3">
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition />
|
||
|
<RowDefinition />
|
||
|
</Grid.RowDefinitions>
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition />
|
||
|
<ColumnDefinition />
|
||
|
<ColumnDefinition />
|
||
|
</Grid.ColumnDefinitions>
|
||
|
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center">
|
||
|
|
||
|
<Button
|
||
|
Margin="2"
|
||
|
Style="{StaticResource MaterialDesignRaisedAccentButton}"
|
||
|
Content="销毁"
|
||
|
Command="{Binding DestoryEmptyCommand}">
|
||
|
</Button>
|
||
|
<Button
|
||
|
Margin="2"
|
||
|
Style="{StaticResource MaterialDesignRaisedButton}"
|
||
|
Background="Orange"
|
||
|
BorderBrush="Orange"
|
||
|
Content="取消"
|
||
|
Command="{Binding CancleTake}" />
|
||
|
</StackPanel>
|
||
|
|
||
|
</Grid>
|
||
|
</Grid>
|
||
|
</materialDesign:Card>
|
||
|
</UserControl>
|