Browse Source

修改是否可回流,修改卡通箱装栈板

callm 1 month ago
parent
commit
92dbac8329

+ 49 - 7
UAS_MES_YDCY/FunctionCode/OQC/OQC_PlanMaintain_Cust.cs

@@ -185,15 +185,31 @@ namespace UAS_MES_NEW.OQC
                 sql.Append("where not exists (select ois_id from OQCItemSamples where OIS_SNCODE='" + ms_sncode.Text + "' and ois_itemcode =:ois_itemcode)");
                 dh.BatchInsert(sql.GetString(), new string[] { "ois_itemcode", "ois_ifng", "ois_itemcode" },
                     oi_itemcode_insert.ToArray(), ois_ifng_insert.ToArray(), oi_itemcode_insert.ToArray());
-                if (pcd_okretuenstep != "" && ms_ifqccheck == "-2")
+                if (ReturnStep.Checked)
                 {
-                    dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0,ms_nextstepcode='" + pcd_okretuenstep + "' where ms_id='" + oMSID + "'", "select");
-                }
-                else
-                {
-                    dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0 where ms_id='" + oMSID + "'", "select");
+                    sql.Clear();
+                    sql.Append("select 1  from makeserial left join craft on cr_prodcode=ms_prodcode and cr_code=ms_craftcode " +
+                        " left join craftdetail on cd_crid=cr_id ms_id='" + oMSID + "' and cd_stepcode='" + pcd_okretuenstep + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (pcd_okretuenstep != "" && ms_ifqccheck == "-2")
+                        {
+                            dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0,ms_nextstepcode='" + pcd_okretuenstep + "' where ms_id='" + oMSID + "'", "select");
+                        }
+                        else
+                        {
+                            dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0 where ms_id='" + oMSID + "'", "select");
+                        }
+                    }
+                    else
+                    {
+                        dh.ExecuteSql("delete from makeserial where ms_id='" + oMSID + "'", "delete");
+                        dh.ExecuteSql("delete from steppassed where sp_sncode='" + ms_sncode.Text + "' and sp_makecode='" + oMakeCode + "'", "delete");
+                        string ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id)", "ms_sncode='" + ms_sncode.Text + "'").ToString();
+                        dh.ExecuteSql("update makeserial set ms_nextmacode='',ms_nextstepcode='" + pcd_okretuenstep + "',ms_status=1 where ms_id='" + ms_id + "'", "update");
+                    }
                 }
-
                 //if (LogicHandler.SetStepResult(oMakeCode, User.UserSourceCode, ms_sncode.Text, "良品采集", "OK", User.UserCode, out ErrorMessage))
                 //{
                 OperateResult.AppendText(">>" + ms_sncode.Text + "良品采集成功\n", Color.Green, ms_sncode);
@@ -222,6 +238,32 @@ namespace UAS_MES_NEW.OQC
                 {
                     pcd_ngretuenstep = "";
                 }
+
+                if (ReturnStep.Checked)
+                {
+                    sql.Clear();
+                    sql.Append("select 1  from makeserial left join craft on cr_prodcode=ms_prodcode and cr_code=ms_craftcode " +
+                        " left join craftdetail on cd_crid=cr_id ms_id='" + oMSID + "' and cd_stepcode='" + pcd_ngretuenstep + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (pcd_ngretuenstep != "")
+                        {
+                            dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0,ms_nextstepcode='" + pcd_ngretuenstep + "' where ms_id='" + oMSID + "'", "select");
+                        }
+                        else
+                        {
+                            dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0 where ms_id='" + oMSID + "'", "select");
+                        }
+                    }
+                    else
+                    {
+                        dh.ExecuteSql("delete from makeserial where ms_id='" + oMSID + "'", "delete");
+                        dh.ExecuteSql("delete from steppassed where sp_sncode='" + ms_sncode.Text + "' and sp_makecode='" + oMakeCode + "'", "delete");
+                        string ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id)", "ms_sncode='" + ms_sncode.Text + "'").ToString();
+                        dh.ExecuteSql("update makeserial set ms_nextmacode='',ms_nextstepcode='" + pcd_ngretuenstep + "',ms_status=1 where ms_id='" + ms_id + "'", "update");
+                    }
+                }
                 dh.ExecuteSql("insert into makebad(MB_ID, MB_MAKECODE, MB_MSCODE, MB_SNCODE, MB_INMAN, MB_INDATE, MB_STEPCODE, MB_SOURCECODE, MB_BADCODE, MB_BGCODE, " +
                     "MB_BADNAME, MB_BGNAME, MB_YMD, MB_LINECODE, MB_TYPE, MB_RETURNSTEP)values(makebad_seq.nextval,'" + oMakeCode + "','" + ms_sncode.Text + "','" + ms_sncode.Text + "'," +
                     "'" + User.UserCode + "',sysdate,'" + ms_stepcode + "','" + User.UserSourceCode + "','CustError','CustError','客户抽检不良','客户抽检不良'," +

+ 17 - 4
UAS_MES_YDCY/FunctionCode/OQC/OQC_PlanMaintain_Cust.designer.cs

@@ -28,7 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OQC_PlanMaintain_NEW));
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OQC_PlanMaintain_Cust));
             this.ms_sncode_label = new System.Windows.Forms.Label();
             this.ob_prodcode_label = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
@@ -49,6 +49,7 @@
             this.ms_prodcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ms_sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.SaveData = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ReturnStep = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
             this.SuspendLayout();
             // 
@@ -329,11 +330,22 @@
             this.SaveData.UseVisualStyleBackColor = true;
             this.SaveData.Click += new System.EventHandler(this.SaveData_Click);
             // 
-            // OQC_PlanMaintain_NEW
+            // ReturnStep
+            // 
+            this.ReturnStep.AutoSize = true;
+            this.ReturnStep.Location = new System.Drawing.Point(390, 103);
+            this.ReturnStep.Name = "ReturnStep";
+            this.ReturnStep.Size = new System.Drawing.Size(138, 28);
+            this.ReturnStep.TabIndex = 201;
+            this.ReturnStep.Text = "是否回流";
+            this.ReturnStep.UseVisualStyleBackColor = true;
+            // 
+            // OQC_PlanMaintain_Cust
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(2044, 1166);
+            this.Controls.Add(this.ReturnStep);
             this.Controls.Add(this.SaveData);
             this.Controls.Add(this.Reject);
             this.Controls.Add(this.GoodProduct);
