Browse Source

标签补打去除限制

callm 5 years ago
parent
commit
e88d5d87ea

+ 44 - 34
UAS_MES_ODLF/FunctionCode/Make/Make_FeedingCollectionCombine.cs

@@ -140,59 +140,69 @@ namespace UAS_MES_NEW.Make
                         }
                         else if (sn_code.Text != "")
                         {
-                            sql.Clear();
-                            sql.Append("select bhp_prodcode,bhp_barcode from make left join makecraftdetail on mcd_macode=ma_code ");
-                            sql.Append("left join stepproduct on sp_stepcode=mcd_stepcode and sp_mothercode = ma_prodcode left join ");
-                            sql.Append("makeserial on ms_makecode=ma_code and sp_craftcode=ms_craftcode left join (select * from ");
-                            sql.Append("BEFOREHANDPROCESS where bhp_maincode='" + code.Text + "') on sp_fsoncode=bhp_prodcode ");
-                            sql.Append("where ma_code='" + ma_code.Text + "' and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + sn_code.Text + "' and bhp_barcode is not null");
-                            DataTable combinedata = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                            //如果绑定的料和上料的料数量一样则可以上料
-                            if (combinedata.Rows.Count == dt1.Rows.Count)
+                            if (!dh.CheckExist("craftmaterial", "cm_barcode='" + code.Text + "' and cm_status=0"))
                             {
                                 sql.Clear();
-                                sql.Append("insert into Craftmaterial (cm_id ,cm_makecode,cm_maid,cm_maprodcode, cm_soncode, cm_mscode, cm_sncode, cm_stepcode, cm_stepname,cm_fsoncode,");
-                                sql.Append("cm_craftcode,cm_craftname,cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid,cm_status,cm_materialtype,cm_firstsn)");
-                                sql.Append("select Craftmaterial_seq.nextval,ma_code, ma_id, ma_prodcode,sp_soncode,ms_code,ms_sncode,mcd_stepcode,mcd_stepname,sp_fsoncode,");
-                                sql.Append("ms_craftcode,ms_craftname,bhp_barcode,1,sysdate,'" + User.UserCode + "','" + User.UserLineCode + "',ma_wccode,'" + User.UserSourceCode + "',sp_id,0,1,ms_firstsn ");
-                                sql.Append("from make left join makecraftdetail on mcd_macode=ma_code left join stepproduct on sp_stepcode=mcd_stepcode and sp_mothercode = ma_prodcode left join ");
+                                sql.Append("select bhp_prodcode,bhp_barcode from make left join makecraftdetail on mcd_macode=ma_code ");
+                                sql.Append("left join stepproduct on sp_stepcode=mcd_stepcode and sp_mothercode = ma_prodcode left join ");
                                 sql.Append("makeserial on ms_makecode=ma_code and sp_craftcode=ms_craftcode left join (select * from ");
                                 sql.Append("BEFOREHANDPROCESS where bhp_maincode='" + code.Text + "') on sp_fsoncode=bhp_prodcode ");
                                 sql.Append("where ma_code='" + ma_code.Text + "' and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + sn_code.Text + "' and bhp_barcode is not null");
-                                dh.ExecuteSql(sql.GetString(), "insert");
-                                for (int i = 0; i < LabelDataGridView.Rows.Count; i++)
+                                DataTable combinedata = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                //如果绑定的料和上料的料数量一样则可以上料
+                                if (combinedata.Rows.Count == dt1.Rows.Count)
                                 {
-                                    for (int j = 0; j < combinedata.Rows.Count; j++)
+                                    sql.Clear();
+                                    sql.Append("insert into Craftmaterial (cm_id ,cm_makecode,cm_maid,cm_maprodcode, cm_soncode, cm_mscode, cm_sncode, cm_stepcode, cm_stepname,cm_fsoncode,");
+                                    sql.Append("cm_craftcode,cm_craftname,cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid,cm_status,cm_materialtype,cm_firstsn)");
+                                    sql.Append("select Craftmaterial_seq.nextval,ma_code, ma_id, ma_prodcode,sp_soncode,ms_code,ms_sncode,mcd_stepcode,mcd_stepname,sp_fsoncode,");
+                                    sql.Append("ms_craftcode,ms_craftname,bhp_barcode,1,sysdate,'" + User.UserCode + "','" + User.UserLineCode + "',ma_wccode,'" + User.UserSourceCode + "',sp_id,0,1,ms_firstsn ");
+                                    sql.Append("from make left join makecraftdetail on mcd_macode=ma_code left join stepproduct on sp_stepcode=mcd_stepcode and sp_mothercode = ma_prodcode left join ");
+                                    sql.Append("makeserial on ms_makecode=ma_code and sp_craftcode=ms_craftcode left join (select * from ");
+                                    sql.Append("BEFOREHANDPROCESS where bhp_maincode='" + code.Text + "') on sp_fsoncode=bhp_prodcode ");
+                                    sql.Append("where ma_code='" + ma_code.Text + "' and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + sn_code.Text + "' and bhp_barcode is not null");
+                                    dh.ExecuteSql(sql.GetString(), "insert");
+                                    for (int i = 0; i < LabelDataGridView.Rows.Count; i++)
                                     {
-                                        if (LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() == combinedata.Rows[j]["bhp_prodcode"].ToString())
+                                        for (int j = 0; j < combinedata.Rows.Count; j++)
                                         {
-                                            LabelDataGridView.Rows[i].Cells["BarCode"].Value = combinedata.Rows[j]["bhp_barcode"].ToString();
+                                            if (LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() == combinedata.Rows[j]["bhp_prodcode"].ToString())
+                                            {
+                                                LabelDataGridView.Rows[i].Cells["BarCode"].Value = combinedata.Rows[j]["bhp_barcode"].ToString();
+                                            }
                                         }
                                     }
+                                    if (!LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sn_code.Text, "上料采集", "上料成功", User.UserCode, out ErrorMessage))
+                                    {
+                                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                                        SetCheck set = new SetCheck("NG", Color.Red);
+                                        BaseUtil.SetFormCenter(set);
+                                        set.ShowDialog();
+                                    }
+                                    else
+                                    {
+                                        //提示正确返回时传递的信息
+                                        if (ErrorMessage.Contains("AFTERSUCCESS"))
+                                            OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                                        OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
+                                        code.Text = "";
+                                        sn_code.Text = "";
+                                        SetCheck set = new SetCheck("OK", Color.Green);
+                                        BaseUtil.SetFormCenter(set);
+                                        set.ShowDialog();
+                                    }
                                 }
-                                if (!LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sn_code.Text, "上料采集", "上料成功", User.UserCode, out ErrorMessage))
-                                {
-                                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
-                                    SetCheck set = new SetCheck("NG", Color.Red);
-                                    BaseUtil.SetFormCenter(set);
-                                    set.ShowDialog();
-                                }    
                                 else
                                 {
-                                    //提示正确返回时传递的信息
-                                    if (ErrorMessage.Contains("AFTERSUCCESS"))
-                                        OperateResult.AppendText(">>" + ErrorMessage + "\n");
-                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
-                                    code.Text = "";
-                                    sn_code.Text = "";
-                                    SetCheck set = new SetCheck("OK", Color.Green);
+                                    OperateResult.AppendText(">>预加工条码" + code.Text + "未绑定所有指定物料,请在预加工界面核对\n", Color.Red, code);
+                                    SetCheck set = new SetCheck("NG", Color.Red);
                                     BaseUtil.SetFormCenter(set);
                                     set.ShowDialog();
                                 }
                             }
                             else
                             {
-                                OperateResult.AppendText(">>预加工条码未绑定所有指定物料,请在预加工界面核对\n", Color.Red, code);
+                                OperateResult.AppendText(">>条码" + code.Text + "已经上料\n", Color.Red, code);
                                 SetCheck set = new SetCheck("NG", Color.Red);
                                 BaseUtil.SetFormCenter(set);
                                 set.ShowDialog();

+ 129 - 150
UAS_MES_ODLF/FunctionCode/Make/Make_RePrintLabel.Designer.cs

@@ -28,82 +28,41 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_RePrintLabel));
-            this.giftBox = new System.Windows.Forms.RadioButton();
-            this.CartonBox = new System.Windows.Forms.RadioButton();
-            this.fuselagel = new System.Windows.Forms.RadioButton();
             this.label = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.label111 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
-            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip();
             this.label6 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
             this.label8 = new System.Windows.Forms.Label();
             this.label9 = new System.Windows.Forms.Label();
-            this.label10 = new System.Windows.Forms.Label();
             this.inputValue = new System.Windows.Forms.Label();
             this.pr_code = new System.Windows.Forms.Label();
             this.ms_makecode = new System.Windows.Forms.Label();
             this.pr_detail = new System.Windows.Forms.Label();
-            this.rePrintCheck = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.groupBoxWithBorder1 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.CartonBox = new System.Windows.Forms.RadioButton();
+            this.fuselagel = new System.Windows.Forms.RadioButton();
+            this.giftBox = new System.Windows.Forms.RadioButton();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.printBtn = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.printNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             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.groupBoxWithBorder1 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.groupBoxWithBorder1.SuspendLayout();
             this.SuspendLayout();
             // 
-            // giftBox
-            // 
-            this.giftBox.AutoSize = true;
-            this.giftBox.Checked = true;
-            this.giftBox.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.giftBox.Location = new System.Drawing.Point(83, 52);
-            this.giftBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.giftBox.Name = "giftBox";
-            this.giftBox.Size = new System.Drawing.Size(135, 35);
-            this.giftBox.TabIndex = 1;
-            this.giftBox.TabStop = true;
-            this.giftBox.Text = "彩标打印";
-            this.giftBox.UseVisualStyleBackColor = true;
-            this.giftBox.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChange);
-            // 
-            // CartonBox
-            // 
-            this.CartonBox.AutoSize = true;
-            this.CartonBox.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.CartonBox.Location = new System.Drawing.Point(431, 52);
-            this.CartonBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.CartonBox.Name = "CartonBox";
-            this.CartonBox.Size = new System.Drawing.Size(164, 35);
-            this.CartonBox.TabIndex = 2;
-            this.CartonBox.Text = "Carton打印";
-            this.CartonBox.UseVisualStyleBackColor = true;
-            this.CartonBox.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChange);
-            // 
-            // fuselagel
-            // 
-            this.fuselagel.AutoSize = true;
-            this.fuselagel.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.fuselagel.Location = new System.Drawing.Point(845, 52);
-            this.fuselagel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.fuselagel.Name = "fuselagel";
-            this.fuselagel.Size = new System.Drawing.Size(159, 35);
-            this.fuselagel.TabIndex = 3;
-            this.fuselagel.Text = "机身标打印";
-            this.fuselagel.UseVisualStyleBackColor = true;
-            this.fuselagel.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChange);
-            // 
             // label
             // 
             this.label.AutoSize = true;
             this.label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label.Location = new System.Drawing.Point(38, 133);
