Explorar o código

Merge repos.ubtob.net:usoft/mes-client

callm hai 1 mes
pai
achega
5706ae7b8b

+ 26 - 0
UAS_MES_YTDZ/CustomControl/RichText/RichTextAutoBottom.cs

@@ -61,6 +61,19 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 thread.Start();
                 thread = new Thread(PlaySound);
             }
+            else if (color == Color.LightGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\3853.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.DarkRed && Entity.SystemInf.CheckAudioEnable)
+            {
+                FileName = Application.StartupPath + @"\Resources\Sound\1454.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
             LogManager.DoLog(FindForm().Tag + str);
         }
 
@@ -103,6 +116,19 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 thread.Start();
                 thread = new Thread(PlaySound);
             }
+            else if (color == Color.LightGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\3853.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.DarkRed && Entity.SystemInf.CheckAudioEnable)
+            {
+                FileName = Application.StartupPath + @"\Resources\Sound\1454.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
             LogManager.DoLog(FindForm().Tag + str);
         }
 

+ 45 - 45
UAS_MES_YTDZ/FunctionCode/Make/Make_TestCollection.cs

@@ -149,7 +149,7 @@ namespace UAS_MES_NEW.Make
         {
             if (ms_sncode.Text == "")
             {
-                OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
+                OperateResult.AppendText(">>序列号不能为空\n", Color.DarkRed);
                 ms_sncode.Focus();
                 return;
             }
@@ -166,7 +166,7 @@ namespace UAS_MES_NEW.Make
                         if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
                         {
                             AddToReject = true;
-                            OperateResult.AppendText(">>已存在" + ChoosedRejectList.Items[j].SubItems[2].Text + "不良\n", Color.Red);
+                            OperateResult.AppendText(">>已存在" + ChoosedRejectList.Items[j].SubItems[2].Text + "不良\n", Color.DarkRed);
                             break;
                         }
                     }
@@ -182,7 +182,7 @@ namespace UAS_MES_NEW.Make
             }
             if (CheckedNum == 0)
             {
-                OperateResult.AppendText(">>请勾选不良代码\n", Color.Red);
+                OperateResult.AppendText(">>请勾选不良代码\n", Color.DarkRed);
             }
         }
 
@@ -203,7 +203,7 @@ namespace UAS_MES_NEW.Make
                     bool NoteAlready = LogicHandler.CheckDiffMakeCodeBeforeStepCheck(ms_sncode.Text, ma_code.Text, NoteForChange.Checked, out oMakeCode, out ErrorMessage);
                     if (!NoteAlready)
                     {
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
                         return;
                     }
                     if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
@@ -211,7 +211,7 @@ namespace UAS_MES_NEW.Make
                         //是否提示过工单切换框,检测前后执行
                         if (!LogicHandler.CheckDiffMakeCodeAfterStepCheck(ms_sncode.Text, oMakeCode, NoteForChange.Checked, NoteAlready, ma_code, out ErrorMessage))
                         {
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
                             return;
                         }
                         if (ma_code.Text != oMakeCode && oMakeCode != null)
@@ -232,7 +232,7 @@ namespace UAS_MES_NEW.Make
                         string sncode = dt.Rows[0]["ms_sncode"].ToString();
                         if (sncode != ms_sncode.Text)
                         {
-                            OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.Red, ms_sncode);
+                            OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.DarkRed, ms_sncode);
                             return;
                         }
                         ifrework = dt.Rows[0]["ms_ifrework"].ToString();
@@ -257,9 +257,9 @@ namespace UAS_MES_NEW.Make
                         }
                         SetCollectResult();
                     }
-                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
                 }
-                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
             }
         }
 
@@ -353,14 +353,14 @@ namespace UAS_MES_NEW.Make
             {
                 LoadBadCodeListView();
                 LoadChoosedBadListView();
-                //OperateResult.AppendText(">>请采集不良代码\n", Color.Green);
+                //OperateResult.AppendText(">>请采集不良代码\n", Color.LightGreen);
                 //bc_code.Focus();
                 ////勾选了自动产生代码
                 //if (AutoBadCode.Checked)
                 //    Save_Click(new object(), new EventArgs());
                 if (ms_sncode.Text == "")
                 {
-                    OperateResult.AppendText(">>序列号不允许为空\n", Color.Red);
+                    OperateResult.AppendText(">>序列号不允许为空\n", Color.DarkRed);
                     return;
                 }
                 if (GoodProduct.Checked)
@@ -375,7 +375,7 @@ namespace UAS_MES_NEW.Make
                         {
                             if (ma_code.Text == "")
                             {
-                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
                                 return;
                             }
                         }
@@ -390,13 +390,13 @@ namespace UAS_MES_NEW.Make
                         }
                         else
                         {
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
                             return;
                         }
                     }
                     else
                     {
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
                         return;
                     }
                     int RejectCount = ChoosedRejectList.Items.Count;
@@ -418,7 +418,7 @@ namespace UAS_MES_NEW.Make
                     {
                         if (ChoosedRejectList.Items.Count == 0)
                         {
-                            OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
+                            OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.DarkRed);
                             return;
                         }
                         else
@@ -490,10 +490,10 @@ namespace UAS_MES_NEW.Make
                         //        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "快速维修成功", "快速维修", "", ob_checkno.Text);
                         //        OperateResult.AppendText(">>本次采集不良代码" + badname + "存在于本工序" + User.CurrentStepCode + "中,请解除故障后重新测试本站\n", Color.Black);
                         //    }
-                        //    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                        //    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.LightGreen);
                         //}
                         //else
-                        OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                        OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.LightGreen);
                         LastSncode = ms_sncode.Text;
                         //采集完不良,聚焦序列号
                         ms_sncode.Focus();
@@ -506,7 +506,7 @@ namespace UAS_MES_NEW.Make
                         WaitList.Clear();
                         ChoosedList.Clear();
                     }
-                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed);
                 }
 
 
@@ -525,7 +525,7 @@ namespace UAS_MES_NEW.Make
                     //存在不良记录
                     if (ErrorMessage != "")
                     {
-                        OperateResult.AppendText(">>序列号:" + ms_sncode.Text + " 已经判为不良品,不允许修改!\n", Color.Red);
+                        OperateResult.AppendText(">>序列号:" + ms_sncode.Text + " 已经判为不良品,不允许修改!\n", Color.DarkRed);
                         return;
                     }
                     else
@@ -542,7 +542,7 @@ namespace UAS_MES_NEW.Make
                             }
                             else
                             {
-                                OperateResult.AppendText(">>" + ms_sncode.Text + "良品采集成功\n", Color.Green, ms_sncode);
+                                OperateResult.AppendText(">>" + ms_sncode.Text + "良品采集成功\n", Color.LightGreen, ms_sncode);
                                 getcheck++;
                             }
                             //记录操作日志
@@ -557,7 +557,7 @@ namespace UAS_MES_NEW.Make
                             }
 
                         }
-                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
                     }
                 }
                 else
@@ -570,15 +570,15 @@ namespace UAS_MES_NEW.Make
                             if (ErrorMessage.Contains("AFTERSUCCESS"))
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n");
                             LastSncode = ms_sncode.Text;
-                            OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为良品\n", Color.Green, ms_sncode);
+                            OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为良品\n", Color.LightGreen, ms_sncode);
                             //记录操作日志
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "采集良品", "采集良品成功", LastSncode, ob_checkno.Text);
                         }
-                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
                     }
                     else
                     {
-                        OperateResult.AppendText(">>返修的不良序列号必须先进行维修\n", Color.Red);
+                        OperateResult.AppendText(">>返修的不良序列号必须先进行维修\n", Color.DarkRed);
                     }
                 }
             }
@@ -611,7 +611,7 @@ namespace UAS_MES_NEW.Make
         {
             if (ms_sncode.Text == "")
             {
-                OperateResult.AppendText(">>序列号不允许为空\n", Color.Red);
+                OperateResult.AppendText(">>序列号不允许为空\n", Color.DarkRed);
                 return;
             }
             if (GoodProduct.Checked)
@@ -626,7 +626,7 @@ namespace UAS_MES_NEW.Make
                     {
                         if (ma_code.Text == "")
                         {
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
                             return;
                         }
                     }
@@ -641,13 +641,13 @@ namespace UAS_MES_NEW.Make
                     }
                     else
                     {
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
                         return;
                     }
                 }
                 else
                 {
-                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
                     return;
                 }
                 int RejectCount = ChoosedRejectList.Items.Count;
@@ -669,7 +669,7 @@ namespace UAS_MES_NEW.Make
                 {
                     if (ChoosedRejectList.Items.Count == 0)
                     {
-                        OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
+                        OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.DarkRed);
                         return;
                     }
                     else
@@ -741,9 +741,9 @@ namespace UAS_MES_NEW.Make
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "快速维修成功", "快速维修", "", ob_checkno.Text);
                             OperateResult.AppendText(">>本次采集不良代码" + badname + "存在于本工序" + User.CurrentStepCode + "中,请解除故障后重新测试本站\n", Color.Black);
                         }
-                        else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                        else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.LightGreen);
                     }
-                    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.LightGreen);
                     LastSncode = ms_sncode.Text;
                     //采集完不良,聚焦序列号
                     ms_sncode.Focus();
@@ -756,7 +756,7 @@ namespace UAS_MES_NEW.Make
                     WaitList.Clear();
                     ChoosedList.Clear();
                 }
-                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed);
             }
         }
 
@@ -774,7 +774,7 @@ namespace UAS_MES_NEW.Make
                     {
                         if (ChoosedRejectList.Items[i].ListView.Items[i].SubItems[2].Text == bc_code.Text)
                         {
-                            OperateResult.AppendText(">>已添加过不良代码" + bc_code.Text + "\n", Color.Red, bc_code);
+                            OperateResult.AppendText(">>已添加过不良代码" + bc_code.Text + "\n", Color.DarkRed, bc_code);
                             return;
                         }
                     }