@@ -353,14 +365,14 @@
             this.Controls.Add(this.ms_sncode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(6);
-            this.Name = "OQC_PlanMaintain_NEW";
+            this.Name = "OQC_PlanMaintain_Cust";
             this.Tag = "OQC!PlanMaintain";
             this.Text = "抽样计划维护";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OQC_PlanMaintain_FormClosing);
             this.Load += new System.EventHandler(this.抽样计划维护_Load);
             this.SizeChanged += new System.EventHandler(this.抽样计划维护_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -387,5 +399,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_itemname;
         private System.Windows.Forms.DataGridViewCheckBoxColumn CheckResult;
         private CustomControl.ButtonUtil.NormalButton SaveData;
+        private System.Windows.Forms.CheckBox ReturnStep;
     }
 }

+ 0 - 9
UAS_MES_YDCY/FunctionCode/OQC/OQC_PlanMaintain_Cust.resx

@@ -258,15 +258,6 @@
   <metadata name="CheckResult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="Choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_itemname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="CheckResult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <data name="SaveData.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 51 - 7
UAS_MES_YDCY/FunctionCode/OQC/OQC_PlanMaintain_NEW.cs

@@ -164,15 +164,33 @@ namespace UAS_MES_NEW.OQC
                 //sql.Append("where not exists (select ois_id from OQCItemSamples where OIS_SNCODE='" + ms_sncode.Text + "' and ois_itemcode =:ois_itemcode)");
                 dh.BatchInsert(sql.GetString(), new string[] { "ois_itemcode", "ois_ifng"/*, "ois_itemcode" */},
                     oi_itemcode_insert.ToArray(), ois_ifng_insert.ToArray(), oi_itemcode_insert.ToArray());
-                if (pcd_okretuenstep != "")
-                {
-                    dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0,ms_nextstepcode='" + pcd_okretuenstep + "' where ms_id='" + oMSID + "'", "select");
-                }
-                else
+
+                if (ReturnStep.Checked)
                 {
-                    dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0 where ms_id='" + oMSID + "'", "select");
+                    sql.Clear();
+                    sql.Append("select 1  from makeserial left join craft on cr_prodcode=ms_prodcode and cr_code=ms_craftcode " +
+                        " left join craftdetail on cd_crid=cr_id ms_id='" + oMSID + "' and cd_stepcode='" + pcd_okretuenstep + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (pcd_okretuenstep != "")
+                        {
+                            dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0,ms_nextstepcode='" + pcd_okretuenstep + "' where ms_id='" + oMSID + "'", "select");
+                        }
+                        else
+                        {
+                            dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0 where ms_id='" + oMSID + "'", "select");
+                        }
+                    }
+                    else
+                    {
+                        dh.ExecuteSql("delete from makeserial where ms_id='" + oMSID + "'", "delete");
+                        dh.ExecuteSql("delete from steppassed where sp_sncode='" + ms_sncode.Text + "' and sp_makecode='" + oMakeCode + "'", "delete");
+                        string ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id)", "ms_sncode='" + ms_sncode.Text + "'").ToString();
+                        dh.ExecuteSql("update makeserial set ms_nextmacode='',ms_nextstepcode='" + pcd_okretuenstep + "',ms_status=1 where ms_id='" + ms_id + "'", "update");
+                    }
                 }
-
+                dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0 where ms_id='" + oMSID + "'", "select");
                 //if (LogicHandler.SetStepResult(oMakeCode, User.UserSourceCode, ms_sncode.Text, "良品采集", "OK", User.UserCode, out ErrorMessage))
                 //{
                 OperateResult.AppendText(">>" + ms_sncode.Text + "良品采集成功\n", Color.Green, ms_sncode);
@@ -203,6 +221,32 @@ namespace UAS_MES_NEW.OQC
                     "'" + User.UserCode + "',sysdate,'" + ms_stepcode + "','" + User.UserSourceCode + "','CustError','CustError','客户抽检不良','客户抽检不良'," +
                     "to_char(sysdate,'yyyymmdd'),'" + User.UserLineCode + "','Client','" + pcd_ngretuenstep + "')", "insert");
 
+                if (ReturnStep.Checked)
+                {
+                    sql.Clear();
+                    sql.Append("select 1  from makeserial left join craft on cr_prodcode=ms_prodcode and cr_code=ms_craftcode " +
+                        " left join craftdetail on cd_crid=cr_id ms_id='" + oMSID + "' and cd_stepcode='" + pcd_ngretuenstep + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (pcd_ngretuenstep != "")
+                        {
+                            dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0,ms_nextstepcode='" + pcd_ngretuenstep + "' where ms_id='" + oMSID + "'", "select");
+                        }
+                        else
+                        {
+                            dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0 where ms_id='" + oMSID + "'", "select");
+                        }
+                    }
+                    else
+                    {
+                        dh.ExecuteSql("delete from makeserial where ms_id='" + oMSID + "'", "delete");
+                        dh.ExecuteSql("delete from steppassed where sp_sncode='" + ms_sncode.Text + "' and sp_makecode='" + oMakeCode + "'", "delete");
+                        string ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id)", "ms_sncode='" + ms_sncode.Text + "'").ToString();
+                        dh.ExecuteSql("update makeserial set ms_nextmacode='',ms_nextstepcode='" + pcd_ngretuenstep + "',ms_status=1 where ms_id='" + ms_id + "'", "update");
+                    }
+                }
+
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "采集不良品", "采集不良品成功", ms_sncode.Text, "");
                 //}
                 //else

+ 14 - 1
UAS_MES_YDCY/FunctionCode/OQC/OQC_PlanMaintain_NEW.designer.cs

@@ -49,6 +49,7 @@
             this.ms_prodcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ms_sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.SaveData = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ReturnStep = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
             this.SuspendLayout();
             // 
@@ -329,11 +330,22 @@
             this.SaveData.UseVisualStyleBackColor = true;
             this.SaveData.Click += new System.EventHandler(this.SaveData_Click);
             // 
