Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master'

shim 8 years ago
parent
commit
9a04356e71

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.Designer.cs

@@ -265,7 +265,7 @@
             this.outboxcode.Location = new System.Drawing.Point(1096, 349);
             this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.outboxcode.Name = "outboxcode";
-            this.outboxcode.Power = "ifwrite";
+            this.outboxcode.Power = "ifread";
             this.outboxcode.Size = new System.Drawing.Size(209, 25);
             this.outboxcode.Str = null;
             this.outboxcode.Str1 = null;
@@ -282,7 +282,7 @@
             this.pa_outboxcode.Location = new System.Drawing.Point(111, 36);
             this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.pa_outboxcode.Name = "pa_outboxcode";
-            this.pa_outboxcode.Power = "ifwrite";
+            this.pa_outboxcode.Power = "ifread";
             this.pa_outboxcode.Size = new System.Drawing.Size(140, 25);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
@@ -341,7 +341,7 @@
             this.NewPallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.MoveImage")));
             this.NewPallet.Name = "NewPallet";
             this.NewPallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.NormalImage")));
-            this.NewPallet.Power = "ifwrite";
+            this.NewPallet.Power = "ifread";
             this.NewPallet.Size = new System.Drawing.Size(80, 30);
             this.NewPallet.TabIndex = 159;
             this.NewPallet.Text = "新增大箱";

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_BigBoxWeight.Designer.cs

@@ -471,7 +471,7 @@
             this.pa_outboxcode.Location = new System.Drawing.Point(198, 21);
             this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.pa_outboxcode.Name = "pa_outboxcode";
-            this.pa_outboxcode.Power = "ifwrite";
+            this.pa_outboxcode.Power = "ifread";
             this.pa_outboxcode.Size = new System.Drawing.Size(486, 55);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CollectBTMAC.Designer.cs

@@ -195,7 +195,7 @@
             this.sncode.Str1 = null;
             this.sncode.Str2 = null;
             this.sncode.TabIndex = 204;
-            this.sncode.Tag = "ifwrite";
+            this.sncode.Tag = "ifread";
             this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
             // 
             // OperateResult

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CollectNetCode.Designer.cs

@@ -177,7 +177,7 @@
             this.sncode.Str1 = null;
             this.sncode.Str2 = null;
             this.sncode.TabIndex = 189;
-            this.sncode.Tag = "ifwrite";
+            this.sncode.Tag = "ifread";
             this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
             // 
             // OperateResult

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.Designer.cs

@@ -286,7 +286,7 @@
             this.sncode.Str1 = null;
             this.sncode.Str2 = null;
             this.sncode.TabIndex = 169;
-            this.sncode.Tag = "ifwrite";
+            this.sncode.Tag = "ifread";
             this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
             // OperateResult

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CustomLabelPrint.Designer.cs

@@ -223,7 +223,7 @@
             this.inputText.Str1 = null;
             this.inputText.Str2 = null;
             this.inputText.TabIndex = 187;
-            this.inputText.Tag = "ifwrite";
+            this.inputText.Tag = "ifread";
             this.inputText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.inputText_KeyDown);
             // 
             // OperateResult

+ 26 - 9
UAS-MES/FunctionCode/Make/Make_PalletCollection.Designer.cs

@@ -63,6 +63,7 @@
             this.pa_currentqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.AutoOutBoxCode = new System.Windows.Forms.CheckBox();
             this.pa_status = new System.Windows.Forms.Label();
+            this.AutoPrint = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
@@ -126,7 +127,7 @@
             // 
             this.outboxcode_label.AutoSize = true;
             this.outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.outboxcode_label.Location = new System.Drawing.Point(997, 324);
+            this.outboxcode_label.Location = new System.Drawing.Point(982, 324);
             this.outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.outboxcode_label.Name = "outboxcode_label";
             this.outboxcode_label.Size = new System.Drawing.Size(52, 27);
@@ -209,13 +210,13 @@
             this.Packing.DownImage = ((System.Drawing.Image)(resources.GetObject("Packing.DownImage")));
             this.Packing.Image = ((System.Drawing.Image)(resources.GetObject("Packing.Image")));
             this.Packing.IsShowBorder = true;
