|
@@ -47,6 +47,7 @@ namespace UAS_MES_NEW.Make
|
|
|
if (dt.Rows.Count == 0)
|
|
if (dt.Rows.Count == 0)
|
|
|
{
|
|
{
|
|
|
MessageBox.Show($"条码:{ReelNoVal.Text} 不是MES系统中库存条码");
|
|
MessageBox.Show($"条码:{ReelNoVal.Text} 不是MES系统中库存条码");
|
|
|
|
|
+ ReelNoVal.Text = "";
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -60,14 +61,52 @@ namespace UAS_MES_NEW.Make
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(ReelNoVal.Text))
|
|
if (!string.IsNullOrEmpty(ReelNoVal.Text))
|
|
|
{
|
|
{
|
|
|
|
|
+ UpdateMaterial("L", ReelNoVal.Text);
|
|
|
|
|
+
|
|
|
dt = (DataTable)dh.ExecuteSql($"select * from barcode where bar_code = '{ReelNoVal.Text}'", "select");
|
|
dt = (DataTable)dh.ExecuteSql($"select * from barcode where bar_code = '{ReelNoVal.Text}'", "select");
|
|
|
if (dt.Rows.Count == 0)
|
|
if (dt.Rows.Count == 0)
|
|
|
{
|
|
{
|
|
|
MessageBox.Show($"条码:{ReelNoVal.Text} 不是MES系统中库存条码");
|
|
MessageBox.Show($"条码:{ReelNoVal.Text} 不是MES系统中库存条码");
|
|
|
|
|
+ ReelNoVal.Text = "";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void ReelNoVal1_KeyDown(object sender, KeyEventArgs e)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (e.KeyCode != Keys.Enter) return;
|
|
|
|
|
+
|
|
|
|
|
+ ReelNoVal1.Text = ReelNoVal1.Text.Trim();
|
|
|
|
|
|
|
|
- UpdateMaterial("L", ReelNoVal.Text);
|
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(ReelNoVal1.Text))
|
|
|
|
|
+ {
|
|
|
|
|
+ UpdateMaterial("L", ReelNoVal1.Text);
|
|
|
|
|
+
|
|
|
|
|
+ dt = (DataTable)dh.ExecuteSql($"select * from barcode where bar_code = '{ReelNoVal1.Text}'", "select");
|
|
|
|
|
+ if (dt.Rows.Count == 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ MessageBox.Show($"条码:{ReelNoVal1.Text} 不是MES系统中库存条码");
|
|
|
|
|
+ ReelNoVal1.Text = "";
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void ReelNoVal1_Leave(object sender, EventArgs e)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!string.IsNullOrEmpty(ReelNoVal1.Text))
|
|
|
|
|
+ {
|
|
|
|
|
+ UpdateMaterial("L", ReelNoVal1.Text);
|
|
|
|
|
+
|
|
|
|
|
+ dt = (DataTable)dh.ExecuteSql($"select * from barcode where bar_code = '{ReelNoVal1.Text}'", "select");
|
|
|
|
|
+ if (dt.Rows.Count == 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ MessageBox.Show($"条码:{ReelNoVal1.Text} 不是MES系统中库存条码");
|
|
|
|
|
+ ReelNoVal1.Text = "";
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void LoadBaking()
|
|
private void LoadBaking()
|
|
@@ -103,49 +142,6 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void Choose_Click(object sender, EventArgs e)
|
|
|
|
|
- {
|
|
|
|
|
- if (string.IsNullOrEmpty(EmployeeVal.Text))
|
|
|
|
|
- {
|
|
|
|
|
- MessageBox.Show("请输入烘烤操作员姓名");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (string.IsNullOrEmpty(BackingVal.Text))
|
|
|
|
|
- {
|
|
|
|
|
- MessageBox.Show("请扫描烘烤箱号");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (string.IsNullOrEmpty(EstimateVal.Text))
|
|
|
|
|
- {
|
|
|
|
|
- MessageBox.Show("请填写扫描时长");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (string.IsNullOrEmpty(ReelNoVal.Text))
|
|
|
|
|
- {
|
|
|
|
|
- MessageBox.Show("请扫描入烘烤物料条码");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- dt = (DataTable)dh.ExecuteSql($@"SELECT * FROM baking_log WHERE status = '烘烤中' AND reel_no = '{ReelNoVal.Text}'", "select");
|
|
|
|
|
- if (dt.Rows.Count > 0)
|
|
|
|
|
- {
|
|
|
|
|
- MessageBox.Show($"条码号:{ReelNoVal.Text} 已在烘烤箱中");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- dh.ExecuteSql($@"INSERT INTO baking_log (baking_id,box_no,reel_no,status,in_date,in_name,estimate_time)
|
|
|
|
|
- SELECT baking_log_seq.NEXTVAL,'{BackingVal.Text}', '{ReelNoVal.Text}', '烘烤中',sysdate,'{EmployeeVal.Text.Trim()}','{EstimateVal.Text}' FROM dual", "insert");
|
|
|
|
|
-
|
|
|
|
|
- EmployeeVal.Text = "";
|
|
|
|
|
- BackingVal.Text = "";
|
|
|
|
|
- EstimateVal.Text = "";
|
|
|
|
|
- ReelNoVal.Text = "";
|
|
|
|
|
- UpdateMaterial("C");
|
|
|
|
|
- LoadBaking();
|
|
|
|
|
- MessageBox.Show($"条码号:{ReelNoVal.Text} 入烘烤箱成功");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
private void BackingVal_KeyDown(object sender, KeyEventArgs e)
|
|
private void BackingVal_KeyDown(object sender, KeyEventArgs e)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
@@ -173,7 +169,7 @@ namespace UAS_MES_NEW.Make
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(EmployeeVal.Text)) return;
|
|
if (string.IsNullOrEmpty(EmployeeVal.Text)) return;
|
|
|
|
|
|
|
|
- dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal.Text.Trim()}'", "select");
|
|
|
|
|
|
|
+ /*dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal.Text.Trim()}'", "select");
|
|
|
if (dt.Rows.Count == 0)
|
|
if (dt.Rows.Count == 0)
|
|
|
{
|
|
{
|
|
|
MessageBox.Show("请输入正确人员姓名");
|
|
MessageBox.Show("请输入正确人员姓名");
|
|
@@ -181,14 +177,14 @@ namespace UAS_MES_NEW.Make
|
|
|
EmployeeVal.Focus();
|
|
EmployeeVal.Focus();
|
|
|
EmployeeVal.SelectAll();
|
|
EmployeeVal.SelectAll();
|
|
|
return;
|
|
return;
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void EmployeeVal_Leave(object sender, EventArgs e)
|
|
private void EmployeeVal_Leave(object sender, EventArgs e)
|
|
|
{
|
|
{
|
|
|
if (string.IsNullOrEmpty(EmployeeVal.Text)) return;
|
|
if (string.IsNullOrEmpty(EmployeeVal.Text)) return;
|
|
|
|
|
|
|
|
- dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal.Text.Trim()}'", "select");
|
|
|
|
|
|
|
+ /*dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal.Text.Trim()}'", "select");
|
|
|
if (dt.Rows.Count == 0)
|
|
if (dt.Rows.Count == 0)
|
|
|
{
|
|
{
|
|
|
MessageBox.Show("请输入正确人员姓名");
|
|
MessageBox.Show("请输入正确人员姓名");
|
|
@@ -196,7 +192,7 @@ namespace UAS_MES_NEW.Make
|
|
|
EmployeeVal.Focus();
|
|
EmployeeVal.Focus();
|
|
|
EmployeeVal.SelectAll();
|
|
EmployeeVal.SelectAll();
|
|
|
return;
|
|
return;
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void EmployeeVal1_KeyDown(object sender, KeyEventArgs e)
|
|
private void EmployeeVal1_KeyDown(object sender, KeyEventArgs e)
|
|
@@ -205,7 +201,7 @@ namespace UAS_MES_NEW.Make
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(EmployeeVal1.Text)) return;
|
|
if (string.IsNullOrEmpty(EmployeeVal1.Text)) return;
|
|
|
|
|
|
|
|
- dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal1.Text.Trim()}'", "select");
|
|
|
|
|
|
|
+ /*dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal1.Text.Trim()}'", "select");
|
|
|
if (dt.Rows.Count == 0)
|
|
if (dt.Rows.Count == 0)
|
|
|
{
|
|
{
|
|
|
MessageBox.Show("请输入正确人员姓名");
|
|
MessageBox.Show("请输入正确人员姓名");
|
|
@@ -213,14 +209,14 @@ namespace UAS_MES_NEW.Make
|
|
|
EmployeeVal1.Focus();
|
|
EmployeeVal1.Focus();
|
|
|
EmployeeVal1.SelectAll();
|
|
EmployeeVal1.SelectAll();
|
|
|
return;
|
|
return;
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void EmployeeVal1_Leave(object sender, EventArgs e)
|
|
private void EmployeeVal1_Leave(object sender, EventArgs e)
|
|
|
{
|
|
{
|
|
|
if (string.IsNullOrEmpty(EmployeeVal1.Text)) return;
|
|
if (string.IsNullOrEmpty(EmployeeVal1.Text)) return;
|
|
|
|
|
|
|
|
- dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal1.Text.Trim()}'", "select");
|
|
|
|
|
|
|
+ /*dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal1.Text.Trim()}'", "select");
|
|
|
if (dt.Rows.Count == 0)
|
|
if (dt.Rows.Count == 0)
|
|
|
{
|
|
{
|
|
|
MessageBox.Show("请输入正确人员姓名");
|
|
MessageBox.Show("请输入正确人员姓名");
|
|
@@ -228,7 +224,50 @@ namespace UAS_MES_NEW.Make
|
|
|
EmployeeVal1.Focus();
|
|
EmployeeVal1.Focus();
|
|
|
EmployeeVal1.SelectAll();
|
|
EmployeeVal1.SelectAll();
|
|
|
return;
|
|
return;
|
|
|
|
|
+ }*/
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void Choose_Click(object sender, EventArgs e)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (string.IsNullOrEmpty(EmployeeVal.Text))
|
|
|
|
|
+ {
|
|
|
|
|
+ MessageBox.Show("请输入烘烤操作员姓名");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (string.IsNullOrEmpty(BackingVal.Text))
|
|
|
|
|
+ {
|
|
|
|
|
+ MessageBox.Show("请扫描烘烤箱号");
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (string.IsNullOrEmpty(EstimateVal.Text))
|
|
|
|
|
+ {
|
|
|
|
|
+ MessageBox.Show("请填写扫描时长");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (string.IsNullOrEmpty(ReelNoVal.Text))
|
|
|
|
|
+ {
|
|
|
|
|
+ MessageBox.Show("请扫描入烘烤物料条码");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ dt = (DataTable)dh.ExecuteSql($@"SELECT * FROM baking_log WHERE status = '烘烤中' AND reel_no = '{ReelNoVal.Text}'", "select");
|
|
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ MessageBox.Show($"条码号:{ReelNoVal.Text} 已在烘烤箱中");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ dh.ExecuteSql($@"INSERT INTO baking_log (baking_id,box_no,reel_no,status,in_date,in_name,estimate_time)
|
|
|
|
|
+ SELECT baking_log_seq.NEXTVAL,'{BackingVal.Text}', '{ReelNoVal.Text}', '烘烤中',sysdate,'{EmployeeVal.Text.Trim()}','{EstimateVal.Text}' FROM dual", "insert");
|
|
|
|
|
+
|
|
|
|
|
+ EmployeeVal.Text = "";
|
|
|
|
|
+ BackingVal.Text = "";
|
|
|
|
|
+ EstimateVal.Text = "";
|
|
|
|
|
+ ReelNoVal.Text = "";
|
|
|
|
|
+ UpdateMaterial("C");
|
|
|
|
|
+ LoadBaking();
|
|
|
|
|
+ MessageBox.Show($"条码号:{ReelNoVal.Text} 入烘烤箱成功");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void Choose1_Click(object sender, EventArgs e)
|
|
private void Choose1_Click(object sender, EventArgs e)
|
|
@@ -261,38 +300,5 @@ namespace UAS_MES_NEW.Make
|
|
|
MessageBox.Show($"条码号:{ReelNoVal1.Text} 出烘烤箱成功");
|
|
MessageBox.Show($"条码号:{ReelNoVal1.Text} 出烘烤箱成功");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void ReelNoVal1_KeyDown(object sender, KeyEventArgs e)
|
|
|
|
|
- {
|
|
|
|
|
- if (e.KeyCode != Keys.Enter) return;
|
|
|
|
|
-
|
|
|
|
|
- ReelNoVal1.Text = ReelNoVal1.Text.Trim();
|
|
|
|
|
-
|
|
|
|
|
- if (!string.IsNullOrEmpty(ReelNoVal1.Text))
|
|
|
|
|
- {
|
|
|
|
|
- dt = (DataTable)dh.ExecuteSql($"select * from barcode where bar_code = '{ReelNoVal1.Text}'", "select");
|
|
|
|
|
- if (dt.Rows.Count == 0)
|
|
|
|
|
- {
|
|
|
|
|
- MessageBox.Show($"条码:{ReelNoVal1.Text} 不是MES系统中库存条码");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- UpdateMaterial("L", ReelNoVal1.Text);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- private void ReelNoVal1_Leave(object sender, EventArgs e)
|
|
|
|
|
- {
|
|
|
|
|
- if (!string.IsNullOrEmpty(ReelNoVal1.Text))
|
|
|
|
|
- {
|
|
|
|
|
- UpdateMaterial("L", ReelNoVal1.Text);
|
|
|
|
|
-
|
|
|
|
|
- dt = (DataTable)dh.ExecuteSql($"select * from barcode where bar_code = '{ReelNoVal1.Text}'", "select");
|
|
|
|
|
- if (dt.Rows.Count == 0)
|
|
|
|
|
- {
|
|
|
|
|
- MessageBox.Show($"条码:{ReelNoVal1.Text} 不是MES系统中库存条码");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|