Browse Source

添加不良提示

章政 7 years ago
parent
commit
4343e341a0

+ 24 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -192,6 +192,10 @@ namespace UAS_MES.Make
                         if (nextstepcode != "" && nextstepcode != User.CurrentStepCode)
                         if (nextstepcode != "" && nextstepcode != User.CurrentStepCode)
                         {
                         {
                             OperateResult.AppendText("当前序列号下一道工序" + nextstepcode + ",当前资源不允许采集\n", Color.Red);
                             OperateResult.AppendText("当前序列号下一道工序" + nextstepcode + ",当前资源不允许采集\n", Color.Red);
+                            if (md.IsOpen)
+                            {
+                                md.SendOrder("M502_ON");
+                            }
                             return;
                             return;
                         }
                         }
                         PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code and cr_prodcode = ms_prodcode", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
                         PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code and cr_prodcode = ms_prodcode", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
@@ -217,6 +221,10 @@ namespace UAS_MES.Make
                             if (locksalecode.Checked && ms_salecode.Text != "" && ms_salecode.Text != ms_salecode_text)
                             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.Red, sn_code);
+                                if (md.IsOpen)
+                                {
+                                    md.SendOrder("M502_ON");
+                                }
                                 return;
                                 return;
                             }
                             }
                             BaseUtil.SetFormValue(this.Controls, dt);
                             BaseUtil.SetFormValue(this.Controls, dt);
@@ -224,11 +232,19 @@ namespace UAS_MES.Make
                         if (dt.Rows[0]["ms_outno"].ToString() != "")
                         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.Red, sn_code);
+                            if (md.IsOpen)
+                            {
+                                md.SendOrder("M502_ON");
+                            }
                             return;
                             return;
                         }
                         }
                         if (dt.Rows[0]["ms_iostatus"].ToString() != "0")
                         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.Red, sn_code);
+                            if (md.IsOpen)
+                            {
+                                md.SendOrder("M502_ON");
+                            }
                             return;
                             return;
                         }
                         }
                         //保证箱内容量不会被重置
                         //保证箱内容量不会被重置
@@ -277,11 +293,19 @@ namespace UAS_MES.Make
                             if (dt.Rows[0]["pa_outno"].ToString() != "")
                             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.Red, sn_code);
+                                if (md.IsOpen)
+                                {
+                                    md.SendOrder("M502_ON");
+                                }
                                 return;
                                 return;
                             }
                             }
                             if (dt.Rows[0]["pa_iostatus"].ToString() != "0")
                             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.Red, sn_code);
+                                if (md.IsOpen)
+                                {
+                                    md.SendOrder("M502_ON");
+                                }
                                 return;
                                 return;
                             }
                             }
                         }
                         }

+ 5 - 5
UAS-MES/FunctionCode/Special/Special_CancelCollection.Designer.cs

@@ -53,7 +53,7 @@
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
             this.sn_code.ID = null;
             this.sn_code.Location = new System.Drawing.Point(151, 164);
             this.sn_code.Location = new System.Drawing.Point(151, 164);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(5);
             this.sn_code.Name = "sn_code";
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
             this.sn_code.Power = null;
             this.sn_code.Size = new System.Drawing.Size(233, 25);
             this.sn_code.Size = new System.Drawing.Size(233, 25);
@@ -70,7 +70,7 @@
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
             this.Confirm.IsShowBorder = true;
             this.Confirm.Location = new System.Drawing.Point(440, 161);
             this.Confirm.Location = new System.Drawing.Point(440, 161);
-            this.Confirm.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(5);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
@@ -85,7 +85,7 @@
             // 
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OperateResult.Location = new System.Drawing.Point(555, 16);
             this.OperateResult.Location = new System.Drawing.Point(555, 16);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(5);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(308, 385);
             this.OperateResult.Size = new System.Drawing.Size(308, 385);
             this.OperateResult.TabIndex = 142;
             this.OperateResult.TabIndex = 142;
@@ -99,7 +99,7 @@
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(668, 412);
             this.Clean.Location = new System.Drawing.Point(668, 412);
-            this.Clean.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.Clean.Margin = new System.Windows.Forms.Padding(5);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -123,7 +123,7 @@
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Name = "Special_CancelCollection";
             this.Name = "Special_CancelCollection";
-            this.Tag = "Special!CancelCollection.cs";
+            this.Tag = "Special!CancelCollection";
             this.Text = "取消采集";
             this.Text = "取消采集";
             this.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
             this.PerformLayout();