Pārlūkot izejas kodu

逻辑漏洞修补

callm 7 mēneši atpakaļ
vecāks
revīzija
b79f029374

+ 31 - 19
UAS_MES_YDCY/FunctionCode/Make/Make_RePrintLabel.Designer.cs

@@ -43,6 +43,7 @@
             this.ms_makecode = new System.Windows.Forms.Label();
             this.pr_detail = new System.Windows.Forms.Label();
             this.groupBoxWithBorder1 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.midbox = new System.Windows.Forms.RadioButton();
             this.aftersalecard = new System.Windows.Forms.RadioButton();
             this.repaircard = new System.Windows.Forms.RadioButton();
             this.CartonBox = new System.Windows.Forms.RadioButton();
@@ -54,7 +55,7 @@
             this.inputText = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
-            this.midbox = new System.Windows.Forms.RadioButton();
+            this.palletno = new System.Windows.Forms.RadioButton();
             this.groupBoxWithBorder1.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -190,6 +191,7 @@
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder1.Controls.Add(this.palletno);
             this.groupBoxWithBorder1.Controls.Add(this.midbox);
             this.groupBoxWithBorder1.Controls.Add(this.aftersalecard);
             this.groupBoxWithBorder1.Controls.Add(this.repaircard);
@@ -207,11 +209,23 @@
             this.groupBoxWithBorder1.Text = "打印类型";
             this.groupBoxWithBorder1.TextColor = System.Drawing.Color.Black;
             // 
+            // midbox
+            // 
+            this.midbox.AutoSize = true;
+            this.midbox.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.midbox.Location = new System.Drawing.Point(1074, 82);
+            this.midbox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.midbox.Name = "midbox";
+            this.midbox.Size = new System.Drawing.Size(145, 45);
+            this.midbox.TabIndex = 6;
+            this.midbox.Text = "中箱标";
+            this.midbox.UseVisualStyleBackColor = true;
+            // 
             // aftersalecard
             // 
             this.aftersalecard.AutoSize = true;
             this.aftersalecard.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.aftersalecard.Location = new System.Drawing.Point(1029, 79);
+            this.aftersalecard.Location = new System.Drawing.Point(885, 82);
             this.aftersalecard.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.aftersalecard.Name = "aftersalecard";
             this.aftersalecard.Size = new System.Drawing.Size(145, 45);
@@ -224,7 +238,7 @@
             // 
             this.repaircard.AutoSize = true;
             this.repaircard.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.repaircard.Location = new System.Drawing.Point(823, 79);
+            this.repaircard.Location = new System.Drawing.Point(720, 82);
             this.repaircard.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.repaircard.Name = "repaircard";
             this.repaircard.Size = new System.Drawing.Size(145, 45);
@@ -237,7 +251,7 @@
             // 
             this.CartonBox.AutoSize = true;
             this.CartonBox.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.CartonBox.Location = new System.Drawing.Point(272, 79);
+            this.CartonBox.Location = new System.Drawing.Point(253, 82);
             this.CartonBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.CartonBox.Name = "CartonBox";
             this.CartonBox.Size = new System.Drawing.Size(216, 45);
@@ -250,7 +264,7 @@
             // 
             this.fuselagel.AutoSize = true;
             this.fuselagel.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.fuselagel.Location = new System.Drawing.Point(551, 79);
+            this.fuselagel.Location = new System.Drawing.Point(490, 82);
             this.fuselagel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.fuselagel.Name = "fuselagel";
             this.fuselagel.Size = new System.Drawing.Size(209, 45);
@@ -264,12 +278,11 @@
             this.giftBox.AutoSize = true;
             this.giftBox.Checked = true;
             this.giftBox.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.giftBox.Location = new System.Drawing.Point(54, 79);
+            this.giftBox.Location = new System.Drawing.Point(55, 82);
             this.giftBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.giftBox.Name = "giftBox";
             this.giftBox.Size = new System.Drawing.Size(177, 45);
             this.giftBox.TabIndex = 1;
-            this.giftBox.TabStop = true;
             this.giftBox.Text = "彩标打印";
             this.giftBox.UseVisualStyleBackColor = true;
             this.giftBox.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChange);