+            // ReturnStep
+            // 
+            this.ReturnStep.AutoSize = true;
+            this.ReturnStep.Location = new System.Drawing.Point(410, 103);
+            this.ReturnStep.Name = "ReturnStep";
+            this.ReturnStep.Size = new System.Drawing.Size(138, 28);
+            this.ReturnStep.TabIndex = 200;
+            this.ReturnStep.Text = "是否回流";
+            this.ReturnStep.UseVisualStyleBackColor = true;
+            // 
             // OQC_PlanMaintain_NEW
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(2044, 1166);
+            this.Controls.Add(this.ReturnStep);
             this.Controls.Add(this.SaveData);
             this.Controls.Add(this.Reject);
             this.Controls.Add(this.GoodProduct);
@@ -360,7 +372,7 @@
             this.Load += new System.EventHandler(this.抽样计划维护_Load);
             this.SizeChanged += new System.EventHandler(this.抽样计划维护_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -387,5 +399,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_itemname;
         private System.Windows.Forms.DataGridViewCheckBoxColumn CheckResult;
         private CustomControl.ButtonUtil.NormalButton SaveData;
+        private System.Windows.Forms.CheckBox ReturnStep;
     }
 }

+ 0 - 9
UAS_MES_YDCY/FunctionCode/OQC/OQC_PlanMaintain_NEW.resx

@@ -258,15 +258,6 @@
   <metadata name="CheckResult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="Choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_itemname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="CheckResult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <data name="SaveData.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 34 - 34
UAS_MES_YDCY/FunctionCode/Packing/Packing_PackageCollectionPallet.Designer.cs

@@ -387,7 +387,7 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(537, 39);
+            this.label1.Location = new System.Drawing.Point(538, 40);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(146, 41);
@@ -410,7 +410,7 @@
             this.checkweightlabel.AutoSize = true;
             this.checkweightlabel.CutLength = null;
             this.checkweightlabel.ForeColor = System.Drawing.Color.Red;
-            this.checkweightlabel.Location = new System.Drawing.Point(63, 55);
+            this.checkweightlabel.Location = new System.Drawing.Point(64, 56);
             this.checkweightlabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.checkweightlabel.MaximumSize = new System.Drawing.Size(400, 0);
             this.checkweightlabel.Name = "checkweightlabel";
@@ -421,7 +421,7 @@
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(699, 183);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(700, 184);
             this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 41);
@@ -431,7 +431,7 @@
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.Location = new System.Drawing.Point(699, 107);
+            this.ob_batchqty.Location = new System.Drawing.Point(700, 108);
             this.ob_batchqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 41);
@@ -441,7 +441,7 @@
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(537, 183);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(538, 184);
             this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
             this.ob_nowcheckqty_label.Size = new System.Drawing.Size(146, 41);
@@ -452,7 +452,7 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.Location = new System.Drawing.Point(537, 111);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(538, 112);
             this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(146, 41);
@@ -463,7 +463,7 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno.Location = new System.Drawing.Point(699, 39);
+            this.ob_checkno.Location = new System.Drawing.Point(700, 40);
             this.ob_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 41);
@@ -528,7 +528,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(23, 185);
+            this.label3.Location = new System.Drawing.Point(24, 186);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(146, 41);
@@ -578,7 +578,7 @@
             // 
             this.PrintList_label.AutoSize = true;
             this.PrintList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintList_label.Location = new System.Drawing.Point(23, 105);
+            this.PrintList_label.Location = new System.Drawing.Point(24, 106);
             this.PrintList_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintList_label.Name = "PrintList_label";
             this.PrintList_label.Size = new System.Drawing.Size(178, 41);
@@ -589,7 +589,7 @@
             // 
             this.PrintNum_label.AutoSize = true;
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintNum_label.Location = new System.Drawing.Point(423, 267);
+            this.PrintNum_label.Location = new System.Drawing.Point(424, 268);
             this.PrintNum_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintNum_label.Name = "PrintNum_label";
             this.PrintNum_label.Size = new System.Drawing.Size(82, 41);
@@ -636,7 +636,7 @@
             this.locksalecode.AutoSize = true;
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.ForeColor = System.Drawing.Color.Red;
-            this.locksalecode.Location = new System.Drawing.Point(591, 41);
+            this.locksalecode.Location = new System.Drawing.Point(592, 42);
             this.locksalecode.Margin = new System.Windows.Forms.Padding(6);
             this.locksalecode.Name = "locksalecode";
             this.locksalecode.Size = new System.Drawing.Size(186, 28);
@@ -648,7 +648,7 @@
             // 
             this.PreFix_label.AutoSize = true;
             this.PreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PreFix_label.Location = new System.Drawing.Point(365, 37);
+            this.PreFix_label.Location = new System.Drawing.Point(366, 38);
             this.PreFix_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PreFix_label.Name = "PreFix_label";
             this.PreFix_label.Size = new System.Drawing.Size(71, 36);
@@ -676,7 +676,7 @@
             // 
             this.pa_salecode_label.AutoSize = true;
             this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode_label.Location = new System.Drawing.Point(427, 281);
+            this.pa_salecode_label.Location = new System.Drawing.Point(428, 282);
             this.pa_salecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_salecode_label.Name = "pa_salecode_label";
             this.pa_salecode_label.Size = new System.Drawing.Size(146, 41);
@@ -687,7 +687,7 @@
             // 
             this.ma_code_label.AutoSize = true;
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(19, 281);
+            this.ma_code_label.Location = new System.Drawing.Point(20, 282);
             this.ma_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ma_code_label.Name = "ma_code_label";
             this.ma_code_label.Size = new System.Drawing.Size(114, 41);
@@ -698,7 +698,7 @@
             // 
             this.ms_salecode.AutoSize = true;
             this.ms_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_salecode.Location = new System.Drawing.Point(589, 281);
+            this.ms_salecode.Location = new System.Drawing.Point(590, 282);
             this.ms_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_salecode.Name = "ms_salecode";
             this.ms_salecode.Size = new System.Drawing.Size(0, 41);
@@ -708,7 +708,7 @@
             // 
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(191, 281);
+            this.ms_makecode.Location = new System.Drawing.Point(192, 282);
             this.ms_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_makecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_makecode.Name = "ms_makecode";
@@ -719,7 +719,7 @@
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(169, 37);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(170, 38);
             this.OutBoxLength_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
             this.OutBoxLength_label.Size = new System.Drawing.Size(71, 36);
