Browse Source

卡通箱采集重量检测修改

Hcsy 8 năm trước cách đây
mục cha
commit
f6ce0ffc17

+ 30 - 33
UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs

@@ -42,7 +42,6 @@
             this.ms_makecode = new System.Windows.Forms.Label();
             this.pa_standardqty = new System.Windows.Forms.Label();
             this.groupBoxWithBorder2 = new UAS_MES.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
-            this.checkweight = new System.Windows.Forms.CheckBox();
             this.ob_nowcheckqty = new System.Windows.Forms.Label();
             this.ob_batchqty = new System.Windows.Forms.Label();
             this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
@@ -80,6 +79,7 @@
             this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.checkweightlabel = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.groupBoxWithBorder2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
@@ -213,7 +213,7 @@
             // groupBoxWithBorder2
             // 
             this.groupBoxWithBorder2.BorderColor = System.Drawing.Color.Black;
-            this.groupBoxWithBorder2.Controls.Add(this.checkweight);
+            this.groupBoxWithBorder2.Controls.Add(this.checkweightlabel);
             this.groupBoxWithBorder2.Controls.Add(this.ob_nowcheckqty);
             this.groupBoxWithBorder2.Controls.Add(this.ob_batchqty);
             this.groupBoxWithBorder2.Controls.Add(this.ob_nowcheckqty_label);
@@ -239,25 +239,11 @@
             this.groupBoxWithBorder2.Text = "打印";
             this.groupBoxWithBorder2.TextColor = System.Drawing.Color.Black;
             // 
-            // checkweight
-            // 
-            this.checkweight.AutoSize = true;
-            this.checkweight.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.checkweight.ForeColor = System.Drawing.Color.Red;
-            this.checkweight.Location = new System.Drawing.Point(117, 14);
-            this.checkweight.Name = "checkweight";
-            this.checkweight.Size = new System.Drawing.Size(112, 24);
-            this.checkweight.TabIndex = 179;
-            this.checkweight.Text = "需要检测重量";
-            this.checkweight.UseVisualStyleBackColor = true;
-            this.checkweight.Visible = false;
-            this.checkweight.CheckedChanged += new System.EventHandler(this.checkweight_CheckedChanged);
-            // 
             // ob_nowcheckqty
             // 
             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(354, 83);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(353, 82);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
             this.ob_nowcheckqty.TabIndex = 178;
@@ -266,7 +252,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(354, 44);
+            this.ob_batchqty.Location = new System.Drawing.Point(353, 43);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
             this.ob_batchqty.TabIndex = 177;
@@ -275,7 +261,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(273, 83);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(272, 82);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
             this.ob_nowcheckqty_label.Size = new System.Drawing.Size(74, 21);
             this.ob_nowcheckqty_label.TabIndex = 176;
@@ -285,7 +271,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(273, 44);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(272, 43);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(74, 21);
             this.ob_batchqty_label.TabIndex = 175;
@@ -347,7 +333,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(11, 83);
+            this.label3.Location = new System.Drawing.Point(10, 82);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 160;
@@ -409,7 +395,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(11, 41);
+            this.PrintList_label.Location = new System.Drawing.Point(10, 40);
             this.PrintList_label.Name = "PrintList_label";
             this.PrintList_label.Size = new System.Drawing.Size(90, 21);
             this.PrintList_label.TabIndex = 116;
@@ -419,7 +405,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(185, 123);
+            this.PrintNum_label.Location = new System.Drawing.Point(184, 122);
             this.PrintNum_label.Name = "PrintNum_label";
             this.PrintNum_label.Size = new System.Drawing.Size(42, 21);
             this.PrintNum_label.TabIndex = 124;
@@ -490,7 +476,7 @@
             // AutoGenBoxCode
             // 
             this.AutoGenBoxCode.AutoSize = true;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(238, 38);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(237, 37);
             this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(2);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
             this.AutoGenBoxCode.Size = new System.Drawing.Size(93, 25);
@@ -502,7 +488,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(217, 79);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(216, 78);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
             this.pa_currentqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_currentqty_label.TabIndex = 95;
@@ -512,7 +498,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(217, 122);
+            this.pr_detail_label.Location = new System.Drawing.Point(216, 121);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 80;
@@ -537,7 +523,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(299, 79);
+            this.pa_currentqty.Location = new System.Drawing.Point(298, 78);
             this.pa_currentqty.Name = "pa_currentqty";
             this.pa_currentqty.Size = new System.Drawing.Size(0, 21);
             this.pa_currentqty.TabIndex = 169;
@@ -546,7 +532,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(8, 122);
+            this.pr_code_label.Location = new System.Drawing.Point(7, 121);
             this.pr_code_label.Name = "pr_code_label";
             this.pr_code_label.Size = new System.Drawing.Size(74, 21);
             this.pr_code_label.TabIndex = 81;
@@ -556,7 +542,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(299, 122);
+            this.pr_detail.Location = new System.Drawing.Point(298, 121);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 168;
@@ -565,7 +551,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(8, 79);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(7, 78);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
             this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(74, 21);
             this.pr_outboxinnerqty_label.TabIndex = 97;