-            this.Packing.Location = new System.Drawing.Point(1213, 253);
+            this.Packing.Location = new System.Drawing.Point(1203, 253);
             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")));
             this.Packing.Power = null;
-            this.Packing.Size = new System.Drawing.Size(80, 30);
+            this.Packing.Size = new System.Drawing.Size(75, 30);
             this.Packing.TabIndex = 178;
             this.Packing.Text = "封栈板";
             this.Packing.UseVisualStyleBackColor = true;
@@ -290,7 +291,7 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(1076, 324);
+            this.outboxcode.Location = new System.Drawing.Point(1061, 324);
             this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifwrite";
@@ -326,13 +327,13 @@
             this.Printlab.DownImage = ((System.Drawing.Image)(resources.GetObject("Printlab.DownImage")));
             this.Printlab.Image = ((System.Drawing.Image)(resources.GetObject("Printlab.Image")));
             this.Printlab.IsShowBorder = true;
-            this.Printlab.Location = new System.Drawing.Point(1106, 253);
+            this.Printlab.Location = new System.Drawing.Point(1094, 253);
             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")));
             this.Printlab.Power = null;
-            this.Printlab.Size = new System.Drawing.Size(80, 30);
+            this.Printlab.Size = new System.Drawing.Size(75, 30);
             this.Printlab.TabIndex = 161;
             this.Printlab.Text = "打印";
             this.Printlab.UseVisualStyleBackColor = true;
@@ -345,13 +346,13 @@
             this.ReleasePallet.DownImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.DownImage")));
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
-            this.ReleasePallet.Location = new System.Drawing.Point(1002, 253);
+            this.ReleasePallet.Location = new System.Drawing.Point(987, 253);
             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")));
             this.ReleasePallet.Power = null;
-            this.ReleasePallet.Size = new System.Drawing.Size(80, 30);
+            this.ReleasePallet.Size = new System.Drawing.Size(75, 30);
             this.ReleasePallet.TabIndex = 160;
             this.ReleasePallet.Text = "解除栈板";
             this.ReleasePallet.UseVisualStyleBackColor = true;
@@ -486,18 +487,33 @@
             // 
             this.pa_status.AutoSize = true;
             this.pa_status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_status.Location = new System.Drawing.Point(1173, 218);
+            this.pa_status.Location = new System.Drawing.Point(1158, 218);
             this.pa_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_status.Name = "pa_status";
             this.pa_status.Size = new System.Drawing.Size(0, 27);
             this.pa_status.TabIndex = 181;
             this.pa_status.Visible = false;
             // 
+            // AutoPrint
+            // 
+            this.AutoPrint.AutoSize = true;
+            this.AutoPrint.Checked = true;
+            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);
+            this.AutoPrint.Name = "AutoPrint";
+            this.AutoPrint.Size = new System.Drawing.Size(114, 31);
+            this.AutoPrint.TabIndex = 182;
+            this.AutoPrint.Text = "自动打印";
+            this.AutoPrint.UseVisualStyleBackColor = true;
+            // 
             // Make_PalletCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1329, 690);
+            this.Controls.Add(this.AutoPrint);
             this.Controls.Add(this.pa_status);
             this.Controls.Add(this.AutoOutBoxCode);
             this.Controls.Add(this.Packing);
@@ -577,5 +593,6 @@
         private CustomControl.ButtonUtil.NormalButton Packing;
         private System.Windows.Forms.CheckBox AutoOutBoxCode;
         private System.Windows.Forms.Label pa_status;
+        private System.Windows.Forms.CheckBox AutoPrint;
     }
 }

+ 34 - 19
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -27,13 +27,13 @@ namespace UAS_MES.Make
 
         Make_NewPallet NewPallet;
 
+        int pa_stanqty;
+
         string pa_nextstep = "";
         //箱类型
         string pa_type;
         //物料编号
         string pr_code;
-        //箱内件数
-        int pa_totqty;
         //Package表的主键
         string pa_id;
 