@@ -785,7 +785,7 @@
             this.AutoGenBoxCode.AutoSize = true;
             this.AutoGenBoxCode.Checked = true;
             this.AutoGenBoxCode.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(503, 97);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(504, 98);
             this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(4);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
             this.AutoGenBoxCode.Size = new System.Drawing.Size(178, 45);
@@ -798,7 +798,7 @@
             // 
             this.pa_currentqty_label.AutoSize = true;
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty_label.Location = new System.Drawing.Point(431, 161);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(432, 162);
             this.pa_currentqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
             this.pa_currentqty_label.Size = new System.Drawing.Size(146, 41);
@@ -809,7 +809,7 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(427, 217);
+            this.pr_detail_label.Location = new System.Drawing.Point(428, 218);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
@@ -838,7 +838,7 @@
             // 
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty.Location = new System.Drawing.Point(587, 157);
+            this.pa_currentqty.Location = new System.Drawing.Point(588, 158);
             this.pa_currentqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_currentqty.Name = "pa_currentqty";
             this.pa_currentqty.Size = new System.Drawing.Size(0, 41);
@@ -848,7 +848,7 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(19, 217);
+            this.pr_code_label.Location = new System.Drawing.Point(20, 218);
             this.pr_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code_label.Name = "pr_code_label";
             this.pr_code_label.Size = new System.Drawing.Size(146, 41);
@@ -859,7 +859,7 @@
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(589, 217);
+            this.pr_detail.Location = new System.Drawing.Point(590, 218);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 41);
@@ -869,7 +869,7 @@
             // 
             this.pr_outboxinnerqty_label.AutoSize = true;
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(19, 155);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(20, 156);
             this.pr_outboxinnerqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
             this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(146, 41);
@@ -880,7 +880,7 @@
             // 
             this.pr_code.AutoSize = true;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(191, 217);
+            this.pr_code.Location = new System.Drawing.Point(192, 218);
             this.pr_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_code.Name = "pr_code";
@@ -892,7 +892,7 @@
             // 
             this.pa_code_label.AutoSize = true;
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_code_label.Location = new System.Drawing.Point(19, 95);
+            this.pa_code_label.Location = new System.Drawing.Point(20, 96);
             this.pa_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_code_label.Name = "pa_code_label";
             this.pa_code_label.Size = new System.Drawing.Size(114, 41);
@@ -1145,7 +1145,7 @@
             // 
             this.sumpalletweight.AutoSize = true;
             this.sumpalletweight.Font = new System.Drawing.Font("微软雅黑", 25F);
-            this.sumpalletweight.Location = new System.Drawing.Point(33, 296);
+            this.sumpalletweight.Location = new System.Drawing.Point(34, 297);
             this.sumpalletweight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.sumpalletweight.Name = "sumpalletweight";
             this.sumpalletweight.Size = new System.Drawing.Size(0, 88);
@@ -1155,7 +1155,7 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(17, 222);
+            this.label4.Location = new System.Drawing.Point(18, 223);
             this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(210, 41);
@@ -1167,7 +1167,7 @@
             this.weight.AutoSize = true;
             this.weight.Font = new System.Drawing.Font("微软雅黑", 35F);
             this.weight.ForeColor = System.Drawing.Color.DarkGreen;
-            this.weight.Location = new System.Drawing.Point(29, 115);
+            this.weight.Location = new System.Drawing.Point(30, 116);
             this.weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.weight.Name = "weight";
             this.weight.Size = new System.Drawing.Size(0, 121);
@@ -1177,7 +1177,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(17, 47);
+            this.label5.Location = new System.Drawing.Point(18, 48);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(146, 41);
@@ -1546,14 +1546,14 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PackCollection_FormClosing);
             this.Load += new System.EventHandler(this.PackCollection_Load);
             this.SizeChanged += new System.EventHandler(this.PackCollection_SizeChanged);
-            this.groupBoxWithBorder2.ResumeLayout(true);
+            this.groupBoxWithBorder2.ResumeLayout(false);
             this.groupBoxWithBorder2.PerformLayout();
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).EndInit();
-            this.groupBoxWithBorder3.ResumeLayout(true);
+            this.groupBoxWithBorder3.ResumeLayout(false);
             this.groupBoxWithBorder3.PerformLayout();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Packing/Packing_PackageCollectionPallet.cs

@@ -773,7 +773,7 @@ namespace UAS_MES_NEW.Packing
             }
         }
 
