205 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			XML
		
	
	
	
			
		
		
	
	
			205 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			XML
		
	
	
	
<UserControl x:Class="DM_Weight.Views.CheckStockWindow"
 | 
						|
             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:pagination="clr-namespace:DM_Weight.Components.pagination"  
 | 
						|
             xmlns:prism="http://prismlibrary.com/"
 | 
						|
             prism:ViewModelLocator.AutoWireViewModel="True"
 | 
						|
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
 | 
						|
             xmlns:convert="clr-namespace:DM_Weight.Converter"
 | 
						|
             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
 | 
						|
             mc:Ignorable="d">
 | 
						|
    <UserControl.Resources>
 | 
						|
        <convert:DrawerSelectConverter x:Key="DrawerSelectConverter" />
 | 
						|
        <convert:StatusConverter x:Key="StatusConverter" />
 | 
						|
        <!--<convert:InputQuantityConverter x:Key="InputQuantityConverter" />
 | 
						|
        <convert:QuantityCountConverter x:Key="QuantityCountConverter"/>-->
 | 
						|
        <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>
 | 
						|
 | 
						|
    <Grid>
 | 
						|
        <Grid.ColumnDefinitions>
 | 
						|
            <ColumnDefinition Width="Auto" />
 | 
						|
            <ColumnDefinition Width="15*" />
 | 
						|
            <ColumnDefinition />
 | 
						|
        </Grid.ColumnDefinitions>
 | 
						|
        <Grid Margin="6" Grid.Column="0" >
 | 
						|
            <Grid.Resources>
 | 
						|
                <Style TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignPaperLightButton}">
 | 
						|
                    <Setter Property="Foreground" Value="#00a0ea" />
 | 
						|
                    <Setter Property="BorderBrush" Value="#00a0ea" />
 | 
						|
                    <Style.Triggers>
 | 
						|
                        <Trigger Property="IsMouseOver" Value="True">
 | 
						|
                            <Setter Property="Background" Value="#d1e7f5" />
 | 
						|
                            <Setter Property="BorderBrush" Value="#d1e7f5" />
 | 
						|
                        </Trigger>
 | 
						|
                        <DataTrigger Value="True">
 | 
						|
                            <DataTrigger.Binding>
 | 
						|
                                <MultiBinding Converter="{StaticResource DrawerSelectConverter}">
 | 
						|
                                    <Binding RelativeSource="{ RelativeSource Mode=Self }" Path="Content" />
 | 
						|
                                    <Binding Path="DrawerNo" />
 | 
						|
                                </MultiBinding>
 | 
						|
                            </DataTrigger.Binding>
 | 
						|
                            <Setter Property="Background" Value="#d1e7f5" />
 | 
						|
                            <Setter Property="BorderBrush" Value="#d1e7f5" />
 | 
						|
                        </DataTrigger>
 | 
						|
                    </Style.Triggers>
 | 
						|
                </Style>
 | 
						|
            </Grid.Resources>
 | 
						|
            <!--<Grid.RowDefinitions>
 | 
						|
                <RowDefinition />
 | 
						|
            </Grid.RowDefinitions>-->
 | 
						|
 | 
						|
            <Grid>
 | 
						|
                <Grid.RowDefinitions>
 | 
						|
                    <RowDefinition />
 | 
						|
                    <RowDefinition />
 | 
						|
                    <RowDefinition />
 | 
						|
                    <RowDefinition />
 | 
						|
                    <RowDefinition />
 | 
						|
                    <RowDefinition />
 | 
						|
                    <RowDefinition />
 | 
						|
                    <RowDefinition />
 | 
						|
                    <RowDefinition />
 | 
						|
                    <!--<RowDefinition />-->
 | 
						|
                </Grid.RowDefinitions>
 | 
						|
                <Grid.ColumnDefinitions>
 | 
						|
                    <ColumnDefinition />
 | 
						|
                    <ColumnDefinition />
 | 
						|
                </Grid.ColumnDefinitions>
 | 
						|
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="0" Grid.Column="0" Width="120" Content="一号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="0" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="1" Grid.Column="0" Width="120" Content="二号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="1" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="2" Grid.Column="0" Width="120" Content="三号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="2" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="3" Grid.Column="0" Width="120" Content="四号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="3" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="4" Grid.Column="0" Width="120" Content="五号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="4" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="5" Grid.Column="0" Width="120" Content="六号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="5" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="6" Grid.Column="0" Width="120" Content="七号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="6" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="7" Grid.Column="0" Width="120" Content="八号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="7" />
 | 
						|
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="8" Grid.Column="0" Width="120" Content="九号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="8" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="0" Grid.Column="1" Width="120" Content="十号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="9" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="1" Grid.Column="1" Width="120" Content="十一号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="10" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="2" Grid.Column="1" Width="120" Content="十二号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="11" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="3" Grid.Column="1" Width="120" Content="十三号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="12" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="4" Grid.Column="1" Width="120" Content="十四号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="13" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="5" Grid.Column="1" Width="120" Content="十五号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="14" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="6" Grid.Column="1" Width="120" Content="十六号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="15" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="7" Grid.Column="1" Width="120" Content="十七号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="16" />
 | 
						|
                <Button Margin="0 0  3 0" Grid.Row="8" Grid.Column="1" Width="120" Content="十八号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="17" />
 | 
						|
                <!--<Button Grid.Row="8" Grid.Column="1" Width="120" Content="19号药箱" Command="{Binding UpdateDrawerNo}" CommandParameter="19" />
 | 
						|
                <Button Grid.Row="9" Grid.Column="1" Width="120" Content="20号药箱" Command="{Binding UpdateDrawerNo}" CommandParameter="20" />-->
 | 
						|
 | 
						|
            </Grid>
 | 
						|
        </Grid>
 | 
						|
        <Grid Grid.Column="1" Margin="6">
 | 
						|
            <Grid.RowDefinitions>
 | 
						|
                <RowDefinition Height="Auto" />
 | 
						|
                <RowDefinition Height="550" />
 | 
						|
            </Grid.RowDefinitions>
 | 
						|
            <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.ColumnSpan="2">
 | 
						|
                <Button Margin="6 0 6 6"
 | 
						|
                        Content="保存修改"
 | 
						|
                        Command="{Binding SaveCommand}" 
 | 
						|
                        Style="{StaticResource MaterialDesignOutlinedLightButton}" />
 | 
						|
                <Button
 | 
						|
                        Margin="0 0 6 6"
 | 
						|
                        Style="{StaticResource MaterialDesignOutlinedLightButton}"
 | 
						|
                        ToolTip="刷新"
 | 
						|
                        Command="{Binding Query}"
 | 
						|
                        Content="{materialDesign:PackIcon Refresh}"/>
 | 
						|
            </StackPanel>
 | 
						|
            <DataGrid  Grid.ColumnSpan="2"
 | 
						|
                Padding="0 6 0 0"
 | 
						|
                Grid.Row="1"
 | 
						|
                materialDesign:DataGridAssist.ColumnHeaderPadding="10"
 | 
						|
                ItemsSource="{Binding ChannelStocks}"
 | 
						|
                materialDesign:ListViewAssist.HeaderRowBackground="#31ccec"
 | 
						|
                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="Left"/>
 | 
						|
                            </Trigger>
 | 
						|
                        </Style.Triggers>
 | 
						|
                    </Style>
 | 
						|
                </DataGrid.Resources>
 | 
						|
                <DataGrid.Columns>
 | 
						|
                    <DataGridTextColumn Width="130"
 | 
						|
                        Binding="{Binding DrugInfo.DrugName}"
 | 
						|
                        Header="药品名称"
 | 
						|
                        IsReadOnly="True"
 | 
						|
                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
 | 
						|
                    <DataGridTextColumn Width="100"
 | 
						|
                        Binding="{Binding DrugInfo.DrugSpec}"
 | 
						|
                        Header="规格"
 | 
						|
                        IsReadOnly="True"
 | 
						|
                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
 | 
						|
                    <!--<DataGridTextColumn Width="100"
 | 
						|
                        Binding="{Binding BaseQuantity}"
 | 
						|
                        Header="基数"
 | 
						|
                        IsReadOnly="True"
 | 
						|
                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
 | 
						|
                    <DataGridTextColumn Width="130"
 | 
						|
                        Binding="{Binding ManuNo}"
 | 
						|
                        Header="批次"
 | 
						|
                        IsReadOnly="True"
 | 
						|
                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
 | 
						|
                    <DataGridTextColumn Width="50"
 | 
						|
                        Binding="{Binding Quantity}"
 | 
						|
                        Header="库存"
 | 
						|
                        IsReadOnly="True"
 | 
						|
                        ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
 | 
						|
                    <DataGridTemplateColumn Width="100"
 | 
						|
                        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>
 | 
						|
            <materialDesign:Snackbar
 | 
						|
                Background="{Binding SnackbarBackground}"
 | 
						|
                MessageQueue="{Binding SnackbarMessageQueue}"/>
 | 
						|
        </Grid>
 | 
						|
    </Grid>
 | 
						|
</UserControl>
 |