+            this.label.Location = new System.Drawing.Point(50, 178);
+            this.label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label.Name = "label";
-            this.label.Size = new System.Drawing.Size(86, 31);
+            this.label.Size = new System.Drawing.Size(114, 41);
             this.label.TabIndex = 4;
             this.label.Text = "输入值";
             // 
@@ -111,9 +70,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label3.Location = new System.Drawing.Point(546, 133);
+            this.label3.Location = new System.Drawing.Point(728, 178);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(110, 31);
+            this.label3.Size = new System.Drawing.Size(146, 41);
             this.label3.TabIndex = 5;
             this.label3.Text = "工单代码";
             // 
@@ -121,9 +81,10 @@
             // 
             this.label111.AutoSize = true;
             this.label111.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label111.Location = new System.Drawing.Point(38, 173);
+            this.label111.Location = new System.Drawing.Point(50, 230);
+            this.label111.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label111.Name = "label111";
-            this.label111.Size = new System.Drawing.Size(110, 31);
+            this.label111.Size = new System.Drawing.Size(146, 41);
             this.label111.TabIndex = 6;
             this.label111.Text = "产品编号";
             // 
@@ -131,30 +92,21 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label5.Location = new System.Drawing.Point(546, 173);
+            this.label5.Location = new System.Drawing.Point(728, 230);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(62, 31);
+            this.label5.Size = new System.Drawing.Size(82, 41);
             this.label5.TabIndex = 7;
             this.label5.Text = "名称";
             // 
