Browse Source

装箱运行重复打标,卡通箱采集支持导入清单

callm 2 years ago
parent
commit
793ae9198b

+ 15 - 2
UAS_MES_LGDZ/FunctionCode/Make/Make_RePrintLabel.Designer.cs

@@ -52,6 +52,7 @@
             this.inputText = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.AllowInBox = new System.Windows.Forms.CheckBox();
             this.groupBoxWithBorder1.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -322,11 +323,22 @@
             this.Printer.Size = new System.Drawing.Size(296, 50);
             this.Printer.TabIndex = 186;
             // 
+            // AllowInBox
+            // 
+            this.AllowInBox.AutoSize = true;
+            this.AllowInBox.Location = new System.Drawing.Point(1230, 300);
+            this.AllowInBox.Name = "AllowInBox";
+            this.AllowInBox.Size = new System.Drawing.Size(258, 28);
+            this.AllowInBox.TabIndex = 205;
+            this.AllowInBox.Text = "允许打印已装箱标签";
+            this.AllowInBox.UseVisualStyleBackColor = true;
+            // 
             // Make_RePrintLabel
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1636, 834);
+            this.Controls.Add(this.AllowInBox);
             this.Controls.Add(this.groupBoxWithBorder1);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.ms_makecode);
@@ -354,9 +366,9 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_RePrintLabel_FormClosing);
             this.Load += new System.EventHandler(this.Make_RePrintLabel_Load);
             this.SizeChanged += new System.EventHandler(this.Make_RePrintLabel_SizeChanged);
-            this.groupBoxWithBorder1.ResumeLayout(false);
+            this.groupBoxWithBorder1.ResumeLayout(true);
             this.groupBoxWithBorder1.PerformLayout();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -384,5 +396,6 @@
         private System.Windows.Forms.Label ms_makecode;
         private System.Windows.Forms.Label pr_detail;
         private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder1;
+        private System.Windows.Forms.CheckBox AllowInBox;
     }
 }

+ 2 - 22
UAS_MES_LGDZ/FunctionCode/Make/Make_RePrintLabel.cs

@@ -243,7 +243,7 @@ namespace UAS_MES_NEW.Make
                     return;
                 }
                 //如果ms_outboxcode 不为空,则提示用户,已经装箱不允许单独打印
-                if (mapB.Rows[0]["ms_outboxcode"].ToString() != "")
+                if (mapB.Rows[0]["ms_outboxcode"].ToString() != "" && !AllowInBox.Checked)
                 {
                     OperateResult.AppendText("<<SN:" + inputValue.Text + "已经装箱" + mapB.Rows[0]["ms_outboxcode"].ToString() + "不允许单独补打\n", Color.Red);
                     return;
@@ -302,27 +302,7 @@ namespace UAS_MES_NEW.Make
             }
         }
 
-        /// <summary>
-        /// 判断彩盒和机身标序列是否已经装箱
-        /// </summary>
-        /// <returns></returns>
-        private bool checkPacked()
-        {
-            //如果存在,则判断是否装箱
-            dt = (DataTable)dh.ExecuteSql("select ms_id,ms_prodcode,ms_makecode,pr_detail, ms_outboxcode from makeserial left join product on pr_code=ms_prodcode where ms_id='" + ms_id + "'", "select");
-            //判断ms_outboxcode 是否为空,如果有值,则返回提示用户“已经装箱
-            if (dt.Rows.Count == 0)
-            {
-                OperateResult.AppendText("<<SN:" + inputText.Text + "不存在\n", Color.Red, inputText);
-                return true;
-            }
-            if (dt.Rows[0]["ms_outboxcode"].ToString() != "")
-            {
-                OperateResult.AppendText("<<SN:" + inputText.Text + "已经装箱" + dt.Rows[0]["ms_outboxcode"].ToString() + "不允许单独补打\n", Color.Red, inputText);
-                return true;
-            }
-            return false;
-        }
+
         /// <summary>
         /// 插入表MAKEDOWN
         /// </summary>

+ 16 - 0
UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -220,6 +220,22 @@ namespace UAS_MES_NEW.Packing
                         {
                             sn_code.Text = dt.Rows[0]["ms_sncode"].ToString();
                         }
+                        else
+                        {
+                            dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei1='" + sn_code.Text + "' order by mil_id desc", "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                sn_code.Text = dt.Rows[0]["mil_sncode"].ToString();
+                            }
+                            else
+                            {
+                                dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei2='" + sn_code.Text + "' order by mil_id desc", "select");
+                                if (dt.Rows.Count > 0)
+                                {
+                                    sn_code.Text = dt.Rows[0]["mil_sncode"].ToString();
+                                }
+                            }
+                        }
                     }
                     dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_nextstepcode,ms_craftcode,ms_prodcode from makeserial where ms_sncode ='" + sn_code.Text + "' order by ms_id desc", "select");
                     if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || (dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))