胶料快检添加离线模式
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
<TextBlock Text="重置" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<TextBlock Text="数据来自 MES 密炼生产计划维护,桌面端只读;断网时显示本地缓存,联网后自动刷新"
|
||||
<TextBlock Text="数据来自 MES 密炼生产计划维护,每 2 秒自动同步;断网时显示本地缓存"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource SecondaryTextBrush}"
|
||||
FontSize="12"/>
|
||||
|
||||
@@ -50,7 +50,14 @@
|
||||
<md:PackIcon Kind="Flask" Width="18" Height="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="无转子流变仪 MDR S3L" FontSize="18" FontWeight="Bold"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="无转子流变仪 MDR S3L" FontSize="18" FontWeight="Bold"/>
|
||||
<Border Background="#fff7e6" BorderBrush="#ffa940" BorderThickness="1" CornerRadius="4"
|
||||
Padding="8,2" Margin="12,0,0,0"
|
||||
Visibility="{Binding IsOfflineMode, Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||
<TextBlock Text="离线模式" FontSize="12" FontWeight="SemiBold" Foreground="#d46b08"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<TextBlock Text="胶料快检记录 · 密炼快检试验操作台" FontSize="11" Foreground="{DynamicResource SecondaryTextBrush}" Margin="0,2,0,0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
@@ -87,7 +94,8 @@
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,4">
|
||||
<Border Width="4" Height="16" CornerRadius="2" Background="#1890ff"/>
|
||||
<TextBlock Text="温度(℃)曲线图" Style="{StaticResource SectionTitleStyle}"/>
|
||||
<Button Content="刷新演示" Command="{Binding RefreshChartDemoCommand}" Style="{StaticResource ButtonDefault}" Height="26" Padding="8,0" Margin="10,0,0,0"/>
|
||||
<Button Content="刷新演示" Command="{Binding RefreshChartDemoCommand}" Style="{StaticResource ButtonDefault}" Height="26" Padding="8,0" Margin="10,0,0,0"
|
||||
Visibility="{Binding IsEditable, Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Row="1" Text="{Binding ChartDemoHint}" FontSize="10" Foreground="{DynamicResource SecondaryTextBrush}" Margin="0,0,0,4"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
@@ -132,7 +140,8 @@
|
||||
<Border Width="4" Height="18" CornerRadius="2" Background="#1890ff"/>
|
||||
<TextBlock Text="试验结果" Style="{StaticResource SectionTitleStyle}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right"
|
||||
Visibility="{Binding IsEditable, Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||
<Button Content="新增检验行" Command="{Binding AddInspectRowCommand}" Style="{StaticResource ButtonPrimary}" Height="28" Padding="10,0" Margin="0,0,8,0"/>
|
||||
<Button Content="删除选中行" Command="{Binding RemoveInspectRowCommand}" Style="{StaticResource ButtonDanger}" Height="28" Padding="10,0"/>
|
||||
</StackPanel>
|
||||
@@ -145,7 +154,7 @@
|
||||
CanUserDeleteRows="False"
|
||||
HeadersVisibility="Column"
|
||||
SelectionMode="Single"
|
||||
IsReadOnly="False"
|
||||
IsReadOnly="{Binding IsReadOnly}"
|
||||
RowHeight="30"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
@@ -153,7 +162,8 @@
|
||||
Style="{StaticResource CusDataGridStyle}"
|
||||
ColumnHeaderStyle="{StaticResource CusDataGridColumnHeaderStyle}">
|
||||
</DataGrid>
|
||||
<TextBlock Grid.Row="2" Text="请手填各数据点检测值,系统将根据数据标准上下限自动判定合格/不合格" FontSize="11" Foreground="{DynamicResource SecondaryTextBrush}" Margin="0,6,0,0"/>
|
||||
<TextBlock Grid.Row="2" Text="请手填各数据点检测值,系统将根据数据标准上下限自动判定合格/不合格" FontSize="11" Foreground="{DynamicResource SecondaryTextBrush}" Margin="0,6,0,0"
|
||||
Visibility="{Binding IsEditable, Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -212,9 +222,6 @@
|
||||
<Border Width="4" Height="18" CornerRadius="2" Background="#1890ff"/>
|
||||
<TextBlock Text="试验信息" Style="{StaticResource SectionTitleStyle}"/>
|
||||
</StackPanel>
|
||||
<Button Content="刷新本地数据" Command="{Binding RefreshPlansCommand}"
|
||||
Style="{StaticResource ButtonDefault}" Height="26" Padding="8,0"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
<hc:Row Gutter="10">
|
||||
@@ -234,6 +241,7 @@
|
||||
<!-- 密炼日期 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:DatePicker SelectedDate="{Binding MixingDate}"
|
||||
IsEnabled="{Binding IsEditable}"
|
||||
hc:InfoElement.Title="密炼日期"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
@@ -245,6 +253,7 @@
|
||||
<hc:Col Span="12">
|
||||
<hc:ComboBox ItemsSource="{Binding MachineOptions}"
|
||||
SelectedItem="{Binding SelectedMachine}"
|
||||
IsEnabled="{Binding IsEditable}"
|
||||
hc:InfoElement.Title="密炼机台"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
@@ -258,6 +267,7 @@
|
||||
<hc:ComboBox ItemsSource="{Binding ShiftOptions}"
|
||||
SelectedItem="{Binding SelectedShift}"
|
||||
DisplayMemberPath="Name"
|
||||
IsEnabled="{Binding IsEditable}"
|
||||
hc:InfoElement.Title="班次"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
@@ -271,6 +281,7 @@
|
||||
<hc:ComboBox ItemsSource="{Binding PlanOptions}"
|
||||
SelectedItem="{Binding SelectedPlan}"
|
||||
DisplayMemberPath="PlanMaterialNo"
|
||||
IsEnabled="{Binding IsEditable}"
|
||||
hc:InfoElement.Title="密炼计划"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
@@ -279,21 +290,34 @@
|
||||
hc:InfoElement.Symbol="*"
|
||||
Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<!-- 胶料名称 -->
|
||||
<!-- 胶料名称(在线:计划带出;离线:手动选择) -->
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding RubberMaterialName, Mode=OneWay}"
|
||||
IsReadOnly="True"
|
||||
hc:InfoElement.Title="胶料名称"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="选择计划后自动带出"
|
||||
Margin="0,0,0,8"/>
|
||||
<Grid Margin="0,0,0,8">
|
||||
<hc:TextBox Text="{Binding RubberMaterialName, Mode=OneWay}"
|
||||
IsReadOnly="True"
|
||||
hc:InfoElement.Title="胶料名称"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="选择计划后自动带出"
|
||||
Visibility="{Binding IsOnlineMode, Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
<hc:ComboBox ItemsSource="{Binding RubberMaterialOptions}"
|
||||
SelectedItem="{Binding SelectedRubberMaterial}"
|
||||
IsEnabled="{Binding IsEditable}"
|
||||
hc:InfoElement.Title="胶料名称"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="从本地标准选择胶料"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
Visibility="{Binding IsOfflineMode, Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
</Grid>
|
||||
</hc:Col>
|
||||
<!-- 实验标准 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:ComboBox ItemsSource="{Binding StdOptions}"
|
||||
SelectedItem="{Binding SelectedStd}"
|
||||
DisplayMemberPath="StdName"
|
||||
IsEnabled="{Binding IsEditable}"
|
||||
hc:InfoElement.Title="实验标准"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
@@ -315,25 +339,27 @@
|
||||
<!-- 车次 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding TrainNo, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsReadOnly="{Binding IsReadOnly}"
|
||||
hc:InfoElement.Title="车次"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="手填车次"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
hc:InfoElement.ShowClearButton="{Binding IsEditable}"
|
||||
Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<!-- 试验次数 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding InspectTimesText, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsReadOnly="{Binding IsReadOnly}"
|
||||
hc:InfoElement.Title="试验次数"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="默认 1,可修改"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
hc:InfoElement.ShowClearButton="{Binding IsEditable}"
|
||||
Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<!-- 检验结果(由试验结果区域自动判定,只读) -->
|
||||
@@ -358,11 +384,18 @@
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
|
||||
<TextBlock Text="密炼计划、实验标准均来自桌面端本地缓存;按密炼日期筛选计划,再按胶料名称选择实验标准"
|
||||
<TextBlock Text="{Binding OfflineModeHint}"
|
||||
FontSize="11"
|
||||
Foreground="#d46b08"
|
||||
Margin="0,8,0,0"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="{Binding IsOfflineMode, Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
<TextBlock Text="密炼计划、实验标准每 2 秒自动从 MES 同步到本地缓存;断网时使用本地数据"
|
||||
FontSize="11"
|
||||
Foreground="{DynamicResource SecondaryTextBrush}"
|
||||
Margin="0,8,0,0"
|
||||
TextWrapping="Wrap"/>
|
||||
TextWrapping="Wrap"
|
||||
Visibility="{Binding IsOnlineMode, Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -406,7 +439,7 @@
|
||||
<!-- 底部操作 -->
|
||||
<Border Grid.Row="2" Background="{DynamicResource RegionBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0" Margin="-12,8,-12,-12">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="20,0">
|
||||
<Button Content="保存胶料快检记录" Command="{Binding SaveCommand}" Style="{StaticResource ButtonPrimary}" Height="36" Width="160"
|
||||
<Button Content="{Binding SaveButtonText}" Command="{Binding SaveCommand}" Style="{StaticResource ButtonPrimary}" Height="36" MinWidth="160" Padding="12,0"
|
||||
IsEnabled="{Binding CanSave}"
|
||||
Visibility="{Binding ShowSaveButton, Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
</StackPanel>
|
||||
|
||||
@@ -118,6 +118,8 @@ public partial class RubberQuickTestOperationView : UserControl
|
||||
Width = 90,
|
||||
ElementStyle = centerTextStyle
|
||||
});
|
||||
|
||||
InspectResultGrid.IsReadOnly = vm.IsReadOnly;
|
||||
}
|
||||
|
||||
private void InspectResultGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
|
||||
@@ -82,12 +82,18 @@
|
||||
<DataGridTextColumn Header="检验日期" Binding="{Binding InspectDate, StringFormat='yyyy-MM-dd HH:mm'}" Width="130"/>
|
||||
<DataGridTextColumn Header="是否合格" Binding="{Binding InspectResultDisplay}" Width="80"/>
|
||||
<DataGridTextColumn Header="同步状态" Binding="{Binding SyncStatusDisplay}" Width="80"/>
|
||||
<DataGridTemplateColumn Header="操作" Width="150">
|
||||
<DataGridTemplateColumn Header="操作" Width="270">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Content="详情" Command="{Binding DataContext.ViewDetailCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}" Style="{StaticResource ButtonPrimary}" Height="26" Padding="8,0" Margin="0,0,6,0"/>
|
||||
<Button Content="编辑" Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}" Style="{StaticResource ButtonDefault}" Height="26" Padding="8,0" Margin="0,0,6,0"
|
||||
Visibility="{Binding CanEdit, Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
<Button Content="同步" Command="{Binding DataContext.SyncCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}" Style="{StaticResource ButtonSuccess}" Height="26" Padding="8,0" Margin="0,0,6,0"
|
||||
Visibility="{Binding CanSync, Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
<Button Content="删除" Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}" Style="{StaticResource ButtonDanger}" Height="26" Padding="8,0"
|
||||
Visibility="{Binding CanDelete, Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<TextBlock Text="重置" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<TextBlock Text="数据来自 MES,桌面端只读;断网时显示本地缓存"
|
||||
<TextBlock Text="数据来自 MES,每 2 秒自动同步(含标准明细);断网时显示本地缓存"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource SecondaryTextBrush}"
|
||||
FontSize="12"/>
|
||||
|
||||
Reference in New Issue
Block a user