-            // PrintLabel
-            // 
-            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(188, 269);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(222, 26);
-            this.PrintLabel.TabIndex = 189;
-            // 
             // label6
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(38, 218);
-            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label6.Location = new System.Drawing.Point(50, 290);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(134, 31);
+            this.label6.Size = new System.Drawing.Size(178, 41);
             this.label6.TabIndex = 188;
             this.label6.Text = "打印机列表";
             // 
@@ -162,10 +114,10 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(38, 264);
-            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label7.Location = new System.Drawing.Point(50, 352);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(110, 31);
+            this.label7.Size = new System.Drawing.Size(146, 41);
             this.label7.TabIndex = 187;
             this.label7.Text = "标签模板";
             // 
@@ -173,9 +125,10 @@
             // 
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label8.Location = new System.Drawing.Point(544, 222);
+            this.label8.Location = new System.Drawing.Point(726, 296);
+            this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(86, 31);
+            this.label8.Size = new System.Drawing.Size(114, 41);
             this.label8.TabIndex = 190;
             this.label8.Text = "输入框";
             // 
@@ -183,38 +136,31 @@
             // 
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label9.Location = new System.Drawing.Point(546, 269);
+            this.label9.Location = new System.Drawing.Point(728, 358);
+            this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(62, 31);
+            this.label9.Size = new System.Drawing.Size(82, 41);
             this.label9.TabIndex = 192;
             this.label9.Text = "份数";
             // 