@@ -354,19 +367,17 @@
             this.Printer.Size = new System.Drawing.Size(296, 50);
             this.Printer.TabIndex = 186;
             // 
-            // midbox
+            // palletno
             // 
-            this.midbox.AutoSize = true;
-            this.midbox.Checked = true;
-            this.midbox.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.midbox.Location = new System.Drawing.Point(1218, 79);
-            this.midbox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
-            this.midbox.Name = "midbox";
-            this.midbox.Size = new System.Drawing.Size(145, 45);
-            this.midbox.TabIndex = 6;
-            this.midbox.TabStop = true;
-            this.midbox.Text = "中箱标";
-            this.midbox.UseVisualStyleBackColor = true;
+            this.palletno.AutoSize = true;
+            this.palletno.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.palletno.Location = new System.Drawing.Point(1257, 82);
+            this.palletno.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.palletno.Name = "palletno";
+            this.palletno.Size = new System.Drawing.Size(145, 45);
+            this.palletno.TabIndex = 7;
+            this.palletno.Text = "卡板标";
+            this.palletno.UseVisualStyleBackColor = true;
             // 
             // Make_RePrintLabel
             // 
@@ -433,5 +444,6 @@
         private System.Windows.Forms.RadioButton aftersalecard;
         private System.Windows.Forms.RadioButton repaircard;
         private System.Windows.Forms.RadioButton midbox;
+        private System.Windows.Forms.RadioButton palletno;
     }
 }

+ 44 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_RePrintLabel.cs

@@ -99,6 +99,11 @@ namespace UAS_MES_NEW.Make
                 OperateResult.AppendText(">>请输入卡通箱号\n", Color.Black);
                 clearAll();
             }
+            else if (btn.Name == "palletno" && btn.Checked)
+            {
+                OperateResult.AppendText(">>请输入卡板号\n", Color.Black);
+                clearAll();
+            }
         }
 
         private void inputText_KeyDown(object sender, KeyEventArgs e)
@@ -188,6 +193,23 @@ namespace UAS_MES_NEW.Make
                     inputValue.Text = inputText.Text;
                     inputText.Text = "";
                 }
+                else if (palletno.Checked) {
+                
+                    dt = (DataTable)dh.ExecuteSql("select pr_code,pl_makecode ms_makecode,pr_detail from pallet left join make on pl_makecode=ma_code left join product on pr_code=ma_prodcode where pl_code='" + inputText.Text + "'", "select");
+                    if (dt.Rows.Count == 0)
+                    {
+                        //无值,返回提示用户“箱号不存在”, “>>请输入卡通箱号”
+                        OperateResult.AppendText("<<卡板:" + inputText.Text + "不存在\n", Color.Red, inputText);
+                        OperateResult.AppendText(">>请输入卡板号\n", Color.Black);
+                        return;
+                    }
+                    //界面赋值
+                    BaseUtil.SetFormValue(this.Controls, dt);
+                    //有值,可以打
+                    //展示产品编号和标签模板到界面
+                    inputValue.Text = inputText.Text;
+                    inputText.Text = "";
+                }
                 print_Click(sender, new EventArgs());
             }
         }
@@ -208,6 +230,8 @@ namespace UAS_MES_NEW.Make
                 type = "售后卡";
             else if (midbox.Checked)
                 type = "中箱标";
+            else if (palletno.Checked)
+                type = "卡板标";
             else
                 type = "卡通箱标";
 
@@ -302,6 +326,26 @@ namespace UAS_MES_NEW.Make
                 //    //插入MakeDown表
                 //    putInfo2MakeDown();
                 //}
+            } else if (palletno.Checked) {
+                mapB = (DataTable)dh.ExecuteSql("select pl_code from pallet where pl_code='" + inputValue.Text + "'", "select");
+                //无值提示用户箱号错误,不存在。
+                if (mapB.Rows.Count == 0)
+                {
+                    OperateResult.AppendText("<<卡板:" + inputValue.Text + "错误,不存在\n", Color.Red);
+                    return;
+                }
+                //doc = lbl.Documents.Open(PrintLabel.Text);
+                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, "卡通箱标", "-1", out errorMessage))
+                {
+                    //判断通过,打印
+                    OperateResult.AppendText("<<打印成功\n", Color.Green);
+                }
+                else
+                {
+                    OperateResult.AppendText(errorMessage + "\n", Color.Red);
+                }
+                //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡板号补打印,:" + inputValue.Text, "补打印成功", inputValue.Text, "");
             }
         }
 

