196 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			196 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| 
								 | 
							
								<UserControl x:Class="DM_Weight.Views.CheckStockNew2Window"
							 | 
						||
| 
								 | 
							
								             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" 
							 | 
						||
| 
								 | 
							
								             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"
							 | 
						||
| 
								 | 
							
								              xmlns:util="clr-namespace:DM_Weight.util"
							 | 
						||
| 
								 | 
							
								             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
							 | 
						||
| 
								 | 
							
								             xmlns:convert="clr-namespace:DM_Weight.Converter"
							 | 
						||
| 
								 | 
							
								             xmlns:prism="http://prismlibrary.com/"
							 | 
						||
| 
								 | 
							
								             mc:Ignorable="d" 
							 | 
						||
| 
								 | 
							
								             d:DesignHeight="450" d:DesignWidth="800">
							 | 
						||
| 
								 | 
							
								    <Grid>
							 | 
						||
| 
								 | 
							
								        <Grid.Resources>
							 | 
						||
| 
								 | 
							
								            <!--<convert:GroupSumConverter x:Key="GroupSumConverter" />
							 | 
						||
| 
								 | 
							
								            <convert:TotalCountConverter x:Key="TotalCountConverter" />
							 | 
						||
| 
								 | 
							
								            <convert:DrawerSelectConverter x:Key="DrawerSelectConverter" />-->
							 | 
						||
| 
								 | 
							
								            <convert:StatusConverter x:Key="StatusConverter" />
							 | 
						||
| 
								 | 
							
								        </Grid.Resources>
							 | 
						||
| 
								 | 
							
								        <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								            <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								            <RowDefinition />
							 | 
						||
| 
								 | 
							
								        </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								        <Grid Margin="0 6 0 6" Grid.Row="0">
							 | 
						||
| 
								 | 
							
								            <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                <ColumnDefinition Width="2*" />
							 | 
						||
| 
								 | 
							
								                <ColumnDefinition Width="2*" />
							 | 
						||
| 
								 | 
							
								                <ColumnDefinition Width="6*"/>
							 | 
						||
| 
								 | 
							
								            </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								            <StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                    Margin="0 0 3 0"
							 | 
						||
| 
								 | 
							
								                    VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                    Command="{Binding OpenDrawer}"
							 | 
						||
| 
								 | 
							
								                    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}"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                    Content="盘点" />
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                    Margin="0 0 3 0"
							 | 
						||
| 
								 | 
							
								                    VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                    Command="{Binding TakeFinish}"
							 | 
						||
| 
								 | 
							
								                    Visibility="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CompleteBtn}"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                    Content="完成" />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                    Margin="0 0 6 0"
							 | 
						||
| 
								 | 
							
								                    VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                    Command="{Binding CancleTake}"
							 | 
						||
| 
								 | 
							
								                    Visibility="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=CancelBtn}"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                    Content="取消" />
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                    Margin="6 0 6 0"
							 | 
						||
| 
								 | 
							
								                    VerticalAlignment="Center"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                    ToolTip="刷新" Command="{Binding QueryCommand}">
							 | 
						||
| 
								 | 
							
								                    <materialDesign:PackIcon
							 | 
						||
| 
								 | 
							
								                    Kind="Refresh" />
							 | 
						||
| 
								 | 
							
								                </Button>
							 | 
						||
| 
								 | 
							
								            </StackPanel>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								        <!--<DataGrid x:Name="dgv1"
							 | 
						||
| 
								 | 
							
								                Grid.Row="1"
							 | 
						||
| 
								 | 
							
								                materialDesign:DataGridAssist.ColumnHeaderPadding="15"
							 | 
						||
| 
								 | 
							
								                ItemsSource="{Binding  ChannelStocks}"
							 | 
						||
| 
								 | 
							
								                SelectedItem="SelectedChannel"
							 | 
						||
| 
								 | 
							
								                materialDesign:DataGridAssist.EnableEditBoxAssist="False"
							 | 
						||
| 
								 | 
							
								                IsSynchronizedWithCurrentItem="True"
							 | 
						||
| 
								 | 
							
								                materialDesign:DataGridAssist.CellPadding="13"
							 | 
						||