-            // label10
-            // 
-            this.label10.AutoSize = true;
-            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label10.Location = new System.Drawing.Point(49, 576);
-            this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(110, 31);
-            this.label10.TabIndex = 196;
-            this.label10.Text = "补打核对";
-            // 
             // inputValue
             // 
             this.inputValue.AutoSize = true;
             this.inputValue.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.inputValue.Location = new System.Drawing.Point(182, 133);
+            this.inputValue.Location = new System.Drawing.Point(242, 178);
+            this.inputValue.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.inputValue.Name = "inputValue";
-            this.inputValue.Size = new System.Drawing.Size(0, 31);
+            this.inputValue.Size = new System.Drawing.Size(0, 41);
             this.inputValue.TabIndex = 199;
             // 
             // pr_code
             // 
             this.pr_code.AutoSize = true;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_code.Location = new System.Drawing.Point(182, 173);
+            this.pr_code.Location = new System.Drawing.Point(242, 230);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_code.Name = "pr_code";
-            this.pr_code.Size = new System.Drawing.Size(0, 31);
+            this.pr_code.Size = new System.Drawing.Size(0, 41);
             this.pr_code.TabIndex = 200;
             this.pr_code.TextChanged += new System.EventHandler(this.PrintLabel_TextChanged);
             // 
@@ -222,43 +168,87 @@
             // 
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ms_makecode.Location = new System.Drawing.Point(656, 133);
+            this.ms_makecode.Location = new System.Drawing.Point(874, 178);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 31);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 41);
             this.ms_makecode.TabIndex = 201;
             // 
             // pr_detail
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_detail.Location = new System.Drawing.Point(656, 173);
+            this.pr_detail.Location = new System.Drawing.Point(874, 230);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 31);
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
             this.pr_detail.TabIndex = 202;
             // 
-            // rePrintCheck
-            // 
-            this.rePrintCheck.AllPower = null;
-            this.rePrintCheck.BackColor = System.Drawing.Color.White;
-            this.rePrintCheck.ID = null;
-            this.rePrintCheck.Location = new System.Drawing.Point(223, 576);
-            this.rePrintCheck.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.rePrintCheck.Name = "rePrintCheck";
-            this.rePrintCheck.Power = null;
-            this.rePrintCheck.Size = new System.Drawing.Size(242, 28);
-            this.rePrintCheck.Str = null;
-            this.rePrintCheck.Str1 = null;
-            this.rePrintCheck.Str2 = null;
-            this.rePrintCheck.TabIndex = 197;
-            this.rePrintCheck.KeyDown += new System.Windows.Forms.KeyEventHandler(this.rePrintCheck_KeyDown);
+            // groupBoxWithBorder1
+            // 
+            this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder1.Controls.Add(this.CartonBox);
+            this.groupBoxWithBorder1.Controls.Add(this.fuselagel);
+            this.groupBoxWithBorder1.Controls.Add(this.giftBox);
+            this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(58, 18);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
+            this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4, 6, 4, 6);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1512, 144);
+            this.groupBoxWithBorder1.TabIndex = 204;
+            this.groupBoxWithBorder1.TabStop = false;
+            this.groupBoxWithBorder1.Text = "打印类型";
+            this.groupBoxWithBorder1.TextColor = System.Drawing.Color.Black;
+            // 
+            // CartonBox
+            // 
+            this.CartonBox.AutoSize = true;
+            this.CartonBox.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.CartonBox.Location = new System.Drawing.Point(574, 70);
+            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);
+            this.CartonBox.TabIndex = 2;
+            this.CartonBox.Text = "Carton打印";
+            this.CartonBox.UseVisualStyleBackColor = true;
+            this.CartonBox.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChange);
+            // 
+            // fuselagel
+            // 
+            this.fuselagel.AutoSize = true;
+            this.fuselagel.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.fuselagel.Location = new System.Drawing.Point(1126, 70);
+            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);
+            this.fuselagel.TabIndex = 3;
+            this.fuselagel.Text = "机身标打印";
+            this.fuselagel.UseVisualStyleBackColor = true;
+            this.fuselagel.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChange);
+            // 
+            // giftBox
+            // 
+            this.giftBox.AutoSize = true;
+            this.giftBox.Checked = true;
+            this.giftBox.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.giftBox.Location = new System.Drawing.Point(110, 70);
+            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);
             // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(44, 316);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.OperateResult.Location = new System.Drawing.Point(58, 422);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(1134, 246);
+            this.OperateResult.Size = new System.Drawing.Size(1510, 326);
             this.OperateResult.TabIndex = 195;
             this.OperateResult.Text = "";
             // 