@@ -785,7 +785,7 @@ namespace UAS_MES_NEW.Make
                     ChoosedRejectList.Items.Add(lvi);
                     bc_code.Clear();
                 }
-                else OperateResult.AppendText(">>" + bc_code.Text + "不良代码不存在\n", Color.Red, bc_code);
+                else OperateResult.AppendText(">>" + bc_code.Text + "不良代码不存在\n", Color.DarkRed, bc_code);
             }
         }
 
@@ -821,8 +821,8 @@ namespace UAS_MES_NEW.Make
                 batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
                 if (nowcheckqty == batchqty)
                 {
-                    ob_nowcheckqty.ForeColor = Color.Red;
-                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.Red);
+                    ob_nowcheckqty.ForeColor = Color.DarkRed;
+                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.DarkRed);
                     if (AutoCut)
                     {
                         OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.Blue);
@@ -1003,7 +1003,7 @@ namespace UAS_MES_NEW.Make
                     }
                     else
                     {
-                        OperateResult.AppendText(">>SN" + ms_sncode.Text + "未进行分板绑定\n", Color.Red, ms_sncode);
+                        OperateResult.AppendText(">>SN" + ms_sncode.Text + "未进行分板绑定\n", Color.DarkRed, ms_sncode);
                     }
                 }
                 else
@@ -1101,7 +1101,7 @@ namespace UAS_MES_NEW.Make
             //                ms_code_KeyDown(this, new KeyEventArgs(Keys.Enter));
             //            }
             //            else {
-            //                OperateResult.AppendText(">>解析数据" + strData[5] + "非良品,无法采集\n", Color.Red, ms_sncode);
+            //                OperateResult.AppendText(">>解析数据" + strData[5] + "非良品,无法采集\n", Color.DarkRed, ms_sncode);
             //            }
             //        }
             //    }
@@ -1170,7 +1170,7 @@ namespace UAS_MES_NEW.Make
                             }
                             else
                             {
-                                OperateResult.AppendText(">>解析数据" + strData[5] + "非良品,无法采集\n", Color.Red, ms_sncode);
+                                OperateResult.AppendText(">>解析数据" + strData[5] + "非良品,无法采集\n", Color.DarkRed, ms_sncode);
                             }
                         }
                     }
@@ -1191,41 +1191,41 @@ namespace UAS_MES_NEW.Make
                     "left join craftdetail on cd_crid=cr_id where ma_code='" + ma_code.Text + "' and cd_stepcode='" + User.CurrentStepCode + "'", "select");
                 if (dt.Rows.Count == 0)
                 {
-                    OperateResult.AppendText(">工序" + User.CurrentStepCode + "不存在工单工艺路线中\n", Color.Red, SNCount);
+                    OperateResult.AppendText(">工序" + User.CurrentStepCode + "不存在工单工艺路线中\n", Color.DarkRed, SNCount);
                     return;
                 }
                 int count;
                 if (!int.TryParse(SNCount.Text, out count))
                 {
-                    OperateResult.AppendText(">请输入正确的数字\n", Color.Red, SNCount);
+                    OperateResult.AppendText(">请输入正确的数字\n", Color.DarkRed, SNCount);
                     return;
                 }
                 if (count <= 0)
                 {
-                    OperateResult.AppendText(">数字必须大于0\n", Color.Red, SNCount);
+                    OperateResult.AppendText(">数字必须大于0\n", Color.DarkRed, SNCount);
                     return;
                 }
                 if (ma_code.Text == "")
                 {
-                    OperateResult.AppendText(">工单号不能为空\n", Color.Red, SNCount);
+                    OperateResult.AppendText(">工单号不能为空\n", Color.DarkRed, SNCount);
                     return;
                 }
                 string sumcount = dh.getFieldDataByCondition("makehourcount", "nvl(sum(mhc_qty),0)", "mhc_macode='" + ma_code.Text + "' and mhc_stepcode='" + User.CurrentStepCode + "'").ToString();
                 if (int.Parse(sumcount) + count * pr_pcbacount.Value > int.Parse(ma_qty.Text))
                 {
-                    OperateResult.AppendText(">已采集数量" + sumcount + ",本次采集数量" + pr_pcbacount.Value * count + ",超出工单数量" + ma_qty.Text + "\n", Color.Red, SNCount);
+                    OperateResult.AppendText(">已采集数量" + sumcount + ",本次采集数量" + pr_pcbacount.Value * count + ",超出工单数量" + ma_qty.Text + "\n", Color.DarkRed, SNCount);
                     return;
                 }
                 if (LogicHandler.UpdateStencil(ma_code.Text, User.UserSourceCode, (pr_pcbacount.Value * count).ToString(), User.UserCode, out ErrorMessage))
                 {
                     dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,MHC_SOURCECODE,mhc_stepcode, MHC_INMAN,mhc_qty,mhc_linecode,mhc_pcbcount)" +
                        "values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + User.UserSourceCode + "','" + User.CurrentStepCode + "','" + User.UserCode + "','" + pr_pcbacount.Value * count + "','" + User.UserLineCode + "','" + pr_pcbacount.Value + "')", "insert");
-                    OperateResult.AppendText(">采集成功,个数量" + count + ",拼板产品数" + pr_pcbacount.Value * count + "\n", Color.Green, SNCount);
+                    OperateResult.AppendText(">采集成功,个数量" + count + ",拼板产品数" + pr_pcbacount.Value * count + "\n", Color.LightGreen, SNCount);
                     return;
                 }
                 else
                 {
-                    OperateResult.AppendText(">" + ErrorMessage + "\n", Color.Red, SNCount);
+                    OperateResult.AppendText(">" + ErrorMessage + "\n", Color.DarkRed, SNCount);
                 }
             }
         }

+ 284 - 183
UAS_MES_YTDZ/FunctionCode/Make/Make_ToolingManager.Designer.cs

@@ -44,36 +44,42 @@
             this.ExePage1 = new System.Windows.Forms.TabPage();
             this.Page1Box = new System.Windows.Forms.TableLayoutPanel();
             this.panel2 = new System.Windows.Forms.Panel();
-            this.useCountVal = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.useCountLab = new System.Windows.Forms.Label();
             this.Scrap = new System.Windows.Forms.Button();
             this.Return = new System.Windows.Forms.Button();
-            this.stA = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.stALab = new System.Windows.Forms.Label();
-            this.stB = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.stBLab = new System.Windows.Forms.Label();
-            this.stC = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.stCLab = new System.Windows.Forms.Label();
-            this.stD = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.stDLab = new System.Windows.Forms.Label();
-            this.stE = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.stELab = new System.Windows.Forms.Label();
             this.stLab = new System.Windows.Forms.Label();
-            this.empVal1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.empLab1 = new System.Windows.Forms.Label();
             this.IsClean = new System.Windows.Forms.CheckBox();
             this.panel1 = new System.Windows.Forms.Panel();
-            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
-            this.empVal = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.empLab = new System.Windows.Forms.Label();
-            this.li_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.li_codeLab = new System.Windows.Forms.Label();
             this.sideVal = new System.Windows.Forms.ComboBox();
             this.sideLab = new System.Windows.Forms.Label();
             this.ma_codeLab = new System.Windows.Forms.Label();
             this.Receive = new System.Windows.Forms.Button();
             this.Container = new System.Windows.Forms.TableLayoutPanel();
+            this.gapLab1 = new System.Windows.Forms.Label();
+            this.gapLab2 = new System.Windows.Forms.Label();
+            this.gapLab3 = new System.Windows.Forms.Label();
             this.MsgBox = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.useCountVal = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.stA = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.stB = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.stC = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.stD = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.stE = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.empVal1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.gapVal1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.gapVal2 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.gapVal3 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.empVal = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.li_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.TopBox.SuspendLayout();
             this.ExeBox.SuspendLayout();
             this.ExePage1.SuspendLayout();
@@ -277,22 +283,6 @@
             this.panel2.Size = new System.Drawing.Size(870, 188);
             this.panel2.TabIndex = 1;
             // 
-            // useCountVal
-            // 
-            this.useCountVal.AllPower = null;
-            this.useCountVal.BackColor = System.Drawing.Color.White;
-            this.useCountVal.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.useCountVal.ID = null;
-            this.useCountVal.Location = new System.Drawing.Point(438, 117);
-            this.useCountVal.Margin = new System.Windows.Forms.Padding(4);
-            this.useCountVal.Name = "useCountVal";
-            this.useCountVal.Power = null;
-            this.useCountVal.Size = new System.Drawing.Size(72, 31);
-            this.useCountVal.Str = null;
-            this.useCountVal.Str1 = null;
-            this.useCountVal.Str2 = null;
-            this.useCountVal.TabIndex = 156;
-            // 
             // useCountLab
             // 
             this.useCountLab.AutoSize = true;
@@ -328,23 +318,6 @@
             this.Return.UseVisualStyleBackColor = true;
             this.Return.Click += new System.EventHandler(this.Return_Click);
             // 
-            // stA
-            // 
-            this.stA.AllPower = null;
-            this.stA.BackColor = System.Drawing.Color.White;
-            this.stA.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.stA.ID = null;
-            this.stA.Location = new System.Drawing.Point(225, 21);
-            this.stA.Margin = new System.Windows.Forms.Padding(4);
-            this.stA.Name = "stA";
-            this.stA.Negative = false;
-            this.stA.Power = null;
-            this.stA.Size = new System.Drawing.Size(80, 31);
-            this.stA.Str = null;
-            this.stA.Str1 = null;
-            this.stA.Str2 = null;
-            this.stA.TabIndex = 150;
-            // 
             // stALab
             // 
             this.stALab.AutoSize = true;
@@ -356,22 +329,6 @@
             this.stALab.TabIndex = 138;
             this.stALab.Text = "A";
             // 