| 
								 | 
							
								                CanUserAddRows="False"
							 | 
						||
| 
								 | 
							
								                AutoGenerateColumns="False">
							 | 
						||
| 
								 | 
							
								            --><!--<DataGrid.RowStyle>
							 | 
						||
| 
								 | 
							
								                <Style  TargetType="DataGridRow" BasedOn="{StaticResource MaterialDesignDataGridRow}">
							 | 
						||
| 
								 | 
							
								                    <EventSetter Event="GotFocus" Handler="Item_GotFocus"/>
							 | 
						||
| 
								 | 
							
								                </Style>
							 | 
						||
| 
								 | 
							
								            </DataGrid.RowStyle>--><!--
							 | 
						||
| 
								 | 
							
								            <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="Background" Value="Transparent"/>
							 | 
						||
| 
								 | 
							
								                            <Setter Property="HorizontalAlignment" Value="Center"/>
							 | 
						||
| 
								 | 
							
								                        </Trigger>
							 | 
						||
| 
								 | 
							
								                    </Style.Triggers>
							 | 
						||
| 
								 | 
							
								                </Style>
							 | 
						||
| 
								 | 
							
								            </DataGrid.Resources>
							 | 
						||
| 
								 | 
							
								            <DataGrid.Columns>
							 | 
						||
| 
								 | 
							
								                <DataGridTextColumn IsReadOnly="True" Header="药品" Binding="{Binding DrugInfo.DrugName}"/>
							 | 
						||
| 
								 | 
							
								                <DataGridTextColumn IsReadOnly="True" Header="规格" Binding="{Binding DrugInfo.DrugSpec}"/>
							 | 
						||
| 
								 | 
							
								                <DataGridTextColumn
							 | 
						||
| 
								 | 
							
								                        Binding="{Binding Location}"
							 | 
						||
| 
								 | 
							
								                        Header="库位"
							 | 
						||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						||
| 
								 | 
							
								                <DataGridTextColumn
							 | 
						||
| 
								 | 
							
								                        Binding="{Binding ManuNo}"
							 | 
						||
| 
								 | 
							
								                        Header="批次"
							 | 
						||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						||
| 
								 | 
							
								                <DataGridTextColumn 
							 | 
						||
| 
								 | 
							
								                        Binding="{Binding EffDate}"
							 | 
						||
| 
								 | 
							
								                        Header="效期"
							 | 
						||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						||
| 
								 | 
							
								                <DataGridTextColumn  Width="100"
							 | 
						||
| 
								 | 
							
								                        Binding="{Binding Quantity}"
							 | 
						||
| 
								 | 
							
								                        Header="库存"
							 | 
						||
| 
								 | 
							
								                        IsReadOnly="True"
							 | 
						||
| 
								 | 
							
								                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
							 | 
						||
| 
								 | 
							
								                <DataGridTemplateColumn Width="141"
							 | 
						||
| 
								 | 
							
								                        Header="盘点数量">
							 | 
						||
| 
								 | 
							
								                    <DataGridTemplateColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                        <DataTemplate>
							 | 
						||
| 
								 | 
							
								                            <TextBox Style="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}">
							 | 
						||
| 
								 | 
							
								                                <TextBox.Text>
							 | 
						||
| 
								 | 
							
								                                    <Binding Path="CheckQuantity" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
							 | 
						||
| 
								 | 
							
								                                        <Binding.ValidationRules>
							 | 
						||
| 
								 | 
							
								                                            <ExceptionValidationRule />
							 | 
						||
| 
								 | 
							
								                                        </Binding.ValidationRules>
							 | 
						||
| 
								 | 
							
								                                    </Binding>
							 | 
						||
| 
								 | 
							
								                                </TextBox.Text>
							 | 
						||
| 
								 | 
							
								                            </TextBox>
							 | 
						||
| 
								 | 
							
								                        </DataTemplate>
							 | 
						||
| 
								 | 
							
								                    </DataGridTemplateColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                </DataGridTemplateColumn>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            </DataGrid.Columns>
							 | 
						||
| 
								 | 
							
								        </DataGrid>-->
							 | 
						||
| 
								 | 
							
								        <ListView Grid.Row="1"
							 | 
						||