@@ -269,13 +259,13 @@
             this.printBtn.DownImage = ((System.Drawing.Image)(resources.GetObject("printBtn.DownImage")));
             this.printBtn.Image = null;
             this.printBtn.IsShowBorder = true;
-            this.printBtn.Location = new System.Drawing.Point(923, 267);
-            this.printBtn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.printBtn.Location = new System.Drawing.Point(1230, 356);
+            this.printBtn.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.printBtn.MoveImage = ((System.Drawing.Image)(resources.GetObject("printBtn.MoveImage")));
             this.printBtn.Name = "printBtn";
             this.printBtn.NormalImage = ((System.Drawing.Image)(resources.GetObject("printBtn.NormalImage")));
             this.printBtn.Power = null;
-            this.printBtn.Size = new System.Drawing.Size(75, 36);
+            this.printBtn.Size = new System.Drawing.Size(100, 48);
             this.printBtn.TabIndex = 194;
             this.printBtn.Text = "打印";
             this.printBtn.UseVisualStyleBackColor = false;
@@ -286,12 +276,12 @@
             this.printNum.AllPower = null;
             this.printNum.BackColor = System.Drawing.Color.White;
             this.printNum.ID = null;
-            this.printNum.Location = new System.Drawing.Point(663, 273);
-            this.printNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.printNum.Location = new System.Drawing.Point(884, 364);
+            this.printNum.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.printNum.Name = "printNum";
             this.printNum.Negative = false;
             this.printNum.Power = null;
-            this.printNum.Size = new System.Drawing.Size(222, 28);
+            this.printNum.Size = new System.Drawing.Size(294, 35);
             this.printNum.Str = null;
             this.printNum.Str1 = null;
             this.printNum.Str2 = null;
@@ -303,54 +293,45 @@
             this.inputText.AllPower = null;
             this.inputText.BackColor = System.Drawing.Color.White;
             this.inputText.ID = null;
-            this.inputText.Location = new System.Drawing.Point(662, 224);
-            this.inputText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.inputText.Location = new System.Drawing.Point(882, 298);
+            this.inputText.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.inputText.Name = "inputText";
             this.inputText.Power = null;
-            this.inputText.Size = new System.Drawing.Size(222, 28);
+            this.inputText.Size = new System.Drawing.Size(294, 35);
             this.inputText.Str = null;
             this.inputText.Str1 = null;
             this.inputText.Str2 = null;
             this.inputText.TabIndex = 191;
             this.inputText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.inputText_KeyDown);
             // 
+            // PrintLabel
+            // 
+            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel.FormattingEnabled = true;
+            this.PrintLabel.Location = new System.Drawing.Point(250, 358);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.PrintLabel.Name = "PrintLabel";
+            this.PrintLabel.Size = new System.Drawing.Size(294, 32);
+            this.PrintLabel.TabIndex = 189;
+            // 
             // Printer
             // 
-            this.Printer.Location = new System.Drawing.Point(188, 218);
-            this.Printer.Margin = new System.Windows.Forms.Padding(6);
+            this.Printer.Location = new System.Drawing.Point(250, 290);
+            this.Printer.Margin = new System.Windows.Forms.Padding(8);
             this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(222, 37);
+            this.Printer.Size = new System.Drawing.Size(296, 50);
             this.Printer.TabIndex = 186;
             // 
-            // groupBoxWithBorder1
-            // 
-            this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
-            this.groupBoxWithBorder1.Controls.Add(this.CartonBox);
-            this.groupBoxWithBorder1.Controls.Add(this.fuselagel);
-            this.groupBoxWithBorder1.Controls.Add(this.giftBox);
-            this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(44, 14);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
-            this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1134, 108);
-            this.groupBoxWithBorder1.TabIndex = 204;
-            this.groupBoxWithBorder1.TabStop = false;
-            this.groupBoxWithBorder1.Text = "打印类型";
-            this.groupBoxWithBorder1.TextColor = System.Drawing.Color.Black;
-            // 
             // Make_RePrintLabel
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1227, 625);
+            this.ClientSize = new System.Drawing.Size(1636, 834);
             this.Controls.Add(this.groupBoxWithBorder1);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.pr_code);
             this.Controls.Add(this.inputValue);
-            this.Controls.Add(this.rePrintCheck);
-            this.Controls.Add(this.label10);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.printBtn);
             this.Controls.Add(this.printNum);
