Browse Source

冲突处理

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

+ 48 - 45
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.Designer.cs

@@ -57,8 +57,7 @@
             this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.pa_standardqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.pa_currentqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.pa_totalqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_packageqty_label = new System.Windows.Forms.Label();
             this.Packing = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.AutoOutBoxCode = new System.Windows.Forms.CheckBox();
@@ -70,6 +69,7 @@
             this.pd_makecode = new System.Windows.Forms.Label();
             this.pd_prodcode = new System.Windows.Forms.Label();
             this.pd_salecode = new System.Windows.Forms.Label();
+            this.pa_standardqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -113,7 +113,7 @@
             this.AutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.AutoPrint.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoPrint.Location = new System.Drawing.Point(1004, 216);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4);
             this.AutoPrint.Name = "AutoPrint";
             this.AutoPrint.Size = new System.Drawing.Size(154, 31);
             this.AutoPrint.TabIndex = 153;
@@ -200,7 +200,7 @@
             // PrinterList
             // 
             this.PrinterList.Location = new System.Drawing.Point(771, 99);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
             this.PrinterList.Name = "PrinterList";
             this.PrinterList.Size = new System.Drawing.Size(195, 25);
             this.PrinterList.TabIndex = 171;
@@ -227,7 +227,7 @@
             this.Clean.Image = null;
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1105, 640);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -242,7 +242,7 @@
             // 
             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(953, 398);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(368, 234);
             this.OperateResult.TabIndex = 167;
@@ -254,7 +254,7 @@
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
             this.outboxcode.Location = new System.Drawing.Point(1049, 348);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifread";
             this.outboxcode.Size = new System.Drawing.Size(145, 25);
@@ -271,7 +271,7 @@
             this.pa_outboxcode.BackColor = System.Drawing.Color.White;
             this.pa_outboxcode.ID = null;
             this.pa_outboxcode.Location = new System.Drawing.Point(111, 36);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifread";
             this.pa_outboxcode.Size = new System.Drawing.Size(140, 25);
@@ -290,7 +290,7 @@
             this.Printlab.Image = null;
             this.Printlab.IsShowBorder = true;
             this.Printlab.Location = new System.Drawing.Point(1107, 280);
-            this.Printlab.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Printlab.Margin = new System.Windows.Forms.Padding(4);
             this.Printlab.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printlab.MoveImage")));
             this.Printlab.Name = "Printlab";
             this.Printlab.NormalImage = ((System.Drawing.Image)(resources.GetObject("Printlab.NormalImage")));
@@ -309,7 +309,7 @@
             this.ReleasePallet.Image = null;
             this.ReleasePallet.IsShowBorder = true;
             this.ReleasePallet.Location = new System.Drawing.Point(1004, 280);
-            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4);
             this.ReleasePallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.MoveImage")));
             this.ReleasePallet.Name = "ReleasePallet";
             this.ReleasePallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.NormalImage")));
@@ -328,7 +328,7 @@
             this.NewPallet.Image = null;
             this.NewPallet.IsShowBorder = true;
             this.NewPallet.Location = new System.Drawing.Point(1236, 12);
-            this.NewPallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.NewPallet.Margin = new System.Windows.Forms.Padding(4);
             this.NewPallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.MoveImage")));
             this.NewPallet.Name = "NewPallet";
             this.NewPallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.NormalImage")));
@@ -365,7 +365,7 @@
             this.Column5});
             this.PackageInf.EnableContentClick = true;
             this.PackageInf.Location = new System.Drawing.Point(4, 161);
-            this.PackageInf.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PackageInf.Margin = new System.Windows.Forms.Padding(4);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
             this.PackageInf.Size = new System.Drawing.Size(941, 519);
@@ -420,31 +420,18 @@
             this.pa_makecode.TabIndex = 109;
             this.pa_makecode.Tag = "1";
             // 
-            // pa_standardqty
+            // pa_totalqty
             // 
