章政 8 år sedan
förälder
incheckning
52336da3b0

+ 61 - 61
UAS-MES/FunctionCode/Make/Make_PalletCollection.Designer.cs

@@ -55,11 +55,6 @@
             this.NewPalletCode = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.pa_custcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.PackageInf = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
-            this.pd_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_totalqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.PrintNum = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -67,6 +62,11 @@
             this.Cancel = new System.Windows.Forms.CheckBox();
             this.pr_packrule = new System.Windows.Forms.Label();
             this.pa_salecode = new System.Windows.Forms.Label();
+            this.pd_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -198,7 +198,7 @@
             this.AutoOutBoxCode.CheckState = System.Windows.Forms.CheckState.Checked;
             this.AutoOutBoxCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoOutBoxCode.Location = new System.Drawing.Point(261, 34);
-            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4);
             this.AutoOutBoxCode.Name = "AutoOutBoxCode";
             this.AutoOutBoxCode.Size = new System.Drawing.Size(114, 31);
             this.AutoOutBoxCode.TabIndex = 180;
@@ -223,7 +223,7 @@
             this.AutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.AutoPrint.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoPrint.Location = new System.Drawing.Point(999, 210);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4);
             this.AutoPrint.Name = "AutoPrint";
             this.AutoPrint.Size = new System.Drawing.Size(114, 31);
             this.AutoPrint.TabIndex = 182;
@@ -238,7 +238,7 @@
             this.Packing.Image = ((System.Drawing.Image)(resources.GetObject("Packing.Image")));
             this.Packing.IsShowBorder = true;
             this.Packing.Location = new System.Drawing.Point(1203, 252);
-            this.Packing.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Packing.Margin = new System.Windows.Forms.Padding(4);
             this.Packing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Packing.MoveImage")));
             this.Packing.Name = "Packing";
             this.Packing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Packing.NormalImage")));
@@ -252,7 +252,7 @@
             // PrinterList
             // 
             this.PrinterList.Location = new System.Drawing.Point(769, 99);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
             this.PrinterList.Name = "PrinterList";
             this.PrinterList.Size = new System.Drawing.Size(195, 25);
             this.PrinterList.TabIndex = 171;
@@ -279,7 +279,7 @@
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1105, 638);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -294,7 +294,7 @@
             // 
             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(953, 409);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(368, 220);
             this.OperateResult.TabIndex = 167;
@@ -306,7 +306,7 @@
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
             this.outboxcode.Location = new System.Drawing.Point(1013, 326);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifread";
             this.outboxcode.Size = new System.Drawing.Size(175, 25);
@@ -323,7 +323,7 @@
             this.pa_outboxcode.BackColor = System.Drawing.Color.White;
             this.pa_outboxcode.ID = null;
             this.pa_outboxcode.Location = new System.Drawing.Point(113, 36);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifread";
             this.pa_outboxcode.Size = new System.Drawing.Size(141, 25);
@@ -342,7 +342,7 @@
             this.Printlab.Image = ((System.Drawing.Image)(resources.GetObject("Printlab.Image")));
             this.Printlab.IsShowBorder = true;
             this.Printlab.Location = new System.Drawing.Point(1093, 252);
-            this.Printlab.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Printlab.Margin = new System.Windows.Forms.Padding(4);
             this.Printlab.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printlab.MoveImage")));
             this.Printlab.Name = "Printlab";
             this.Printlab.NormalImage = ((System.Drawing.Image)(resources.GetObject("Printlab.NormalImage")));
@@ -361,7 +361,7 @@
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
             this.ReleasePallet.Location = new System.Drawing.Point(987, 252);
-            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4);
             this.ReleasePallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.MoveImage")));
             this.ReleasePallet.Name = "ReleasePallet";
             this.ReleasePallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.NormalImage")));
@@ -380,7 +380,7 @@
             this.NewPalletCode.Image = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.Image")));
             this.NewPalletCode.IsShowBorder = true;
             this.NewPalletCode.Location = new System.Drawing.Point(1221, 12);