@@ -366,16 +347,16 @@
             this.Controls.Add(this.label3);
             this.Controls.Add(this.label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.Name = "Make_RePrintLabel";
             this.Tag = "Make!RePrintLabel";
             this.Text = "Make_RePrintLabel";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_RePrintLabel_FormClosing);
             this.Load += new System.EventHandler(this.Make_RePrintLabel_Load);
             this.SizeChanged += new System.EventHandler(this.Make_RePrintLabel_SizeChanged);
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -398,8 +379,6 @@
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox printNum;
         private CustomControl.ButtonUtil.NormalButton printBtn;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
-        private System.Windows.Forms.Label label10;
-        private CustomControl.TextBoxWithIcon.SnCollectionBox rePrintCheck;
         private System.Windows.Forms.Label inputValue;
         private System.Windows.Forms.Label pr_code;
         private System.Windows.Forms.Label ms_makecode;

+ 27 - 139
UAS_MES_ODLF/FunctionCode/Make/Make_RePrintLabel.cs

@@ -133,11 +133,11 @@ namespace UAS_MES_NEW.Make
                         OperateResult.AppendText(">>请输入SN\n", Color.Black);
                         return;
                     }
-                    //判断是否装箱通过
-                    if (checkPacked())
-                    {
-                        return;
-                    }
+                    ////判断是否装箱通过
+                    //if (checkPacked())
+                    //{
+                    //    return;
+                    //}
                     //界面赋值
                     formValue = (DataTable)dh.ExecuteSql("select ms_makecode,pr_code,pr_detail from makeserial left join product on MS_PRODCODE=pr_code where ms_id='" + ms_id + "'", "select");
                     BaseUtil.SetFormValue(this.Controls, formValue);
@@ -164,6 +164,7 @@ namespace UAS_MES_NEW.Make
                     inputValue.Text = inputText.Text;
                     inputText.Text = "";
                 }
+                print_Click(sender, new EventArgs());
             }
         }
 
@@ -214,19 +215,18 @@ namespace UAS_MES_NEW.Make
                     OperateResult.AppendText("<<序列号错误,不存在或已经发生转号\n", Color.Red);
                     return;
                 }
-                //如果ms_outboxcode 不为空,则提示用户,已经装箱不允许单独打印
-                if (mapB.Rows[0]["ms_outboxcode"].ToString() != "")
-                {
-                    OperateResult.AppendText("<<SN:" + inputValue.Text + "已经装箱" + mapB.Rows[0]["ms_outboxcode"].ToString() + "不允许单独补打\n", Color.Red);
-                    return;
-                }
+                ////如果ms_outboxcode 不为空,则提示用户,已经装箱不允许单独打印
+                //if (mapB.Rows[0]["ms_outboxcode"].ToString() != "")
+                //{
+                //    OperateResult.AppendText("<<SN:" + inputValue.Text + "已经装箱" + mapB.Rows[0]["ms_outboxcode"].ToString() + "不允许单独补打\n", Color.Red);
+                //    return;
+                //}
                 //判定通过进行打印 
                 //doc = lbl.Documents.Open(PrintLabel.Text);
                 if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, giftBox.Checked ? "彩盒标" : "机身标", "-1", out errorMessage))
                 {
                     //按照打印张数打印
                     OperateResult.AppendText("<<打印成功\n", Color.Green);
-                    printBtn.Enabled = false;
                 }
                 else
                 {
@@ -234,13 +234,13 @@ namespace UAS_MES_NEW.Make
                 }
                 //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, giftBox.Checked ? "彩盒标补打印" : "机身标补打印", "补打印成功", inputValue.Text, "");
-                //如果ms_downstatus<>0,则更新ms_downstatus=-1 where ms_id=?id,同时插入记录至表 MAKEDOWN
-                if (mapB.Rows[0]["ms_downstatus"].ToString() == "0")
-                {
-                    dh.ExecuteSql("update makeserial set ms_downstatus='-1' where ms_id='" + ms_id + "'", "update");
-                    //插入数据
-                    putInfo2MakeDown();
-                }
+                ////如果ms_downstatus<>0,则更新ms_downstatus=-1 where ms_id=?id,同时插入记录至表 MAKEDOWN
+                //if (mapB.Rows[0]["ms_downstatus"].ToString() == "0")
+                //{
+                //    dh.ExecuteSql("update makeserial set ms_downstatus='-1' where ms_id='" + ms_id + "'", "update");
+                //    //插入数据
+                //    putInfo2MakeDown();
+                //}
             }
             //打印类型为卡通箱标签
             else if (CartonBox.Checked)
@@ -258,7 +258,6 @@ namespace UAS_MES_NEW.Make
                 {
                     //判断通过,打印
                     OperateResult.AppendText("<<打印成功\n", Color.Green);
-                    printBtn.Enabled = false;
                 }
                 else
                 {
@@ -266,13 +265,13 @@ namespace UAS_MES_NEW.Make
                 }
                 //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱标签补打印,箱号:" + inputValue.Text, "补打印成功", inputValue.Text, "");