-            this.pa_standardqty.AutoSize = true;
-            this.pa_standardqty.CutLength = null;
-            this.pa_standardqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_standardqty.Location = new System.Drawing.Point(111, 96);
-            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_standardqty.MaximumSize = new System.Drawing.Size(200, 0);
-            this.pa_standardqty.Name = "pa_standardqty";
-            this.pa_standardqty.Size = new System.Drawing.Size(0, 27);
-            this.pa_standardqty.TabIndex = 105;
-            this.pa_standardqty.Tag = "1";
-            // 
-            // pa_currentqty
-            // 
-            this.pa_currentqty.AutoSize = true;
-            this.pa_currentqty.CutLength = null;
-            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(500, 99);
-            this.pa_currentqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_currentqty.MaximumSize = new System.Drawing.Size(200, 0);
-            this.pa_currentqty.Name = "pa_currentqty";
-            this.pa_currentqty.Size = new System.Drawing.Size(0, 27);
-            this.pa_currentqty.TabIndex = 177;
-            this.pa_currentqty.Tag = "1";
+            this.pa_totalqty.AutoSize = true;
+            this.pa_totalqty.CutLength = null;
+            this.pa_totalqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_totalqty.Location = new System.Drawing.Point(500, 99);
+            this.pa_totalqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_totalqty.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_totalqty.Name = "pa_totalqty";
+            this.pa_totalqty.Size = new System.Drawing.Size(0, 27);
+            this.pa_totalqty.TabIndex = 177;
+            this.pa_totalqty.Tag = "1";
             // 
             // pa_packageqty_label
             // 
@@ -465,7 +452,7 @@
             this.Packing.Image = null;
             this.Packing.IsShowBorder = true;
             this.Packing.Location = new System.Drawing.Point(1213, 280);
-            this.Packing.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Packing.Margin = new System.Windows.Forms.Padding(4);
             this.Packing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Packing.MoveImage")));
             this.Packing.Name = "Packing";
             this.Packing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Packing.NormalImage")));
@@ -481,7 +468,7 @@
             this.AutoOutBoxCode.AutoSize = true;
             this.AutoOutBoxCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoOutBoxCode.Location = new System.Drawing.Point(259, 32);
-            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4);
             this.AutoOutBoxCode.Name = "AutoOutBoxCode";
             this.AutoOutBoxCode.Size = new System.Drawing.Size(114, 31);
             this.AutoOutBoxCode.TabIndex = 179;
@@ -506,7 +493,7 @@
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
             this.PrintNum.Location = new System.Drawing.Point(1117, 166);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
             this.PrintNum.Size = new System.Drawing.Size(188, 25);
@@ -520,7 +507,7 @@
             this.Cancel.AutoSize = true;
             this.Cancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Cancel.Location = new System.Drawing.Point(1203, 342);
-            this.Cancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Cancel.Margin = new System.Windows.Forms.Padding(4);
             this.Cancel.Name = "Cancel";
             this.Cancel.Size = new System.Drawing.Size(114, 31);
             this.Cancel.TabIndex = 182;
@@ -577,11 +564,28 @@
             this.pd_salecode.TabIndex = 187;
             this.pd_salecode.Visible = false;
             // 
+            // pa_standardqty
+            // 
+            this.pa_standardqty.AllPower = null;
+            this.pa_standardqty.BackColor = System.Drawing.Color.White;
+            this.pa_standardqty.ID = null;
+            this.pa_standardqty.Location = new System.Drawing.Point(111, 96);
+            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.pa_standardqty.Name = "pa_standardqty";
+            this.pa_standardqty.Power = null;
+            this.pa_standardqty.Size = new System.Drawing.Size(141, 25);
+            this.pa_standardqty.Str = null;
+            this.pa_standardqty.Str1 = null;
+            this.pa_standardqty.Str2 = null;
+            this.pa_standardqty.TabIndex = 188;
+            this.pa_standardqty.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pa_standardqty_KeyDown);
+            // 
             // Make_BigBoxCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1329, 690);
+            this.Controls.Add(this.pa_standardqty);
             this.Controls.Add(this.pd_salecode);
             this.Controls.Add(this.pd_prodcode);
             this.Controls.Add(this.pd_makecode);
@@ -592,7 +596,7 @@
             this.Controls.Add(this.pa_status);
             this.Controls.Add(this.AutoOutBoxCode);
             this.Controls.Add(this.Packing);
-            this.Controls.Add(this.pa_currentqty);
+            this.Controls.Add(this.pa_totalqty);
             this.Controls.Add(this.pa_packageqty_label);
             this.Controls.Add(this.PrintLabel_label);
             this.Controls.Add(this.PrinterList_label);
@@ -615,11 +619,10 @@
             this.Controls.Add(this.AutoPrint);
             this.Controls.Add(this.pa_makecode);
             this.Controls.Add(this.pa_makecode_label);