-            // stB
-            // 
-            this.stB.AllPower = null;
-            this.stB.BackColor = System.Drawing.Color.White;
-            this.stB.ID = null;
-            this.stB.Location = new System.Drawing.Point(224, 66);
-            this.stB.Margin = new System.Windows.Forms.Padding(4);
-            this.stB.Name = "stB";
-            this.stB.Negative = false;
-            this.stB.Power = null;
-            this.stB.Size = new System.Drawing.Size(80, 35);
-            this.stB.Str = null;
-            this.stB.Str1 = null;
-            this.stB.Str2 = null;
-            this.stB.TabIndex = 153;
-            // 
             // stBLab
             // 
             this.stBLab.AutoSize = true;
@@ -383,23 +340,6 @@
             this.stBLab.TabIndex = 136;
             this.stBLab.Text = "B";
             // 
-            // stC
-            // 
-            this.stC.AllPower = null;
-            this.stC.BackColor = System.Drawing.Color.White;
-            this.stC.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.stC.ID = null;
-            this.stC.Location = new System.Drawing.Point(373, 21);
-            this.stC.Margin = new System.Windows.Forms.Padding(4);
-            this.stC.Name = "stC";
-            this.stC.Negative = false;
-            this.stC.Power = null;
-            this.stC.Size = new System.Drawing.Size(80, 31);
-            this.stC.Str = null;
-            this.stC.Str1 = null;
-            this.stC.Str2 = null;
-            this.stC.TabIndex = 151;
-            // 
             // stCLab
             // 
             this.stCLab.AutoSize = true;
@@ -411,22 +351,6 @@
             this.stCLab.TabIndex = 134;
             this.stCLab.Text = "C";
             // 
-            // stD
-            // 
-            this.stD.AllPower = null;
-            this.stD.BackColor = System.Drawing.Color.White;
-            this.stD.ID = null;
-            this.stD.Location = new System.Drawing.Point(373, 66);
-            this.stD.Margin = new System.Windows.Forms.Padding(4);
-            this.stD.Name = "stD";
-            this.stD.Negative = false;
-            this.stD.Power = null;
-            this.stD.Size = new System.Drawing.Size(80, 35);
-            this.stD.Str = null;
-            this.stD.Str1 = null;
-            this.stD.Str2 = null;
-            this.stD.TabIndex = 154;
-            // 
             // stDLab
             // 
             this.stDLab.AutoSize = true;
@@ -438,22 +362,6 @@
             this.stDLab.TabIndex = 132;
             this.stDLab.Text = "D";
             // 
-            // stE
-            // 
-            this.stE.AllPower = null;
-            this.stE.BackColor = System.Drawing.Color.White;
-            this.stE.ID = null;
-            this.stE.Location = new System.Drawing.Point(517, 21);
-            this.stE.Margin = new System.Windows.Forms.Padding(4);
-            this.stE.Name = "stE";
-            this.stE.Negative = false;
-            this.stE.Power = null;
-            this.stE.Size = new System.Drawing.Size(80, 35);
-            this.stE.Str = null;
-            this.stE.Str1 = null;
-            this.stE.Str2 = null;
-            this.stE.TabIndex = 152;
-            // 
             // stELab
             // 
             this.stELab.AutoSize = true;
@@ -476,22 +384,6 @@
             this.stLab.TabIndex = 129;
             this.stLab.Text = "张力测试结果(N):";
             // 
-            // empVal1
-            // 
-            this.empVal1.AllPower = null;
-            this.empVal1.BackColor = System.Drawing.Color.White;
-            this.empVal1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.empVal1.ID = null;
-            this.empVal1.Location = new System.Drawing.Point(157, 117);
-            this.empVal1.Margin = new System.Windows.Forms.Padding(4);
-            this.empVal1.Name = "empVal1";
-            this.empVal1.Power = null;
-            this.empVal1.Size = new System.Drawing.Size(178, 31);
-            this.empVal1.Str = null;
-            this.empVal1.Str1 = null;
-            this.empVal1.Str2 = null;
-            this.empVal1.TabIndex = 155;
-            // 
             // empLab1
             // 
             this.empLab1.AutoSize = true;
@@ -517,6 +409,12 @@
             // 
             // panel1
             // 
+            this.panel1.Controls.Add(this.gapVal1);
+            this.panel1.Controls.Add(this.gapLab1);
+            this.panel1.Controls.Add(this.gapVal2);
+            this.panel1.Controls.Add(this.gapLab2);
+            this.panel1.Controls.Add(this.gapVal3);
+            this.panel1.Controls.Add(this.gapLab3);
             this.panel1.Controls.Add(this.ma_code);
             this.panel1.Controls.Add(this.empVal);
             this.panel1.Controls.Add(this.empLab);
@@ -532,43 +430,6 @@
             this.panel1.Size = new System.Drawing.Size(870, 188);
             this.panel1.TabIndex = 0;
             // 
-            // ma_code
-            // 
-            this.ma_code.AllPower = null;
-            this.ma_code.Caller = null;
-            this.ma_code.Condition = null;
-            this.ma_code.DBTitle = null;
-            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(108, 24);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
-            this.ma_code.Name = "ma_code";
-            this.ma_code.Power = null;
-            this.ma_code.ReturnData = null;
-            this.ma_code.SelectField = null;
-            this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(227, 32);
-            this.ma_code.TabIndex = 115;
-            this.ma_code.TableName = null;
-            this.ma_code.Tag = "ma_code";
-            this.ma_code.TextBoxEnable = true;
-            // 
-            // empVal
-            // 
-            this.empVal.AllPower = null;
-            this.empVal.BackColor = System.Drawing.SystemColors.Window;
-            this.empVal.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.empVal.ID = null;
-            this.empVal.Location = new System.Drawing.Point(108, 100);
-            this.empVal.Margin = new System.Windows.Forms.Padding(4);
-            this.empVal.Name = "empVal";
-            this.empVal.Power = null;
-            this.empVal.Size = new System.Drawing.Size(178, 31);
-            this.empVal.Str = null;
-            this.empVal.Str1 = null;
-            this.empVal.Str2 = null;
-            this.empVal.TabIndex = 114;
-            // 
             // empLab
             // 
             this.empLab.AutoSize = true;
@@ -580,27 +441,6 @@
             this.empLab.TabIndex = 113;
             this.empLab.Text = "领用人员:";
             // 
-            // li_code
-            // 
-            this.li_code.AllPower = null;
-            this.li_code.BackColor = System.Drawing.SystemColors.Window;
-            this.li_code.Caller = null;
-            this.li_code.Condition = null;
-            this.li_code.DBTitle = null;
-            this.li_code.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.li_code.FormName = null;
-            this.li_code.Location = new System.Drawing.Point(419, 23);
-            this.li_code.Margin = new System.Windows.Forms.Padding(4);
-            this.li_code.Name = "li_code";
-            this.li_code.Power = null;
-            this.li_code.ReturnData = null;
-            this.li_code.SelectField = null;
-            this.li_code.SetValueField = null;
-            this.li_code.Size = new System.Drawing.Size(130, 32);
-            this.li_code.TabIndex = 76;
-            this.li_code.TableName = null;
-            this.li_code.TextBoxEnable = false;
-            // 
             // li_codeLab
             // 
             this.li_codeLab.AutoSize = true;
@@ -648,7 +488,7 @@
             // 
             this.Receive.Cursor = System.Windows.Forms.Cursors.Hand;
             this.Receive.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Receive.Location = new System.Drawing.Point(373, 98);
+            this.Receive.Location = new System.Drawing.Point(729, 146);
             this.Receive.Name = "Receive";
             this.Receive.Size = new System.Drawing.Size(100, 32);
             this.Receive.TabIndex = 11;
@@ -672,6 +512,39 @@
             this.Container.Size = new System.Drawing.Size(1280, 441);
             this.Container.TabIndex = 12;
             // 
+            // gapLab1
+            // 
+            this.gapLab1.AutoSize = true;
+            this.gapLab1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.gapLab1.Location = new System.Drawing.Point(301, 102);
+            this.gapLab1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.gapLab1.Name = "gapLab1";
+            this.gapLab1.Size = new System.Drawing.Size(96, 28);
+            this.gapLab1.TabIndex = 155;
+            this.gapLab1.Text = "间隙范围";
+            // 
+            // gapLab2
+            // 
+            this.gapLab2.AutoSize = true;
+            this.gapLab2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.gapLab2.Location = new System.Drawing.Point(453, 102);
+            this.gapLab2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.gapLab2.Name = "gapLab2";
+            this.gapLab2.Size = new System.Drawing.Size(96, 28);
+            this.gapLab2.TabIndex = 154;
+            this.gapLab2.Text = "最大间隙";
+            // 
+            // gapLab3
+            // 
+            this.gapLab3.AutoSize = true;
+            this.gapLab3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.gapLab3.Location = new System.Drawing.Point(613, 102);
+            this.gapLab3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.gapLab3.Name = "gapLab3";
+            this.gapLab3.Size = new System.Drawing.Size(96, 28);
+            this.gapLab3.TabIndex = 153;
+            this.gapLab3.Text = "最小间隙";
+            // 
             // MsgBox
             // 
             this.MsgBox.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -683,6 +556,228 @@
             this.MsgBox.TabIndex = 54;
             this.MsgBox.Text = "";
             // 