| 
								 | 
							
								                  ItemsSource="{Binding ChannelStocks}"
							 | 
						||
| 
								 | 
							
								                  materialDesign:ListViewAssist.HeaderRowBackground="#31ccec"
							 | 
						||
| 
								 | 
							
								                  materialDesign:DataGridAssist.ColumnHeaderPadding="8"
							 | 
						||
| 
								 | 
							
								                  >
							 | 
						||
| 
								 | 
							
								            <ListView.Resources>
							 | 
						||
| 
								 | 
							
								                <Style TargetType="{x:Type GridViewColumnHeader}" BasedOn="{StaticResource {x:Type GridViewColumnHeader}}">
							 | 
						||
| 
								 | 
							
								                    <Setter Property="Foreground" Value="White" />
							 | 
						||
| 
								 | 
							
								                </Style>
							 | 
						||
| 
								 | 
							
								                <Style TargetType="{x:Type ListViewItem}">
							 | 
						||
| 
								 | 
							
								                    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
							 | 
						||
| 
								 | 
							
								                </Style>
							 | 
						||
| 
								 | 
							
								            </ListView.Resources>
							 | 
						||
| 
								 | 
							
								            <ListView.View>
							 | 
						||
| 
								 | 
							
								                <GridView>
							 | 
						||
| 
								 | 
							
								                    <GridViewColumn Header="药品" DisplayMemberBinding="{Binding DrugInfo.DrugName}"/>
							 | 
						||
| 
								 | 
							
								                    <GridViewColumn Header="规格" DisplayMemberBinding="{Binding DrugInfo.DrugSpec}"/>
							 | 
						||
| 
								 | 
							
								                    <GridViewColumn
							 | 
						||
| 
								 | 
							
								                        DisplayMemberBinding="{Binding Location}"
							 | 
						||
| 
								 | 
							
								                        Header="库位"/>
							 | 
						||
| 
								 | 
							
								                    <GridViewColumn
							 | 
						||
| 
								 | 
							
								                        DisplayMemberBinding="{Binding ManuNo}"
							 | 
						||
| 
								 | 
							
								                        Header="批次"/>
							 | 
						||
| 
								 | 
							
								                    <GridViewColumn 
							 | 
						||
| 
								 | 
							
								                        DisplayMemberBinding="{Binding EffDate}"
							 | 
						||
| 
								 | 
							
								                        Header="效期"/>
							 | 
						||
| 
								 | 
							
								                    <GridViewColumn  Width="100"
							 | 
						||
| 
								 | 
							
								                        DisplayMemberBinding="{Binding Quantity}"
							 | 
						||
| 
								 | 
							
								                        Header="库存"/>
							 | 
						||
| 
								 | 
							
								                    <GridViewColumn Width="141"
							 | 
						||
| 
								 | 
							
								                        Header="盘点数量">
							 | 
						||
| 
								 | 
							
								                        <GridViewColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                            <DataTemplate>
							 | 
						||
| 
								 | 
							
								                                <TextBox Style="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}">
							 | 
						||
| 
								 | 
							
								                                    <TextBox.Text>
							 | 
						||
| 
								 | 
							
								                                        <Binding Path="CheckQuantity" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
							 | 
						||
| 
								 | 
							
								                                            <Binding.ValidationRules>
							 | 
						||
| 
								 | 
							
								                                                <ExceptionValidationRule />
							 | 
						||
| 
								 | 
							
								                                            </Binding.ValidationRules>
							 | 
						||
| 
								 | 
							
								                                        </Binding>
							 | 
						||
| 
								 | 
							
								                                    </TextBox.Text>
							 | 
						||
| 
								 | 
							
								                                </TextBox>
							 | 
						||
| 
								 | 
							
								                            </DataTemplate>
							 | 
						||
| 
								 | 
							
								                        </GridViewColumn.CellTemplate>
							 | 
						||
| 
								 | 
							
								                    </GridViewColumn>
							 | 
						||
| 
								 | 
							
								                </GridView>
							 | 
						||
| 
								 | 
							
								            </ListView.View>
							 | 
						||
| 
								 | 
							
								        </ListView>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    </Grid>
							 | 
						||
| 
								 | 
							
								</UserControl>
							 |