-            this.Controls.Add(this.pa_standardqty);
             this.Controls.Add(this.pa_totalqty_label);
             this.Controls.Add(this.pa_outboxcode_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_BigBoxCollection";
             this.Tag = "Make!BigBoxCollection";
             this.Text = "栈板采集";
@@ -634,7 +637,6 @@
 
         #endregion
         private System.Windows.Forms.Label pa_outboxcode_label;
-        private CustomControl.ValueLabel.ValueLabel pa_standardqty;
         private System.Windows.Forms.Label pa_totalqty_label;
         private CustomControl.ValueLabel.ValueLabel pa_makecode;
         private System.Windows.Forms.Label pa_makecode_label;
@@ -657,7 +659,7 @@
         private System.Windows.Forms.ComboBox PrintLabel;
         private System.Windows.Forms.Label PrintLabel_label;
         private System.Windows.Forms.Label PrinterList_label;
-        private CustomControl.ValueLabel.ValueLabel pa_currentqty;
+        private CustomControl.ValueLabel.ValueLabel pa_totalqty;
         private System.Windows.Forms.Label pa_packageqty_label;
         private CustomControl.ButtonUtil.NormalButton Packing;
         private System.Windows.Forms.CheckBox AutoOutBoxCode;
@@ -674,5 +676,6 @@
         private System.Windows.Forms.Label pd_makecode;
         private System.Windows.Forms.Label pd_prodcode;
         private System.Windows.Forms.Label pd_salecode;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pa_standardqty;
     }
 }

+ 48 - 21
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -86,8 +86,8 @@ namespace UAS_MES.Make
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append("select pa_id,pa_standardqty,pa_makecode,pa_prodcode,pa_id,pa_packageqty,pa_outboxcode,pa_totalqty,pa_currentqty,pa_salecode,pa_custcode ");
-                sql.Append("from package where pa_outboxcode='" + pa_outboxcode.Text + "'  and pa_type =2");
+                sql.Append("select pa_id,pa_standardqty,pa_makecode,pa_prodcode,pa_id,pa_packageqty,pa_outboxcode,pa_totalqty,pa_currentqty, ");
+                sql.Append("pa_salecode,pa_custcode from package where pa_outboxcode='" + pa_outboxcode.Text + "'  and pa_type =2");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
                 {
@@ -114,8 +114,9 @@ namespace UAS_MES.Make
                         return;
                     }
                     sql.Clear();
-                    sql.Append("select nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_makecode pd_makecode,nvl(pa_downstatus,0)pa_downstatus,pa_salecode pd_salecode,pr_packrule,pa_id,pa_prodcode pd_prodcode,pa_status,pa_mothercode,pa_nextstep,nvl(pr_bigboxinnerqty,0) pa_standardqty  ");
-                    sql.Append("from packagedetail left join package on pd_paid=pa_id left join product on pd_prodcode=pr_code where pd_outboxcode='" + outboxcode.Text + "'");
+                    sql.Append("select nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_makecode pd_makecode,nvl(pa_downstatus,0)pa_downstatus,pa_salecode pd_salecode,");
+                    sql.Append("pr_packrule,pa_id,pa_prodcode pd_prodcode,pa_status,pa_mothercode,pa_nextstep from packagedetail left ");
+                    sql.Append("join package on pd_paid=pa_id left join product on pd_prodcode=pr_code where pd_outboxcode='" + outboxcode.Text + "'");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     //判断采集的卡通箱是否有明细
                     if (dt.Rows.Count > 0)
@@ -146,12 +147,6 @@ namespace UAS_MES.Make
                             }
                         }
                         pa_nextstep = dt.Rows[0]["pa_nextstep"].ToString();