+            // useCountVal
+            // 
+            this.useCountVal.AllPower = null;
+            this.useCountVal.BackColor = System.Drawing.Color.White;
+            this.useCountVal.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.useCountVal.ID = null;
+            this.useCountVal.Location = new System.Drawing.Point(438, 117);
+            this.useCountVal.Margin = new System.Windows.Forms.Padding(4);
+            this.useCountVal.Name = "useCountVal";
+            this.useCountVal.Power = null;
+            this.useCountVal.Size = new System.Drawing.Size(72, 31);
+            this.useCountVal.Str = null;
+            this.useCountVal.Str1 = null;
+            this.useCountVal.Str2 = null;
+            this.useCountVal.TabIndex = 156;
+            // 
+            // stA
+            // 
+            this.stA.AllPower = null;
+            this.stA.BackColor = System.Drawing.Color.White;
+            this.stA.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.stA.ID = null;
+            this.stA.Location = new System.Drawing.Point(225, 21);
+            this.stA.Margin = new System.Windows.Forms.Padding(4);
+            this.stA.Name = "stA";
+            this.stA.Negative = false;
+            this.stA.Power = null;
+            this.stA.Size = new System.Drawing.Size(80, 31);
+            this.stA.Str = null;
+            this.stA.Str1 = null;
+            this.stA.Str2 = null;
+            this.stA.TabIndex = 150;
+            // 
+            // stB
+            // 
+            this.stB.AllPower = null;
+            this.stB.BackColor = System.Drawing.Color.White;
+            this.stB.ID = null;
+            this.stB.Location = new System.Drawing.Point(224, 66);
+            this.stB.Margin = new System.Windows.Forms.Padding(4);
+            this.stB.Name = "stB";
+            this.stB.Negative = false;
+            this.stB.Power = null;
+            this.stB.Size = new System.Drawing.Size(80, 35);
+            this.stB.Str = null;
+            this.stB.Str1 = null;
+            this.stB.Str2 = null;
+            this.stB.TabIndex = 153;
+            // 
+            // stC
+            // 
+            this.stC.AllPower = null;
+            this.stC.BackColor = System.Drawing.Color.White;
+            this.stC.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.stC.ID = null;
+            this.stC.Location = new System.Drawing.Point(373, 21);
+            this.stC.Margin = new System.Windows.Forms.Padding(4);
+            this.stC.Name = "stC";
+            this.stC.Negative = false;
+            this.stC.Power = null;
+            this.stC.Size = new System.Drawing.Size(80, 31);
+            this.stC.Str = null;
+            this.stC.Str1 = null;
+            this.stC.Str2 = null;
+            this.stC.TabIndex = 151;
+            // 
+            // stD
+            // 
+            this.stD.AllPower = null;
+            this.stD.BackColor = System.Drawing.Color.White;
+            this.stD.ID = null;
+            this.stD.Location = new System.Drawing.Point(373, 66);
+            this.stD.Margin = new System.Windows.Forms.Padding(4);
+            this.stD.Name = "stD";
+            this.stD.Negative = false;
+            this.stD.Power = null;
+            this.stD.Size = new System.Drawing.Size(80, 35);
+            this.stD.Str = null;
+            this.stD.Str1 = null;
+            this.stD.Str2 = null;
+            this.stD.TabIndex = 154;
+            // 
+            // stE
+            // 
+            this.stE.AllPower = null;
+            this.stE.BackColor = System.Drawing.Color.White;
+            this.stE.ID = null;
+            this.stE.Location = new System.Drawing.Point(517, 21);
+            this.stE.Margin = new System.Windows.Forms.Padding(4);
+            this.stE.Name = "stE";
+            this.stE.Negative = false;
+            this.stE.Power = null;
+            this.stE.Size = new System.Drawing.Size(80, 35);
+            this.stE.Str = null;
+            this.stE.Str1 = null;
+            this.stE.Str2 = null;
+            this.stE.TabIndex = 152;
+            // 
+            // empVal1
+            // 
+            this.empVal1.AllPower = null;
+            this.empVal1.BackColor = System.Drawing.Color.White;
+            this.empVal1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.empVal1.ID = null;
+            this.empVal1.Location = new System.Drawing.Point(157, 117);
+            this.empVal1.Margin = new System.Windows.Forms.Padding(4);
+            this.empVal1.Name = "empVal1";
+            this.empVal1.Power = null;
+            this.empVal1.Size = new System.Drawing.Size(178, 31);
+            this.empVal1.Str = null;
+            this.empVal1.Str1 = null;
+            this.empVal1.Str2 = null;
+            this.empVal1.TabIndex = 155;
+            // 
+            // gapVal1
+            // 
+            this.gapVal1.AllPower = null;
+            this.gapVal1.BackColor = System.Drawing.Color.White;
+            this.gapVal1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.gapVal1.ID = null;
+            this.gapVal1.Location = new System.Drawing.Point(370, 100);
+            this.gapVal1.Margin = new System.Windows.Forms.Padding(4);
+            this.gapVal1.Name = "gapVal1";
+            this.gapVal1.Negative = false;
+            this.gapVal1.Power = null;
+            this.gapVal1.Size = new System.Drawing.Size(69, 31);
+            this.gapVal1.Str = null;
+            this.gapVal1.Str1 = null;
+            this.gapVal1.Str2 = null;
+            this.gapVal1.TabIndex = 156;
+            // 
+            // gapVal2
+            // 
+            this.gapVal2.AllPower = null;
+            this.gapVal2.BackColor = System.Drawing.Color.White;
+            this.gapVal2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.gapVal2.ID = null;
+            this.gapVal2.Location = new System.Drawing.Point(523, 100);
+            this.gapVal2.Margin = new System.Windows.Forms.Padding(4);
+            this.gapVal2.Name = "gapVal2";
+            this.gapVal2.Negative = false;
+            this.gapVal2.Power = null;
+            this.gapVal2.Size = new System.Drawing.Size(73, 31);
+            this.gapVal2.Str = null;
+            this.gapVal2.Str1 = null;
+            this.gapVal2.Str2 = null;
+            this.gapVal2.TabIndex = 157;
+            // 
+            // gapVal3
+            // 
+            this.gapVal3.AllPower = null;
+            this.gapVal3.BackColor = System.Drawing.Color.White;
+            this.gapVal3.ID = null;
+            this.gapVal3.Location = new System.Drawing.Point(681, 100);
+            this.gapVal3.Margin = new System.Windows.Forms.Padding(4);
+            this.gapVal3.Name = "gapVal3";
+            this.gapVal3.Negative = false;
+            this.gapVal3.Power = null;
+            this.gapVal3.Size = new System.Drawing.Size(80, 35);
+            this.gapVal3.Str = null;
+            this.gapVal3.Str1 = null;
+            this.gapVal3.Str2 = null;
+            this.gapVal3.TabIndex = 158;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = null;
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = null;
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(108, 24);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = null;
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(227, 32);
+            this.ma_code.TabIndex = 115;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "ma_code";
+            this.ma_code.TextBoxEnable = true;
+            // 
+            // empVal
+            // 
+            this.empVal.AllPower = null;
+            this.empVal.BackColor = System.Drawing.SystemColors.Window;
+            this.empVal.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.empVal.ID = null;
+            this.empVal.Location = new System.Drawing.Point(108, 100);
+            this.empVal.Margin = new System.Windows.Forms.Padding(4);
+            this.empVal.Name = "empVal";
+            this.empVal.Power = null;
+            this.empVal.Size = new System.Drawing.Size(178, 31);
+            this.empVal.Str = null;
+            this.empVal.Str1 = null;
+            this.empVal.Str2 = null;
+            this.empVal.TabIndex = 114;
+            // 
+            // li_code
+            // 
+            this.li_code.AllPower = null;
+            this.li_code.BackColor = System.Drawing.SystemColors.Window;
+            this.li_code.Caller = null;
+            this.li_code.Condition = null;
+            this.li_code.DBTitle = null;
+            this.li_code.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.li_code.FormName = null;
+            this.li_code.Location = new System.Drawing.Point(419, 23);
+            this.li_code.Margin = new System.Windows.Forms.Padding(4);
+            this.li_code.Name = "li_code";
+            this.li_code.Power = null;
+            this.li_code.ReturnData = null;
+            this.li_code.SelectField = null;
+            this.li_code.SetValueField = null;
+            this.li_code.Size = new System.Drawing.Size(130, 32);
+            this.li_code.TabIndex = 76;
+            this.li_code.TableName = null;
+            this.li_code.TextBoxEnable = false;
+            // 
             // Make_ToolingManager
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
@@ -756,5 +851,11 @@
         private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
         private CustomControl.TextBoxWithIcon.EnterTextBox useCountVal;
         private System.Windows.Forms.Label useCountLab;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox gapVal1;
+        private System.Windows.Forms.Label gapLab1;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox gapVal2;
+        private System.Windows.Forms.Label gapLab2;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox gapVal3;
+        private System.Windows.Forms.Label gapLab3;
     }
 }

+ 26 - 2
UAS_MES_YTDZ/FunctionCode/Make/Make_ToolingManager.cs

@@ -105,6 +105,13 @@ namespace UAS_MES_NEW.Make
                 stC.Enabled = true;
                 stD.Enabled = true;
                 stE.Enabled = true;
+
+                gapVal1.Visible = false;
+                gapLab1.Visible = false;
+                gapVal2.Visible = false;
+                gapLab2.Visible = false;
+                gapVal3.Visible = false;
+                gapLab3.Visible = false;
             }
             else
             {
@@ -113,6 +120,13 @@ namespace UAS_MES_NEW.Make
                 stC.Enabled = false;
                 stD.Enabled = false;
                 stE.Enabled = false;
+
+                gapVal1.Visible = true;
+                gapLab1.Visible = true;
+                gapVal2.Visible = true;
+                gapLab2.Visible = true;
+                gapVal3.Visible = true;
+                gapLab3.Visible = true;
             }
 
             dt = (DataTable)dh.ExecuteSql($"select su_status,su_usedate from (select su_status,su_usedate from stenciluse where su_stcode = '{toolingVal.Text.Trim()}' order by su_usedate desc) where rownum=1", "select");
@@ -271,11 +285,21 @@ namespace UAS_MES_NEW.Make
                     return;
                 }
 