-            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(4);
             this.NewPalletCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.MoveImage")));
             this.NewPalletCode.Name = "NewPalletCode";
             this.NewPalletCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.NormalImage")));
@@ -417,48 +417,12 @@
             this.Column5});
             this.PackageInf.EnableContentClick = true;
             this.PackageInf.Location = new System.Drawing.Point(4, 161);
-            this.PackageInf.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PackageInf.Margin = new System.Windows.Forms.Padding(4);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
             this.PackageInf.Size = new System.Drawing.Size(941, 519);
             this.PackageInf.TabIndex = 156;
             // 
-            // pd_outboxcode
-            // 
-            this.pd_outboxcode.DataPropertyName = "code";
-            this.pd_outboxcode.HeaderText = "箱号";
-            this.pd_outboxcode.Name = "pd_outboxcode";
-            this.pd_outboxcode.ReadOnly = true;
-            // 
-            // pd_innerqty
-            // 
-            this.pd_innerqty.DataPropertyName = "pd_innerqty";
-            this.pd_innerqty.HeaderText = "数量";
-            this.pd_innerqty.Name = "pd_innerqty";
-            this.pd_innerqty.ReadOnly = true;
-            // 
-            // Column3
-            // 
-            this.Column3.DataPropertyName = "pa_prodcode";
-            this.Column3.HeaderText = "产品编号";
-            this.Column3.Name = "Column3";
-            this.Column3.ReadOnly = true;
-            // 
-            // Column4
-            // 
-            this.Column4.DataPropertyName = "pa_makecode";
-            this.Column4.HeaderText = "工单号";
-            this.Column4.Name = "Column4";
-            this.Column4.ReadOnly = true;
-            // 
-            // Column5
-            // 
-            this.Column5.DataPropertyName = "pa_custcode";
-            this.Column5.HeaderText = "客户";
-            this.Column5.MinimumWidth = 100;
-            this.Column5.Name = "Column5";
-            this.Column5.ReadOnly = true;
-            // 
             // pa_makecode
             // 
             this.pa_makecode.AutoSize = true;
@@ -492,7 +456,7 @@
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
             this.PrintNum.Location = new System.Drawing.Point(1119, 161);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
             this.PrintNum.Size = new System.Drawing.Size(157, 25);
@@ -523,7 +487,7 @@
             this.Cancel.AutoSize = true;
             this.Cancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Cancel.Location = new System.Drawing.Point(1200, 322);
-            this.Cancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Cancel.Margin = new System.Windows.Forms.Padding(4);
             this.Cancel.Name = "Cancel";
             this.Cancel.Size = new System.Drawing.Size(114, 31);
             this.Cancel.TabIndex = 185;
@@ -550,6 +514,42 @@
             this.pa_salecode.TabIndex = 187;
             this.pa_salecode.Visible = false;
             // 