@@ -575,7 +561,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(100, 122);
+            this.pr_code.Location = new System.Drawing.Point(99, 121);
             this.pr_code.MaximumSize = new System.Drawing.Size(150, 0);
             this.pr_code.Name = "pr_code";
             this.pr_code.Size = new System.Drawing.Size(0, 21);
@@ -586,7 +572,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(8, 37);
+            this.pa_code_label.Location = new System.Drawing.Point(7, 36);
             this.pa_code_label.Name = "pa_code_label";
             this.pa_code_label.Size = new System.Drawing.Size(42, 21);
             this.pa_code_label.TabIndex = 113;
@@ -709,6 +695,17 @@
             this.pd_id.ReadOnly = true;
             this.pd_id.Visible = false;
             // 
+            // checkweightlabel
+            // 
+            this.checkweightlabel.AutoSize = true;
+            this.checkweightlabel.CutLength = null;
+            this.checkweightlabel.ForeColor = System.Drawing.Color.Red;
+            this.checkweightlabel.Location = new System.Drawing.Point(119, 15);
+            this.checkweightlabel.MaximumSize = new System.Drawing.Size(200, 0);
+            this.checkweightlabel.Name = "checkweightlabel";
+            this.checkweightlabel.Size = new System.Drawing.Size(0, 21);
+            this.checkweightlabel.TabIndex = 180;
+            // 
             // Make_PackageCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -804,6 +801,6 @@
         private System.Windows.Forms.Label ms_makecode;
         private System.Windows.Forms.Label pa_standardqty;
         private CustomControl.ButtonUtil.NormalButton DeleteAll;
-        private System.Windows.Forms.CheckBox checkweight;
+        private CustomControl.ValueLabel.ValueLabel checkweightlabel;
     }
 }

+ 15 - 16
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -90,7 +90,10 @@ namespace UAS_MES.Make
                 //记录该数据保证在修改不被允许的前提下能偶回复之前的值
                 StandardQTY = decimal.Parse(dt.Rows[0]["pr_outboxinnerqty"].ToString());
                 PR_CHECKCARTONW = dt.Rows[0]["PR_CHECKCARTONW"].ToString();
-                checkweight.Checked = (PR_CHECKCARTONW != "0");
+                if (PR_CHECKCARTONW != "0")
+                    checkweightlabel.Text = "需要检测重量";
+                else
+                    checkweightlabel.Text = "不需检测重量";
                 BaseUtil.SetFormValue(this.Controls, dt);
                 if (pa_standardqty.Text != "0")
                 {
@@ -274,11 +277,12 @@ namespace UAS_MES.Make
                                         }
                                         if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == pr_outboxinnerqty.Value)
                                         {
-                                            //if (checkweight.Checked)
-                                            //{
-                                            //    OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "满箱需要重量检测,请在卡通箱称重界面进行称重打印\n", Color.Red);
-                                            //    return;
-                                            //}
+                                            OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱\n", Color.Black);
+                                            if (PR_CHECKCARTONW != "0")
+                                            {
+                                                OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "满箱需要重量检测,请在卡通箱称重界面进行称重打印\n", Color.Red);
+                                                return;
+                                            }
                                             dh.UpdateByCondition("package", "pa_status=1,pa_packageqty=pa_currentqty,pa_totalqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                                             pa_status.Text = "1";
                                             pa_standardqty.Text = "";
@@ -343,11 +347,11 @@ namespace UAS_MES.Make
         {
             if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "' and nvl(pa_status,0)=0"))
             {
-                //if (checkweight.Checked)
-                //{
-                //    OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "需要重量检测,请在卡通箱称重界面进行操作\n", Color.Red);
-                //    return;
-                //}
+                if (PR_CHECKCARTONW != "0")
+                {
+                    OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "需要重量检测,请在卡通箱称重界面进行操作\n", Color.Red);
+                    return;
+                }
                 string Seal = MessageBox.Show(this.ParentForm, "是否确认封箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (Seal == "Yes")
                 {
@@ -585,10 +589,5 @@ namespace UAS_MES.Make
                 else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "不存在\n", Color.Red);
             }
         }
-
-        private void checkweight_CheckedChanged(object sender, EventArgs e)
-        {
-            checkweight.Checked = (PR_CHECKCARTONW != "0");
-        }
     }
 }

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -350,6 +350,7 @@ namespace UAS_MES.Make
                                         }
                                         if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == int.Parse(pr_outboxinnerqty.Text))
                                         {
+                                            OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱\n", Color.Black);
                                             float weigh = float.Parse(weight.Text.Replace("kg", "").Trim());
                                             if (PR_CHECKCARTONW != "0")
                                             {
@@ -434,6 +435,7 @@ namespace UAS_MES.Make
         {
             if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "' and nvl(pa_status,0)=0"))
             {
+              
                 if (PR_CHECKCARTONW != "0")
                 {
                     //检查重量合格