优化样品管理
This commit is contained in:
@@ -175,7 +175,7 @@ namespace SamplePreSystem.UI.ViewModel.Child
|
||||
[RelayCommand]
|
||||
public void ImportClick()
|
||||
{
|
||||
List<tube_input> samples = new List<tube_input>();
|
||||
List<sample_input> samples = new List<sample_input>();
|
||||
foreach (var tube in SampleList)
|
||||
{
|
||||
|
||||
|
||||
@@ -170,10 +170,10 @@ namespace SamplePreSystem.UI.ViewModel.Monitor
|
||||
|
||||
|
||||
|
||||
private List<sample_exec_detail_ext> _sampleExecList = new List<sample_exec_detail_ext>();
|
||||
private List<sample_input> _sampleExecList = new List<sample_input>();
|
||||
|
||||
|
||||
public List<sample_exec_detail_ext> SampleExecList
|
||||
public List<sample_input> SampleExecList
|
||||
{
|
||||
get { return _sampleExecList; }
|
||||
set {
|
||||
@@ -204,7 +204,7 @@ namespace SamplePreSystem.UI.ViewModel.Monitor
|
||||
private void GetSampleData()
|
||||
{
|
||||
|
||||
List<sample_exec_detail_ext> samples = sampleSequenceBll.GetSampleExecDetails();
|
||||
List<sample_input> samples = sampleSequenceBll.GetSampleExecDetails();
|
||||
SampleExecList = samples;
|
||||
|
||||
//设置当前SOP——ID
|
||||
|
||||
@@ -51,9 +51,9 @@ namespace SamplePreSystem.UI.ViewModel.QueryManager
|
||||
}
|
||||
}
|
||||
|
||||
private List<tube_input> _sampleList = new List<tube_input>();
|
||||
private List<sample_input> _sampleList = new List<sample_input>();
|
||||
|
||||
public List<tube_input> SampleList
|
||||
public List<sample_input> SampleList
|
||||
{
|
||||
get { return _sampleList; }
|
||||
set {
|
||||
|
||||
@@ -12,6 +12,7 @@ using SamplePre.UIWpf.ParamManager.chirld;
|
||||
using SamplePre.UIWpf.SampleManager.chirld;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
@@ -39,11 +40,11 @@ namespace SamplePreSystem.UI.ViewModel.SampleManager
|
||||
}
|
||||
|
||||
|
||||
private tube_input _tubeInput = new tube_input();
|
||||
private sample_input _tubeInput = new sample_input();
|
||||
/// <summary>
|
||||
/// 样品录入实体
|
||||
/// </summary>
|
||||
public tube_input TubeInput
|
||||
public sample_input TubeInput
|
||||
{
|
||||
get { return _tubeInput; }
|
||||
set {
|
||||
@@ -168,9 +169,9 @@ namespace SamplePreSystem.UI.ViewModel.SampleManager
|
||||
return qrcode;
|
||||
}
|
||||
|
||||
private List<tube_input> _tubeInputs = new List<tube_input>();
|
||||
private List<sample_input> _tubeInputs = new List<sample_input>();
|
||||
|
||||
public List<tube_input> TubeInputs
|
||||
public List<sample_input> TubeInputs
|
||||
{
|
||||
get { return _tubeInputs; }
|
||||
set {
|
||||
@@ -214,14 +215,14 @@ namespace SamplePreSystem.UI.ViewModel.SampleManager
|
||||
/// </summary>
|
||||
public bool SaveSample()
|
||||
{
|
||||
List<tube_input> tempList = new List<tube_input>();
|
||||
List<sample_input> tempList = new List<sample_input>();
|
||||
|
||||
////二维码序号
|
||||
int sqno = int.Parse(TubeInput.qrcode.Substring(8));// int.Parse(txtSampleSeqno2.Text);
|
||||
string strDate = TubeInput.qrcode.Substring(0, 8);
|
||||
for (int i = 0; i < TubeInput.tube_count; i++)
|
||||
{
|
||||
tube_input qRcode = new tube_input();
|
||||
sample_input qRcode = new sample_input();
|
||||
qRcode.qrcode = strDate + sqno.ToString(); //TubeInput.qrcode;
|
||||
qRcode.item_name = TubeInput.item_name;
|
||||
//qRcode.seqno = txtSampleSeqno.Text + txtSampleSeqno2.Text;
|
||||
@@ -281,12 +282,12 @@ namespace SamplePreSystem.UI.ViewModel.SampleManager
|
||||
}
|
||||
|
||||
|
||||
private tube_input _selectSample;
|
||||
private sample_input _selectSample;
|
||||
|
||||
/// <summary>
|
||||
/// 选中的样品
|
||||
/// </summary>
|
||||
public tube_input SelectSample
|
||||
public sample_input SelectSample
|
||||
{
|
||||
get { return _selectSample; }
|
||||
set {
|
||||
@@ -301,7 +302,7 @@ namespace SamplePreSystem.UI.ViewModel.SampleManager
|
||||
public void DeleSelectSample()
|
||||
{
|
||||
|
||||
tube_input[] tube_Inputs = new tube_input[TubeInputs.Count];
|
||||
sample_input[] tube_Inputs = new sample_input[TubeInputs.Count];
|
||||
|
||||
TubeInputs.CopyTo(tube_Inputs);
|
||||
|
||||
@@ -323,9 +324,9 @@ namespace SamplePreSystem.UI.ViewModel.SampleManager
|
||||
}
|
||||
|
||||
|
||||
private List<sample_exec_ext> _cmdList = new List<sample_exec_ext>();
|
||||
private ObservableCollection<sample_exec_ext> _cmdList = new ObservableCollection<sample_exec_ext>();
|
||||
|
||||
public List<sample_exec_ext> CmdList
|
||||
public ObservableCollection<sample_exec_ext> CmdList
|
||||
{
|
||||
get { return _cmdList; }
|
||||
set {
|
||||
@@ -341,9 +342,9 @@ namespace SamplePreSystem.UI.ViewModel.SampleManager
|
||||
/// </summary>
|
||||
public void CreateCmdList()
|
||||
{
|
||||
List<sample_exec_ext> temp_CmdList = new List<sample_exec_ext>();
|
||||
//List<sample_exec_ext> temp_CmdList = new List<sample_exec_ext>();
|
||||
|
||||
//this.tubes = gridSamples.DataSource as List<tube_input>;
|
||||
CmdList.Clear();
|
||||
|
||||
var groups = TubeInputs.GroupBy(p => new { p.standrad_id, p.standrad });
|
||||
|
||||
@@ -365,10 +366,10 @@ namespace SamplePreSystem.UI.ViewModel.SampleManager
|
||||
|
||||
sampleCmdExec.sampleExecDetails = details;
|
||||
sampleCmdExec.exec_state = "未执行";
|
||||
temp_CmdList.Add(sampleCmdExec);
|
||||
CmdList.Add(sampleCmdExec);
|
||||
|
||||
}
|
||||
CmdList = temp_CmdList;
|
||||
//CmdList = temp_CmdList;
|
||||
//BadingSopData(cmds);
|
||||
}
|
||||
|
||||
@@ -482,8 +483,7 @@ namespace SamplePreSystem.UI.ViewModel.SampleManager
|
||||
{
|
||||
if (!CmdExec()) return;
|
||||
|
||||
//保存下发记录
|
||||
|
||||
//保存下发记录
|
||||
SelectItemCmd.exec_state = "执行中";
|
||||
SelectItemCmd.cmd_content = sopStr;
|
||||
SelectItemCmd.exec_date = DateTime.Now;
|
||||
@@ -528,11 +528,11 @@ namespace SamplePreSystem.UI.ViewModel.SampleManager
|
||||
|
||||
sopStr = string.Join("-", sop.ToArray());
|
||||
|
||||
//写入PLC
|
||||
bool val = communicationBll.WritePlcData(100, 0, sop.ToArray());
|
||||
////写入PLC
|
||||
//bool val = communicationBll.WritePlcData(100, 0, sop.ToArray());
|
||||
|
||||
//bool val = monitorBll.WritePlcData(1, 0, sop.ToArray());
|
||||
return val;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -38,10 +38,13 @@
|
||||
<RowDefinition Height="30" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Height="30"
|
||||
VerticalAlignment="Center">
|
||||
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
Padding="6"
|
||||
@@ -49,7 +52,74 @@
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Text="样品列表" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<Button
|
||||
Width="80"
|
||||
Height="25"
|
||||
Margin="5,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Content="启动"
|
||||
Style="{StaticResource IconTextButtonStyle}"
|
||||
Tag="Play"
|
||||
ToolTip="启动" />
|
||||
|
||||
|
||||
<Button
|
||||
Width="80"
|
||||
Height="25"
|
||||
Margin="5,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Content="暂停"
|
||||
Style="{StaticResource IconTextButtonStyle}"
|
||||
Tag="Pause"
|
||||
ToolTip="暂停" />
|
||||
|
||||
|
||||
<Button
|
||||
Width="80"
|
||||
Height="25"
|
||||
Margin="5,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Content="继续"
|
||||
Style="{StaticResource IconTextButtonStyle}"
|
||||
Tag="PlayPause"
|
||||
ToolTip="继续" />
|
||||
|
||||
|
||||
<Button
|
||||
Width="80"
|
||||
Height="25"
|
||||
Margin="5,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Content="停止"
|
||||
Style="{StaticResource IconTextButtonStyle}"
|
||||
Tag="Stop"
|
||||
ToolTip="停止" />
|
||||
<Button
|
||||
Width="80"
|
||||
Height="25"
|
||||
Margin="5,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Content="复位"
|
||||
FontSize="13"
|
||||
Style="{StaticResource IconTextButtonStyle}"
|
||||
Tag="Refresh"
|
||||
ToolTip="复位" />
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
<DataGrid
|
||||
x:Name="dg_sample"
|
||||
Grid.Row="1"
|
||||
@@ -286,14 +356,12 @@
|
||||
<!-- 功能单元 -->
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="31*" />
|
||||
<RowDefinition Height="44*" />
|
||||
<RowDefinition Height="15*" />
|
||||
<RowDefinition Height="3*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 功能岛信息 -->
|
||||
<Border
|
||||
Grid.RowSpan="2"
|
||||
Margin="0,5,5,5"
|
||||
Background="White"
|
||||
BorderThickness="1"
|
||||
@@ -347,6 +415,8 @@
|
||||
</Style>
|
||||
</Border.Style>
|
||||
|
||||
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
@@ -357,10 +427,13 @@
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 功能岛名称 -->
|
||||
<TextBlock
|
||||
Margin="5"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding unitName}" />
|
||||
|
||||
<!-- 详情链接 -->
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="5"
|
||||
@@ -372,11 +445,8 @@
|
||||
[详情]
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<!--<Image Grid.Row="1" Grid.Column="0"
|
||||
Source="{Binding imgPath}" Height="48" Width="48" Margin="5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>-->
|
||||
|
||||
<!-- 图标 -->
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
@@ -395,15 +465,13 @@
|
||||
Kind="{Binding packIconKind}" />
|
||||
</Border>
|
||||
|
||||
|
||||
|
||||
<UniformGrid
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Columns="1"
|
||||
Rows="2">
|
||||
Rows="3">
|
||||
|
||||
<StackPanel
|
||||
Margin="0,2"
|
||||
@@ -425,8 +493,41 @@
|
||||
CornerRadius="3" />
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding StateName}" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- 功能按钮 -->
|
||||
<!--
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Width="45" Margin="2,0"
|
||||
Height="24" Background="White" Foreground="OrangeRed"
|
||||
ToolTip="暂停">
|
||||
<materialDesign:PackIcon Kind="Pause" />
|
||||
</Button>
|
||||
<Button
|
||||
Width="45" Background="White" Foreground="DarkBlue"
|
||||
Height="24"
|
||||
ToolTip="继续">
|
||||
<materialDesign:PackIcon Kind="PlayPause" />
|
||||
</Button>
|
||||
<Button
|
||||
Width="45" Background="White" Foreground="Green"
|
||||
Height="24"
|
||||
ToolTip="复位">
|
||||
<materialDesign:PackIcon Kind="Refresh" />
|
||||
</Button>
|
||||
</StackPanel>-->
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
@@ -438,7 +539,7 @@
|
||||
|
||||
<!-- 故障信息 -->
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Grid.Row="1"
|
||||
Margin="0,0,5,5"
|
||||
Background="White"
|
||||
BorderThickness="1"
|
||||
|
||||
Reference in New Issue
Block a user