You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
268 lines
20 KiB
XML
268 lines
20 KiB
XML
<UserControl x:Class="XGLFinishPro.Views.weighWindows"
|
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:XGLFinishPro.Views"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:localDate="clr-namespace:XGLFinishPro.Tools"
|
|
Loaded="UserControl_Loaded"
|
|
mc:Ignorable="d"
|
|
Height="800" Width="1920">
|
|
<UserControl.Resources>
|
|
<!--日历样式-->
|
|
<Style TargetType="CalendarDayButton" x:Key="CalendarDayBtnStyle">
|
|
<Setter Property="FontSize" Value="18"></Setter>
|
|
</Style>
|
|
<Style x:Key="calendarWithGotToTodayStyle"
|
|
TargetType="{x:Type Calendar}">
|
|
<Setter Property="CalendarDayButtonStyle"
|
|
Value="{StaticResource CalendarDayBtnStyle}"></Setter>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Calendar}">
|
|
<Border>
|
|
<StackPanel Orientation="Vertical">
|
|
<StackPanel x:Name="PART_Root"
|
|
HorizontalAlignment="Center" Background="#FF878787">
|
|
<CalendarItem x:Name="PART_CalendarItem"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Background="{TemplateBinding Background}"
|
|
Style="{TemplateBinding CalendarItemStyle}"
|
|
Height="{TemplateBinding Height}"
|
|
/>
|
|
<Grid VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="30"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="52"></ColumnDefinition>
|
|
<ColumnDefinition Width="26"></ColumnDefinition>
|
|
<ColumnDefinition Width="52"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock x:Name="PART_GoToday"
|
|
Width="40" Height="20"
|
|
Text="今天" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" Cursor="Hand" Foreground="#FFFFFFFF" />
|
|
<TextBlock Grid.Column="2" x:Name="PART_GoClear"
|
|
Width="40" Height="20"
|
|
Text="清空" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" Cursor="Hand" Foreground="#FFFFFFFF" />
|
|
</Grid>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
<Grid Margin="0" Background="Transparent">
|
|
<Border Background="White" Margin="10" BorderThickness="2" CornerRadius="4">
|
|
|
|
<Grid >
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="10*"/>
|
|
<RowDefinition Height="162*"/>
|
|
<RowDefinition Height="9*"/>
|
|
<RowDefinition Height="232*"/>
|
|
<RowDefinition Height="9*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.01*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="0.01*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Label Background="White" BorderThickness="0" Content="称重" FontSize="14" HorizontalContentAlignment="Center" Margin="88,0,1631,285" Grid.Column="1" Panel.ZIndex="1" Grid.RowSpan="2"/>
|
|
|
|
<Label BorderThickness="0" Background="White" Content="称重历史" FontSize="14" HorizontalContentAlignment="Center" Margin="1319,0,420,292" Grid.Column="1" Panel.ZIndex="1" Grid.RowSpan="2"/>
|
|
<Label BorderThickness="0" Background="Red" Foreground="Black" Content="必须先选择检验规则后才能点称重,称重及上传" HorizontalContentAlignment="Center" Margin="450,288,1105,3" FontSize="10" Grid.Column="1" Panel.ZIndex="1" Grid.Row="1" Grid.RowSpan="2"/>
|
|
<Grid Grid.Column="1" Margin="0,10,0,1" Grid.RowSpan="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="494*"/>
|
|
<ColumnDefinition Width="13*"/>
|
|
<ColumnDefinition Width="254*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Border BorderThickness="1" BorderBrush="#404040" Grid.Column="0" Panel.ZIndex="0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="8*"/>
|
|
<RowDefinition Height="23*"/>
|
|
<RowDefinition Height="25*"/>
|
|
<RowDefinition Height="25*"/>
|
|
<RowDefinition Height="25*"/>
|
|
<RowDefinition Height="35*"/>
|
|
</Grid.RowDefinitions>
|
|
<Label Content="1号称重设备" FontSize="14" Grid.Row="1" Margin="15,10,1078,53" Grid.RowSpan="2"></Label>
|
|
<Border BorderThickness="1" CornerRadius="4" BorderBrush="#404040" Width="70" Grid.Row="1" HorizontalAlignment="Left" Margin="132,14,0,6">
|
|
<TextBlock Text="未连接" Name="lianjiezhuangtai" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
|
|
</Border>
|
|
<Label Content="检验物料:" FontSize="14" Grid.Row="2" Margin="15,0,1082,0" ></Label>
|
|
<Border Grid.Row="2" Margin="132,6,711,6" BorderBrush="#404040" BorderThickness="1" CornerRadius="4">
|
|
<TextBox Name="jianyanwuliao" BorderThickness="0" FontSize="18" Margin="1,1,0,1" HorizontalAlignment="Left" Width="360" ></TextBox>
|
|
</Border>
|
|
<Label Content="检验节点:" FontSize="14" Grid.Row="2" Margin="649,10,455,0" ></Label>
|
|
<Border Grid.Row="2" Margin="755,6,84,6" BorderBrush="#404040" BorderThickness="1" CornerRadius="4">
|
|
<TextBox Name="jianyanjiedian" BorderThickness="0" FontSize="18" Margin="1,1,1,1" Width="360"></TextBox>
|
|
</Border>
|
|
<Label Content="任务编号:" FontSize="14" Grid.Row="3" Margin="15,6,1082,0" ></Label>
|
|
<Border Grid.Row="3" Margin="132,6,711,6" BorderBrush="#404040" BorderThickness="1" CornerRadius="4">
|
|
<TextBox Name="renwubianhao" BorderThickness="0" FontSize="18" Margin="1,1,1,1" Width="360" ></TextBox>
|
|
</Border>
|
|
<!--<Label Content="规则属性:" FontSize="14" Grid.Row="3" Margin="649,10,455,0" ></Label>
|
|
<Border Grid.Row="3" Margin="755,6,84,6" BorderBrush="#404040" BorderThickness="1" CornerRadius="4">
|
|
<TextBox Name="guizeshuxing" BorderThickness="0" Margin="1,1,1,1" Width="360"></TextBox>
|
|
</Border>-->
|
|
<Label Content="规则名称:" FontSize="14" Grid.Row="3" Margin="649,10,455,0" ></Label>
|
|
<Border Grid.Row="3" Margin="755,6,84,6" BorderBrush="#404040" BorderThickness="1" CornerRadius="4">
|
|
<TextBox Name="guizemingcheng" FontSize="18" BorderThickness="0" Margin="1,1,1,1" Width="360"></TextBox>
|
|
</Border>
|
|
<Label Content="重 量(g):" FontSize="14" Grid.Row="4" Margin="15,6,1082,0" ></Label>
|
|
<Border Grid.Row="4" Margin="132,6,711,6" BorderBrush="#404040" BorderThickness="1" CornerRadius="4">
|
|
<TextBox Name="zhongliang" FontSize="18" BorderThickness="0" Margin="1,1,1,1" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Width="360"></TextBox>
|
|
</Border>
|
|
<Border BorderThickness="1" CornerRadius="3" BorderBrush="#404040" Background="#2F82E7" Grid.Row="5" Height="32" Margin="88,0,304,8" Width="80">
|
|
<Button Content="称 重" BorderThickness="0" FontSize="16" Foreground="White" Background="#2F82E7" Click="Button_Click_1" Height="30" VerticalAlignment="Top"/>
|
|
</Border>
|
|
<Border BorderThickness="1" CornerRadius="3" Visibility="Hidden" BorderBrush="#404040" Background="#2F82E7" Grid.Row="5" Height="32" Margin="200,-5,1,1" Width="80">
|
|
<Button Content="去皮" BorderThickness="0" FontSize="16" Foreground="White" Background="#2F82E7"/>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
<Border BorderThickness="1" BorderBrush="#404040" Grid.Column="2" >
|
|
<DataGrid Margin="0,20,0,0" Name="zhongDate" >
|
|
<DataGrid.Resources>
|
|
<!-- 列名居中样式 -->
|
|
<Style TargetType="DataGridColumnHeader">
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="FontSize" Value="18"/>
|
|
</Style>
|
|
<Style TargetType="DataGridCell">
|
|
<Setter Property="Foreground" Value="Black"/>
|
|
<Setter Property="FontSize" Value="16"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
</Style>
|
|
</DataGrid.Resources>
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Binding="{Binding material_name}" Width="0.8*" IsReadOnly="True" Header="重量(g)">
|
|
<DataGridTextColumn.ElementStyle>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
</Style>
|
|
</DataGridTextColumn.ElementStyle>
|
|
</DataGridTextColumn>
|
|
|
|
<DataGridTemplateColumn Width="0.2*" Header="操作">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<Button Content="删除" Click="DeleteButton_Click" Height="35" Width="60" Background="Aqua"/>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
</DataGrid.Columns>
|
|
|
|
|
|
|
|
</DataGrid>
|
|
</Border>
|
|
</Grid>
|
|
<Grid Grid.Row="3" Grid.Column="1">
|
|
<Border BorderThickness="1" BorderBrush="#404040" CornerRadius="4" Margin="0,10,0,0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="59*"/>
|
|
<RowDefinition Height="155*"/>
|
|
</Grid.RowDefinitions>
|
|
<Label BorderThickness="0" Background="White" Content="检验任务" FontSize="14" HorizontalContentAlignment="Center" Grid.Column="0" Panel.ZIndex="0" Grid.Row="0" Margin="69,-12,1588,99"/>
|
|
<Label Content="任务编号:" FontSize="14" Grid.Row="0" Margin="10,22,1750,56" ></Label>
|
|
|
|
<Border Grid.Row="0" Margin="112,19,1471,55" BorderBrush="#404040" BorderThickness="1" CornerRadius="4">
|
|
<TextBox Name="renwubianhao1" FontSize="16" BorderThickness="0" Margin="1,1,1,1" ></TextBox>
|
|
</Border>
|
|
<Label Content="检验日期:" FontSize="14" Grid.Row="0" Margin="400,22,1357,56" ></Label>
|
|
<!--<Border Grid.Row="0" Margin="505,20,1066,56" BorderBrush="#404040" BorderThickness="1" CornerRadius="4">-->
|
|
<Border Margin="505,18,1066,0" Height="40" VerticalAlignment="Top" BorderThickness="1" BorderBrush="#404040" CornerRadius="4">
|
|
<localDate:UserDatePicker x:Name="dateStart" FontSize="18" BorderThickness="0" AlternativeCalendarStyle="{StaticResource calendarWithGotToTodayStyle}" SelectedDateFormat="Short" IsTodayHighlighted="True" VerticalContentAlignment="Center" Margin="0,0,0,-1" />
|
|
</Border>
|
|
|
|
|
|
|
|
<Label Content="检验节点:" FontSize="14" Grid.Row="0" Margin="10,68,1750,10" ></Label>
|
|
<Border Grid.Row="0" Margin="112,64,1471,10" BorderBrush="#404040" BorderThickness="1" CornerRadius="4">
|
|
<TextBox Name="jianyanjiedian1" BorderThickness="0" FontSize="18" Margin="1,1,1,1" ></TextBox>
|
|
</Border>
|
|
<Label Content="检验物料:" FontSize="14" Grid.Row="0" Margin="400,68,1357,0" Height="36" VerticalAlignment="Top" ></Label>
|
|
<Border Grid.Row="0" Margin="505,64,1066,10" BorderBrush="#404040" BorderThickness="1" CornerRadius="4">
|
|
<TextBox Name="jianyanwuliao1" BorderThickness="0" Margin="1,1,1,1" FontSize="18"></TextBox>
|
|
</Border>
|
|
<Border BorderThickness="1" CornerRadius="4" BorderBrush="#404040" Background="#2F82E7" Grid.Row="0" Height="32" Margin="867,23,910,59" Width="80">
|
|
<Button Content="查询" BorderThickness="0" FontSize="16" Foreground="White" Background="#2F82E7" Click="Button_Click_2"/>
|
|
</Border>
|
|
<Border BorderThickness="1" CornerRadius="4" BorderBrush="#404040" Background="#2F82E7" Grid.Row="0" Height="32" Margin="867,66,910,16" Width="80">
|
|
<Button Content="重置" BorderThickness="0" FontSize="16" Foreground="White" Background="#2F82E7" Click="Button_Click"/>
|
|
</Border>
|
|
<DataGrid Grid.Row="1" Margin="10" Name="WeighingTaskDateTable" AutoGenerateColumns="False"
|
|
CanUserAddRows="False" CanUserDeleteRows="False"
|
|
CanUserResizeColumns="False" CanUserResizeRows="False" CanUserReorderColumns="False"
|
|
MouseDoubleClick="DataGrid_MouseDoubleClick" >
|
|
<DataGrid.Resources>
|
|
<!-- 列名居中样式 -->
|
|
<Style TargetType="DataGridColumnHeader">
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="FontSize" Value="18"/>
|
|
</Style>
|
|
<!-- 内容居中样式 -->
|
|
<Style TargetType="DataGridCell" >
|
|
<Setter Property="Foreground" Value="Black"/>
|
|
<Setter Property="FontSize" Value="16"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
|
<Border Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}">
|
|
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</DataGrid.Resources>
|
|
<DataGrid.RowStyle>
|
|
<Style TargetType="DataGridRow">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="Black"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="Blue"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.RowStyle>
|
|
<DataGrid.Columns>
|
|
<!--<DataGridTextColumn Binding="{Binding RowNumber}" Width="*" IsReadOnly="True" Header="序号" />-->
|
|
<DataGridTextColumn Binding="{Binding check_name}" Width="*" IsReadOnly="True" Header="检验节点" />
|
|
<DataGridTextColumn Binding="{Binding income_time,StringFormat='{}{0:yyyy-MM-dd HH:mm:ss}'}" IsReadOnly="True" Width="*" Header="检验日期" />
|
|
<DataGridTextColumn Binding="{Binding check_no}" Width="*" IsReadOnly="True" Header="任务编号" />
|
|
<DataGridTextColumn Binding="{Binding material_code}" Width="*" IsReadOnly="True" Header="检验物料" />
|
|
<DataGridTextColumn Binding="{Binding rule_name}" Width="*" IsReadOnly="True" Header="规则名称" />
|
|
<DataGridTextColumn Binding="{Binding material_name}" Width="*" IsReadOnly="True" Header="物料描述" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
|
|
</Grid>
|
|
</UserControl>
|