+ 2 - 2
UAS_MES_YDCY/FunctionCode/Make/Make_TestCollectionOnlyBad.cs

@@ -89,8 +89,8 @@ namespace UAS_MES_NEW.Make
                 OperateResult.AppendText("已安装BarTender\n");
                 try
                 {
-                    engine = new Engine();
-                    engine.Start();
+                    //engine = new Engine();
+                    //engine.Start();
                     format = engine.Documents.Open(Application.StartupPath + "/BadCode.btw");
                     EnablePrint = true;
                 }

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

@@ -76,7 +76,7 @@
             this.ms_makecode = new System.Windows.Forms.Label();
             this.OutBoxLength_label = new System.Windows.Forms.Label();
             this.OutBoxLength = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
-            this.pr_outboxinnerqty = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.pr_palletqty = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.DeleteAll = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.AutoGenBoxCode = new System.Windows.Forms.CheckBox();
             this.pa_currentqty_label = new System.Windows.Forms.Label();
@@ -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(536, 38);
+            this.label1.Location = new System.Drawing.Point(537, 39);
             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(62, 54);
+            this.checkweightlabel.Location = new System.Drawing.Point(63, 55);
             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(698, 182);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(699, 183);
             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(698, 106);
+            this.ob_batchqty.Location = new System.Drawing.Point(699, 107);
             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(536, 182);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(537, 183);
             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(536, 110);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(537, 111);
             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(698, 38);
+            this.ob_checkno.Location = new System.Drawing.Point(699, 39);
             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(22, 184);
+            this.label3.Location = new System.Drawing.Point(23, 185);
             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(22, 104);
+            this.PrintList_label.Location = new System.Drawing.Point(23, 105);
             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(422, 266);
+            this.PrintNum_label.Location = new System.Drawing.Point(423, 267);
             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);
@@ -608,7 +608,7 @@
             this.groupBoxWithBorder1.Controls.Add(this.ms_makecode);
             this.groupBoxWithBorder1.Controls.Add(this.OutBoxLength_label);
             this.groupBoxWithBorder1.Controls.Add(this.OutBoxLength);
-            this.groupBoxWithBorder1.Controls.Add(this.pr_outboxinnerqty);
+            this.groupBoxWithBorder1.Controls.Add(this.pr_palletqty);
             this.groupBoxWithBorder1.Controls.Add(this.DeleteAll);
             this.groupBoxWithBorder1.Controls.Add(this.AutoGenBoxCode);
             this.groupBoxWithBorder1.Controls.Add(this.pa_currentqty_label);
@@ -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(590, 40);
+            this.locksalecode.Location = new System.Drawing.Point(591, 41);
             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(364, 36);
+            this.PreFix_label.Location = new System.Drawing.Point(365, 37);
             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(426, 280);
+            this.pa_salecode_label.Location = new System.Drawing.Point(427, 281);
             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(18, 280);
+            this.ma_code_label.Location = new System.Drawing.Point(19, 281);
             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(588, 280);
+            this.ms_salecode.Location = new System.Drawing.Point(589, 281);
             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(190, 280);
+            this.ms_makecode.Location = new System.Drawing.Point(191, 281);
             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(168, 36);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(169, 37);
             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);
@@ -743,22 +743,22 @@
             this.OutBoxLength.TabIndex = 183;
             this.OutBoxLength.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OutBoxLength_KeyDown);
             // 