@@ -91,8 +91,8 @@ namespace UAS_MES.Make
                 {
                     BaseUtil.SetFormValue(Controls, dt);
                     LoadGridData();
-                    dt = dh.getFieldsDataByCondition("Package", new string[] { "pa_totalqty", "pa_id" }, "pa_outboxcode='" + pa_outboxcode.Text + "'");
-                    pa_totqty = int.Parse(dt.Rows[0]["pa_totalqty"].ToString());
+                    dt = dh.getFieldsDataByCondition("Package", new string[] { "pa_standardqty", "pa_id" }, "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                    pa_stanqty = int.Parse(dt.Rows[0]["pa_standardqty"].ToString());
                     pa_id = dt.Rows[0]["pa_id"].ToString();
                     FillPrintLabel();
                     outboxcode.Focus();
@@ -114,8 +114,8 @@ namespace UAS_MES.Make
                         return;
                     }
                     sql.Clear();
-                    sql.Append("select pd_makecode pa_makecode,pa_id,pd_prodcode pa_prodcode,pa_mothercode,pa_status,pa_nextstep  from packagedetail ");
-                    sql.Append("left join package on pd_paid=pa_id where pd_outboxcode='" + outboxcode.Text + "'");
+                    sql.Append("select pd_makecode pa_makecode,pa_id,pd_prodcode pa_prodcode,pa_mothercode,pa_status,pa_nextstep,nvl(pr_palletqty,0) pa_standardqty  from packagedetail ");
+                    sql.Append("left join package on pd_paid=pa_id left join product on pr_code=pd_prodcode where pd_outboxcode='" + outboxcode.Text + "'");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     if (dt.Rows.Count > 0)
                     {
@@ -126,6 +126,12 @@ namespace UAS_MES.Make
                             palletcode_KeyDown(sender, e);
                         }
                         pa_nextstep = dt.Rows[0]["pa_nextstep"].ToString();
+                        pa_stanqty = int.Parse(dt.Rows[0]["pa_standardqty"].ToString());
+                        if (pa_stanqty == 0)
+                        {
+                            OperateResult.AppendText(">>产品" + pa_prodcode.Text + "未维护栈板容量\n", Color.Red, outboxcode);
+                            return;
+                        }
                         if (pa_nextstep != User.CurrentStepCode && pa_nextstep != "")
                         {
                             OperateResult.AppendText(">>箱号" + outboxcode.Text + "的下一工序不是当前岗位资源对应工序\n", Color.Red, outboxcode);
@@ -159,29 +165,24 @@ namespace UAS_MES.Make
                         return;
                     }
                     pa_status.Text = dh.getFieldDataByCondition("package", "nvl(pa_status,0)pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString();
-                    if (pa_status.Text == "1")
+                    if (pa_outboxcode.Text == "" && AutoOutBoxCode.Checked || pa_status.Text == "1")
                     {
-                        if (AutoOutBoxCode.Checked)
+                        //箱已采集满并且未勾选自动生成
+                        if (pa_standardqty.Text == pa_currentqty.Text && !AutoOutBoxCode.Checked)
                         {
-                            pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pa_prodcode.Text, User.UserCode);
-                            pa_status.Text = "1";
+                            OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "已采集满\n", Color.Red, outboxcode);
+                            return;
                         }
                         else
                         {
-                            OperateResult.AppendText(">>栈板号" + outboxcode.Text + "已封,请采集其他栈板号\n", Color.Red, outboxcode);
-                            return;
+                            pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pa_prodcode.Text, User.UserCode);
                         }
                     }
-                    else if (pa_outboxcode.Text == "" && AutoOutBoxCode.Checked)
-                    {
-                        pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pa_prodcode.Text, User.UserCode);
-                    }
-                    else if (pa_outboxcode.Text == "" && !AutoOutBoxCode.Checked)
+                    else if (pa_outboxcode.Text == "")
                     {
-                        OperateResult.AppendText(">>栈板号不能为空\n", Color.Red, outboxcode);
+                        OperateResult.AppendText(">>栈板号不能为空\n", Color.Red);
                         return;
                     }