+            // pd_outboxcode
+            // 
+            this.pd_outboxcode.DataPropertyName = "code";
+            this.pd_outboxcode.HeaderText = "箱号";
+            this.pd_outboxcode.Name = "pd_outboxcode";
+            this.pd_outboxcode.ReadOnly = true;
+            // 
+            // pd_innerqty
+            // 
+            this.pd_innerqty.DataPropertyName = "pd_innerqty";
+            this.pd_innerqty.HeaderText = "数量";
+            this.pd_innerqty.Name = "pd_innerqty";
+            this.pd_innerqty.ReadOnly = true;
+            // 
+            // Column3
+            // 
+            this.Column3.DataPropertyName = "pd_prodcode";
+            this.Column3.HeaderText = "产品编号";
+            this.Column3.Name = "Column3";
+            this.Column3.ReadOnly = true;
+            // 
+            // Column4
+            // 
+            this.Column4.DataPropertyName = "pd_makecode";
+            this.Column4.HeaderText = "工单号";
+            this.Column4.Name = "Column4";
+            this.Column4.ReadOnly = true;
+            // 
+            // Column5
+            // 
+            this.Column5.DataPropertyName = "pa_custcode";
+            this.Column5.HeaderText = "客户";
+            this.Column5.MinimumWidth = 100;
+            this.Column5.Name = "Column5";
+            this.Column5.ReadOnly = true;
+            // 
             // Make_PalletCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -589,7 +589,7 @@
             this.Controls.Add(this.pa_totalqty_label);
             this.Controls.Add(this.pa_outboxcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_PalletCollection";
             this.Tag = "Make!BigBoxCollection";
             this.Text = "7";
@@ -626,11 +626,6 @@
         private System.Windows.Forms.ComboBox PrintLabel;
         private System.Windows.Forms.Label PrintLabel_label;
         private System.Windows.Forms.Label PrinterList_label;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_outboxcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_innerqty;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
         private System.Windows.Forms.Label pa_packageqty_label;
         private CustomControl.ButtonUtil.NormalButton Packing;
         private System.Windows.Forms.CheckBox AutoOutBoxCode;
@@ -641,5 +636,10 @@
         private System.Windows.Forms.CheckBox Cancel;
         private System.Windows.Forms.Label pr_packrule;
         private System.Windows.Forms.Label pa_salecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_outboxcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_innerqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
     }
 }

+ 4 - 6
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -201,11 +201,9 @@ namespace UAS_MES.Make
                         {
                             pa_id = dt.Rows[0]["pa_id"].ToString();
                         }
-
-                        string error;
-                        if (!LogicHandler.CheckPackRule(pr_packrule.Text, pa_outboxcode.Text, outboxcode.Text, pa_makecode.Text, pa_salecode.Text, pa_prodcode.Text, out error))
+                        if (!LogicHandler.CheckPackRule(pr_packrule.Text, pa_outboxcode.Text, outboxcode.Text, pa_makecode.Text, pa_salecode.Text, pa_prodcode.Text, out ErrorMessage))
                         {
-                            OperateResult.AppendText(">>" + error + "\n", Color.Red, outboxcode);
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, outboxcode);
                             return;
                         }
                         dt = (DataTable)dh.ExecuteSql("select pa_totalqty,pa_mothercode,nvl(pa_status,0) pa_status from package where pa_outboxcode='" + outboxcode.Text + "'", "select");
@@ -241,7 +239,7 @@ namespace UAS_MES.Make
                                         pa_makecode.Text = carton_macode;
                                         dh.ExecuteSql("update package set pa_makecode='" + carton_macode + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                                     }
-                                    LogicHandler.OutBoxStepPass(outboxcode.Text, pa_makecode.Text, User.UserSourceCode, User.UserCode, "栈板采集成功,栈板号:" + pa_outboxcode.Text, "栈板采集");
+                                    //LogicHandler.OutBoxStepPass(outboxcode.Text, pa_makecode.Text, User.UserSourceCode, User.UserCode, "栈板采集成功,栈板号:" + pa_outboxcode.Text, "栈板采集");
                                     if (pa_totalqty.Text == "1")
                                     {
                                         string nextstepcode = dh.getFieldDataByCondition("mes_package_view left join makeserial on ms_sncode=v_barcode", "ms_nextstepcode", "v_outboxcode='" + outboxcode.Text + "'").ToString();
@@ -295,7 +293,7 @@ namespace UAS_MES.Make
         {
             sql.Clear();
             sql.Append("select pa_prodcode,nvl(pd_barcode,PD_INNERBOXCODE) code ,pd_innerqty,pa_salecode");
-            sql.Append(",pa_makecode,pa_custcode,pa_packageqty from packagedetail left join package on pd_paid=pa_id left ");
+            sql.Append(",pd_makecode,pd_prodcode,pa_custcode,pa_packageqty from packagedetail left join package on pd_paid=pa_id left ");
             sql.Append("join product on pr_code=pa_prodcode where pa_outboxcode ='" + pa_outboxcode.Text + "' and pa_type=3");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             BaseUtil.FillDgvWithDataTable(PackageInf, dt);