-                        pa_stanqty = int.Parse(dt.Rows[0]["pa_standardqty"].ToString());
-                        if (pa_stanqty == 0)
-                        {
-                            OperateResult.AppendText(">>产品" + pa_prodcode.Text + "未维护大箱容量\n", Color.Red, outboxcode);
-                            return;
-                        }
                         if (pa_nextstep != User.CurrentStepCode && pa_nextstep != "")
                         {
                             OperateResult.AppendText(">>卡通箱号" + outboxcode.Text + "的下一工序不是当前岗位资源对应工序,下一工序为" + pa_nextstep + "\n", Color.Red, outboxcode);
@@ -205,7 +200,7 @@ namespace UAS_MES.Make
                     if (!Cancel.Checked)
                     {
                         pa_status.Text = dh.getFieldDataByCondition("package", "nvl(pa_status,0)pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString();
-                        if (pa_standardqty.Text == pa_currentqty.Text && pa_status.Text == "0")
+                        if (pa_standardqty.Text == pa_totalqty.Text && pa_status.Text == "0")
                         {
                             dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                             pa_status.Text = "1";
@@ -214,7 +209,7 @@ namespace UAS_MES.Make
                         if (pa_outboxcode.Text == "" && AutoOutBoxCode.Checked || pa_status.Text == "1")
                         {
                             //箱已采集满并且未勾选自动生成
-                            if (pa_standardqty.Text == pa_currentqty.Text && !AutoOutBoxCode.Checked)
+                            if (pa_standardqty.Text == pa_totalqty.Text && !AutoOutBoxCode.Checked)
                             {
                                 OperateResult.AppendText(">>大箱" + pa_outboxcode.Text + "已采集满\n", Color.Red, outboxcode);
                                 return;
@@ -250,20 +245,22 @@ namespace UAS_MES.Make
                             OperateResult.AppendText(">>" + error + "\n", Color.Red, outboxcode);
                             return;
                         }
-                        //如果未装满的话
-                        sql.Clear();
-                        sql.Append("select count(0) cn from packagedetail left join package on pa_id=pd_paid where ");
-                        sql.Append("pa_outboxcode='" + pa_outboxcode.Text + "'");
-                        int packageqty = int.Parse((dh.ExecuteSql(sql.GetString(), "select") as DataTable).Rows[0][0].ToString());
-                        dt = (DataTable)dh.ExecuteSql("select nvl(pa_status,0) pa_status,pa_mothercode from package where pa_outboxcode='" + outboxcode.Text + "' and pa_type=1", "select");
+                        dt = (DataTable)dh.ExecuteSql("select pa_totalqty,nvl(pa_status,0) pa_status,pa_mothercode from package where pa_outboxcode='" + outboxcode.Text + "' and pa_type=1", "select");
                         //采集的卡通箱号存在
                         if (dt.Rows.Count > 0)
                         {
+                            int sonboxtotalqty = int.Parse(dt.Rows[0]["pa_totalqty"].ToString());
                             if (dt.Rows[0]["pa_status"].ToString() == "1")
                             {
                                 //判断是否已经装箱
                                 if (dt.Rows[0]["pa_mothercode"].ToString() == "")
                                 {
+                                    pa_totalqty.Text = dh.getFieldDataByCondition("package", "pa_totalqty", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString();
+                                    if (int.Parse(pa_totalqty.Text == "" ? "0" : pa_totalqty.Text) + sonboxtotalqty > int.Parse(pa_standardqty.Text == "" ? "0" : pa_standardqty.Text))
+                                    {
+                                        OperateResult.AppendText(">>采集箱号" + outboxcode.Text + "后超出容量\n", Color.Red, outboxcode);
+                                        return;
+                                    }
                                     //插入大箱明细
                                     List<string> SQLS = new List<string>();
                                     sql.Clear();
@@ -291,13 +288,13 @@ namespace UAS_MES.Make
                                     LoadGridData();
                                     LoadCollectNum();
                                     //更新箱号的NextStepCode
-                                    if (pa_currentqty.Text == "1")
+                                    if (pa_totalqty.Text == "1")
                                     {
                                         string nextstepcode = dh.getFieldDataByCondition("mes_package_view left join makeserial on ms_sncode=v_barcode", "ms_nextstepcode", "v_outboxcode='" + outboxcode.Text + "'").ToString();
                                         dh.UpdateByCondition("package", "pa_nextstep='" + nextstepcode + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                                     }
                                     OperateResult.AppendText(">>卡通箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
-                                    if (packageqty + 1 == pa_stanqty)
+                                    if (pa_standardqty.Text == pa_totalqty.Text)
                                     {
                                         dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                                         if (AutoPrint.Checked)
@@ -375,7 +372,7 @@ namespace UAS_MES.Make
 
         private void LoadCollectNum()
         {
-            pa_currentqty.Text = dh.getFieldDataByCondition("package", "PA_CURRENTQTY", "pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=2").ToString();
+            pa_totalqty.Text = dh.getFieldDataByCondition("package", "pa_totalqty", "pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=2").ToString();
         }
 
         private void 栈板称重_SizeChanged(object sender, EventArgs e)
@@ -506,5 +503,35 @@ namespace UAS_MES.Make
         {
             FillPrintLabel();
         }
+
+        private void ResetPackageQTY()
+        {
+            if (pa_outboxcode.Text != "")
+            {
+                DataTable dt = (DataTable)dh.ExecuteSql("select pa_totalqty,pa_status from package where pa_outboxcode='" + pa_outboxcode.Text + "'", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    string total = dt.Rows[0]["pa_totalqty"].ToString();
+                    if (int.Parse(pa_standardqty.Text) >= int.Parse(total))
+                    {
+                        dh.UpdateByCondition("package", "pa_standardqty='" + pa_standardqty.Text + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                        OperateResult.AppendText(">>大箱" + pa_outboxcode.Text + "修改容量成功,已修改为" + pa_standardqty.Text + "\n", Color.Green);
+                        outboxcode.Focus();
+                        return;
+                    }
+                    else OperateResult.AppendText(">>容量不能小于已装数量\n", Color.Red);
+                }
+                else OperateResult.AppendText(">>大箱板号不存在\n", Color.Red);
+                pa_standardqty.Text = "";
+            }
+        }
+
+        private void pa_standardqty_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                ResetPackageQTY();
+            }
+        }
     }
 }

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

@@ -285,21 +285,6 @@
   <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="pd_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <data name="Packing.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 20 - 19
UAS-MES/FunctionCode/Make/Make_CustomLabelPrint.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_CustomLabelPrint));
-            this.label1 = new System.Windows.Forms.Label();
+            this.pr_code_label = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.PrintLabel = new System.Windows.Forms.ComboBox();
@@ -47,15 +47,15 @@
             this.Printer = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.SuspendLayout();
             // 
-            // label1
+            // pr_code_label
             // 
-            this.label1.AutoSize = true;
-            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label1.Location = new System.Drawing.Point(49, 27);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "产品代码";
+            this.pr_code_label.AutoSize = true;
+            this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pr_code_label.Location = new System.Drawing.Point(49, 27);
+            this.pr_code_label.Name = "pr_code_label";
+            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_code_label.TabIndex = 0;
+            this.pr_code_label.Text = "产品代码";
             // 
             // label2
             // 
@@ -71,7 +71,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label3.Location = new System.Drawing.Point(376, 92);
+            this.label3.Location = new System.Drawing.Point(680, 25);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(52, 27);
             this.label3.TabIndex = 2;
@@ -81,7 +81,7 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(814, 92);
+            this.PrintLabel.Location = new System.Drawing.Point(462, 92);
             this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(169, 23);
@@ -93,7 +93,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(708, 27);
+            this.label4.Location = new System.Drawing.Point(356, 27);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(72, 27);
@@ -104,7 +104,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(717, 92);
+            this.label5.Location = new System.Drawing.Point(356, 92);
             this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(52, 27);
@@ -138,7 +138,7 @@
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_detail.Location = new System.Drawing.Point(155, 93);
+            this.pr_detail.Location = new System.Drawing.Point(160, 92);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 27);
             this.pr_detail.TabIndex = 193;
@@ -147,7 +147,8 @@
             // 
             this.pr_spec.AutoSize = true;
             this.pr_spec.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_spec.Location = new System.Drawing.Point(436, 95);
+            this.pr_spec.Location = new System.Drawing.Point(740, 25);
+            this.pr_spec.MaximumSize = new System.Drawing.Size(300, 150);
             this.pr_spec.Name = "pr_spec";
             this.pr_spec.Size = new System.Drawing.Size(0, 27);
             this.pr_spec.TabIndex = 194;
@@ -199,7 +200,7 @@
             this.pr_code.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.pr_code.Name = "pr_code";
             this.pr_code.Power = null;
-            this.pr_code.Size = new System.Drawing.Size(224, 25);
+            this.pr_code.Size = new System.Drawing.Size(165, 25);
             this.pr_code.Str = null;
             this.pr_code.Str1 = null;
             this.pr_code.Str2 = null;
@@ -238,7 +239,7 @@
             // 
             // Printer
             // 
-            this.Printer.Location = new System.Drawing.Point(814, 27);
+            this.Printer.Location = new System.Drawing.Point(462, 27);
             this.Printer.Margin = new System.Windows.Forms.Padding(5);
             this.Printer.Name = "Printer";
             this.Printer.Size = new System.Drawing.Size(169, 31);
@@ -264,7 +265,7 @@
             this.Controls.Add(this.Printer);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.label2);
-            this.Controls.Add(this.label1);
+            this.Controls.Add(this.pr_code_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Name = "Make_CustomLabelPrint";
@@ -280,7 +281,7 @@
 
         #endregion
 
-        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label pr_code_label;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.ComboBox PrintLabel;