-                dh.ExecuteSql($@"INSERT INTO stenciluse (su_id,su_stcode,su_stid,
+                dt = (DataTable)dh.ExecuteSql("select stenciluse_seq.NEXTVAL seq from dual", "select");
+                if(dt.Rows.Count > 1)
+                {
+                    dh.ExecuteSql($@"INSERT INTO stenciluse (su_id,su_stcode,su_stid,
                     su_usemacode,su_useprodcode,su_linecode,su_table,su_useman,su_usedate,su_status)
-                    SELECT stenciluse_seq.NEXTVAL,'{toolingVal.Text.Trim()}',st_id,
+                    SELECT '{dt.Rows[0]["seq"].ToString()}','{toolingVal.Text.Trim()}',st_id,
                     '{ma_code.Text}','{ma_prodcode}','{li_code.Text}','{sideVal.Text}','{empVal.Text}',sysdate, '领用'
                     FROM stencil WHERE st_code = '{toolingVal.Text.Trim()}'", "insert");
+
+                    if(!string.IsNullOrEmpty(gapVal1.Text) && !string.IsNullOrEmpty(gapVal2.Text)&& !string.IsNullOrEmpty(gapVal3.Text))
+                    {
+                        dh.ExecuteSql($@"INSERT INTO steptestdetail( std_id, std_subclass1, std_subclass2, std_value9, std_value10, std_value11) 
+                            VALUES ( steptestdetail_seq.NEXTVAL, '{dt.Rows[0]["seq"].ToString()}', '刮刀', '{gapVal1.Text}', '{gapVal2.Text}', '{gapVal3.Text}' )", "insert");
+                    }
+                }
             }
             dh.ExecuteSql($@"update stencil set st_usestatus= '出库',st_line = '{li_code.Text}',st_macode = '{ma_code.Text}',
                 st_useofproduct = '{ma_prodcode}' where st_code='" + toolingVal.Text + "'", "update");

+ 52 - 52
UAS_MES_YTDZ/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -55,7 +55,7 @@ namespace UAS_MES_NEW.Packing
             }
             catch (Exception ex)
             {
-                OperateResult.AppendText("未正确安装打印软件\n" + ex.Message, Color.Red);
+                OperateResult.AppendText("未正确安装打印软件\n" + ex.Message, Color.DarkRed);
             }
         }
 
@@ -168,7 +168,7 @@ namespace UAS_MES_NEW.Packing
                         }
                         else
                         {
-                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                            OperateResult.AppendText(ErrorMessage + "\n", Color.DarkRed);
                         }
                     //}
                     if (!AutoGenBoxCode.Checked)
@@ -182,9 +182,9 @@ namespace UAS_MES_NEW.Packing
                         sn_code.SelectAll();
                     }
                 }
-                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "尚未封箱,请封箱后执行打印\n", Color.Red);
+                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "尚未封箱,请封箱后执行打印\n", Color.DarkRed);
             }
-            else OperateResult.AppendText(">>产品" + pr_code.Text + "未维护打印标签\n", Color.Red);
+            else OperateResult.AppendText(">>产品" + pr_code.Text + "未维护打印标签\n", Color.DarkRed);
         }
 
         //加载工单信息和装箱明细信息
@@ -233,14 +233,14 @@ namespace UAS_MES_NEW.Packing
                             string craftstepcode = dh.getFieldDataByCondition("craft left join craftdetail on cr_id =cd_crid", "(cd_stepcode)", "cr_prodcode='" + prodcode + "' and cr_code='" + craftcode + "' and cd_stepcode='" + User.CurrentStepCode + "'").ToString();
                             if (craftstepcode == "")
                             {
-                                OperateResult.AppendText("工序" + User.CurrentStepCode + "不在途程" + craftcode + "内,不允许采集\n", Color.Red);
+                                OperateResult.AppendText("工序" + User.CurrentStepCode + "不在途程" + craftcode + "内,不允许采集\n", Color.DarkRed);
                                 return;
                             }
                         }
                         string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
                         if (nextstepcode != "" && nextstepcode != User.CurrentStepCode)
                         {
-                            OperateResult.AppendText("当前序列号下一道工序" + nextstepcode + ",当前资源不允许采集\n", Color.Red);
+                            OperateResult.AppendText("当前序列号下一道工序" + nextstepcode + ",当前资源不允许采集\n", Color.DarkRed);
                             if (md.IsOpen)
                             {
                                 md.SendOrder("M502_ON");
@@ -269,7 +269,7 @@ namespace UAS_MES_NEW.Packing
                             ms_salecode_text = dt.Rows[0]["ms_salecode"].ToString();
                             if (locksalecode.Checked && ms_salecode.Text != "" && ms_salecode.Text != ms_salecode_text)
                             {
-                                OperateResult.AppendText(">>序列号" + sn_code.Text + "所属订单号" + ms_salecode_text + "与界面订单号" + ms_salecode.Text + "不同,无法采集\n", Color.Red, sn_code);
+                                OperateResult.AppendText(">>序列号" + sn_code.Text + "所属订单号" + ms_salecode_text + "与界面订单号" + ms_salecode.Text + "不同,无法采集\n", Color.DarkRed, sn_code);
                                 if (md.IsOpen)
                                 {
                                     md.SendOrder("M502_ON");
@@ -280,7 +280,7 @@ namespace UAS_MES_NEW.Packing
                         }
                         if (dt.Rows[0]["ms_outno"].ToString() != "")
                         {
-                            OperateResult.AppendText(">>序列号" + sn_code.Text + "已被出货单" + dt.Rows[0]["ms_outno"].ToString() + "采集,不允许操作\n", Color.Red, sn_code);
+                            OperateResult.AppendText(">>序列号" + sn_code.Text + "已被出货单" + dt.Rows[0]["ms_outno"].ToString() + "采集,不允许操作\n", Color.DarkRed, sn_code);
                             if (md.IsOpen)
                             {
                                 md.SendOrder("M502_ON");
@@ -289,7 +289,7 @@ namespace UAS_MES_NEW.Packing
                         }
                         if (dt.Rows[0]["ms_iostatus"].ToString() != "0")
                         {
-                            OperateResult.AppendText(">>序列号" + sn_code.Text + "已入库不允许采集\n", Color.Red, sn_code);
+                            OperateResult.AppendText(">>序列号" + sn_code.Text + "已入库不允许采集\n", Color.DarkRed, sn_code);
                             if (md.IsOpen)
                             {
                                 md.SendOrder("M502_ON");
@@ -319,7 +319,7 @@ namespace UAS_MES_NEW.Packing
                                     string autoout = LogicHandler.GetOutBoxCode("PACKAGE", ms_makecode, pr_code.Text, User.UserCode);
                                     if (autoout == " ")
                                     {
-                                        OperateResult.AppendText(">>未维护箱号规则,无法生成箱号\n", Color.Red, sn_code);
+                                        OperateResult.AppendText(">>未维护箱号规则,无法生成箱号\n", Color.DarkRed, sn_code);
                                         return;
                                     }
                                     pa_outboxcode.Text = autoout;
@@ -329,13 +329,13 @@ namespace UAS_MES_NEW.Packing
                         }
                         if (pa_outboxcode.Text == "")
                         {
-                            OperateResult.AppendText(">>箱号不能为空\n", Color.Red, sn_code);
+                            OperateResult.AppendText(">>箱号不能为空\n", Color.DarkRed, sn_code);
                             return;
                         }
                         //判断箱内总数必须大于0
                         if (pr_outboxinnerqty.Text == "" || pr_outboxinnerqty.Text == "0")
                         {
-                            OperateResult.AppendText(">>箱内容量必须大于0\n", Color.Red);
+                            OperateResult.AppendText(">>箱内容量必须大于0\n", Color.DarkRed);
                             return;
                         }
                         sql.Clear();
@@ -350,7 +350,7 @@ namespace UAS_MES_NEW.Packing
                             }
                             if (dt.Rows[0]["pa_outno"].ToString() != "")
                             {
-                                OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.Red, sn_code);
+                                OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.DarkRed, sn_code);
                                 if (md.IsOpen)
                                 {
                                     md.SendOrder("M502_ON");
@@ -359,7 +359,7 @@ namespace UAS_MES_NEW.Packing
                             }
                             if (dt.Rows[0]["pa_iostatus"].ToString() != "0")
                             {
-                                OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.Red, sn_code);
+                                OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.DarkRed, sn_code);
                                 if (md.IsOpen)
                                 {
                                     md.SendOrder("M502_ON");
@@ -380,7 +380,7 @@ namespace UAS_MES_NEW.Packing
                                     {
                                         md.SendOrder("M501_ON");
                                     }
-                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "已在本箱内\n", Color.Red, sn_code);
+                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "已在本箱内\n", Color.DarkRed, sn_code);
                                 }
                                 else
                                 {
@@ -388,7 +388,7 @@ namespace UAS_MES_NEW.Packing
                                     {
                                         md.SendOrder("M502_ON");
                                     }
-                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "已采集至箱" + ms_outboxcode + "\n", Color.Red, sn_code);
+                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "已采集至箱" + ms_outboxcode + "\n", Color.DarkRed, sn_code);
                                 }
                                 LoadData();
                             }
@@ -404,7 +404,7 @@ namespace UAS_MES_NEW.Packing
                                     string autoout = LogicHandler.GetOutBoxCode("PACKAGE", ms_makecode, pr_code.Text, User.UserCode);
                                     if (autoout == " ")
                                     {
-                                        OperateResult.AppendText(">>未维护箱号规则,无法生成箱号\n", Color.Red, sn_code);
+                                        OperateResult.AppendText(">>未维护箱号规则,无法生成箱号\n", Color.DarkRed, sn_code);
                                         return;
                                     }
                                     pa_outboxcode.Text = autoout;
@@ -426,7 +426,7 @@ namespace UAS_MES_NEW.Packing
                                     if (ErrorMessage.Contains("AFTERSUCCESS"))
                                         OperateResult.AppendText(">>" + ErrorMessage + "\n");
                                     LastSncode = sn_code.Text;
-                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
+                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.LightGreen);
                                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "采集成功", sn_code.Text, "");
                                     //满箱更新状态为1
                                     LoadData();
@@ -499,7 +499,7 @@ namespace UAS_MES_NEW.Packing
                                         }
                                         else
                                         {
-                                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed);
                                         }
                                         if (AutoPrint.Checked)
                                             Print_Click(new object(), new EventArgs());
@@ -508,7 +508,7 @@ namespace UAS_MES_NEW.Packing
                                     }
                                     sn_code.Clear();
                                 }
-                                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, sn_code);
                             }
                         }
                         //勾选了取消箱号先验证箱号存不存在,存在的话移除掉,重新加载一次数据