-                //如果pa_downstatus<>0,则更新pa_downstatus=-1 where pa_outboxcode=?code,同时插入记录至表 MAKEDOWN
-                if (mapB.Rows[0]["pa_downstatus"].ToString() == "0")
-                {
-                    dh.ExecuteSql("update package set pa_downstatus='-1' where pa_outboxcode='" + inputValue.Text + "'", "update");
-                    //插入MakeDown表
-                    putInfo2MakeDown();
-                }
+                ////如果pa_downstatus<>0,则更新pa_downstatus=-1 where pa_outboxcode=?code,同时插入记录至表 MAKEDOWN
+                //if (mapB.Rows[0]["pa_downstatus"].ToString() == "0")
+                //{
+                //    dh.ExecuteSql("update package set pa_downstatus='-1' where pa_outboxcode='" + inputValue.Text + "'", "update");
+                //    //插入MakeDown表
+                //    putInfo2MakeDown();
+                //}
             }
         }
 
@@ -315,118 +314,7 @@ namespace UAS_MES_NEW.Make
 
         private void rePrintCheck_KeyDown(object sender, KeyEventArgs e)
         {
-            //输入ENTER
-            if (e.KeyCode == Keys.Enter)
-            {
-                if (rePrintCheck.Text == "")
-                {
-                    OperateResult.AppendText("<<输入不能为空\n", Color.Red);
-                    return;
-                }
-                OperateResult.AppendText(">>" + rePrintCheck.Text + "\n", Color.Black);
-                if (giftBox.Checked || fuselagel.Checked)
-                {
-                    //TSN为空,说明是第一次
-                    if (TSN == "")
-                    {
-                        re_ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id) ms_id", "ms_sncode='" + rePrintCheck.Text + "'").ToString();
-                        //如果ms_id 无值或者为空,提示用户SN不存在,请输入SN
-                        if (re_ms_id == "")
-                        {
-                            OperateResult.AppendText("<<SN:" + rePrintCheck.Text + "不存在\n", Color.Red, rePrintCheck);
-                            OperateResult.AppendText(">>请输入SN\n", Color.Black);
-                            return;
-                        }
-                        //存在则记录下这一次输入的SN
-                        TSN = rePrintCheck.Text;
-                        //查询其他的数据
-                        infoc = (DataTable)dh.ExecuteSql("select ms_downstatus,ms_prodcode,ms_makecode from makeserial where ms_id='" + re_ms_id + "'", "select");
-                        //提示用户输入核对SN
-                        OperateResult.AppendText(">>请输入核对SN\n", Color.Green, rePrintCheck);
-                    }
-                    //说明输入的是核对的SN
-                    else
-                    {
-                        //两次输入的序列号一致
-                        if (rePrintCheck.Text == TSN)
-                        {
-                            OperateResult.AppendText("<<核对成功\n", Color.Green);
-                            //如果序列号是下地状态 ms_downstatus<>0 ,更新ms_downstatus=0;
-                            if (infoc.Rows[0]["ms_downstatus"].ToString() != "0")
-                            {
-                                ////判断下地原因是否是补打标签,是才能取消下地
-                                if (dh.CheckExist("makedown", "Md_SNCODE='" + TSN + "' AND Md_MACODE='" + infoc.Rows[0]["ms_makecode"].ToString() + "' AND Md_STATUS=-1 AND MD_DOWNREASON='补打标签'"))
-                                {
-                                    //同时更新 update makedown set ms_status=0,MS_UPREASON=’标签补打核对’,MS_UPMAN=’人员编号’,MS_UPDATE=SYSDATE WHERE MS_SNCODE=? AND MS_MACODE=? AND MS_STATUS=-1
-                                    sql.Clear();
-                                    sql.Append("update makedown set md_status=0,Md_UPREASON='标签补打核对',Md_UPMAN='" + User.UserCode + "',Md_UPDATE=SYSDATE WHERE Md_SNCODE='" + TSN + "' AND Md_MACODE='" + infoc.Rows[0]["ms_makecode"].ToString() + "' AND Md_STATUS=-1 AND MD_DOWNREASON='补打标签'");
-                                    dh.ExecuteSQLTran("update makeserial set ms_downstatus='0' where ms_id='" + re_ms_id + "'", sql.GetString());
-                                }
-                            }
-                            printBtn.Enabled = true;
-                            //记录操作日志commandlog , 补打核对,核对成功
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, infoc.Rows[0]["ms_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "标签补打核对", "核对成功", TSN, "");
-                        }
-                        else
-                        {
-                            OperateResult.AppendText("<<核对失败\n", Color.Red);
-                        }
-                        //清空TSN的值
-                        TSN = "";
-                        rePrintCheck.Text = "";
-                    }
-                }
-                //勾选的是卡通箱
-                else if (CartonBox.Checked)
-                {
-                    //第一次输入
-                    if (TSN == "")
-                    {
-                        infoc = (DataTable)dh.ExecuteSql("select pa_prodcode,pa_makecode,pa_downstatus from package where pa_outboxcode='" + rePrintCheck.Text + "' and pa_type=1", "select");
-                        //如果查询无值,提示用户卡通箱号不存在,请输入卡通箱号
-                        if (infoc.Rows.Count == 0)
-                        {
-                            OperateResult.AppendText("<<卡通箱号:" + rePrintCheck.Text + "不存在\n", Color.Red, rePrintCheck);
-                            OperateResult.AppendText(">>请输入卡通箱号\n", Color.Black);
-                            return;
-                        }
-                        //存在则保存,用于和第二次的比对
-                        TSN = rePrintCheck.Text;
-                        //提示用户输入卡通箱号
-                        OperateResult.AppendText(">>请输入核对卡通箱号\n", Color.Green, rePrintCheck);
-                    }
-                    else
-                    {
-                        //比对两次输入的是否一致
-                        if (TSN == rePrintCheck.Text)
-                        {
-                            //提示用户核对成功
-                            OperateResult.AppendText("<<核对成功\n", Color.Green);
-                            //如果卡通箱号是下地状态 pa_downstatus<>0 ,更新pa_downstatus=0;
-                            if (infoc.Rows[0]["pa_downstatus"].ToString() != "0")
-                            {
-                                //判断下地原因是否是补打标签,是才能取消下地
-                                if (dh.CheckExist("makedown", "Md_OUTBOXCODE='" + TSN + "' AND Md_PRODCODE='" + infoc.Rows[0]["pa_prodcode"].ToString() + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'"))
-                                {
-                                    sql.Clear();
-                                    sql.Append("update makedown set md_status=0,Md_UPREASON='标签补打核对',Md_UPMAN='" + User.UserCode + "',Md_UPDATE=SYSDATE WHERE Md_OUTBOXCODE='" + TSN + "' AND Md_PRODCODE='" + infoc.Rows[0]["pa_prodcode"].ToString() + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'");
-                                    dh.ExecuteSQLTran("update package set pa_downstatus='0' where pa_outboxcode='" + TSN + "'", sql.GetString());
-                                }
-                            }
-                            printBtn.Enabled = true;
-                            //记录操作日志commandlog , 补打核对,核对成功
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, infoc.Rows[0]["pa_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "标签补打核对,卡通箱号:" + TSN, "核对成功", TSN, "");
-                        }
-                        else
-                        {
-                            OperateResult.AppendText("<<核对失败\n", Color.Red);
-                        }
-                        //清空TSN的值
-                        TSN = "";
-                        rePrintCheck.Text = "";
-                    }
-                }
-            }
+
         }
         /// <summary>
         /// 清除信息

+ 17 - 17
UAS_MES_ODLF/PublicMethod/Print.cs

@@ -110,23 +110,23 @@ namespace UAS_MES_NEW.PublicMethod
         {
             ErrorMessage = "";
             DataTable dt = new DataTable();
-            if (IfRePrint != "-1")
-            {
-                if (LabelType == "卡通箱标" || LabelType == "大箱标" || LabelType == "栈板标")
-                {
-                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
-                }
-                else
-                {
-                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_makecode='" + MakeCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
-                }
-                ////如果已经打印过了,则不允许再打印
-                if (dt.Rows.Count > 0)
-                {
-                    ErrorMessage = SnCode + LabelType + "已打印";
-                    return false;
-                }
-            }
+            //if (IfRePrint != "-1")
+            //{
+            //    if (LabelType == "卡通箱标" || LabelType == "大箱标" || LabelType == "栈板标")
+            //    {
+            //        dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
+            //    }
+            //    else
+            //    {
+            //        dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_makecode='" + MakeCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
+            //    }
+            //    ////如果已经打印过了,则不允许再打印
+            //    if (dt.Rows.Count > 0)
+            //    {
+            //        ErrorMessage = SnCode + LabelType + "已打印";
+            //        return false;
+            //    }
+            //}
             string filelastwritetime = dh.getFieldDataByCondition("label", "la_lastwritetime", "la_id = '" + LaID + "'").ToString();
             FileInfo PrintFile = new FileInfo(LabelName);
             //打开模板路径