浏览代码

修改称量界面

章政 8 年之前
父节点
当前提交
d43001f92d

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.Designer.cs

@@ -634,12 +634,12 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.卡通箱称重_FormClosing);
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.卡通箱称重_FormClosing);
             this.Load += new System.EventHandler(this.卡通箱称重_Load);
             this.Load += new System.EventHandler(this.卡通箱称重_Load);
             this.SizeChanged += new System.EventHandler(this.卡通箱称重_SizeChanged);
             this.SizeChanged += new System.EventHandler(this.卡通箱称重_SizeChanged);
-            this.panel6.ResumeLayout(false);
+            this.panel6.ResumeLayout(true);
             this.panel6.PerformLayout();
             this.panel6.PerformLayout();
-            this.panel4.ResumeLayout(false);
+            this.panel4.ResumeLayout(true);
             this.panel4.PerformLayout();
             this.panel4.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dataGridViewWithSerialNum1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dataGridViewWithSerialNum1)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
             this.PerformLayout();
 
 
         }
         }

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs

@@ -230,9 +230,9 @@ namespace UAS_MES.Make
             catch (Exception mes)
             catch (Exception mes)
             {
             {
                 if (BaudRate.Text == "" || ComList.Text == "")
                 if (BaudRate.Text == "" || ComList.Text == "")
-                    MessageBox.Show("请先在电子秤调试界面维护波特率和串口");
+                    OperateResult.AppendText(">>请先在电子秤调试界面维护波特率和串口\n", Color.Red);
                 else
                 else
-                    MessageBox.Show(mes.Message);
+                    OperateResult.AppendText(">>" + mes.Message + "\n", Color.Red);
             }
             }
         }
         }
 
 

+ 6 - 6
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs

@@ -630,17 +630,17 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.彩盒称重_FormClosing);
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.彩盒称重_FormClosing);
             this.Load += new System.EventHandler(this.彩盒上料打印_Load);
             this.Load += new System.EventHandler(this.彩盒上料打印_Load);
             this.SizeChanged += new System.EventHandler(this.彩盒称重_SizeChanged);
             this.SizeChanged += new System.EventHandler(this.彩盒称重_SizeChanged);
-            this.panel6.ResumeLayout(false);
+            this.panel6.ResumeLayout(true);
             this.panel6.PerformLayout();
             this.panel6.PerformLayout();
-            this.panel4.ResumeLayout(false);
+            this.panel4.ResumeLayout(true);
             this.panel4.PerformLayout();
             this.panel4.PerformLayout();
-            this.panel3.ResumeLayout(false);
+            this.panel3.ResumeLayout(true);
             this.panel3.PerformLayout();
             this.panel3.PerformLayout();
-            this.panel2.ResumeLayout(false);
+            this.panel2.ResumeLayout(true);
             this.panel2.PerformLayout();
             this.panel2.PerformLayout();
-            this.panel1.ResumeLayout(false);
+            this.panel1.ResumeLayout(true);
             this.panel1.PerformLayout();
             this.panel1.PerformLayout();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
             this.PerformLayout();
 
 
         }
         }

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -197,9 +197,9 @@ namespace UAS_MES.Make
             catch (Exception mes)
             catch (Exception mes)
             {
             {
                 if (BaudRate.Text == "" || ComList.Text == "")
                 if (BaudRate.Text == "" || ComList.Text == "")
-                    MessageBox.Show("请先在电子秤调试界面维护波特率和串口");
+                    OperateResult.AppendText(">>请先在电子秤调试界面维护波特率和串口\n", Color.Red);
                 else
                 else
-                    MessageBox.Show(mes.Message);
+                    OperateResult.AppendText(">>"+ mes.Message + "\n", Color.Red);
             }
             }
         }
         }
 
 

+ 19 - 19
UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs

@@ -58,7 +58,7 @@
             this.pa_packageqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pa_packageqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ma_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ma_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pa_totalqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pa_totalqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.ma_prodname = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.pr_detail = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pa_restqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pa_restqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.barcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.barcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.PackageDetail = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
             this.PackageDetail = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
@@ -253,7 +253,7 @@
             // 
             // 
             this.pr_id.AutoSize = true;
             this.pr_id.AutoSize = true;
             this.pr_id.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_id.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_id.Location = new System.Drawing.Point(964, 71);
+            this.pr_id.Location = new System.Drawing.Point(964, 80);
             this.pr_id.Name = "pr_id";
             this.pr_id.Name = "pr_id";
             this.pr_id.Size = new System.Drawing.Size(47, 21);
             this.pr_id.Size = new System.Drawing.Size(47, 21);
             this.pr_id.TabIndex = 161;
             this.pr_id.TabIndex = 161;
@@ -420,21 +420,21 @@
             this.pa_totalqty.TabIndex = 141;
             this.pa_totalqty.TabIndex = 141;
             this.pa_totalqty.Tag = "NoAuto";
             this.pa_totalqty.Tag = "NoAuto";
             // 
             // 