@@ -545,11 +545,11 @@ namespace UAS_MES_NEW.Packing
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "取消采集成功", sn_code.Text, "");
                                 LoadGridData();
                                 pa_status.Text = "0";
-                                OperateResult.AppendText(">>已从该箱中移除序列号" + sn_code.Text + "\n", Color.Green, sn_code);
+                                OperateResult.AppendText(">>已从该箱中移除序列号" + sn_code.Text + "\n", Color.LightGreen, sn_code);
                             }
                             else
                             {
-                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, sn_code);
                                 if (md.IsOpen)
                                 {
                                     md.SendOrder("M502_ON");
@@ -559,14 +559,14 @@ namespace UAS_MES_NEW.Packing
                     }
                     else
                     {
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, sn_code);
                         if (md.IsOpen)
                         {
                             md.SendOrder("M502_ON");
                         }
                     }
                 }
-                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, sn_code);
             }
         }
 
@@ -634,14 +634,14 @@ namespace UAS_MES_NEW.Packing
                     }
                     else
                     {
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed);
                     }
                     if (AutoPrint.Checked)
                         Print_Click(new object(), new EventArgs());
                     LoadCheckQTY();
                 }
             }
-            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "错误或者已封箱\n", Color.Red);
+            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "错误或者已封箱\n", Color.DarkRed);
         }
 
         private void SendCheck_Click(object sender, EventArgs e)
@@ -651,7 +651,7 @@ namespace UAS_MES_NEW.Packing
                 DataTable dt = (DataTable)dh.ExecuteSql("select wm_concat(pa_outboxcode) pa_outboxcode from package where pa_checkno='" + ob_checkno.Text + "' and pa_status=0 ", "select");
                 if (dt.Rows[0][0].ToString() != "")
                 {
-                    OperateResult.AppendText(">>批次" + ob_checkno.Text + "存在箱号" + dt.Rows[0][0].ToString() + "未封箱,请先进行封箱\n", Color.Red);
+                    OperateResult.AppendText(">>批次" + ob_checkno.Text + "存在箱号" + dt.Rows[0][0].ToString() + "未封箱,请先进行封箱\n", Color.DarkRed);
                     return;
                 }
                 sql.Clear();
@@ -661,13 +661,13 @@ namespace UAS_MES_NEW.Packing
                 ob_batchqty.Text = "";
                 ob_nowcheckqty.ForeColor = Color.Black;
                 SendCheck.Enabled = false;
-                OperateResult.AppendText(">>批次" + ob_checkno.Text + "送检成功\n", Color.Green);
+                OperateResult.AppendText(">>批次" + ob_checkno.Text + "送检成功\n", Color.LightGreen);
                 LogicHandler.InsertMakeProcess(LastSncode, oMakeCode, User.UserSourceCode, "手动送检", "手动送检成功", User.UserCode);
                 //记录操作日志
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "手动送检", "手动送检成功", "", ob_checkno.Text);
                 ob_checkno.Text = "";
             }
-            else OperateResult.AppendText(">>必须封箱才能送检\n", Color.Red);
+            else OperateResult.AppendText(">>必须封箱才能送检\n", Color.DarkRed);
         }
 
         bool AutoCut;
@@ -703,11 +703,11 @@ namespace UAS_MES_NEW.Packing
                 batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
                 if (nowcheckqty >= batchqty)
                 {
-                    ob_nowcheckqty.ForeColor = Color.Red;
-                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.Red);
+                    ob_nowcheckqty.ForeColor = Color.DarkRed;
+                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.DarkRed);
                     if (AutoCut)
                     {
-                        OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.Green);
+                        OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.LightGreen);
                     }
                 }
             }
@@ -776,16 +776,16 @@ namespace UAS_MES_NEW.Packing
         //                        return;
         //                    }
         //                    else
-        //                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "当前所在工序不是登录岗位资源所在工序,不允许修改数量\n", Color.Red);
+        //                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "当前所在工序不是登录岗位资源所在工序,不允许修改数量\n", Color.DarkRed);
         //                }
         //                else
-        //                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "处于下地状态,不允许修改标准容量\n", Color.Red);
+        //                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "处于下地状态,不允许修改标准容量\n", Color.DarkRed);
         //            }
         //            else
-        //                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "处于送检中,不允许修改标准容量\n", Color.Red);
+        //                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "处于送检中,不允许修改标准容量\n", Color.DarkRed);
         //        }
         //        else
-        //            OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "不存在,修改容量无效\n", Color.Red);
+        //            OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "不存在,修改容量无效\n", Color.DarkRed);
         //        pr_outboxinnerqty.Text = StandardQTY.ToString();
         //    }
         //}
@@ -803,7 +803,7 @@ namespace UAS_MES_NEW.Packing
         {
             if (pa_outboxcode.Text == "")
             {
-                OperateResult.AppendText(">>箱号不能为空\n", Color.Red);
+                OperateResult.AppendText(">>箱号不能为空\n", Color.DarkRed);
                 return;
             }
             string Delete = MessageBox.Show(this.ParentForm, "是否确认拆箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
@@ -814,12 +814,12 @@ namespace UAS_MES_NEW.Packing
                 {
                     if (dt.Rows[0]["pa_outno"].ToString() != "")
                     {
-                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.Red);
+                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.DarkRed);
                         return;
                     }
                     if (dt.Rows[0]["pa_iostatus"].ToString() != "0")
                     {
-                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.Red);
+                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.DarkRed);
                         return;
                     }
                     if (dt.Rows[0]["pa_mothercode"].ToString() == "")
@@ -870,17 +870,17 @@ namespace UAS_MES_NEW.Packing
                                 //删除箱的明细
                                 dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", pa_outboxcode.Text, ob_checkno.Text);
-                                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "成功拆解!\n", Color.Green);
+                                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "成功拆解!\n", Color.LightGreen);
                                 LoadGridData();
                                 LoadCheckQTY();
                             }
-                            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已送检,不允许解除\n", Color.Red);
+                            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已送检,不允许解除\n", Color.DarkRed);
                         }
-                        else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已下地,不允许解除\n", Color.Red);
+                        else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已下地,不允许解除\n", Color.DarkRed);
                     }
-                    else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已装箱" + dt.Rows[0]["pa_mothercode"].ToString() + ",不允许解除\n", Color.Red);
+                    else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已装箱" + dt.Rows[0]["pa_mothercode"].ToString() + ",不允许解除\n", Color.DarkRed);
                 }
-                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "不存在\n", Color.Red);
+                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "不存在\n", Color.DarkRed);
             }
         }
 
@@ -929,7 +929,7 @@ namespace UAS_MES_NEW.Packing
                 }
                 if (pa_outboxcode.Text.Length != int.Parse(OutBoxLength.Text))
                 {
-                    OperateResult.AppendText(">>箱号长度错误,请重新输入箱号\n", Color.Red);
+                    OperateResult.AppendText(">>箱号长度错误,请重新输入箱号\n", Color.DarkRed);
                     return false;
                 }
             }
@@ -939,13 +939,13 @@ namespace UAS_MES_NEW.Packing
                 {
                     if (pa_outboxcode.Text.Substring(0, PreFix.Text.Length) != PreFix.Text)
                     {
-                        OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                        OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.DarkRed);
                         return false;
                     }
                 }
                 catch (Exception)
                 {
-                    OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                    OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.DarkRed);
                     return false;
                 }
             }
@@ -970,13 +970,13 @@ namespace UAS_MES_NEW.Packing
                         {
                             if (pa_remark.Text.Substring(0, Remark_PreFix.Text.Length) != Remark_PreFix.Text)
                             {
-                                OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.Red);
+                                OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.DarkRed);
                                 return;
                             }
                         }
                         catch (Exception)
                         {
-                            OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.Red);
+                            OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.DarkRed);
                             return;
                         }
                     }
@@ -985,12 +985,12 @@ namespace UAS_MES_NEW.Packing
                         DataTable dt = (DataTable)dh.ExecuteSql("select pa_outboxcode from package where pa_remark='" + pa_remark.Text.ToUpper() + "'", "select");
                         if (dt.Rows.Count > 0)
                         {
-                            OperateResult.AppendText(">>箱号" + dt.Rows[0][0].ToString() + "已采集关联信息" + pa_remark.Text + "\n", Color.Red);
+                            OperateResult.AppendText(">>箱号" + dt.Rows[0][0].ToString() + "已采集关联信息" + pa_remark.Text + "\n", Color.DarkRed);
                             return;
                         }
                     }
                     dh.UpdateByCondition("package", "pa_remark='" + pa_remark.Text.ToUpper() + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
-                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "关联信息" + pa_remark.Text + "采集成功\n", Color.Green);
+                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "关联信息" + pa_remark.Text + "采集成功\n", Color.LightGreen);
                     pa_remark.Text = "";
                     if (!AutoGenBoxCode.Checked)
                     {
@@ -1002,7 +1002,7 @@ namespace UAS_MES_NEW.Packing
                         sn_code.Focus();
                     }
                 }
-                else OperateResult.AppendText(">>请先采集箱内数据\n", Color.Red);
+                else OperateResult.AppendText(">>请先采集箱内数据\n", Color.DarkRed);
             }
         }
 

+ 54 - 54
UAS_MES_YTDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -69,7 +69,7 @@ namespace UAS_MES_NEW.Packing
             }
             catch (Exception ex)
             {
-                OperateResult.AppendText("未正确安装CodeSoft软件\n", Color.Red);
+                OperateResult.AppendText("未正确安装CodeSoft软件\n", Color.DarkRed);
             }
         }
 
@@ -103,9 +103,9 @@ namespace UAS_MES_NEW.Packing
             catch (Exception mes)
             {
                 if (Baurate.Text == "" || ComList.Text == "")
-                    OperateResult.AppendText(">>请先在电子秤调试界面维护波特率和串口\n", Color.Red);
+                    OperateResult.AppendText(">>请先在电子秤调试界面维护波特率和串口\n", Color.DarkRed);
                 else
-                    OperateResult.AppendText(">>" + mes.Message + "\n", Color.Red);
+                    OperateResult.AppendText(">>" + mes.Message + "\n", Color.DarkRed);
             }
             sn_code.Focus();
             dh = SystemInf.dh;