-            // pr_outboxinnerqty
-            // 
-            this.pr_outboxinnerqty.AllPower = null;
-            this.pr_outboxinnerqty.BackColor = System.Drawing.Color.White;
-            this.pr_outboxinnerqty.Enabled = false;
-            this.pr_outboxinnerqty.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty.ID = null;
-            this.pr_outboxinnerqty.Location = new System.Drawing.Point(180, 148);
-            this.pr_outboxinnerqty.Margin = new System.Windows.Forms.Padding(6);
-            this.pr_outboxinnerqty.Name = "pr_outboxinnerqty";
-            this.pr_outboxinnerqty.Power = null;
-            this.pr_outboxinnerqty.Size = new System.Drawing.Size(204, 39);
-            this.pr_outboxinnerqty.Str = null;
-            this.pr_outboxinnerqty.Str1 = null;
-            this.pr_outboxinnerqty.Str2 = null;
-            this.pr_outboxinnerqty.TabIndex = 181;
+            // pr_palletqty
+            // 
+            this.pr_palletqty.AllPower = null;
+            this.pr_palletqty.BackColor = System.Drawing.Color.White;
+            this.pr_palletqty.Enabled = false;
+            this.pr_palletqty.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_palletqty.ID = null;
+            this.pr_palletqty.Location = new System.Drawing.Point(180, 148);
+            this.pr_palletqty.Margin = new System.Windows.Forms.Padding(6);
+            this.pr_palletqty.Name = "pr_palletqty";
+            this.pr_palletqty.Power = null;
+            this.pr_palletqty.Size = new System.Drawing.Size(204, 39);
+            this.pr_palletqty.Str = null;
+            this.pr_palletqty.Str1 = null;
+            this.pr_palletqty.Str2 = null;
+            this.pr_palletqty.TabIndex = 181;
             // 
             // DeleteAll
             // 
@@ -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(502, 96);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(503, 97);
             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(430, 160);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(431, 161);
             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(426, 216);
+            this.pr_detail_label.Location = new System.Drawing.Point(427, 217);
             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(586, 156);
+            this.pa_currentqty.Location = new System.Drawing.Point(587, 157);
             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(18, 216);
+            this.pr_code_label.Location = new System.Drawing.Point(19, 217);
             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(588, 216);
+            this.pr_detail.Location = new System.Drawing.Point(589, 217);
             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(18, 154);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(19, 155);
             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(190, 216);
+            this.pr_code.Location = new System.Drawing.Point(191, 217);
             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(18, 94);
+            this.pa_code_label.Location = new System.Drawing.Point(19, 95);
             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(32, 295);
+            this.sumpalletweight.Location = new System.Drawing.Point(33, 296);
             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(16, 221);
+            this.label4.Location = new System.Drawing.Point(17, 222);
             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(28, 114);
+            this.weight.Location = new System.Drawing.Point(29, 115);
             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(16, 46);
+            this.label5.Location = new System.Drawing.Point(17, 47);
             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);
@@ -1600,7 +1600,7 @@
         private CustomControl.ButtonUtil.NormalButton DeleteAll;
         private CustomControl.ValueLabel.ValueLabel checkweightlabel;
         private System.Windows.Forms.Label label1;
-        private CustomControl.TextBoxWithIcon.EnterTextBox pr_outboxinnerqty;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pr_palletqty;
         private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum;
         private UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
         private System.Windows.Forms.Label OutBoxLength_label;

+ 16 - 64
UAS_MES_YDCY/FunctionCode/Packing/Packing_PackageCollectionPallet.cs