-            // ma_prodname
-            // 
-            this.ma_prodname.AllPower = null;
-            this.ma_prodname.BackColor = System.Drawing.Color.White;
-            this.ma_prodname.Enabled = false;
-            this.ma_prodname.ID = null;
-            this.ma_prodname.Location = new System.Drawing.Point(108, 102);
-            this.ma_prodname.Name = "ma_prodname";
-            this.ma_prodname.Power = null;
-            this.ma_prodname.Size = new System.Drawing.Size(150, 21);
-            this.ma_prodname.Str = null;
-            this.ma_prodname.Str1 = null;
-            this.ma_prodname.Str2 = null;
-            this.ma_prodname.TabIndex = 139;
-            this.ma_prodname.Tag = "ma_prodname";
+            // pr_detail
+            // 
+            this.pr_detail.AllPower = null;
+            this.pr_detail.BackColor = System.Drawing.Color.White;
+            this.pr_detail.Enabled = false;
+            this.pr_detail.ID = null;
+            this.pr_detail.Location = new System.Drawing.Point(108, 102);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Power = null;
+            this.pr_detail.Size = new System.Drawing.Size(150, 21);
+            this.pr_detail.Str = null;
+            this.pr_detail.Str1 = null;
+            this.pr_detail.Str2 = null;
+            this.pr_detail.TabIndex = 139;
+            this.pr_detail.Tag = "ma_prodname";
             // 
             // 
             // pa_restqty
             // pa_restqty
             // 
             // 
@@ -549,7 +549,7 @@
             this.Controls.Add(this.pa_packageqty);
             this.Controls.Add(this.pa_packageqty);
             this.Controls.Add(this.ma_prodcode);
             this.Controls.Add(this.ma_prodcode);
             this.Controls.Add(this.pa_totalqty);
             this.Controls.Add(this.pa_totalqty);
-            this.Controls.Add(this.ma_prodname);
+            this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.pa_restqty);
             this.Controls.Add(this.pa_restqty);
             this.Controls.Add(this.barcode);
             this.Controls.Add(this.barcode);
             this.Controls.Add(this.PackageDetail);
             this.Controls.Add(this.PackageDetail);
@@ -602,7 +602,7 @@
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum PackageDetail;
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum PackageDetail;
         private CustomControl.TextBoxWithIcon.EnterTextBox barcode;
         private CustomControl.TextBoxWithIcon.EnterTextBox barcode;
         private CustomControl.TextBoxWithIcon.EnterTextBox pa_restqty;
         private CustomControl.TextBoxWithIcon.EnterTextBox pa_restqty;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ma_prodname;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pr_detail;
         private CustomControl.TextBoxWithIcon.EnterTextBox pa_totalqty;
         private CustomControl.TextBoxWithIcon.EnterTextBox pa_totalqty;
         private CustomControl.TextBoxWithIcon.EnterTextBox ma_prodcode;
         private CustomControl.TextBoxWithIcon.EnterTextBox ma_prodcode;
         private CustomControl.TextBoxWithIcon.EnterTextBox pa_packageqty;
         private CustomControl.TextBoxWithIcon.EnterTextBox pa_packageqty;

+ 11 - 23
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -42,7 +42,7 @@ namespace UAS_MES.Make
             ma_code.FormName = Name;
             ma_code.FormName = Name;
             ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_prodname", "pr_id" };
             ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_prodname", "pr_id" };
             ma_code.TableName = "Make left join product on  ma_prodcode=pr_code";
             ma_code.TableName = "Make left join product on  ma_prodcode=pr_code";
-            ma_code.SelectField = "pr_id # 物料ID,ma_code # 工单号,ma_prodcode # 物料编号,ma_qty # 数量,ma_prodname # 物料名册,ma_wccode # 工作中心编号";
+            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 物料编号,ma_qty # 数量,ma_prodname # 物料名册,ma_wccode # 工作中心编号";
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
             ma_code.DbChange += Ma_code_DbChange;
             PrintNum.Value = 1;
             PrintNum.Value = 1;
@@ -73,8 +73,8 @@ namespace UAS_MES.Make
             BaseUtil.FillDgvWithDataTable(PackageDetail, dt);
             BaseUtil.FillDgvWithDataTable(PackageDetail, dt);
             //加载表单数据
             //加载表单数据
             sql.Clear();
             sql.Clear();
-            sql.Append("select pa_id,pa_totalqty,pa_packageqty,pa_totalqty-pa_packageqty pa_restqty,pr_detail,pr_colorboxmaxw,pr_colorboxminw,pr_code,pa_makecode as ma_code ");
-            sql.Append("from package left join packagedetail on pd_paid=pa_id left join product on pa_prodcode=pr_code  where pa_outboxcode='" + pa_code.Text + "' and rownum=1");
+            sql.Append("select pr_id,pa_id,pa_totalqty,pa_packageqty,pa_totalqty-pa_packageqty pa_restqty,ma_prodcode,pr_detail,pr_colorboxmaxw,pr_colorboxminw,pr_code,pa_makecode as ma_code ");
+            sql.Append("from package left join packagedetail on pd_paid=pa_id left join product left join make on ma_prodcode=pr_code on pa_prodcode=pr_code where pa_outboxcode='" + pa_code.Text + "' and rownum=1");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             BaseUtil.SetFormValue(this.Controls, dt);
             BaseUtil.SetFormValue(this.Controls, dt);
         }
         }
