166 lines
9.1 KiB
Plaintext
166 lines
9.1 KiB
Plaintext
|
<UserControl x:Class="DM_Weight.Views.OperationTakeWindow"
|
||
|
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
xmlns:local="clr-namespace:DM_Weight.Views"
|
||
|
mc:Ignorable="d"
|
||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||
|
<Grid Grid.Column="2">
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition Height="Auto" />
|
||
|
<RowDefinition />
|
||
|
</Grid.RowDefinitions>
|
||
|
<ScrollViewer Grid.Row="1" Margin="6">
|
||
|
<!--<ItemsControl
|
||
|
ItemsSource="{Binding ChannelLsts}"
|
||
|
Grid.IsSharedSizeScope="True">
|
||
|
<ItemsControl.ItemTemplate>
|
||
|
<DataTemplate>-->
|
||
|
<Grid>
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition Width="200"/>
|
||
|
<ColumnDefinition/>
|
||
|
</Grid.ColumnDefinitions>
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition Height="auto"/>
|
||
|
<RowDefinition Height="auto"/>
|
||
|
<RowDefinition Height="auto"/>
|
||
|
|
||
|
</Grid.RowDefinitions>
|
||
|
<Border BorderBrush="White" BorderThickness="1">
|
||
|
<StackPanel Orientation="Horizontal" Background="#31ccec" Grid.Column="0">
|
||
|
|
||
|
<Grid>
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition/>
|
||
|
<RowDefinition/>
|
||
|
<RowDefinition/>
|
||
|
</Grid.RowDefinitions>
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition Width="200"/>
|
||
|
</Grid.ColumnDefinitions>
|
||
|
<TextBlock TextWrapping="Wrap" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="0 10 0 0 " />
|
||
|
|
||
|
<TextBlock TextWrapping="Wrap" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="0 0 0 1 " />
|
||
|
<Button Grid.Row="2" Padding="0 0 0 1 " Style="{x:Null}" BorderBrush="{x:Null}" Background="{x:Null}" Command="{Binding AddBtnCommand}" >
|
||
|
|
||
|
<Button.Content>
|
||
|
<Border Width="32" Height="32" CornerRadius="16" Background="CornflowerBlue" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||
|
<Path Data="M0 11L22 11M11 0L11 22" Stroke="WhiteSmoke" StrokeThickness="4" VerticalAlignment="Center" HorizontalAlignment="Center"></Path>
|
||
|
</Border>
|
||
|
</Button.Content>
|
||
|
</Button>
|
||
|
</Grid>
|
||
|
|
||
|
|
||
|
</StackPanel>
|
||
|
</Border>
|
||
|
<DataGrid
|
||
|
Margin="0"
|
||
|
Grid.Column="1"
|
||
|
materialDesign:DataGridAssist.ColumnHeaderPadding="15"
|
||
|
ItemsSource="{Binding OrderDetails}"
|
||
|
materialDesign:DataGridAssist.EnableEditBoxAssist="False"
|
||
|
materialDesign:DataGridAssist.CellPadding="13"
|
||
|
SelectionUnit="Cell"
|
||
|
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>
|
||
|
</Style>
|
||
|
</DataGrid.Resources>
|
||
|
<DataGrid.Columns>
|
||
|
<!--<DataGridTextColumn Width="80"
|
||
|
Binding="{Binding ColNo}"
|
||
|
Header="库位"
|
||
|
IsReadOnly="True"
|
||
|
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||
|
<DataGridTextColumn Width="180"
|
||
|
Binding="{Binding DrugInfo.DrugName}"
|
||
|
Header="药品名称"
|
||
|
IsReadOnly="True"
|
||
|
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
|
||
|
|
||
|
<DataGridTemplateColumn Width="180" IsReadOnly="True" Header="药品名称">
|
||
|
<DataGridTemplateColumn.CellTemplate>
|
||
|
<DataTemplate>
|
||
|
<ComboBox Style="{StaticResource MaterialDesignDataGridComboBox}"
|
||
|
ItemsSource="{Binding DrugInfos}" SelectedItem="{Binding DrugInfo,UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="DrugName">
|
||
|
</ComboBox>
|
||
|
</DataTemplate>
|
||
|
</DataGridTemplateColumn.CellTemplate>
|
||
|
|
||
|
</DataGridTemplateColumn>
|
||
|
|
||
|
<DataGridTextColumn Width="100"
|
||
|
Binding="{Binding DrugInfo.DrugSpec}"
|
||
|
Header="规格"
|
||
|
IsReadOnly="True"
|
||
|
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||
|
<DataGridTemplateColumn Width="200" IsReadOnly="True"
|
||
|
Header="批次">
|
||
|
<DataGridTemplateColumn.CellTemplate>
|
||
|
<DataTemplate>
|
||
|
<ComboBox
|
||
|
Style="{StaticResource MaterialDesignDataGridComboBox}"
|
||
|
ItemsSource="{Binding DrugInfo.DrugManuNos}"
|
||
|
SelectedItem="{Binding drugManuNo,UpdateSourceTrigger=PropertyChanged}"
|
||
|
DisplayMemberPath="ManuNo">
|
||
|
</ComboBox>
|
||
|
</DataTemplate>
|
||
|
</DataGridTemplateColumn.CellTemplate>
|
||
|
</DataGridTemplateColumn>
|
||
|
<DataGridTextColumn Width="100"
|
||
|
Binding="{Binding drugManuNo.EffDate}"
|
||
|
Header="效期"
|
||
|
IsReadOnly="True"
|
||
|
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||
|
<!--<DataGridTextColumn Width="100"
|
||
|
Binding="{Binding Quantity}"
|
||
|
Header="库存"
|
||
|
IsReadOnly="True"
|
||
|
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
|
||
|
<DataGridTemplateColumn Width="100"
|
||
|
Header="添加数量">
|
||
|
<DataGridTemplateColumn.CellTemplate>
|
||
|
<DataTemplate>
|
||
|
<TextBox Style="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}">
|
||
|
<TextBox.Text>
|
||
|
<Binding Path="Quantity" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
|
||
|
<Binding.ValidationRules>
|
||
|
<ExceptionValidationRule />
|
||
|
</Binding.ValidationRules>
|
||
|
</Binding>
|
||
|
</TextBox.Text>
|
||
|
</TextBox>
|
||
|
</DataTemplate>
|
||
|
</DataGridTemplateColumn.CellTemplate>
|
||
|
</DataGridTemplateColumn>
|
||
|
|
||
|
</DataGrid.Columns>
|
||
|
</DataGrid>
|
||
|
</Grid>
|
||
|
<!--</DataTemplate>
|
||
|
</ItemsControl.ItemTemplate>
|
||
|
</ItemsControl>-->
|
||
|
</ScrollViewer>
|
||
|
</Grid>
|
||
|
</UserControl>
|