-     
+
         private void PrintLabel_SelectedValueChanged(object sender, EventArgs e)
         {
             if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")

+ 335 - 27
UAS_MES_YDCY/FunctionCode/Packing/Packing_PalletWightCollection.Designer.cs

@@ -68,7 +68,7 @@
             this.RefreshWeigh = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.pr_code = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ma_code = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.pr_cartongw = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pr_palletweight = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.StopWeight = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.StartWeight = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.PalletPreFix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
@@ -98,6 +98,26 @@
             this.pa_totalqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pa_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.label1 = new System.Windows.Forms.Label();
+            this.pa_length = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label12 = new System.Windows.Forms.Label();
+            this.pa_width = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.pa_heigth = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label14 = new System.Windows.Forms.Label();
+            this.label15 = new System.Windows.Forms.Label();
+            this.PrintNum2 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.label9 = new System.Windows.Forms.Label();
+            this.PrintThird = new System.Windows.Forms.CheckBox();
+            this.PrintLabel2 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.label10 = new System.Windows.Forms.Label();
+            this.PrintList2 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.label11 = new System.Windows.Forms.Label();
+            this.PrintNum1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.PrintSecond = new System.Windows.Forms.CheckBox();
+            this.PrintLabel1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.label7 = new System.Windows.Forms.Label();
+            this.PrintList1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.label8 = new System.Windows.Forms.Label();
             this.panel4.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
@@ -139,7 +159,7 @@
             // 
             this.pa_restqty_label.AutoSize = true;
             this.pa_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_restqty_label.Location = new System.Drawing.Point(1618, 260);
+            this.pa_restqty_label.Location = new System.Drawing.Point(1615, 307);
             this.pa_restqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_restqty_label.Name = "pa_restqty_label";
             this.pa_restqty_label.Size = new System.Drawing.Size(146, 41);
@@ -337,11 +357,11 @@
             this.panel4.Controls.Add(this.pr_colorboxunit);
             this.panel4.Controls.Add(this.weight_label);
             this.panel4.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.panel4.Location = new System.Drawing.Point(1184, 328);
+            this.panel4.Location = new System.Drawing.Point(1081, 365);
             this.panel4.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.panel4.Name = "panel4";
             this.panel4.Padding = new System.Windows.Forms.Padding(6);
-            this.panel4.Size = new System.Drawing.Size(592, 250);
+            this.panel4.Size = new System.Drawing.Size(695, 213);
             this.panel4.TabIndex = 197;
             this.panel4.TabStop = false;
             this.panel4.Text = "重量";
@@ -351,7 +371,7 @@
             // 
             this.weight.Font = new System.Drawing.Font("微软雅黑", 40F);
             this.weight.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
-            this.weight.Location = new System.Drawing.Point(181, 101);
+            this.weight.Location = new System.Drawing.Point(185, 52);
             this.weight.Name = "weight";
             this.weight.Size = new System.Drawing.Size(367, 148);
             this.weight.TabIndex = 43;
@@ -362,7 +382,7 @@
             this.pr_colorboxunit.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.pr_colorboxunit.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_colorboxunit.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.pr_colorboxunit.Location = new System.Drawing.Point(38, 202);
+            this.pr_colorboxunit.Location = new System.Drawing.Point(41, 205);
             this.pr_colorboxunit.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_colorboxunit.Name = "pr_colorboxunit";
             this.pr_colorboxunit.Size = new System.Drawing.Size(60, 50);
@@ -376,7 +396,7 @@
             this.weight_label.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.weight_label.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.weight_label.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.weight_label.Location = new System.Drawing.Point(38, 104);
+            this.weight_label.Location = new System.Drawing.Point(41, 88);
             this.weight_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.weight_label.Name = "weight_label";
             this.weight_label.Size = new System.Drawing.Size(98, 50);
@@ -412,7 +432,7 @@
             // 
             this.pr_colorboxgw_label.AutoSize = true;
             this.pr_colorboxgw_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_colorboxgw_label.Location = new System.Drawing.Point(1168, 258);
+            this.pr_colorboxgw_label.Location = new System.Drawing.Point(1098, 302);
             this.pr_colorboxgw_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_colorboxgw_label.Name = "pr_colorboxgw_label";
             this.pr_colorboxgw_label.Size = new System.Drawing.Size(146, 41);
@@ -462,18 +482,18 @@
             this.ma_code.TabIndex = 204;
             this.ma_code.Visible = false;
             // 
-            // pr_cartongw
+            // pr_palletweight
             // 
-            this.pr_cartongw.AutoSize = true;
-            this.pr_cartongw.CutLength = null;
-            this.pr_cartongw.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_cartongw.Location = new System.Drawing.Point(1336, 258);
-            this.pr_cartongw.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.pr_cartongw.MaximumSize = new System.Drawing.Size(300, 0);
-            this.pr_cartongw.Name = "pr_cartongw";
-            this.pr_cartongw.Size = new System.Drawing.Size(0, 41);
-            this.pr_cartongw.TabIndex = 203;
-            this.pr_cartongw.Tag = "1";
+            this.pr_palletweight.AutoSize = true;
+            this.pr_palletweight.CutLength = null;
+            this.pr_palletweight.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pr_palletweight.Location = new System.Drawing.Point(1256, 302);
+            this.pr_palletweight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_palletweight.MaximumSize = new System.Drawing.Size(300, 0);
+            this.pr_palletweight.Name = "pr_palletweight";
+            this.pr_palletweight.Size = new System.Drawing.Size(0, 41);
+            this.pr_palletweight.TabIndex = 203;
+            this.pr_palletweight.Tag = "1";
             // 
             // StopWeight
             // 
@@ -501,7 +521,7 @@
             this.StartWeight.DownImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.DownImage")));
             this.StartWeight.Image = ((System.Drawing.Image)(resources.GetObject("StartWeight.Image")));
             this.StartWeight.IsShowBorder = true;
-            this.StartWeight.Location = new System.Drawing.Point(1822, 392);
+            this.StartWeight.Location = new System.Drawing.Point(1822, 418);
             this.StartWeight.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.StartWeight.MoveImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.MoveImage")));
             this.StartWeight.Name = "StartWeight";
@@ -561,7 +581,7 @@
             // AutoPrint
             // 
             this.AutoPrint.Checked = false;
-            this.AutoPrint.Location = new System.Drawing.Point(1792, 328);
+            this.AutoPrint.Location = new System.Drawing.Point(1788, 362);
             this.AutoPrint.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8);
             this.AutoPrint.Name = "AutoPrint";
             this.AutoPrint.Size = new System.Drawing.Size(168, 44);
@@ -589,7 +609,7 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(1784, 260);
+            this.PrintNum.Location = new System.Drawing.Point(1784, 308);
             this.PrintNum.Margin = new System.Windows.Forms.Padding(6);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
@@ -662,10 +682,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(1176, 602);
+            this.OperateResult.Location = new System.Drawing.Point(1081, 602);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(744, 404);
+            this.OperateResult.Size = new System.Drawing.Size(476, 404);
             this.OperateResult.TabIndex = 167;
             this.OperateResult.Text = "";
             // 
@@ -788,8 +808,9 @@
             this.PackageInf.Location = new System.Drawing.Point(6, 258);
             this.PackageInf.Margin = new System.Windows.Forms.Padding(6);
             this.PackageInf.Name = "PackageInf";
+            this.PackageInf.RowHeadersWidth = 82;
             this.PackageInf.RowTemplate.Height = 23;
-            this.PackageInf.Size = new System.Drawing.Size(1148, 748);
+            this.PackageInf.Size = new System.Drawing.Size(1055, 748);
             this.PackageInf.TabIndex = 156;
             // 
             // pd_outboxcode
@@ -890,17 +911,284 @@
             this.label1.TabIndex = 208;
             this.label1.Text = "备注";
             // 
