Merge branch 'master' of http://www.scserverddns.top:13000/sc/formula_manage
This commit is contained in:
commit
8aee8752ff
3 files changed
+44
-13
No files matched your search
+9
-4
@@ -61,7 +61,7 @@
|
||||
<TextBlock HorizontalAlignment="Left" Height="35" Margin="5,35,0,0" TextWrapping="Wrap" Text="领料单号:" VerticalAlignment="Top" Width="90" FontSize="20" Background="WhiteSmoke"/>
|
||||
<TextBlock HorizontalAlignment="Left" Height="35" Margin="5,70,0,0" TextWrapping="Wrap" Text="流转订单:" VerticalAlignment="Top" Width="90" FontSize="20"/>
|
||||
<TextBlock HorizontalAlignment="Left" Height="35" Margin="5,105,0,0" TextWrapping="Wrap" Text="执行工艺:" VerticalAlignment="Top" Width="90" FontSize="20"/>
|
||||
<TextBlock HorizontalAlignment="Left" Height="35" Margin="5,140,0,0" TextWrapping="Wrap" Text="机台:" VerticalAlignment="Top" Width="90" FontSize="20"/>
|
||||
<TextBlock HorizontalAlignment="Left" Height="35" Margin="5,140,0,0" TextWrapping="Wrap" Text="机台:" VerticalAlignment="Top" Width="80" FontSize="20"/>
|
||||
<TextBlock HorizontalAlignment="Left" Height="35" Margin="5,175,0,0" TextWrapping="Wrap" Text="类型:" VerticalAlignment="Top" Width="90" FontSize="20"/>
|
||||
<TextBlock HorizontalAlignment="Left" Height="35" Margin="230,140,0,0" TextWrapping="Wrap" Text="总步数:" VerticalAlignment="Top" Width="70" FontSize="20"/>
|
||||
<TextBlock HorizontalAlignment="Left" Height="35" Margin="230,175,0,0" TextWrapping="Wrap" Text="表单:" VerticalAlignment="Top" Width="70" FontSize="20"/>
|
||||
@@ -71,9 +71,14 @@
|
||||
<TextBox x:Name="Anew" HorizontalAlignment="Left" Height="30" Margin="300,35,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Width="30" FontSize="20"
|
||||
MaxLines="1" MaxLength="2" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" Focusable ="False"/>
|
||||
<TextBox HorizontalAlignment="Left" Height="30" Margin="95,105,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="200" FontSize="20" KeyUp="SearchBox_OnKeyDownd" IsTabStop="False"/>
|
||||
<ComboBox x:Name="Machine" DisplayMemberPath="Name" ItemsSource="{Binding mac_Machine, Source={StaticResource MainWindowViewModel}}" StaysOpenOnEdit="True"
|
||||
HorizontalAlignment="Left" Height="30" Margin="95,140,0,0" VerticalAlignment="Top" Width="120" FontSize="20" KeyUp="SearchBox_OnKeyDownd" IsEditable="True"/>
|
||||
<ComboBox x:Name="OrderType" Text="正常单" HorizontalAlignment="Left" Height="30" Margin="95,175,0,0" VerticalAlignment="Top" Width="120" FontSize="20" IsTabStop="True" KeyUp="SearchBox_OnKeyDownd" IsEditable="True">
|
||||
<ComboBox x:Name="Machine" DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding mac_Machine, Source={StaticResource MainWindowViewModel}}"
|
||||
HorizontalAlignment="Left" Height="30" Margin="95,140,0,0" VerticalAlignment="Top" Width="120" FontSize="20"
|
||||
KeyUp="Machine_OnKeyDownd" DropDownClosed="Machine_DropDownClosed" IsEditable="True"/>
|
||||
|
||||
<ComboBox x:Name="OrderType" Text="正常单"
|
||||
HorizontalAlignment="Left" Height="30" Margin="95,175,0,0" VerticalAlignment="Top" Width="120" FontSize="20"
|
||||
IsTabStop="True" KeyUp="SearchBox_OnKeyDownd" IsEditable="True" IsReadOnly="True">
|
||||
<ComboBoxItem Content="正常单"></ComboBoxItem>
|
||||
<ComboBoxItem Content="追加单"></ComboBoxItem>
|
||||
</ComboBox>
|
||||
|
||||
+28
-4
@@ -57,6 +57,7 @@ namespace formula_manage
|
||||
string TEXT_SQLPASWOR;
|
||||
string Connstr_SC;
|
||||
int ID_N = 1;
|
||||
string DYELOT_;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
@@ -104,7 +105,6 @@ namespace formula_manage
|
||||
row["ID"] = ID_N;
|
||||
row["STEP"] = Procedures_P.Text;
|
||||
row["UNIT"] = "g";
|
||||
//row["SHIFT"] = "g";
|
||||
RRODUCTdataTable.Rows.Add(row);
|
||||
|
||||
Grid_RRODUCT.ItemsSource = RRODUCTdataTable.DefaultView;
|
||||
@@ -225,6 +225,29 @@ namespace formula_manage
|
||||
}
|
||||
}
|
||||
|
||||
private void Machine_OnKeyDownd(object sender, System.Windows.Input.KeyEventArgs e) //机台回车跳转功能
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
if (Machine.Text == "")
|
||||
{
|
||||
System.Windows.MessageBox.Show("请确认机台");
|
||||
return;
|
||||
}
|
||||
|
||||
DataRow[] m = MainWindowViewModel.MACHINEdatatemp.Select("Name ='" + Machine.Text + "'"); //查询判断原料代码是否有效
|
||||
if (m.Any()) //检查原料信息
|
||||
{
|
||||
System.Windows.MessageBox.Show("机台不存在");
|
||||
Machine.Text = "";
|
||||
return;
|
||||
}
|
||||
|
||||
UserClass.PressKey.PressKeys(Keys.Tab, false);
|
||||
UserClass.PressKey.PressKeys(Keys.Tab, true);
|
||||
}
|
||||
}
|
||||
|
||||
string Prepose; //料单前置
|
||||
string PreposeT; //料单时间
|
||||
string PreposeS; //料单序列格式
|
||||
@@ -613,9 +636,7 @@ namespace formula_manage
|
||||
rowadd = RRODUCTdataTable.NewRow();
|
||||
ID_N++;
|
||||
rowadd["ID"] = ID_N;
|
||||
// row["STEP"] = "1";
|
||||
rowadd["UNIT"] = "g";
|
||||
// row["STEP"] = Procedures_P.Text;
|
||||
RRODUCTdataTable.Rows.Add(rowadd);
|
||||
}
|
||||
}
|
||||
@@ -795,6 +816,9 @@ namespace formula_manage
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void Machine_DropDownClosed(object sender, EventArgs e)//选择机台事件
|
||||
{
|
||||
DYELOT_ = Number.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,13 +38,14 @@ namespace formula_manage.ViewModel
|
||||
///
|
||||
public class MainWindowViewModel : ViewModelBase
|
||||
{
|
||||
DataTable DissolvedataTable = new DataTable(); //建立Dissolve缓存
|
||||
DataTable STUFFdataTable = new DataTable(); //建立STUFF缓存
|
||||
DataTable MACHINEdataTable = new DataTable(); //建立Machine缓存
|
||||
DataTable RRODUCTdataTable = new DataTable(); //建立RRODUCT缓存
|
||||
DataTable RecipedataTable = new DataTable(); //建立Recipe缓存
|
||||
DataTable DissolvedataTable = new DataTable(); //建立Dissolve
|
||||
DataTable STUFFdataTable = new DataTable(); //建立STUFF
|
||||
DataTable MACHINEdataTable = new DataTable(); //建立Machine
|
||||
DataTable RRODUCTdataTable = new DataTable(); //建立RRODUCT
|
||||
DataTable RecipedataTable = new DataTable(); //建立Recipe
|
||||
|
||||
public static DataTable STUFFdatatemp = new DataTable(); //建立STUFF缓存
|
||||
public static DataTable MACHINEdatatemp = new DataTable(); //建立Machine缓存
|
||||
|
||||
public string INIPath = Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "formula.ini"; //配置文件路径
|
||||
public string sys_Time; //显示系统时间
|
||||
@@ -113,6 +114,7 @@ namespace formula_manage.ViewModel
|
||||
flow_Workflow = ToObservableCollection<Workflow>(DissolvedataTable);
|
||||
|
||||
STUFFdatatemp = STUFFdataTable;
|
||||
MACHINEdatatemp = MACHINEdataTable;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user