-                    pa_outboxcode.Text = pa_outboxcode.Text;
                     dt = (DataTable)dh.ExecuteSql("select pa_id from  package where pa_outboxcode='" + pa_outboxcode.Text + "'", "select");
                     if (dt.Rows.Count == 0)
                     {
@@ -231,6 +232,20 @@ namespace UAS_MES.Make
                                 }
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "栈板采集", "栈板采集成功", pa_outboxcode.Text, "");
                                 OperateResult.AppendText(">>箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
+                                sql.Clear();
+                                sql.Append("select count(0) cn from packagedetail left join package on pa_id=pd_paid where ");
+                                sql.Append("pa_outboxcode='" + pa_outboxcode.Text + "'");
+                                int packageqty = int.Parse((dh.ExecuteSql(sql.GetString(), "select") as DataTable).Rows[0][0].ToString());
+                                if (packageqty == pa_stanqty)
+                                {
+                                    dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                                    if (AutoPrint.Checked)
+                                    {
+                                        OperateResult.AppendText(">>栈板已装满,自动打印!\n", Color.Green);
+                                        Printlab.PerformClick();
+                                    }
+                                }
+
                                 LoadGridData();
                             }
                             else OperateResult.AppendText(">>箱号" + outboxcode.Text + "尚未封箱\n", Color.Red, outboxcode);

+ 15 - 0
UAS-MES/FunctionCode/Make/Make_PalletCollection.resx

@@ -788,4 +788,19 @@
   <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pd_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 4 - 4
UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.Designer.cs

@@ -610,7 +610,7 @@
             this.ForcePass.MoveImage = ((System.Drawing.Image)(resources.GetObject("ForcePass.MoveImage")));
             this.ForcePass.Name = "ForcePass";
             this.ForcePass.NormalImage = ((System.Drawing.Image)(resources.GetObject("ForcePass.NormalImage")));
-            this.ForcePass.Power = "IFREAD";
+            this.ForcePass.Power = "ifspecial";
             this.ForcePass.Size = new System.Drawing.Size(91, 38);
             this.ForcePass.TabIndex = 165;
             this.ForcePass.Text = "强制通过";
@@ -630,7 +630,7 @@
             this.ForceRejection.MoveImage = ((System.Drawing.Image)(resources.GetObject("ForceRejection.MoveImage")));
             this.ForceRejection.Name = "ForceRejection";
             this.ForceRejection.NormalImage = ((System.Drawing.Image)(resources.GetObject("ForceRejection.NormalImage")));
-            this.ForceRejection.Power = "IFREAD";
+            this.ForceRejection.Power = "ifspecial";
             this.ForceRejection.Size = new System.Drawing.Size(91, 38);
             this.ForceRejection.TabIndex = 164;
             this.ForceRejection.Text = "强制批退";
@@ -767,9 +767,9 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OQC_BatchResultJudge_FormClosing);
             this.Load += new System.EventHandler(this.抽检批维护_Load);
             this.SizeChanged += new System.EventHandler(this.抽检批维护_SizeChanged);
-            this.panel2.ResumeLayout(true);
+            this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 1 - 1
UAS-MES/FunctionCode/OQC/OQC_Inspection.Designer.cs

@@ -364,7 +364,7 @@
             this.NewBatch.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewBatch.MoveImage")));
             this.NewBatch.Name = "NewBatch";
             this.NewBatch.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewBatch.NormalImage")));
-            this.NewBatch.Power = "ifWrite";
+            this.NewBatch.Power = "ifread";
             this.NewBatch.Size = new System.Drawing.Size(60, 24);
             this.NewBatch.TabIndex = 156;
             this.NewBatch.Tag = "OQC!Inspection";

+ 2 - 2
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -816,7 +816,7 @@
             this.BatchPass.MoveImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.MoveImage")));
             this.BatchPass.Name = "BatchPass";
             this.BatchPass.NormalImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.NormalImage")));
-            this.BatchPass.Power = "ifWrite";
+            this.BatchPass.Power = "ifread";
             this.BatchPass.Size = new System.Drawing.Size(80, 30);
             this.BatchPass.TabIndex = 174;
             this.BatchPass.Tag = "OQC!Inspection";
@@ -840,7 +840,7 @@
             this.Confirm.Power = "IFREAD";
             this.Confirm.Size = new System.Drawing.Size(80, 30);
             this.Confirm.TabIndex = 172;
-            this.Confirm.Tag = "ifWrite";
+            this.Confirm.Tag = "ifread";
             this.Confirm.Text = "确认";
             this.Confirm.UseVisualStyleBackColor = true;
             this.Confirm.Click += new System.EventHandler(this.Confirm_Click);