@@ -222,7 +222,7 @@ namespace UAS_MES_NEW.Packing
                     }
                     else
                     {
-                        OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                        OperateResult.AppendText(ErrorMessage + "\n", Color.DarkRed);
                     }
                     if (!AutoGenBoxCode.Checked)
                     {
@@ -235,9 +235,9 @@ namespace UAS_MES_NEW.Packing
                         sn_code.SelectAll();
                     }
                 }
-                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "尚未封箱,请封箱后执行打印\n", Color.Red);
+                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "尚未封箱,请封箱后执行打印\n", Color.DarkRed);
             }
-            else OperateResult.AppendText(">>产品" + pr_code.Text + "未维护打印标签\n", Color.Red);
+            else OperateResult.AppendText(">>产品" + pr_code.Text + "未维护打印标签\n", Color.DarkRed);
         }
 
         //加载工单信息和装箱明细信息
@@ -278,14 +278,14 @@ namespace UAS_MES_NEW.Packing
                             string craftstepcode = dh.getFieldDataByCondition("craft left join craftdetail on cr_id =cd_crid", "cd_stepcode", "cr_prodcode='" + prodcode + "' and cr_code='" + craftcode + "' and cd_stepcode='" + User.CurrentStepCode + "'").ToString();
                             if (craftstepcode == "")
                             {
-                                OperateResult.AppendText("工序" + User.CurrentStepCode + "不在途程" + craftcode + "内,不允许采集\n", Color.Red);
+                                OperateResult.AppendText("工序" + User.CurrentStepCode + "不在途程" + craftcode + "内,不允许采集\n", Color.DarkRed);
                                 return;
                             }
                         }
                         string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
                         if (nextstepcode != "" && nextstepcode != User.CurrentStepCode)
                         {
-                            OperateResult.AppendText("当前序列号下一道工序为" + nextstepcode + ",当前资源不允许采集\n", Color.Red);
+                            OperateResult.AppendText("当前序列号下一道工序为" + nextstepcode + ",当前资源不允许采集\n", Color.DarkRed);
                             return;
                         }
                         //PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
@@ -309,19 +309,19 @@ namespace UAS_MES_NEW.Packing
                             ms_salecode_text = dt.Rows[0]["ms_salecode"].ToString();
                             if (locksalecode.Checked && ms_salecode.Text != "" && ms_salecode.Text != ms_salecode_text)
                             {
-                                OperateResult.AppendText(">>序列号" + sn_code.Text + "所属订单号" + ms_salecode_text + "与界面订单号" + ms_salecode.Text + "不同,无法采集\n", Color.Red, sn_code);
+                                OperateResult.AppendText(">>序列号" + sn_code.Text + "所属订单号" + ms_salecode_text + "与界面订单号" + ms_salecode.Text + "不同,无法采集\n", Color.DarkRed, sn_code);
                                 return;
                             }
                             BaseUtil.SetFormValue(this.Controls, dt);
                         }
                         if (dt.Rows[0]["ms_outno"].ToString() != "")
                         {
-                            OperateResult.AppendText(">>序列号" + sn_code.Text + "已被出货单" + dt.Rows[0]["ms_outno"].ToString() + "采集,不允许操作\n", Color.Red, sn_code);
+                            OperateResult.AppendText(">>序列号" + sn_code.Text + "已被出货单" + dt.Rows[0]["ms_outno"].ToString() + "采集,不允许操作\n", Color.DarkRed, sn_code);
                             return;
                         }
                         if (dt.Rows[0]["ms_iostatus"].ToString() != "0")
                         {
-                            OperateResult.AppendText(">>序列号" + sn_code.Text + "已入库不允许采集\n", Color.Red, sn_code);
+                            OperateResult.AppendText(">>序列号" + sn_code.Text + "已入库不允许采集\n", Color.DarkRed, sn_code);
                             return;
                         }
                         if (pa_standardqty.Text != "0" && pa_standardqty.Text != "")
@@ -347,13 +347,13 @@ namespace UAS_MES_NEW.Packing
                         }
                         if (pa_outboxcode.Text == "")
                         {
-                            OperateResult.AppendText(">>箱号不能为空\n", Color.Red, sn_code);
+                            OperateResult.AppendText(">>箱号不能为空\n", Color.DarkRed, sn_code);
                             return;
                         }
                         //判断箱内总数必须大于0
                         if (pr_outboxinnerqty.Text == "" || pr_outboxinnerqty.Text == "0")
                         {
-                            OperateResult.AppendText(">>箱内容量必须大于0\n", Color.Red);
+                            OperateResult.AppendText(">>箱内容量必须大于0\n", Color.DarkRed);
                             return;
                         }
                         sql.Clear();
@@ -368,12 +368,12 @@ namespace UAS_MES_NEW.Packing
                             }
                             if (dt.Rows[0]["pa_outno"].ToString() != "")
                             {
-                                OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.Red, sn_code);
+                                OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.DarkRed, sn_code);
                                 return;
                             }
                             if (dt.Rows[0]["pa_iostatus"].ToString() != "0")
                             {
-                                OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.Red, sn_code);
+                                OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.DarkRed, sn_code);
                                 return;
                             }
                         }
@@ -384,9 +384,9 @@ namespace UAS_MES_NEW.Packing
                             if (ms_outboxcode != "")
                             {
                                 if (ms_outboxcode == pa_outboxcode.Text)
-                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "已在本箱内\n", Color.Red, sn_code);
+                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "已在本箱内\n", Color.DarkRed, sn_code);
                                 else
-                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "已采集至箱" + ms_outboxcode + "\n", Color.Red, sn_code);
+                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "已采集至箱" + ms_outboxcode + "\n", Color.DarkRed, sn_code);
                                 LoadData();
                             }
                             else
@@ -413,7 +413,7 @@ namespace UAS_MES_NEW.Packing
                                         OperateResult.AppendText(">>" + ErrorMessage + "\n");
                                     LoadCheckQTY();
                                     LoadCollectedNum();
-                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
+                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.LightGreen);
                                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "采集成功", sn_code.Text, "");
                                     LastSncode = sn_code.Text;
                                     //满箱更新状态为1
@@ -458,12 +458,12 @@ namespace UAS_MES_NEW.Packing
                                         {
                                             if (MinWeight == 0 || MaxWeight == 0)
                                             {
-                                                OperateResult.AppendText(">>产品" + pr_code.Text + "未维护卡通箱重量范围\n", Color.Red);
+                                                OperateResult.AppendText(">>产品" + pr_code.Text + "未维护卡通箱重量范围\n", Color.DarkRed);
                                                 return;
                                             }
                                             if (!(weigh >= MinWeight && weigh <= MaxWeight) || weigh == 0)
                                             {
-                                                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);
+                                                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.DarkRed);
                                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量不符合要求:" + weight.Text.Trim(), pa_outboxcode.Text, "");
                                                 LogicHandler.RecordProdWeight(pa_outboxcode.Text, "CARTON", float.Parse(ActWeigh.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
                                                 return;
@@ -472,7 +472,7 @@ namespace UAS_MES_NEW.Packing
                                         dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty,pa_weight=" + weigh + "", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                                         pa_standardqty.Text = "";
                                         pa_status.Text = "1";
-                                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱封箱成功\n", Color.Green);
+                                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱封箱成功\n", Color.LightGreen);
                                         LogicHandler.RecordProdWeight(pa_outboxcode.Text, "CARTON", float.Parse(ActWeigh.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
                                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量完成:" + weight.Text.Trim(), pa_outboxcode.Text, "");
                                         if (LogicHandler.OutBoxStepPass(pa_outboxcode.Text, ms_makecode, User.UserSourceCode, User.UserCode, "卡通箱:" + pa_outboxcode.Text + "整箱过站", "卡通箱整箱过站", out ErrorMessage))
@@ -481,11 +481,11 @@ namespace UAS_MES_NEW.Packing
                                         }
                                         else
                                         {
-                                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed);
                                         }
                                         LoadCheckQTY();
                                         LoadCollectedNum();
-                                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "称量完成\n", Color.Green);
+                                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "称量完成\n", Color.LightGreen);
                                         if (AutoPrint.Checked)
                                             Print_Click(new object(), new EventArgs());
                                         if (!CollecRemark.Checked)
@@ -508,7 +508,7 @@ namespace UAS_MES_NEW.Packing
                                         }
                                     }
                                 }
-                                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed);
                             }
                         }
                         //勾选了取消箱号先验证箱号存不存在,存在的话移除掉,重新加载一次数据
@@ -545,14 +545,14 @@ namespace UAS_MES_NEW.Packing
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "取消采集成功", sn_code.Text, "");
                                 LoadGridData();
                                 pa_status.Text = "0";
-                                OperateResult.AppendText(">>已从该箱中移除序列号" + sn_code.Text + "\n", Color.Green, sn_code);
+                                OperateResult.AppendText(">>已从该箱中移除序列号" + sn_code.Text + "\n", Color.LightGreen, sn_code);
                             }
-                            else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                            else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, sn_code);
                         }
                     }
-                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, sn_code);
                 }
-                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, sn_code);
             }
         }
 
@@ -596,7 +596,7 @@ namespace UAS_MES_NEW.Packing
                     {
                         if (!(weigh >= MinWeight && weigh <= MaxWeight) || weigh == 0)
                         {
-                            OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量,不能完成工序过站\n", Color.Red);
+                            OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量,不能完成工序过站\n", Color.DarkRed);
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量不符合要求:" + weight.Text.Trim(), pa_outboxcode.Text, "");
                             LogicHandler.RecordProdWeight(pa_outboxcode.Text, "CARTON", float.Parse(ActWeigh.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
                             return;
@@ -606,7 +606,7 @@ namespace UAS_MES_NEW.Packing
                     pa_status.Text = "1";
                     pa_standardqty.Text = "";
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "封箱成功", pa_outboxcode.Text, "");
-                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "封箱成功\n", Color.Green);
+                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "封箱成功\n", Color.LightGreen);
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量完成:" + weight.Text.Trim(), pa_outboxcode.Text, "");
                     LogicHandler.RecordProdWeight(pa_outboxcode.Text, "CARTON", float.Parse(ActWeigh.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
                     string ms_makecode = dh.getFieldDataByCondition("packagedetail", "pd_makecode", "pd_outboxcode = '" + pa_outboxcode.Text + "'").ToString();
@@ -616,7 +616,7 @@ namespace UAS_MES_NEW.Packing
                     }
                     else
                     {
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed);
                     }
                     LoadCheckQTY();
                     if (!CollecRemark.Checked)
@@ -639,7 +639,7 @@ namespace UAS_MES_NEW.Packing
                     }
                 }
             }