+            // pa_length
+            // 
+            this.pa_length.AllPower = null;
+            this.pa_length.BackColor = System.Drawing.Color.White;
+            this.pa_length.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_length.ID = null;
+            this.pa_length.Location = new System.Drawing.Point(1160, 238);
+            this.pa_length.Margin = new System.Windows.Forms.Padding(6);
+            this.pa_length.Name = "pa_length";
+            this.pa_length.Power = null;
+            this.pa_length.Size = new System.Drawing.Size(89, 39);
+            this.pa_length.Str = null;
+            this.pa_length.Str1 = null;
+            this.pa_length.Str2 = null;
+            this.pa_length.TabIndex = 210;
+            // 
+            // label12
+            // 
+            this.label12.AutoSize = true;
+            this.label12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label12.Location = new System.Drawing.Point(1098, 236);
+            this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(50, 41);
+            this.label12.TabIndex = 209;
+            this.label12.Text = "长";
+            // 
+            // pa_width
+            // 
+            this.pa_width.AllPower = null;
+            this.pa_width.BackColor = System.Drawing.Color.White;
+            this.pa_width.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_width.ID = null;
+            this.pa_width.Location = new System.Drawing.Point(1312, 238);
+            this.pa_width.Margin = new System.Windows.Forms.Padding(6);
+            this.pa_width.Name = "pa_width";
+            this.pa_width.Power = null;
+            this.pa_width.Size = new System.Drawing.Size(87, 39);
+            this.pa_width.Str = null;
+            this.pa_width.Str1 = null;
+            this.pa_width.Str2 = null;
+            this.pa_width.TabIndex = 212;
+            // 
+            // pa_heigth
+            // 
+            this.pa_heigth.AllPower = null;
+            this.pa_heigth.BackColor = System.Drawing.Color.White;
+            this.pa_heigth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_heigth.ID = null;
+            this.pa_heigth.Location = new System.Drawing.Point(1470, 238);
+            this.pa_heigth.Margin = new System.Windows.Forms.Padding(6);
+            this.pa_heigth.Name = "pa_heigth";
+            this.pa_heigth.Power = null;
+            this.pa_heigth.Size = new System.Drawing.Size(90, 39);
+            this.pa_heigth.Str = null;
+            this.pa_heigth.Str1 = null;
+            this.pa_heigth.Str2 = null;
+            this.pa_heigth.TabIndex = 214;
+            // 
+            // label14
+            // 
+            this.label14.AutoSize = true;
+            this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label14.Location = new System.Drawing.Point(1261, 236);
+            this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label14.Name = "label14";
+            this.label14.Size = new System.Drawing.Size(50, 41);
+            this.label14.TabIndex = 211;
+            this.label14.Text = "宽";
+            // 
+            // label15
+            // 
+            this.label15.AutoSize = true;
+            this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label15.Location = new System.Drawing.Point(1412, 236);
+            this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label15.Name = "label15";
+            this.label15.Size = new System.Drawing.Size(50, 41);
+            this.label15.TabIndex = 213;
+            this.label15.Text = "高";
+            // 
+            // PrintNum2
+            // 
+            this.PrintNum2.AllPower = null;
+            this.PrintNum2.BackColor = System.Drawing.Color.White;
+            this.PrintNum2.ID = null;
+            this.PrintNum2.Location = new System.Drawing.Point(1844, 774);
+            this.PrintNum2.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum2.Name = "PrintNum2";
+            this.PrintNum2.Negative = false;
+            this.PrintNum2.Power = null;
+            this.PrintNum2.Size = new System.Drawing.Size(85, 35);
+            this.PrintNum2.Str = null;
+            this.PrintNum2.Str1 = null;
+            this.PrintNum2.Str2 = null;
+            this.PrintNum2.TabIndex = 255;
+            this.PrintNum2.Text = "1";
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(1750, 770);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(82, 41);
+            this.label9.TabIndex = 254;
+            this.label9.Text = "份数";
+            // 
+            // PrintThird
+            // 
+            this.PrintThird.AutoSize = true;
+            this.PrintThird.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintThird.ForeColor = System.Drawing.Color.Red;
+            this.PrintThird.Location = new System.Drawing.Point(1569, 776);
+            this.PrintThird.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintThird.Name = "PrintThird";
+            this.PrintThird.Size = new System.Drawing.Size(174, 28);
+            this.PrintThird.TabIndex = 253;
+            this.PrintThird.Text = "打印副标签2";
+            this.PrintThird.UseVisualStyleBackColor = true;
+            // 
+            // PrintLabel2
+            // 
+            this.PrintLabel2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel2.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintLabel2.FormattingEnabled = true;
+            this.PrintLabel2.Location = new System.Drawing.Point(1713, 868);
+            this.PrintLabel2.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintLabel2.Name = "PrintLabel2";
+            this.PrintLabel2.Size = new System.Drawing.Size(264, 39);
+            this.PrintLabel2.TabIndex = 251;
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(1562, 866);
+            this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(101, 41);
+            this.label10.TabIndex = 252;
+            this.label10.Text = "标签2";
+            // 
+            // PrintList2
+            // 
+            this.PrintList2.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintList2.Location = new System.Drawing.Point(1713, 813);
+            this.PrintList2.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.PrintList2.Name = "PrintList2";
+            this.PrintList2.Size = new System.Drawing.Size(264, 56);
+            this.PrintList2.TabIndex = 250;
+            // 
+            // label11
+            // 
+            this.label11.AutoSize = true;
+            this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label11.Location = new System.Drawing.Point(1562, 813);
+            this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(133, 41);
+            this.label11.TabIndex = 249;
+            this.label11.Text = "打印机2";
+            // 
+            // PrintNum1
+            // 
+            this.PrintNum1.AllPower = null;
+            this.PrintNum1.BackColor = System.Drawing.Color.White;
+            this.PrintNum1.ID = null;
+            this.PrintNum1.Location = new System.Drawing.Point(1844, 627);
+            this.PrintNum1.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum1.Name = "PrintNum1";
+            this.PrintNum1.Negative = false;
+            this.PrintNum1.Power = null;
+            this.PrintNum1.Size = new System.Drawing.Size(85, 35);
+            this.PrintNum1.Str = null;
+            this.PrintNum1.Str1 = null;
+            this.PrintNum1.Str2 = null;
+            this.PrintNum1.TabIndex = 248;
+            this.PrintNum1.Text = "1";
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(1750, 623);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(82, 41);
+            this.label6.TabIndex = 247;
+            this.label6.Text = "份数";
+            // 
+            // PrintSecond
+            // 
+            this.PrintSecond.AutoSize = true;
+            this.PrintSecond.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintSecond.ForeColor = System.Drawing.Color.Red;
+            this.PrintSecond.Location = new System.Drawing.Point(1569, 629);
+            this.PrintSecond.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintSecond.Name = "PrintSecond";
+            this.PrintSecond.Size = new System.Drawing.Size(162, 28);
+            this.PrintSecond.TabIndex = 246;
+            this.PrintSecond.Text = "打印副标签";
+            this.PrintSecond.UseVisualStyleBackColor = true;
+            // 
+            // PrintLabel1
+            // 
+            this.PrintLabel1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel1.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintLabel1.FormattingEnabled = true;
+            this.PrintLabel1.Location = new System.Drawing.Point(1713, 721);
+            this.PrintLabel1.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintLabel1.Name = "PrintLabel1";
+            this.PrintLabel1.Size = new System.Drawing.Size(264, 39);
+            this.PrintLabel1.TabIndex = 244;
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(1562, 719);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(101, 41);
+            this.label7.TabIndex = 245;
+            this.label7.Text = "标签1";
+            // 
+            // PrintList1
+            // 
+            this.PrintList1.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintList1.Location = new System.Drawing.Point(1713, 666);
+            this.PrintList1.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.PrintList1.Name = "PrintList1";
+            this.PrintList1.Size = new System.Drawing.Size(264, 56);
+            this.PrintList1.TabIndex = 243;
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(1562, 666);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(133, 41);
+            this.label8.TabIndex = 242;
+            this.label8.Text = "打印机1";
+            // 
             // Packing_PalletWightCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1988, 1104);