@@ -50,7 +50,7 @@ namespace UAS_MES_NEW.Packing
         {
             try
             {
-                engine = new Engine(true);
+                //engine = new Engine(true);
             }
             catch (Exception ex)
             {
@@ -116,13 +116,13 @@ namespace UAS_MES_NEW.Packing
         {
             //加载表单数据
             sql.Clear();
-            sql.Append("select pa_width,pa_length,pa_heigth,pr_code,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,pa_remark,pa_outboxcode,pa_prodcode,pa_salecode,pa_makecode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,pa_status,pr_packrule,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,pr_detail,pa_packageqty,nvl(pa_standardqty,0) pa_standardqty,nvl(pr_outboxinnerqty,0)pr_outboxinnerqty,pa_currentqty from package left join product on pa_prodcode=");
+            sql.Append("select pa_width,pa_length,pa_heigth,pr_code,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,pa_remark,pa_outboxcode,pa_prodcode,pa_salecode,pa_makecode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,pa_status,pr_packrule,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,pr_detail,pa_packageqty,nvl(pr_palletqty,0) pa_standardqty,nvl(pr_palletqty,0)pr_palletqty,pa_currentqty from package left join product on pa_prodcode=");
             sql.Append("pr_code where pa_outboxcode='" + pa_outboxcode.Text + "'");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count > 0)
             {
                 //记录该数据保证在修改不被允许的前提下能偶回复之前的值
-                StandardQTY = decimal.Parse(dt.Rows[0]["pr_outboxinnerqty"].ToString());
+                StandardQTY = decimal.Parse(dt.Rows[0]["pr_palletqty"].ToString());
                 if (dt.Rows[0]["pa_salecode"].ToString() != "")
                 {
                     ms_salecode.Text = dt.Rows[0]["pa_salecode"].ToString();
@@ -130,7 +130,7 @@ namespace UAS_MES_NEW.Packing
                 BaseUtil.SetFormValue(this.Controls, dt);
                 if (pa_standardqty.Text != "0")
                 {
-                    pr_outboxinnerqty.Text = pa_standardqty.Text;
+                    pr_palletqty.Text = pa_standardqty.Text;
                 }
             }
             else
@@ -316,7 +316,7 @@ namespace UAS_MES_NEW.Packing
                         //获取序列号信息
                         sql.Clear();
                         sql.Append("select nvl(pr_Singlelevelqty,1)pr_Singlelevelqty,nvl(ms_iostatus,0) ms_iostatus,pr_code,pa_salecode,ms_salecode,ms_outno,ms_makecode,ms_prodcode,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,pa_checkno,pr_packrule,");
-                        sql.Append("nvl(pr_outboxinnerqty,0)pr_outboxinnerqty,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype from makeserial left join product on ms_prodcode=pr_code left join packagedetail ");
+                        sql.Append("nvl(pr_palletqty,0)pr_palletqty,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype from makeserial left join product on ms_prodcode=pr_code left join packagedetail ");
                         sql.Append("on pd_barcode=ms_sncode left join package on pa_id =pd_paid where ms_id='" + oMsID + "'");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         string ms_makecode = "";
@@ -328,7 +328,7 @@ namespace UAS_MES_NEW.Packing
                         {
                             pr_code.Text = dt.Rows[0]["pr_code"].ToString();
                             pr_Singlelevelqty = dt.Rows[0]["pr_Singlelevelqty"].ToString();
-                            StandardQTY = decimal.Parse(dt.Rows[0]["pr_outboxinnerqty"].ToString());
+                            StandardQTY = decimal.Parse(dt.Rows[0]["pr_palletqty"].ToString());
                             ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
                             ms_prodcode = dt.Rows[0]["ms_prodcode"].ToString();
                             ms_iostatus = dt.Rows[0]["ms_iostatus"].ToString();
@@ -354,7 +354,7 @@ namespace UAS_MES_NEW.Packing
                         //保证箱内容量不会被重置
                         if (pa_standardqty.Text != "0" && pa_standardqty.Text != "")
                         {
-                            pr_outboxinnerqty.Text = pa_standardqty.Text;
+                            pr_palletqty.Text = pa_standardqty.Text;
                         }
                         if (pa_outboxcode.Text == "")
                         {
@@ -371,7 +371,7 @@ namespace UAS_MES_NEW.Packing
                                 //如果勾选了自动生成箱号,在封箱或者首次
                                 if (AutoGenBoxCode.Checked && (pa_status.Text == "1" || pa_status.Text == "" || pa_status.Text == "0"))
                                 {
-                                    pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PACKAGE", ms_makecode, pr_code.Text, User.UserCode);
+                                    pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PALLET", ms_makecode, pr_code.Text, User.UserCode);
                                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "自动生成", sn_code.Text, PreFix.Text + ":" + OutBoxLength.Text);
                                 }
                             }
@@ -382,7 +382,7 @@ namespace UAS_MES_NEW.Packing
                             return;
                         }
                         //判断箱内总数必须大于0
-                        if (pr_outboxinnerqty.Text == "" || pr_outboxinnerqty.Text == "0")
+                        if (pr_palletqty.Text == "" || pr_palletqty.Text == "0")
                         {
                             OperateResult.AppendText(">>箱内容量必须大于0\n", Color.Red);
                             return;
@@ -428,13 +428,13 @@ namespace UAS_MES_NEW.Packing
                             else
                             {
                                 //满箱之后采集下一个之前自动清除内容,生成新的箱号
-                                if ((AutoGenBoxCode.Checked && pa_currentqty.Text != "" && pr_outboxinnerqty.Text == pa_currentqty.Text) || (AutoGenBoxCode.Checked && pa_status.Text == "1"))
+                                if ((AutoGenBoxCode.Checked && pa_currentqty.Text != "" && pr_palletqty.Text == pa_currentqty.Text) || (AutoGenBoxCode.Checked && pa_status.Text == "1"))
                                 {
                                     pa_currentqty.Text = "";
                                     pa_outboxcode.Text = "";
                                     pa_status.Text = "0";
                                     BaseUtil.CleanDGVData(PackageDetail);
-                                    pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PACKAGE", ms_makecode, pr_code.Text, User.UserCode);
+                                    pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PALLET", ms_makecode, pr_code.Text, User.UserCode);
                                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "自动生成", sn_code.Text, PreFix.Text + ":" + OutBoxLength.Text);
                                 }
                                 if (!CheckOutBoxLength(ms_salecode_text))
@@ -447,7 +447,7 @@ namespace UAS_MES_NEW.Packing
                                     OperateResult.AppendText(">>采集后层数超出,不允许采集\n", Color.Red);
                                     return;
                                 }
-                                if (LogicHandler.Packing_Pallet(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
+                                if (LogicHandler.Packing_Pallet(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_palletqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
                                 {
                                     //提示正确返回时传递的信息
                                     if (ErrorMessage.Contains("AFTERSUCCESS"))
@@ -491,7 +491,7 @@ namespace UAS_MES_NEW.Packing
                                     {
                                         dh.UpdateByCondition("package", "pa_nextstep='" + User.CurrentStepCode + "', PA_CURRENTSTEP = '" + User.CurrentStepCode + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                                     }
-                                    if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == int.Parse(pr_outboxinnerqty.Text))
+                                    if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == int.Parse(pr_palletqty.Text))
                                     {
                                         double ActualWeight = double.Parse(weight.Text == "" ? "0" : weight.Text.Replace("kg", "").Replace("g", "").Trim());
                                         double palletWeightErrorValue = double.Parse(dh.GetConfig("palletWeightErrorValue", "MESSetting").ToString());
@@ -549,7 +549,7 @@ namespace UAS_MES_NEW.Packing
                         //勾选了取消箱号先验证箱号存不存在,存在的话移除掉,重新加载一次数据
                         else
                         {
-                            if (LogicHandler.Packing_Pallet(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
+                            if (LogicHandler.Packing_Pallet(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_palletqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
                             {
                                 RefreshWeight();
                                 dh.UpdateByCondition("makeserial", "ms_outboxcode=''", "ms_id='" + oMsID + "'");
@@ -773,55 +773,7 @@ namespace UAS_MES_NEW.Packing
             }
         }
 
-        //private void pr_outboxinnerqty_KeyDown(object sender, KeyEventArgs e)
-        //{
-        //    if (e.KeyCode == Keys.Enter)
-        //        ResetPackQTY();
-        //}
-
-        //private void pr_outboxinnerqty_Leave(object sender, EventArgs e)
-        //{
-        //    ResetPackQTY();
-        //}
-
-        //private void ResetPackQTY()
-        //{
-        //    //数据不符合限制的时候保持原有值
-        //    int curretnqty = int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text);
-        //    if (!(int.Parse(pr_outboxinnerqty.Text) >= curretnqty))
-        //    {
-        //        pr_outboxinnerqty.Text = StandardQTY.ToString();
-        //    }
-        //    else
-        //    {
-        //        if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "'"))
-        //        {
-        //            string checknostatus = dh.getFieldDataByCondition("oqcbatch", "ob_status", "ob_checkno='" + pa_checkno.Text + "'").ToString();
-        //            if (checknostatus == "" || checknostatus == "ENTERING")
-        //            {
-        //                if (pa_downstatus.Text == "0")
-        //                {
-        //                    if (dh.CheckExist("source", "sc_code='" + pa_sccode.Text + "' and  sc_stepcode='" + User.CurrentStepCode + "'"))
-        //                    {
-        //                        dh.UpdateByCondition("package", "pa_standardqty='" + pr_outboxinnerqty.Text + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
-        //                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "修改箱内容量", "原容量" + StandardQTY + ",修改为" + pr_outboxinnerqty.Text + "'", pa_outboxcode.Text, pa_checkno.Text);
-        //                        return;
-        //                    }
-        //                    else
-        //                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "当前所在工序不是登录岗位资源所在工序,不允许修改数量\n", Color.Red);
-        //                }
-        //                else
-        //                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "处于下地状态,不允许修改标准容量\n", Color.Red);
-        //            }
-        //            else
-        //                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "处于送检中,不允许修改标准容量\n", Color.Red);
-        //        }
-        //        else
-        //            OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "不存在,修改容量无效\n", Color.Red);
-        //        pr_outboxinnerqty.Text = StandardQTY.ToString();
-        //    }
-        //}
-
+     
         private void PrintLabel_SelectedValueChanged(object sender, EventArgs e)
         {
             if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
@@ -894,7 +846,7 @@ namespace UAS_MES_NEW.Packing
                                 //抽检批次不为空的时候进行移除
                                 dh.ExecuteSQLTran(SQLS1.ToArray());
                                 string prcode = dh.getFieldDataByCondition("packagedetail", "pd_prodcode", "pd_outboxcode = '" + pa_outboxcode.Text + "'").ToString();
-                                string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + prcode + "'").ToString();
+                                string standqty = dh.getFieldDataByCondition("product", "pr_palletqty", "pr_code = '" + prcode + "'").ToString();
                                 if (standqty != "")
                                 {
                                     //置空原箱

+ 7 - 2
UAS_MES_YDCY/PublicMethod/LogicHandler.cs

@@ -889,12 +889,13 @@ namespace UAS_MES_NEW.PublicMethod
                 dh.ExecuteSql("delete from oqcbatchdetail where obd_sncode='" + iSnCode + "'", "delete");
             }
             //之前保存的不良就不再调用
-            DataTable dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_stepcode", "nvl(ms_ifrework,0)ms_ifrework", "ms_status" }, "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
+            DataTable dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_stepcode", "nvl(ms_ifrework,0)ms_ifrework", "ms_status", "nvl(ms_ifqccheck,0)ms_ifqccheck" }, "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
             if (dt.Rows.Count > 0)
             {
                 string ifrework = dt.Rows[0]["ms_ifrework"].ToString();
                 string ms_stepcode = dt.Rows[0]["ms_stepcode"].ToString();
                 string ms_status = dt.Rows[0]["ms_status"].ToString();
+                string ms_ifqccheck = dt.Rows[0]["ms_ifqccheck"].ToString();
                 if (ms_status == "2")
                 {
                     dh.ExecuteSql("delete from steppassed where sp_sncode='" + iSnCode + "' and sp_makecode='" + iMakeCode + "' and sp_stepcode='" + StepCode + "'", "delete");
@@ -902,6 +903,10 @@ namespace UAS_MES_NEW.PublicMethod
                 }
                 if (ms_stepcode == StepCode)
                 {
+                    if (ms_ifqccheck == "-1")
+                    {
+                        oErrorMessage = iSnCode + "QC抽检状态,不允许采集";
+                    }
                     if (ifrework == "0")
                         dh.UpdateByCondition("makeserial", "ms_status=3,ms_nextstepcode=''", "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
                     else
@@ -1487,7 +1492,7 @@ namespace UAS_MES_NEW.PublicMethod
         /// <param name="stepcode"></param>
         /// <param name="ifRePrint"></param>
         /// <param name="userCode"></param>
-        public static void doLabelPrintLog(string printValue, string printType, string MakeCode, string prodCode, string sourceCode, string stepcode, string ifRePrint, string userCode,string fileName)
+        public static void doLabelPrintLog(string printValue, string printType, string MakeCode, string prodCode, string sourceCode, string stepcode, string ifRePrint, string userCode, string fileName)
         {
             sql.Clear();
             sql.Append("insert into labelprintlog(LPL_ID,LPL_VALUE,LPL_TYPE,LPL_MAKECODE,LPL_PRODCODE,LPL_SOURCECODE,LPL_STEPCODE,LPL_IFREPRINT,LPL_INDATE,LPL_INMAN,lpl_file) ");