-            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "错误或者已封箱\n", Color.Red);
+            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "错误或者已封箱\n", Color.DarkRed);
         }
 
         private void SendCheck_Click(object sender, EventArgs e)
@@ -649,7 +649,7 @@ namespace UAS_MES_NEW.Packing
                 DataTable dt = (DataTable)dh.ExecuteSql("select wm_concat(pa_outboxcode) pa_outboxcode from package where pa_checkno='" + ob_checkno.Text + "' and pa_status=0 ", "select");
                 if (dt.Rows[0][0].ToString() != "")
                 {
-                    OperateResult.AppendText(">>批次" + ob_checkno.Text + "存在箱号" + dt.Rows[0][0].ToString() + "未封箱,请先进行封箱\n", Color.Red);
+                    OperateResult.AppendText(">>批次" + ob_checkno.Text + "存在箱号" + dt.Rows[0][0].ToString() + "未封箱,请先进行封箱\n", Color.DarkRed);
                     return;
                 }
                 sql.Clear();
@@ -659,13 +659,13 @@ namespace UAS_MES_NEW.Packing
                 ob_batchqty.Text = "";
                 ob_nowcheckqty.ForeColor = Color.Black;
                 SendCheck.Enabled = false;
-                OperateResult.AppendText(">>批次" + ob_checkno.Text + "送检成功\n", Color.Green);
+                OperateResult.AppendText(">>批次" + ob_checkno.Text + "送检成功\n", Color.LightGreen);
                 LogicHandler.InsertMakeProcess(LastSncode, oMakeCode, User.UserSourceCode, "手动送检", "手动送检成功", User.UserCode);
                 //记录操作日志
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "手动送检", "手动送检成功", "", ob_checkno.Text);
                 ob_checkno.Text = "";
             }
-            else OperateResult.AppendText(">>必须封箱才能送检\n", Color.Red);
+            else OperateResult.AppendText(">>必须封箱才能送检\n", Color.DarkRed);
         }
 
         bool AutoCut;
@@ -701,11 +701,11 @@ namespace UAS_MES_NEW.Packing
                 batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
                 if (nowcheckqty >= batchqty)
                 {
-                    ob_nowcheckqty.ForeColor = Color.Red;
-                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.Red);
+                    ob_nowcheckqty.ForeColor = Color.DarkRed;
+                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.DarkRed);
                     if (AutoCut)
                     {
-                        OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.Green);
+                        OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.LightGreen);
                     }
                 }
             }
@@ -752,7 +752,7 @@ namespace UAS_MES_NEW.Packing
         {
             if (pa_outboxcode.Text == "")
             {
-                OperateResult.AppendText(">>箱号不能为空\n", Color.Red);
+                OperateResult.AppendText(">>箱号不能为空\n", Color.DarkRed);
                 return;
             }
             string Delete = MessageBox.Show(this.ParentForm, "是否确认拆箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
@@ -763,12 +763,12 @@ namespace UAS_MES_NEW.Packing
                 {
                     if (dt.Rows[0]["pa_outno"].ToString() != "")
                     {
-                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.Red);
+                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.DarkRed);
                         return;
                     }
                     if (dt.Rows[0]["pa_iostatus"].ToString() != "0")
                     {
-                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.Red);
+                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.DarkRed);
                         return;
                     }
                     if (dt.Rows[0]["pa_mothercode"].ToString() == "")
@@ -819,17 +819,17 @@ namespace UAS_MES_NEW.Packing
                                 //删除箱的明细
                                 dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", pa_outboxcode.Text, ob_checkno.Text);
-                                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "成功拆解!\n", Color.Green);
+                                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "成功拆解!\n", Color.LightGreen);
                                 LoadGridData();
                                 LoadCheckQTY();
                             }
-                            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已送检,不允许解除\n", Color.Red);
+                            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已送检,不允许解除\n", Color.DarkRed);
                         }
-                        else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已下地,不允许解除\n", Color.Red);
+                        else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已下地,不允许解除\n", Color.DarkRed);
                     }
-                    else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已装箱" + dt.Rows[0]["pa_mothercode"].ToString() + ",不允许解除\n", Color.Red);
+                    else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已装箱" + dt.Rows[0]["pa_mothercode"].ToString() + ",不允许解除\n", Color.DarkRed);
                 }
-                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "不存在\n", Color.Red);
+                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "不存在\n", Color.DarkRed);
             }
         }
 
@@ -878,7 +878,7 @@ namespace UAS_MES_NEW.Packing
                 }
                 if (pa_outboxcode.Text.Length != int.Parse(OutBoxLength.Text))
                 {
-                    OperateResult.AppendText(">>箱号长度错误,请重新输入箱号\n", Color.Red);
+                    OperateResult.AppendText(">>箱号长度错误,请重新输入箱号\n", Color.DarkRed);
                     return false;
                 }
             }
@@ -888,13 +888,13 @@ namespace UAS_MES_NEW.Packing
                 {
                     if (pa_outboxcode.Text.Substring(0, PreFix.Text.Length) != PreFix.Text)
                     {
-                        OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                        OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.DarkRed);
                         return false;
                     }
                 }
                 catch (Exception)
                 {
-                    OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                    OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.DarkRed);
                     return false;
                 }
             }
@@ -941,13 +941,13 @@ namespace UAS_MES_NEW.Packing
                         {
                             if (pa_remark.Text.Substring(0, Remark_PreFix.Text.Length) != Remark_PreFix.Text)
                             {
-                                OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.Red);
+                                OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.DarkRed);
                                 return;
                             }
                         }
                         catch (Exception)
                         {
-                            OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.Red);
+                            OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.DarkRed);
                             return;
                         }
                     }
@@ -956,12 +956,12 @@ namespace UAS_MES_NEW.Packing
                         DataTable dt = (DataTable)dh.ExecuteSql("select pa_outboxcode from package where pa_remark='" + pa_remark.Text.ToUpper() + "'", "select");
                         if (dt.Rows.Count > 0)
                         {
-                            OperateResult.AppendText(">>箱号" + dt.Rows[0][0].ToString() + "已采集关联信息" + pa_remark.Text + "\n", Color.Red);
+                            OperateResult.AppendText(">>箱号" + dt.Rows[0][0].ToString() + "已采集关联信息" + pa_remark.Text + "\n", Color.DarkRed);
                             return;
                         }
                     }
                     dh.UpdateByCondition("package", "pa_remark='" + pa_remark.Text.ToUpper() + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
-                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "关联信息" + pa_remark.Text + "采集成功\n", Color.Green);
+                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "关联信息" + pa_remark.Text + "采集成功\n", Color.LightGreen);
                     pa_remark.Text = "";
                     if (!AutoGenBoxCode.Checked)
                     {
@@ -973,7 +973,7 @@ namespace UAS_MES_NEW.Packing
                         sn_code.Focus();
                     }
                 }
-                else OperateResult.AppendText(">>请先采集箱内数据\n", Color.Red);
+                else OperateResult.AppendText(">>请先采集箱内数据\n", Color.DarkRed);
             }
         }
 

+ 7 - 2
UAS_MES_YTDZ/FunctionCode/Query/Query_LoadMake.cs

@@ -67,9 +67,14 @@ namespace UAS_MES_NEW.Query
                 MessageBox.Show("人数必须大于0");
                 return;
             }
-            if (dh.CheckExist("loadmake", "lm_linecode='" + li_code.Text + "' and lm_stepcode='" + User.CurrentStepCode + "' and lm_downtime is null"))
+            //if (dh.CheckExist("loadmake", "lm_linecode='" + li_code.Text + "' and lm_stepcode='" + User.CurrentStepCode + "' and lm_downtime is null"))
+            //{
+            //    MessageBox.Show("线别" + li_code.Text + "存在在线工单,不允许上线");
+            //    return;
+            //}
+            if (dh.CheckExist("loadmake", "lm_linecode='" + li_code.Text + "' and lm_stepcode='" + User.CurrentStepCode + "' and lm_makecode='" + ma_code.Text + "' and lm_downtime is null"))
             {
-                MessageBox.Show("线别" + li_code.Text + "存在在线工单,不允许上线");
+                MessageBox.Show("线别" + li_code.Text + ",工单" + ma_code.Text + ",工序 " + User.CurrentStepCode + " 存在已上线记录,不允许上线");
                 return;
             }
             dh.ExecuteSql("insert into loadmake(lm_id,lm_makecode,lm_linecode,lm_uptime,lm_inman,lm_mannum,lm_stepcode,lm_uppc)" +

BIN=BIN
UAS_MES_YTDZ/Resources/Sound/1454.wav


BIN=BIN
UAS_MES_YTDZ/Resources/Sound/3853.wav


+ 2 - 0
UAS_MES_YTDZ/UAS_MES_YTDZ.csproj

@@ -1716,6 +1716,8 @@
     <Content Include="Resources\Button\White-side.png" />
     <Content Include="Resources\change_password.png" />
     <None Include="Resources\Sound\4082.wav" />
+    <Content Include="Resources\Sound\1454.wav" />
+    <Content Include="Resources\Sound\3853.wav" />
     <Content Include="Resources\Sound\缺料.wav" />
     <Content Include="Resources\Sound\采集失败.wav" />
     <Content Include="Resources\Sound\采集正确.wav" />