Browse Source

按照箱号上架

callm 5 months ago
parent
commit
223f695e0b

+ 3 - 3
UAS_MES_JWS/FunctionCode/Make/Make_Aging.Designer.cs

@@ -169,7 +169,7 @@
             this.AGD_SNCODE,
             this.AGD_INDATE});
             this.LabelDataGridView.Location = new System.Drawing.Point(17, 148);
-            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(5);
             this.LabelDataGridView.Name = "LabelDataGridView";
             this.LabelDataGridView.RowHeadersVisible = false;
             this.LabelDataGridView.RowHeadersWidth = 82;
@@ -210,7 +210,7 @@
             // 
             this.quxiao.AutoSize = true;
             this.quxiao.Location = new System.Drawing.Point(656, 856);
-            this.quxiao.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.quxiao.Margin = new System.Windows.Forms.Padding(4);
             this.quxiao.Name = "quxiao";
             this.quxiao.Size = new System.Drawing.Size(138, 28);
             this.quxiao.TabIndex = 204;
@@ -259,7 +259,7 @@
             this.Controls.Add(this.pr_code_label);
             this.Controls.Add(this.ms_makecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_Aging";
             this.Tag = "Make!Aging";
             this.Text = "老化采集";

+ 19 - 6
UAS_MES_JWS/FunctionCode/Make/Make_Aging.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -53,12 +49,24 @@ namespace UAS_MES_NEW.Make
                 //采集序列号
                 if (sncode.Text == "")
                 {
-                    OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
+                    OperateResult.AppendText(">>号不能为空\n", Color.Red);
                     return;
                 }
-                DataTable dt = (DataTable)dh.ExecuteSql("select pa_makecode from package where pa_outboxcode='" + sncode.Text + "' and nvl(pa_status,0)=0 ", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode,ms_prodcode,pr_detail from makeserial " +
+                    "left join product on pr_code=ms_prodcode where ms_outboxcode='" + sncode.Text + "' ", "select");
                 if (dt.Rows.Count > 0)
                 {
+                    BaseUtil.SetFormValue(this.Controls, dt);
+                }
+                dt = (DataTable)dh.ExecuteSql("select pa_makecode,pa_nextstep from package where pa_outboxcode='" + sncode.Text + "' and nvl(pa_status,0)=0 ", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    string pa_nextstep = dt.Rows[0]["pa_nextstep"].ToString();
+                    if (pa_nextstep != User.CurrentStepCode)
+                    {
+                        OperateResult.AppendText(">>箱号" + sncode.Text + "当前工序不对应\n", Color.Red);
+                        return;
+                    }
                     string pa_makecode = dt.Rows[0]["pa_makecode"].ToString();
                     {
                         dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty", "pa_outboxcode='" + sncode.Text + "'");
@@ -77,6 +85,11 @@ namespace UAS_MES_NEW.Make
                         dh.ExecuteSql("insert into AGEINGDETAIL(AGD_ID, AGD_AGCODE, AGD_MAKECODE, AGD_SNCODE, AGD_INDATE)" +
                             "select AGEINGDETAIL_seq.nextval,'" + sncode.Text + "',pd_makecode,pd_barcode,sysdate from packagedetail " +
                             "where pd_outboxcode='" + sncode.Text + "'", "insert");
+                        dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from PACKAGEDETAIL where pd_outboxcode='" + sncode.Text + "' and pd_barcode not in (select pbd_barcode from PACKAGEBACKUPDETAIL)", "insert");
+                        dh.ExecuteSql("delete from PACKAGEDETAIL where pd_outboxcode='" + sncode.Text + "'", "delete");
+                        dh.ExecuteSql("insert into PACKAGEBACKUP select * from PACKAGE where pa_outboxcode='" + sncode.Text + "' and pa_outboxcode not in (select pab_outboxcode from package)", "insert");
+                        dh.ExecuteSql("delete from PACKAGE where pa_outboxcode='" + sncode.Text + "'", "delete");
+                        //dh.ExecuteSql("update makeserial set ms_outboxcode='' where ms_outboxcode='" + sncode.Text + "'", "update");
                         //显示老化数据
                         dt = (DataTable)dh.ExecuteSql("select AGD_AGCODE,AGD_MAKECODE,AGD_SNCODE,to_char(AGD_INDATE,'yyyy-mm-dd hh24:mi:ss')AGD_INDATE " +
                             "from AGEINGDETAIL where AGD_AGCODE='" + sncode.Text + "'", "select");

+ 1 - 1
UAS_MES_JWS/FunctionCode/Make/Make_OutBoxSnCheck.Designer.cs

@@ -254,7 +254,7 @@
             this.Load += new System.EventHandler(this.Make_LabelCheck_Load);
             this.SizeChanged += new System.EventHandler(this.Make_LabelCheck_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.CheckSnDGV)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 27 - 26
UAS_MES_JWS/FunctionCode/Packing/Packing_PackageCollection1.Designer.cs

@@ -511,7 +511,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(530, 32);
+            this.label1.Location = new System.Drawing.Point(531, 33);
             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);
@@ -534,7 +534,7 @@
             this.checkweightlabel.AutoSize = true;
             this.checkweightlabel.CutLength = null;
             this.checkweightlabel.ForeColor = System.Drawing.Color.Red;
-            this.checkweightlabel.Location = new System.Drawing.Point(56, 48);
+            this.checkweightlabel.Location = new System.Drawing.Point(57, 49);
             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";
@@ -545,7 +545,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(692, 176);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(693, 177);
             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);
@@ -555,7 +555,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(692, 100);
+            this.ob_batchqty.Location = new System.Drawing.Point(693, 101);
             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);
