|
|
|
|
<UserControl
|
|
|
|
|
x:Class="XGL.Views.LanJu_Prepare"
|
|
|
|
|
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:local="clr-namespace:XGL.Views"
|
|
|
|
|
xmlns:convert="clr-namespace:XGL.Tools"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
Width="1920"
|
|
|
|
|
Height="800"
|
|
|
|
|
mc:Ignorable="d" Loaded="UserControl_Loaded">
|
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
<ResourceDictionary>
|
|
|
|
|
<Style x:Key="RoundButton" TargetType="Button">
|
|
|
|
|
<Setter Property="Width" Value="25" />
|
|
|
|
|
<Setter Property="Height" Value="25" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Ellipse
|
|
|
|
|
Name="GelBackground"
|
|
|
|
|
Stroke="Black"
|
|
|
|
|
StrokeThickness="1" >
|
|
|
|
|
<Ellipse.Fill>
|
|
|
|
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
|
|
|
|
<GradientStop Color="#FF34268A" Offset="0.1"></GradientStop>
|
|
|
|
|
<GradientStop Color="#FF33288B" Offset="0.5"></GradientStop>
|
|
|
|
|
<GradientStop Color="#FF2281D1" Offset="0.9"></GradientStop>
|
|
|
|
|
</LinearGradientBrush>
|
|
|
|
|
</Ellipse.Fill>
|
|
|
|
|
</Ellipse>
|
|
|
|
|
<ContentPresenter
|
|
|
|
|
Name="GelButtonContent"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Content="{TemplateBinding Content}" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style x:Key="CustomCellStyle" TargetType="DataGridCell">
|
|
|
|
|
<Setter Property="Foreground" Value="#707971" />
|
|
|
|
|
<Setter Property="TextBlock.TextAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="TextBlock.FontSize" Value="22" />
|
|
|
|
|
</Style>
|
|
|
|
|
<convert:MyValueConverter x:Key="MyConverter"/>
|
|
|
|
|
<!--<convert:SyncFlagConverter x:Key="SyncFlagConverter"/>-->
|
|
|
|
|
</ResourceDictionary>
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
|
|
|
|
<Viewbox Stretch="Fill">
|
|
|
|
|
<Canvas
|
|
|
|
|
Width="1920"
|
|
|
|
|
Height="800"
|
|
|
|
|
Background="#F2F3F5">
|
|
|
|
|
<Grid
|
|
|
|
|
Canvas.Top="-10"
|
|
|
|
|
Width="1920"
|
|
|
|
|
Height="800"
|
|
|
|
|
Margin="0">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="1546" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
<RowDefinition Height="310" />
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
<RowDefinition Height="350" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Label
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Width="175"
|
|
|
|
|
Height="37"
|
|
|
|
|
Margin="26,5,0,0"
|
|
|
|
|
HorizontalAlignment="Left">
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="22"
|
|
|
|
|
FontWeight="Bold"
|
|
|
|
|
Text="准备清单" />
|
|
|
|
|
</Label>
|
|
|
|
|
|
|
|
|
|
<DataGrid
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Width="1500"
|
|
|
|
|
Height="309"
|
|
|
|
|
Margin="25,0,0,0"
|
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
|
FrozenColumnCount="1"
|
|
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Visible">
|
|
|
|
|
<DataGrid.ColumnHeaderStyle>
|
|
|
|
|
<Style TargetType="DataGridColumnHeader">
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="Height" Value="48" />
|
|
|
|
|
<Setter Property="FontSize" Value="24" />
|
|
|
|
|
<Setter Property="Foreground" Value="White" />
|
|
|
|
|
<Setter Property="Background" Value="#2B7EE6" />
|
|
|
|
|
</Style>
|
|
|
|
|
</DataGrid.ColumnHeaderStyle>
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
|
<DataGridTextColumn Width="300" Header="序号" />
|
|
|
|
|
<DataGridTextColumn Width="300" Header="准备类型" />
|
|
|
|
|
<DataGridTextColumn Width="300" Header="准备内容" />
|
|
|
|
|
<DataGridTextColumn Width="300" Header="状态" />
|
|
|
|
|
<DataGridTextColumn Width="300" Header="完成时间" />
|
|
|
|
|
</DataGrid.Columns>
|
|
|
|
|
</DataGrid>
|
|
|
|
|
<Button Grid.Row="1" Grid.Column="1" Click="btnStartOrders_Click">
|
|
|
|
|
<Button.Template>
|
|
|
|
|
<ControlTemplate>
|
|
|
|
|
<Image Width="250" Height="250" Margin="0,0,0,0" Source="/Resources/startOrder.jpg" />
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Button.Template>
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
|
|
<!--<Button
|
|
|
|
|
x:Name="btnStartOrders"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Foreground="White"
|
|
|
|
|
FontSize="28"
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Width="250"
|
|
|
|
|
Height="250"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Content="开始工单"
|
|
|
|
|
Style="{StaticResource RoundButton}" Click="btnStartOrders_Click">
|
|
|
|
|
|
|
|
|
|
</Button>-->
|
|
|
|
|
|
|
|
|
|
<Label
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Width="175"
|
|
|
|
|
Height="37"
|
|
|
|
|
Margin="26,5,0,0"
|
|
|
|
|
HorizontalAlignment="Left">
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="22"
|
|
|
|
|
FontWeight="Bold"
|
|
|
|
|
Text="工单" />
|
|
|
|
|
</Label>
|
|
|
|
|
<ScrollViewer
|
|
|
|
|
Grid.Row="3"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
|
HorizontalScrollBarVisibility="Auto"
|
|
|
|
|
VerticalScrollBarVisibility="Auto">
|
|
|
|
|
<DataGrid
|
|
|
|
|
x:Name="WorkOrder"
|
|
|
|
|
Width="2490"
|
|
|
|
|
Height="309"
|
|
|
|
|
Margin="25,0,0,0"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
|
CanUserResizeColumns="False"
|
|
|
|
|
SelectionMode="Single"
|
|
|
|
|
CellStyle="{StaticResource CustomCellStyle}"
|
|
|
|
|
FrozenColumnCount="1"
|
|
|
|
|
IsReadOnly="True">
|
|
|
|
|
<DataGrid.ColumnHeaderStyle>
|
|
|
|
|
<Style TargetType="DataGridColumnHeader">
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="Height" Value="48" />
|
|
|
|
|
<Setter Property="FontSize" Value="24" />
|
|
|
|
|
<Setter Property="Foreground" Value="White" />
|
|
|
|
|
<Setter Property="Background" Value="#2B7EE6" />
|
|
|
|
|
</Style>
|
|
|
|
|
</DataGrid.ColumnHeaderStyle>
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
|
<DataGridTemplateColumn Width="350" Header="操作">
|
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<StackPanel
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<Button
|
|
|
|
|
x:Name="Flow_Click"
|
|
|
|
|
Width="90"
|
|
|
|
|
Height="30"
|
|
|
|
|
Margin="15,0,0,0"
|
|
|
|
|
Background="#4294C6"
|
|
|
|
|
Content="查看工艺" Click="Flow_Click"/>
|
|
|
|
|
<Button
|
|
|
|
|
x:Name="SOP_Click"
|
|
|
|
|
Width="90"
|
|
|
|
|
Height="30"
|
|
|
|
|
Margin="25,0,0,0"
|
|
|
|
|
Background="#4294C6"
|
|
|
|
|
Content="查看SOP" />
|
|
|
|
|
<Button
|
|
|
|
|
x:Name="Material_Click"
|
|
|
|
|
Width="90"
|
|
|
|
|
Height="30"
|
|
|
|
|
Margin="25,0,0,0"
|
|
|
|
|
Background="#4294C6"
|
|
|
|
|
Content="查看物料" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
<DataGridTextColumn Width="200" Header="序号" />
|
|
|
|
|
<!--<DataGridTextColumn
|
|
|
|
|
Width="250"
|
|
|
|
|
Binding="{Binding WorkOrderCode}"
|
|
|
|
|
Header="工单编码" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="150"
|
|
|
|
|
Binding="{Binding OrderCode}"
|
|
|
|
|
Header="订单编码" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="450"
|
|
|
|
|
Binding="{Binding ProductName}"
|
|
|
|
|
Header="产品名称" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="200"
|
|
|
|
|
Binding="{Binding ProductSpc}"
|
|
|
|
|
Header="产品型号" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="200"
|
|
|
|
|
Binding="{Binding QuantitySplit}"
|
|
|
|
|
Header="工单数量" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="*"
|
|
|
|
|
Binding="{Binding BatchCode}"
|
|
|
|
|
Header="生产批次" />-->
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="250"
|
|
|
|
|
Binding="{Binding id}"
|
|
|
|
|
Header="计划编码" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="150"
|
|
|
|
|
Binding="{Binding workorder_id}"
|
|
|
|
|
Header="订单编码" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="450"
|
|
|
|
|
Binding="{Binding ProductName}"
|
|
|
|
|
Header="产品名称" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="200"
|
|
|
|
|
Binding="{Binding material_code}"
|
|
|
|
|
Header="产品型号" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="200"
|
|
|
|
|
Binding="{Binding plan_time}"
|
|
|
|
|
Header="工单时间" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="*"
|
|
|
|
|
Binding="{Binding bucket_code}"
|
|
|
|
|
Header="料罐编码" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="*"
|
|
|
|
|
Binding="{Binding shift_desc}"
|
|
|
|
|
Header="班次" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="*"
|
|
|
|
|
Binding="{Binding prod_line_code}"
|
|
|
|
|
Header="成型机" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="*"
|
|
|
|
|
Binding="{Binding status,Converter={StaticResource MyConverter}}"
|
|
|
|
|
Header="状态" />
|
|
|
|
|
<DataGridTextColumn
|
|
|
|
|
Width="*"
|
|
|
|
|
Binding="{Binding sync_flag}"
|
|
|
|
|
Header="状态" />
|
|
|
|
|
</DataGrid.Columns>
|
|
|
|
|
</DataGrid>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</Canvas>
|
|
|
|
|
</Viewbox>
|
|
|
|
|
</UserControl>
|