@@ -84,7 +84,7 @@ namespace UAS_MES.Make
             //插入工序表MakeSerial,如果是第一道工序的话
             //插入工序表MakeSerial,如果是第一道工序的话
             //插入PackageDetail从表信息
             //插入PackageDetail从表信息
             sql.Clear();
             sql.Clear();
-            sql.Append("insert into packagedetail (pd_id,pd_paid,pd_outboxcode,pd_innerqty,pd_barcode) ");
+            sql.Append("insert into packagedetail(pd_id,pd_paid,pd_outboxcode,pd_innerqty,pd_barcode) ");
             sql.Append("select packagedetail_seq.nextval,pa_id,pa_outboxcode,pa_totalqty,'" + barcode.Text + "' from package where pa_outboxcode='" + pa_code.Text + "'");
             sql.Append("select packagedetail_seq.nextval,pa_id,pa_outboxcode,pa_totalqty,'" + barcode.Text + "' from package where pa_outboxcode='" + pa_code.Text + "'");
             dh.ExecuteSql(sql.GetString(), "insert");
             dh.ExecuteSql(sql.GetString(), "insert");
             dh.UpdateByCondition("Package", "pa_packageqty=pa_packageqty+1", "pa_outboxcode='" + pa_code.Text + "'");
             dh.UpdateByCondition("Package", "pa_packageqty=pa_packageqty+1", "pa_outboxcode='" + pa_code.Text + "'");
@@ -108,7 +108,7 @@ namespace UAS_MES.Make
                     }
                     }
                     catch
                     catch
                     {
                     {
-                        BaseUtil.ShowError("打印程序异常,请检查是否连接打印机或者打印软件是否安装");
+                        OperateResult.AppendText(">>打印程序异常,请检查是否连接打印机或者打印软件是否安装\n", Color.Red);
                     }
                     }
                 }
                 }
             }
             }
@@ -149,7 +149,8 @@ namespace UAS_MES.Make
                     //判断箱内总数必须大于0
                     //判断箱内总数必须大于0
                     if (pa_totalqty.Text == "" || pa_totalqty.Text == "0")
                     if (pa_totalqty.Text == "" || pa_totalqty.Text == "0")
                     {
                     {
-                        BaseUtil.ShowError("箱内数量必须大于0");
+                        OperateResult.AppendText(">>箱内数量必须大于0\n", Color.Red);
+                        return;
                     }
                     }
                     //如果未勾选了取消录入
                     //如果未勾选了取消录入
                     if (!Cancel.Checked)
                     if (!Cancel.Checked)
@@ -188,19 +189,12 @@ namespace UAS_MES.Make
                                         {
                                         {
                                             InsertDetail();
                                             InsertDetail();
                                         }
                                         }
-                                        else
-                                        {
-                                            OperateResult.AppendText("序列号" + barcode.Text + "无效!\n", Color.Red);
-                                        }
-                                    }
-                                    else
-                                    {
-                                        OperateResult.AppendText(">>" + ErrorMessage + "!\n", Color.Red);
+                                        else OperateResult.AppendText("序列号" + barcode.Text + "无效!\n", Color.Red);
                                     }
                                     }
+                                    else OperateResult.AppendText(">>" + ErrorMessage + "!\n", Color.Red);
                                 }
                                 }
                                 else
                                 else
                                 {
                                 {
-                                    //验证序列号,插入明细表的数据
                                     InsertDetail();
                                     InsertDetail();
                                 }
                                 }
                             }
                             }
@@ -220,16 +214,10 @@ namespace UAS_MES.Make
                             OperateResult.AppendText(">>已从该箱中移除该序列号\n", Color.Green);
                             OperateResult.AppendText(">>已从该箱中移除该序列号\n", Color.Green);
                             LoadData();
                             LoadData();
                         }
                         }
-                        else
-                        {
-                            OperateResult.AppendText(">>序列号" + barcode.Text + "不在该箱内,请输入正确的序列号\n", Color.Red);
-                        }
+                        else OperateResult.AppendText(">>序列号" + barcode.Text + "不在该箱内,请输入正确的序列号\n", Color.Red);
                     }
                     }
                 }
                 }
-                else
-                {
-                    OperateResult.AppendText(">>请先输入箱号和工单号\n", Color.Red);
-                }
+                else OperateResult.AppendText(">>请先输入箱号和工单号\n", Color.Red);
             }
             }
         }
         }
 
 

+ 0 - 15
UAS-MES/FunctionCode/Make/Make_PackageCollection.resx

@@ -395,19 +395,4 @@
   <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
     <value>True</value>
   </metadata>
   </metadata>
-  <metadata name="pd_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>
 </root>