@@ -565,7 +565,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(530, 176);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(531, 177);
             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);
@@ -576,7 +576,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(530, 104);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(531, 105);
             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);
@@ -587,7 +587,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(692, 32);
+            this.ob_checkno.Location = new System.Drawing.Point(693, 33);
             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);
@@ -634,6 +634,7 @@
             this.Packing.TabIndex = 173;
             this.Packing.Text = "封箱";
             this.Packing.UseVisualStyleBackColor = true;
+            this.Packing.Visible = false;
             this.Packing.Click += new System.EventHandler(this.Packing_Click);
             // 
             // PrintLabel
@@ -652,7 +653,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(16, 178);
+            this.label3.Location = new System.Drawing.Point(17, 179);
             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);
@@ -702,7 +703,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(16, 98);
+            this.PrintList_label.Location = new System.Drawing.Point(17, 99);
             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);
@@ -713,7 +714,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(416, 260);
+            this.PrintNum_label.Location = new System.Drawing.Point(417, 261);
             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);
@@ -760,7 +761,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(584, 34);
+            this.locksalecode.Location = new System.Drawing.Point(585, 35);
             this.locksalecode.Margin = new System.Windows.Forms.Padding(6);
             this.locksalecode.Name = "locksalecode";
             this.locksalecode.Size = new System.Drawing.Size(186, 28);
@@ -772,7 +773,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(358, 30);
+            this.PreFix_label.Location = new System.Drawing.Point(359, 31);
             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);
@@ -800,7 +801,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(420, 274);
+            this.pa_salecode_label.Location = new System.Drawing.Point(421, 275);
             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);
@@ -811,7 +812,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(12, 274);
+            this.ma_code_label.Location = new System.Drawing.Point(13, 275);
             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);
@@ -822,7 +823,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(582, 274);
+            this.ms_salecode.Location = new System.Drawing.Point(583, 275);
             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);
@@ -832,7 +833,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(184, 274);
+            this.ms_makecode.Location = new System.Drawing.Point(185, 275);
             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";
@@ -843,7 +844,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(162, 30);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(163, 31);
             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);
@@ -908,7 +909,7 @@
             this.AutoGenBoxCode.AutoSize = true;
             this.AutoGenBoxCode.Checked = true;
             this.AutoGenBoxCode.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(496, 90);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(497, 91);
             this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(4);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
             this.AutoGenBoxCode.Size = new System.Drawing.Size(178, 45);
@@ -921,7 +922,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(424, 154);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(425, 155);
             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);
@@ -932,7 +933,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(420, 210);
+            this.pr_detail_label.Location = new System.Drawing.Point(421, 211);
             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);
@@ -961,7 +962,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(580, 150);
+            this.pa_currentqty.Location = new System.Drawing.Point(581, 151);
             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);
@@ -971,7 +972,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(12, 210);
+            this.pr_code_label.Location = new System.Drawing.Point(13, 211);
             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);
@@ -982,7 +983,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(582, 210);
+            this.pr_detail.Location = new System.Drawing.Point(583, 211);
             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);
@@ -992,7 +993,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(12, 148);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(13, 149);
             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);
@@ -1003,7 +1004,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(184, 210);
+            this.pr_code.Location = new System.Drawing.Point(185, 211);
             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";
@@ -1015,7 +1016,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(12, 88);
+            this.pa_code_label.Location = new System.Drawing.Point(13, 89);
             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(82, 41);

+ 18 - 22
UAS_MES_JWS/FunctionCode/Packing/Packing_PackageCollection1.cs

@@ -147,30 +147,26 @@ namespace UAS_MES_NEW.Packing
         {
             if (PrintLabel.Items.Count != 0)
             {
-                if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
-                {
-                    dh.ExecuteSql("update package set pa_printcount=pa_printcount+1,pa_remark='" + PrintLabel.Text + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                dh.ExecuteSql("update package set pa_printcount=pa_printcount+1,pa_remark='" + PrintLabel.Text + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
 
-                    if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "老化箱标", "0", out ErrorMessage))
-                    {
-                        OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
-                    }
-                    else
-                    {
-                        OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
-                    }
-                    if (!AutoGenBoxCode.Checked)
-                    {
-                        pa_outboxcode.SelectAll();
-                        pa_outboxcode.Focus();
-                    }
-                    else
-                    {
-                        sn_code.Focus();
-                        sn_code.SelectAll();
-                    }
+                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "老化箱标", "0", out ErrorMessage))
+                {
+                    OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
+                }
+                else
+                {
+                    OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                }
+                if (!AutoGenBoxCode.Checked)
+                {
+                    pa_outboxcode.SelectAll();
+                    pa_outboxcode.Focus();
+                }
+                else
+                {
+                    sn_code.Focus();
+                    sn_code.SelectAll();
                 }
-                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "尚未封箱,请封箱后执行打印\n", Color.Red);
             }
             else OperateResult.AppendText(">>产品" + pr_code.Text + "未维护打印标签\n", Color.Red);
         }