+            this.Controls.Add(this.PrintNum2);
+            this.Controls.Add(this.label9);
+            this.Controls.Add(this.PrintThird);
+            this.Controls.Add(this.PrintLabel2);
+            this.Controls.Add(this.label10);
+            this.Controls.Add(this.PrintList2);
+            this.Controls.Add(this.label11);
+            this.Controls.Add(this.PrintNum1);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.PrintSecond);
+            this.Controls.Add(this.PrintLabel1);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.PrintList1);
+            this.Controls.Add(this.label8);
+            this.Controls.Add(this.pa_length);
+            this.Controls.Add(this.label12);
+            this.Controls.Add(this.pa_width);
+            this.Controls.Add(this.pa_heigth);
+            this.Controls.Add(this.label14);
+            this.Controls.Add(this.label15);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.pa_remark);
             this.Controls.Add(this.RefreshWeigh);
             this.Controls.Add(this.pr_code);
             this.Controls.Add(this.ma_code);
-            this.Controls.Add(this.pr_cartongw);
+            this.Controls.Add(this.pr_palletweight);
             this.Controls.Add(this.pr_colorboxgw_label);
             this.Controls.Add(this.StopWeight);
             this.Controls.Add(this.StartWeight);
@@ -1018,7 +1306,7 @@
         private System.Windows.Forms.Label BaudRate;
         private CustomControl.ButtonUtil.NormalButton StopWeight;
         private CustomControl.ButtonUtil.NormalButton StartWeight;
-        private CustomControl.ValueLabel.ValueLabel pr_cartongw;
+        private CustomControl.ValueLabel.ValueLabel pr_palletweight;
         private System.Windows.Forms.Label pr_colorboxgw_label;
         private CustomControl.ValueLabel.ValueLabel ma_code;
         private CustomControl.ValueLabel.ValueLabel pr_code;
@@ -1026,5 +1314,25 @@
         private System.Windows.Forms.TextBox weight;
         private CustomControl.TextBoxWithIcon.SnCollectionBox pa_remark;
         private System.Windows.Forms.Label label1;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pa_length;
+        private System.Windows.Forms.Label label12;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pa_width;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pa_heigth;
+        private System.Windows.Forms.Label label14;
+        private System.Windows.Forms.Label label15;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum2;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.CheckBox PrintThird;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel2;
+        private System.Windows.Forms.Label label10;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrintList2;
+        private System.Windows.Forms.Label label11;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum1;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.CheckBox PrintSecond;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel1;
+        private System.Windows.Forms.Label label7;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrintList1;
+        private System.Windows.Forms.Label label8;
     }
 }

+ 39 - 11
UAS_MES_YDCY/FunctionCode/Packing/Packing_PalletWightCollection.cs

@@ -16,6 +16,7 @@ using Seagull.BarTender.Print;
 using System.Net.Sockets;
 using System.Net;
 using System.Text.RegularExpressions;
