Newer
Older
SubCabinetSolution / SubCabinetSolution / Views / GoodsQueryPage.xaml
<Page
    x:Class="SubCabinetSolution.Views.GoodsQueryPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:hc="https://handyorg.github.io/handycontrol"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Title="GoodsQueryPage"
    d:DesignHeight="450"
    d:DesignWidth="800"
    Background="White"
    DataContext="{Binding GoodsQueryPage, Source={StaticResource Locator}}"
    mc:Ignorable="d">

    <Page.Resources>
        <Style TargetType="DataGridRow">
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="TextBlock.Foreground" Value="{StaticResource ItemSelectedColor}" />
                </Trigger>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Background" Value="{StaticResource ItemSelectedColor}" />
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style TargetType="DataGridCell">
            <Setter Property="Height" Value="50" />
            <Setter Property="Background" Value="White" />
            <Setter Property="FontSize" Value="16" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="DataGridCell">
                        <Grid>
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="TextBlockStyle" TargetType="TextBlock">
            <Setter Property="Foreground" Value="White" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="Margin" Value="5,0" />
        </Style>

        <Style x:Key="GoodsTextBlockStyle" TargetType="TextBlock">
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="FontSize" Value="15" />
            <Setter Property="FontWeight" Value="Bold" />
        </Style>
    </Page.Resources>

    <Grid Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <Border
                Grid.Row="0"
                Margin="20"
                Padding="10,0,0,0"
                Background="#F1F1F1"
                BorderBrush="{StaticResource MainThemeColor}"
                CornerRadius="3">
                <StackPanel Orientation="Horizontal">
                    <hc:TextBox
                        Width="350"
                        Padding="3,0"
                        VerticalContentAlignment="Center"
                        hc:InfoElement.Placeholder="请输入助记码查询"
                        Background="Transparent"
                        BorderThickness="0"
                        FontSize="16"
                        ShowClearButton="True" />

                    <Button
                        Width="60"
                        Height="40"
                        Background="#FFD9E3ED"
                        BorderThickness="0"
                        Command="{Binding SearchDataCommand}"
                        Content="&#xe67d;"
                        FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
                        FontSize="20"
                        Foreground="#809AB1" />
                </StackPanel>
            </Border>
        </Grid>

        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="2*" />
            </Grid.ColumnDefinitions>

            <hc:Card
                Grid.Column="0"
                Width="350"
                Height="500"
                BorderThickness="0"
                Effect="{StaticResource EffectShadow3}">
                <DataGrid ItemsSource="{Binding RecentUseModels}" Style="{StaticResource DataGridStyle}">
                    <DataGrid.Columns>
                        <DataGridTextColumn
                            Width="*"
                            Binding="{Binding OperatePersion, Mode=OneWay}"
                            Header="操作人"
                            HeaderStyle="{StaticResource DataGridHeaderStyle}" />
                        <DataGridTextColumn
                            Width="1.5*"
                            Binding="{Binding OperateTime, Mode=OneWay}"
                            Header="时间"
                            HeaderStyle="{StaticResource DataGridHeaderStyle}" />
                        <DataGridTextColumn
                            Width="*"
                            Binding="{Binding RFID, Mode=OneWay}"
                            Header="业务类型"
                            HeaderStyle="{StaticResource DataGridHeaderStyle}" />
                    </DataGrid.Columns>
                </DataGrid>
            </hc:Card>

            <Grid Grid.Column="1">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <Grid Grid.ColumnSpan="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <StackPanel
                        Grid.Row="1"
                        Grid.Column="0"
                        Margin="10,0"
                        VerticalAlignment="Center"
                        Orientation="Horizontal">

                        <TextBlock
                            FontSize="16"
                            FontWeight="Bold"
                            Text="入库" />

                        <TextBlock
                            Margin="5,0"
                            FontSize="16"
                            FontWeight="Bold"
                            Foreground="{StaticResource MainThemeColor}"
                            Text="起" />
                    </StackPanel>

                    <StackPanel
                        Grid.Row="0"
                        Grid.Column="1"
                        Margin="0,10"
                        HorizontalAlignment="Center"
                        Orientation="Horizontal">

                        <TextBlock
                            FontSize="16"
                            FontWeight="Bold"
                            Text="领用" />

                        <TextBlock
                            Margin="5,0"
                            FontSize="16"
                            FontWeight="Bold"
                            Text="0次" />
                    </StackPanel>

                    <StackPanel
                        Grid.Row="1"
                        Grid.Column="2"
                        Margin="10,0"
                        VerticalAlignment="Center"
                        Orientation="Horizontal">

                        <TextBlock
                            FontSize="16"
                            FontWeight="Bold"
                            Text="归还" />

                        <TextBlock
                            Margin="5,0"
                            FontSize="16"
                            FontWeight="Bold"
                            Text="0次" />
                    </StackPanel>

                    <StackPanel
                        Grid.Row="2"
                        Grid.Column="1"
                        Margin="0,10"
                        HorizontalAlignment="Center"
                        Orientation="Horizontal">

                        <TextBlock
                            FontSize="16"
                            FontWeight="Bold"
                            Text="消耗" />

                        <TextBlock
                            Margin="5,0"
                            FontSize="16"
                            FontWeight="Bold"
                            Foreground="Red"
                            Text="终" />
                    </StackPanel>

                    <Grid Grid.Row="1" Grid.Column="1">

                        <!--  外圆  -->
                        <Ellipse
                            Width="500"
                            Height="500"
                            Fill="Transparent"
                            Stroke="AliceBlue"
                            StrokeThickness="25" />


                        <!--  内环  -->
                        <!--  起点 起点x,起点y 画椭圆 长轴,短轴 旋转角度 是否是优弧 正角方向绘制 终点x,终点y  -->
                        <Path
                            Data="M120,275 A200,200 0 1 1 320,475"
                            Stroke="DarkCyan"
                            StrokeThickness="5" />

                        <!--  文字描述  -->
                        <StackPanel
                            Width="300"
                            VerticalAlignment="Center"
                            Orientation="Vertical">
                            <Grid Height="35">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <TextBlock
                                    Grid.Column="0"
                                    Style="{StaticResource GoodsTextBlockStyle}"
                                    Text="名称" />
                                <TextBlock
                                    Grid.Column="1"
                                    Style="{StaticResource GoodsTextBlockStyle}"
                                    Text="名称名称名称名称名称" />
                            </Grid>
                            <Grid Height="35">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <TextBlock
                                    Grid.Column="0"
                                    Style="{StaticResource GoodsTextBlockStyle}"
                                    Text="规格" />
                                <TextBlock
                                    Grid.Column="1"
                                    Style="{StaticResource GoodsTextBlockStyle}"
                                    Text="名称名称名称名称名称" />
                            </Grid>
                            <Grid Height="35">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <TextBlock
                                    Grid.Column="0"
                                    Style="{StaticResource GoodsTextBlockStyle}"
                                    Text="效期" />
                                <TextBlock
                                    Grid.Column="1"
                                    Style="{StaticResource GoodsTextBlockStyle}"
                                    Text="名称名称名称名称名称" />
                            </Grid>
                            <Grid Height="35">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <TextBlock
                                    Grid.Column="0"
                                    Style="{StaticResource GoodsTextBlockStyle}"
                                    Text="柜号" />
                                <TextBlock
                                    Grid.Column="1"
                                    Style="{StaticResource GoodsTextBlockStyle}"
                                    Text="名称名称名称名称名称" />
                            </Grid>
                        </StackPanel>
                    </Grid>
                </Grid>

                <Button
                    Grid.Row="1"
                    Grid.Column="1"
                    Width="80"
                    Height="30"
                    Margin="20"
                    HorizontalAlignment="Right"
                    Background="{StaticResource MainThemeColor}"
                    BorderThickness="0"
                    Command="{Binding GoBackCommand}">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock
                            FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
                            FontSize="20"
                            Foreground="White"
                            Text="&#xe666;" />
                        <TextBlock Style="{StaticResource TextBlockStyle}" Text="返回" />
                    </StackPanel>
                </Button>
            </Grid>
        </Grid>
    </Grid>
</Page>