+using HslCommunication.Profinet.Knx;
 
 namespace UAS_MES_NEW.Packing
 {
@@ -111,7 +112,7 @@ namespace UAS_MES_NEW.Packing
             {
                 LoadGridData();
                 sql.Clear();
-                sql.Append("select pa_makecode,pa_id,pa_status,nvl(pa_standardqty,PR_PALLETQTY)pa_standardqty,pa_prodcode,pa_packageqty,pa_totalqty,pa_salecode,pa_currentqty,pr_code pa_prodcode,pa_outboxcode,pa_totalqty,pa_custcode ");
+                sql.Append("select pa_width,pa_length,pa_heigth,pa_makecode,pa_id,pa_status,nvl(pa_standardqty,PR_PALLETQTY)pa_standardqty,pa_prodcode,pa_packageqty,pa_totalqty,pa_salecode,pa_currentqty,pr_code pa_prodcode,pa_outboxcode,pa_totalqty,pa_custcode ");
                 sql.Append("from package left join packagedetail on pa_id =pd_paid left join product on pr_code=pd_prodcode where pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type =3");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
@@ -149,7 +150,7 @@ namespace UAS_MES_NEW.Packing
                     }
                     //根据箱号查询表单数据
                     sql.Clear();
-                    sql.Append("select pa_totalqty,ma_code,ma_qty,ma_salecode,pa_prodcode,PA_STANDARDQTY PA_STANDARDQTYCARTON,PA_CURRENTQTY,pr_detail,pr_cartonunit,pr_code,pr_cartongw,");
+                    sql.Append("select pa_totalqty,ma_code,ma_qty,ma_salecode,pa_prodcode,PA_STANDARDQTY PA_STANDARDQTYCARTON,PA_CURRENTQTY,pr_detail,pr_cartonunit,pr_code,pr_palletweight,");
                     sql.Append("pr_cartonmaxw,pr_cartonminw,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype from package left join packagedetail ");
                     sql.Append("on pa_id=pd_paid left join makeserial on ms_sncode=pd_barcode and ms_makecode=pa_makecode left join product on pr_code=pd_prodcode left join make on ma_code=pd_makecode ");
                     sql.Append(" where pa_outboxcode='" + outboxcode.Text + "' and pa_nextstep='" + User.CurrentStepCode + "'");
@@ -161,7 +162,7 @@ namespace UAS_MES_NEW.Packing
                         string ErrorMessage;
                         //重量的临时变量
                         PR_CHECKCARTONW = dt.Rows[0]["PR_CHECKCARTONW"].ToString();
-                        string _weight = dt.Rows[0]["pr_cartongw"].ToString();
+                        string _weight = dt.Rows[0]["pr_palletweight"].ToString();
                         string _maxweight = dt.Rows[0]["pr_cartonmaxw"].ToString();
                         string _minweight = dt.Rows[0]["pr_cartonminw"].ToString();
                         string pa_pr_cartonunit = dt.Rows[0]["pr_cartonunit"].ToString();
@@ -171,12 +172,12 @@ namespace UAS_MES_NEW.Packing
                         MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
                         MinWeight = double.Parse(_minweight == "" ? "0" : _minweight);
                         if (Weight - MinWeight == MaxWeight - Weight)
-                            pr_cartongw.Text = Weight + "±" + (MaxWeight - Weight) + dt.Rows[0]["pr_cartonunit"].ToString();
+                            pr_palletweight.Text = Weight + "±" + (MaxWeight - Weight) + dt.Rows[0]["pr_cartonunit"].ToString();
                         else
-                            pr_cartongw.Text = MinWeight + "-" + MaxWeight + dt.Rows[0]["pr_cartonunit"].ToString();
+                            pr_palletweight.Text = MinWeight + "-" + MaxWeight + dt.Rows[0]["pr_cartonunit"].ToString();
                         double ActualWeight = double.Parse(weight.Text == "" ? "0" : weight.Text.Replace("kg", "").Trim());
                         //需要检查称重重量
-                        if (PR_CHECKCARTONW != "0" && PA_STANDARDQTY == PA_CURRENTQTY)
+                        if (PA_STANDARDQTY == PA_CURRENTQTY)
                         {
                             //称量合格或不合格都记录重量
                             if (ActualWeight >= MinWeight && ActualWeight <= MaxWeight && ActualWeight != 0)
@@ -493,6 +494,11 @@ namespace UAS_MES_NEW.Packing
             {
                 if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
                 {
+                    if (pa_length.Text == "" || pa_width.Text == "" || pa_heigth.Text == "")
+                    {
+                        OperateResult.AppendText(">>长宽高不允许为空" + pa_outboxcode.Text + "\n", Color.Black);
+                        return;
+                    }
                     if (!AutoOutBoxCode.Checked)
                     {
                         pa_outboxcode.Focus();
@@ -507,6 +513,28 @@ namespace UAS_MES_NEW.Packing
                     {
                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                     }
+                    if (PrintSecond.Checked)
+                    {
+                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, pa_outboxcode.Text, int.Parse(PrintNum1.Text), pa_makecode.Text, pr_code.Text, "栈板标", "0", out ErrorMessage))
+                        {
+                            OperateResult.AppendText(">>打印栈板:" + pa_outboxcode.Text + "打印结束\n", Color.Green);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                        }
+                    }
+                    if (PrintThird.Checked)
+                    {
+                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel2.Text, PrintLabel1.SelectedValue.ToString(), PrintList2.Text, pa_outboxcode.Text, int.Parse(PrintNum1.Text), pa_makecode.Text, pr_code.Text, "栈板标", "0", out ErrorMessage))
+                        {
+                            OperateResult.AppendText(">>打印栈板:" + pa_outboxcode.Text + "打印结束\n", Color.Green);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                        }
+                    }
 
                 }
                 else OperateResult.AppendText(">>必须封栈板才能进行打印\n", Color.Red);
@@ -588,7 +616,7 @@ namespace UAS_MES_NEW.Packing
                         {
                             OperateResult.AppendText(">>栈板号" + pa_outboxcode.Text + "装栈板成功\n", Color.Green);
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "栈板采集", "封栈板" + pa_outboxcode.Text + "成功", outboxcode.Text, "");
-                            dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                            dh.ExecuteSql("update package set pa_status=1,PA_WEIGHT='" + weight.Text + "',PA_WIDTH='" + pa_width.Text + "', PA_HEIGTH='" + pa_heigth.Text + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                             pa_status.Text = "1";
                         }
                     }
@@ -778,21 +806,21 @@ namespace UAS_MES_NEW.Packing
         private void RefreshWeigh_Click(object sender, EventArgs e)
         {
             sql.Clear();
-            sql.Append("select pr_cartonmaxw,pr_cartonunit,pr_cartonminw,pr_cartongw from product where pr_code='" + pr_code.Text + "'");
+            sql.Append("select pr_cartonmaxw,pr_cartonunit,pr_cartonminw,pr_palletweight from product where pr_code='" + pr_code.Text + "'");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             //填充打印文件选项的DataGridView
             if (dt.Rows.Count > 0)
             {
-                string _weight = dt.Rows[0]["pr_cartongw"].ToString();
+                string _weight = dt.Rows[0]["pr_palletweight"].ToString();
                 string _maxweight = dt.Rows[0]["pr_cartonmaxw"].ToString();
                 string _minweight = dt.Rows[0]["pr_cartonminw"].ToString();
                 Weight = double.Parse(_weight == "" ? "0" : _weight);
                 MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
                 MinWeight = double.Parse(_minweight == "" ? "0" : _minweight);
                 if (Weight - MinWeight == MaxWeight - Weight)
-                    pr_cartongw.Text = Weight + "±" + (MaxWeight - Weight) + dt.Rows[0]["pr_cartonunit"].ToString();
+                    pr_palletweight.Text = Weight + "±" + (MaxWeight - Weight) + dt.Rows[0]["pr_cartonunit"].ToString();
                 else
-                    pr_cartongw.Text = MinWeight + "-" + MaxWeight + dt.Rows[0]["pr_cartonunit"].ToString();
+                    pr_palletweight.Text = MinWeight + "-" + MaxWeight + dt.Rows[0]["pr_cartonunit"].ToString();
             }
         }
     }

File diff suppressed because it is too large
+ 476 - 476
UAS_MES_YDCY/FunctionCode/Packing/Packing_PalletWightCollection.resx


Some files were not shown because too many files changed in this diff