Pārlūkot izejas kodu

界面调整,登陆BUG调整

callm 5 gadi atpakaļ
vecāks
revīzija
51cccdc403

+ 29 - 22
UAS-出货标签管理(泽天)/Login.cs

@@ -81,30 +81,37 @@ namespace UAS_LabelMachine
             string oMsg = "";
             if (HttpHandler.CheckUserLogin(UserName.Text, PassWord.Text, MasterCombox.SelectedValue.ToString(), out oMsg))
             {
-                dt = (DataTable)dh.ExecuteSql("select em_name,em_type from employee where em_code='" + UserName.Text + "'", "select");
-                User.UserName = dt.Rows[0]["em_name"].ToString();
-                User.UserCode = UserName.Text;
-                User.UserAccountType = dt.Rows[0]["em_type"].ToString();
-                //保存此次登陆的用户名和密码
-                Properties.Settings.Default.LastLoginUser = UserName.Text;
-                Properties.Settings.Default.LastLoginMaster = MasterCombox.Text;
-                Properties.Settings.Default.IPAddress = IP.Text;
-                Properties.Settings.Default.Save();
-                IPHostEntry IpEntry = Dns.GetHostEntry(Dns.GetHostName());
-                string IPAddress = "";
-                for (int i = 0; i < IpEntry.AddressList.Length; i++)
+              DataTable  dt1 = (DataTable)dh.ExecuteSql("select em_name,em_type from employee where em_code='" + UserName.Text + "'", "select");
+                if (dt1.Rows.Count > 0)
                 {
-                    if (IpEntry.AddressList[i].AddressFamily == AddressFamily.InterNetwork)
-                        IPAddress = IpEntry.AddressList[i].ToString();
+                    User.UserName = dt1.Rows[0]["em_name"].ToString();
+                    User.UserCode = UserName.Text;
+                    User.UserAccountType = dt1.Rows[0]["em_type"].ToString();
+                    //保存此次登陆的用户名和密码
+                    Properties.Settings.Default.LastLoginUser = UserName.Text;
+                    Properties.Settings.Default.LastLoginMaster = MasterCombox.Text;
+                    Properties.Settings.Default.IPAddress = IP.Text;
+                    Properties.Settings.Default.Save();
+                    IPHostEntry IpEntry = Dns.GetHostEntry(Dns.GetHostName());
+                    string IPAddress = "";
+                    for (int i = 0; i < IpEntry.AddressList.Length; i++)
+                    {
+                        if (IpEntry.AddressList[i].AddressFamily == AddressFamily.InterNetwork)
+                            IPAddress = IpEntry.AddressList[i].ToString();
+                    }
+                    string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
+                    RecordLogInfo(User.UserCode, User.UserName, version, "CS", IPAddress);
+                    //弹出标签打印的主界面
+                    UAS_出货标签打印 main = new UAS_出货标签打印(MasterCombox.Text);
+                    main.StartPosition = FormStartPosition.CenterScreen;
+                    Hide();
+                    main.ShowDialog();
+                    Close();
+                }
+                else
+                {
+                    MessageBox.Show("用户名或者密码不正确");
                 }
-                string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
-                RecordLogInfo(User.UserCode, User.UserName, version, "CS", IPAddress);
-                //弹出标签打印的主界面
-                UAS_出货标签打印 main = new UAS_出货标签打印(MasterCombox.Text);
-                main.StartPosition = FormStartPosition.CenterScreen;
-                Hide();
-                main.ShowDialog();
-                Close();
             }
             else MessageBox.Show(oMsg);
         }

+ 239 - 207
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs

@@ -99,22 +99,6 @@
             this.Weight = new System.Windows.Forms.Label();
             this.DCCheck = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.GridPrcode = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
-            this.pd_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_piid = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_inoutno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_whcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pjd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_custprodcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_pocode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.CollectedNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.UnCollectedNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_outqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_spec1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pjd_zxbzs_user = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.groupBoxWithBorder1 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.ResetHBXH = new System.Windows.Forms.Button();
             this.label18 = new System.Windows.Forms.Label();
@@ -157,6 +141,7 @@
             this.SingleLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.SingleLabelCombox = new System.Windows.Forms.ComboBox();
             this.MidLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.CurrentRowOnly = new System.Windows.Forms.CheckBox();
             this.MidboxCapacity = new System.Windows.Forms.NumericUpDown();
             this.label2 = new System.Windows.Forms.Label();
             this.MidLabelNum = new UAS_LabelMachine.CustomControl.EnterTextBox();
@@ -179,6 +164,22 @@
             this.OutboxCapacity = new System.Windows.Forms.NumericUpDown();
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
+            this.pd_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_piid = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_inoutno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_whcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pjd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_custprodcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_pocode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CollectedNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.UnCollectedNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_outqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pjd_zxbzs_user = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_spec1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.groupBoxWithBorder2.SuspendLayout();
@@ -486,7 +487,7 @@
             // ChooseAll
             // 
             this.ChooseAll.Location = new System.Drawing.Point(0, 758);
-            this.ChooseAll.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ChooseAll.Margin = new System.Windows.Forms.Padding(4);
             this.ChooseAll.Name = "ChooseAll";
             this.ChooseAll.Size = new System.Drawing.Size(76, 44);
             this.ChooseAll.TabIndex = 84;
@@ -568,7 +569,7 @@
             // 
             this.pictureBox1.Image = global::UAS_LabelMachine.Properties.Resources.Status;
             this.pictureBox1.Location = new System.Drawing.Point(892, 240);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(6);
             this.pictureBox1.Name = "pictureBox1";
             this.pictureBox1.Size = new System.Drawing.Size(244, 128);
             this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
@@ -684,7 +685,7 @@
             this.Combindetail.AutoSize = true;
             this.Combindetail.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.Combindetail.Location = new System.Drawing.Point(592, 204);
-            this.Combindetail.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Combindetail.Margin = new System.Windows.Forms.Padding(4);
             this.Combindetail.Name = "Combindetail";
             this.Combindetail.Size = new System.Drawing.Size(156, 35);
             this.Combindetail.TabIndex = 104;
@@ -740,7 +741,7 @@
             this.CombindetailTwo.AutoSize = true;
             this.CombindetailTwo.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.CombindetailTwo.Location = new System.Drawing.Point(592, 260);
-            this.CombindetailTwo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.CombindetailTwo.Margin = new System.Windows.Forms.Padding(4);
             this.CombindetailTwo.Name = "CombindetailTwo";
             this.CombindetailTwo.Size = new System.Drawing.Size(231, 35);
             this.CombindetailTwo.TabIndex = 109;
@@ -778,9 +779,9 @@
             this.groupBoxWithBorder2.Controls.Add(this.ButtonWeigh);
             this.groupBoxWithBorder2.Controls.Add(this.Weight);
             this.groupBoxWithBorder2.Location = new System.Drawing.Point(2270, 444);
-            this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(4);
             this.groupBoxWithBorder2.Name = "groupBoxWithBorder2";
-            this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(4);
             this.groupBoxWithBorder2.Size = new System.Drawing.Size(224, 310);
             this.groupBoxWithBorder2.TabIndex = 113;
             this.groupBoxWithBorder2.TabStop = false;
@@ -815,7 +816,7 @@
             this.Weight.AutoSize = true;
             this.Weight.Font = new System.Drawing.Font("微软雅黑", 30F);
             this.Weight.ForeColor = System.Drawing.Color.Red;
-            this.Weight.Location = new System.Drawing.Point(5, 56);
+            this.Weight.Location = new System.Drawing.Point(17, 68);
             this.Weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.Weight.Name = "Weight";
             this.Weight.Size = new System.Drawing.Size(0, 104);
@@ -853,9 +854,9 @@
             this.UnCollectedNum,
             this.pd_outqty,
             this.pr_unit,
-            this.pr_spec1,
             this.pd_brand,
-            this.pjd_zxbzs_user});
+            this.pjd_zxbzs_user,
+            this.pr_spec1});
             dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
             dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
             dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -866,7 +867,7 @@
             this.GridPrcode.DefaultCellStyle = dataGridViewCellStyle1;
             this.GridPrcode.GridColor = System.Drawing.SystemColors.Control;
             this.GridPrcode.Location = new System.Drawing.Point(0, 444);
-            this.GridPrcode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.GridPrcode.Margin = new System.Windows.Forms.Padding(6);
             this.GridPrcode.MultiSelect = false;
             this.GridPrcode.Name = "GridPrcode";
             this.GridPrcode.RowTemplate.Height = 23;
@@ -878,139 +879,6 @@
             this.GridPrcode.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.GridPrcode_CellPainting);
             this.GridPrcode.SelectionChanged += new System.EventHandler(this.GridPrcode_SelectionChanged);
             // 
-            // pd_pdno
-            // 
-            this.pd_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.pd_pdno.DataPropertyName = "pd_pdno";
-            this.pd_pdno.HeaderText = "序号";
-            this.pd_pdno.Name = "pd_pdno";
-            this.pd_pdno.ReadOnly = true;
-            this.pd_pdno.Width = 103;
-            // 
-            // pd_piid
-            // 
-            this.pd_piid.DataPropertyName = "pd_piid";
-            this.pd_piid.HeaderText = "Column1";
-            this.pd_piid.Name = "pd_piid";
-            this.pd_piid.Visible = false;
-            // 
-            // Column1
-            // 
-            this.Column1.DataPropertyName = "combined";
-            this.Column1.HeaderText = "Column1";
-            this.Column1.Name = "Column1";
-            this.Column1.Visible = false;
-            // 
-            // pd_inoutno
-            // 
-            this.pd_inoutno.DataPropertyName = "pd_inoutno";
-            this.pd_inoutno.HeaderText = "Column1";
-            this.pd_inoutno.Name = "pd_inoutno";
-            this.pd_inoutno.Visible = false;
-            // 
-            // pd_whcode
-            // 
-            this.pd_whcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.pd_whcode.DataPropertyName = "pd_whcode";
-            this.pd_whcode.HeaderText = "仓别";
-            this.pd_whcode.Name = "pd_whcode";
-            this.pd_whcode.Width = 103;
-            // 
-            // pjd_id
-            // 
-            this.pjd_id.DataPropertyName = "pjd_id";
-            this.pjd_id.HeaderText = "pjd_id";
-            this.pjd_id.Name = "pjd_id";
-            this.pjd_id.Visible = false;
-            // 
-            // pd_custprodcode1
-            // 
-            this.pd_custprodcode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
-            this.pd_custprodcode1.DataPropertyName = "pd_custprodcode";
-            this.pd_custprodcode1.HeaderText = "客户料号";
-            this.pd_custprodcode1.Name = "pd_custprodcode1";
-            this.pd_custprodcode1.Width = 151;
-            // 
-            // pd_pocode1
-            // 
-            this.pd_pocode1.DataPropertyName = "pd_pocode";
-            this.pd_pocode1.HeaderText = "客户PO";
-            this.pd_pocode1.Name = "pd_pocode1";
-            // 
-            // pd_prodcode
-            // 
-            this.pd_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
-            this.pd_prodcode.DataPropertyName = "pd_prodcode";
-            this.pd_prodcode.HeaderText = "物料编号";
-            this.pd_prodcode.Name = "pd_prodcode";
-            this.pd_prodcode.ReadOnly = true;
-            this.pd_prodcode.Width = 151;
-            // 
-            // CollectedNum
-            // 
-            this.CollectedNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
-            this.CollectedNum.DataPropertyName = "CollectedNum";
-            this.CollectedNum.HeaderText = "已采数";
-            this.CollectedNum.Name = "CollectedNum";
-            this.CollectedNum.ReadOnly = true;
-            this.CollectedNum.Width = 127;
-            // 
-            // UnCollectedNum
-            // 
-            this.UnCollectedNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
-            this.UnCollectedNum.DataPropertyName = "UnCollectedNum";
-            this.UnCollectedNum.HeaderText = "未采集";
-            this.UnCollectedNum.Name = "UnCollectedNum";
-            this.UnCollectedNum.ReadOnly = true;
-            this.UnCollectedNum.Visible = false;
-            // 
-            // pd_outqty
-            // 
-            this.pd_outqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
-            this.pd_outqty.DataPropertyName = "pd_outqty";
-            this.pd_outqty.HeaderText = "出库数量";
-            this.pd_outqty.Name = "pd_outqty";
-            this.pd_outqty.ReadOnly = true;
-            this.pd_outqty.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.pd_outqty.Width = 112;
-            // 
-            // pr_unit
-            // 
-            this.pr_unit.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.pr_unit.DataPropertyName = "pr_unit";
-            this.pr_unit.HeaderText = "单位";
-            this.pr_unit.Name = "pr_unit";
-            this.pr_unit.ReadOnly = true;
-            this.pr_unit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.pr_unit.Width = 64;
-            // 
-            // pr_spec1
-            // 
-            this.pr_spec1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
-            this.pr_spec1.DataPropertyName = "pr_spec";
-            this.pr_spec1.HeaderText = "规格";
-            this.pr_spec1.MinimumWidth = 100;
-            this.pr_spec1.Name = "pr_spec1";
-            // 
-            // pd_brand
-            // 
-            this.pd_brand.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.pd_brand.DataPropertyName = "pd_brand";
-            this.pd_brand.HeaderText = "品牌";
-            this.pd_brand.Name = "pd_brand";
-            this.pd_brand.ReadOnly = true;
-            this.pd_brand.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.pd_brand.Width = 64;
-            // 
-            // pjd_zxbzs_user
-            // 
-            this.pjd_zxbzs_user.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pjd_zxbzs_user.DataPropertyName = "pjd_zxbzs_user";
-            this.pjd_zxbzs_user.HeaderText = "最小包装";
-            this.pjd_zxbzs_user.MinimumWidth = 80;
-            this.pjd_zxbzs_user.Name = "pjd_zxbzs_user";
-            this.pjd_zxbzs_user.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.Controls.Add(this.ResetHBXH);
@@ -1023,9 +891,9 @@
             this.groupBoxWithBorder1.Controls.Add(this.label12);
             this.groupBoxWithBorder1.Controls.Add(this.label7);
             this.groupBoxWithBorder1.Location = new System.Drawing.Point(1150, 12);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4);
             this.groupBoxWithBorder1.Size = new System.Drawing.Size(280, 422);
             this.groupBoxWithBorder1.TabIndex = 81;
             this.groupBoxWithBorder1.TabStop = false;
@@ -1047,7 +915,7 @@
             // 
             this.label18.AutoSize = true;
             this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label18.Location = new System.Drawing.Point(124, 240);
+            this.label18.Location = new System.Drawing.Point(136, 252);
             this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(24, 31);
@@ -1082,7 +950,7 @@
             // 
             this.label16.AutoSize = true;
             this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label16.Location = new System.Drawing.Point(120, 112);
+            this.label16.Location = new System.Drawing.Point(132, 124);
             this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(24, 31);
@@ -1117,7 +985,7 @@
             // 
             this.label12.AutoSize = true;
             this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label12.Location = new System.Drawing.Point(8, 172);
+            this.label12.Location = new System.Drawing.Point(20, 184);
             this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(110, 31);
@@ -1128,7 +996,7 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(4, 48);
+            this.label7.Location = new System.Drawing.Point(16, 60);
             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);
@@ -1215,7 +1083,7 @@
             this.pib_midifprint.Resizable = System.Windows.Forms.DataGridViewTriState.True;
             this.pib_midifprint.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
             this.pib_midifprint.Visible = false;
-            this.pib_midifprint.Width = 90;
+            this.pib_midifprint.Width = 118;
             // 
             // pib_id1
             // 
@@ -1223,7 +1091,7 @@
             this.pib_id1.HeaderText = "pib_id";
             this.pib_id1.Name = "pib_id1";
             this.pib_id1.Visible = false;
-            this.pib_id1.Width = 66;
+            this.pib_id1.Width = 127;
             // 
             // pib_pdno
             // 
@@ -1260,7 +1128,7 @@
             this.pjd_orispeccode.Name = "pjd_orispeccode";
             this.pjd_orispeccode.ReadOnly = true;
             this.pjd_orispeccode.Visible = false;
-            this.pjd_orispeccode.Width = 48;
+            this.pjd_orispeccode.Width = 91;
             // 
             // pib_brand
             // 
@@ -1277,7 +1145,7 @@
             this.pr_zxbzs.Name = "pr_zxbzs";
             this.pr_zxbzs.ReadOnly = true;
             this.pr_zxbzs.Visible = false;
-            this.pr_zxbzs.Width = 90;
+            this.pr_zxbzs.Width = 118;
             // 
             // pib_lotno
             // 
@@ -1301,10 +1169,11 @@
             this.DateCode1.HeaderText = "DateCode1";
             this.DateCode1.Name = "DateCode1";
             this.DateCode1.Visible = false;
-            this.DateCode1.Width = 84;
+            this.DateCode1.Width = 163;
             // 
             // pib_qty
             // 
+            this.pib_qty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
             this.pib_qty.DataPropertyName = "pib_qty";
             this.pib_qty.HeaderText = "数量";
             this.pib_qty.Name = "pib_qty";
@@ -1313,33 +1182,39 @@
             // 
             // pib_custbarcode
             // 
-            this.pib_custbarcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_custbarcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
             this.pib_custbarcode.DataPropertyName = "pib_custbarcode";
             this.pib_custbarcode.HeaderText = "料盘条码";
-            this.pib_custbarcode.MinimumWidth = 100;
+            this.pib_custbarcode.MinimumWidth = 160;
             this.pib_custbarcode.Name = "pib_custbarcode";
             this.pib_custbarcode.ReadOnly = true;
+            this.pib_custbarcode.Width = 160;
             // 
             // pib_custmidboxcode
             // 
+            this.pib_custmidboxcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
             this.pib_custmidboxcode.DataPropertyName = "pib_custmidboxcode";
             this.pib_custmidboxcode.HeaderText = "中盒条码";
+            this.pib_custmidboxcode.MinimumWidth = 160;
             this.pib_custmidboxcode.Name = "pib_custmidboxcode";
             this.pib_custmidboxcode.ReadOnly = true;
-            this.pib_custmidboxcode.Width = 151;
+            this.pib_custmidboxcode.Width = 160;
             // 
             // pib_custoutboxcode
             // 
+            this.pib_custoutboxcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
             this.pib_custoutboxcode.DataPropertyName = "pib_custoutboxcode";
             this.pib_custoutboxcode.HeaderText = "外箱条码";
+            this.pib_custoutboxcode.MinimumWidth = 160;
             this.pib_custoutboxcode.Name = "pib_custoutboxcode";
             this.pib_custoutboxcode.ReadOnly = true;
-            this.pib_custoutboxcode.Width = 151;
+            this.pib_custoutboxcode.Width = 160;
             // 
             // pd_pocode
             // 
             this.pd_pocode.DataPropertyName = "pd_pocode";
             this.pd_pocode.HeaderText = "客户PO";
+            this.pd_pocode.MinimumWidth = 97;
             this.pd_pocode.Name = "pd_pocode";
             this.pd_pocode.ReadOnly = true;
             this.pd_pocode.Width = 127;
@@ -1351,12 +1226,13 @@
             this.pr_spec.Name = "pr_spec";
             this.pr_spec.ReadOnly = true;
             this.pr_spec.Visible = false;
-            this.pr_spec.Width = 54;
+            this.pr_spec.Width = 97;
             // 
             // pib_boxweight
             // 
             this.pib_boxweight.DataPropertyName = "pib_boxweight";
             this.pib_boxweight.HeaderText = "箱重";
+            this.pib_boxweight.MinimumWidth = 50;
             this.pib_boxweight.Name = "pib_boxweight";
             this.pib_boxweight.Width = 103;
             // 
@@ -1364,6 +1240,7 @@
             // 
             this.pib_totalweight.DataPropertyName = "pib_totalweight";
             this.pib_totalweight.HeaderText = "总重";
+            this.pib_totalweight.MinimumWidth = 50;
             this.pib_totalweight.Name = "pib_totalweight";
             this.pib_totalweight.Width = 103;
             // 
@@ -1408,7 +1285,7 @@
             this.SingleLabel.Location = new System.Drawing.Point(1436, 12);
             this.SingleLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.SingleLabel.Name = "SingleLabel";
-            this.SingleLabel.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.SingleLabel.Padding = new System.Windows.Forms.Padding(4);
             this.SingleLabel.Size = new System.Drawing.Size(340, 422);
             this.SingleLabel.TabIndex = 77;
             this.SingleLabel.TabStop = false;
@@ -1427,7 +1304,7 @@
             // 
             this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrint.Location = new System.Drawing.Point(124, 352);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(28, 354);
             this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
             this.SingleLabelPrint.Size = new System.Drawing.Size(136, 52);
@@ -1442,7 +1319,7 @@
             this.SingleLabelAutoPrint.Checked = true;
             this.SingleLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.SingleLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(16, 184);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(28, 196);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
@@ -1464,6 +1341,7 @@
             // 
             // MidLabel
             // 
+            this.MidLabel.Controls.Add(this.CurrentRowOnly);
             this.MidLabel.Controls.Add(this.MidboxCapacity);
             this.MidLabel.Controls.Add(this.label2);
             this.MidLabel.Controls.Add(this.MidLabelNum);
@@ -1476,12 +1354,26 @@
             this.MidLabel.Location = new System.Drawing.Point(1780, 12);
             this.MidLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.MidLabel.Name = "MidLabel";
-            this.MidLabel.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.MidLabel.Padding = new System.Windows.Forms.Padding(4);
             this.MidLabel.Size = new System.Drawing.Size(344, 422);
             this.MidLabel.TabIndex = 78;
             this.MidLabel.TabStop = false;
             this.MidLabel.Text = "中盒标签";
             // 
+            // CurrentRowOnly
+            // 
+            this.CurrentRowOnly.AutoSize = true;
+            this.CurrentRowOnly.Checked = true;
+            this.CurrentRowOnly.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.CurrentRowOnly.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CurrentRowOnly.Location = new System.Drawing.Point(179, 199);
+            this.CurrentRowOnly.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.CurrentRowOnly.Name = "CurrentRowOnly";
+            this.CurrentRowOnly.Size = new System.Drawing.Size(166, 35);
+            this.CurrentRowOnly.TabIndex = 93;
+            this.CurrentRowOnly.Text = "只打当前行";
+            this.CurrentRowOnly.UseVisualStyleBackColor = true;
+            // 
             // MidboxCapacity
             // 
             this.MidboxCapacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1500,7 +1392,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(8, 240);
+            this.label2.Location = new System.Drawing.Point(20, 252);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(62, 31);
@@ -1524,7 +1416,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(8, 304);
+            this.label5.Location = new System.Drawing.Point(20, 316);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(62, 31);
@@ -1558,7 +1450,7 @@
             this.MidLabelAutoPrint.Checked = true;
             this.MidLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.MidLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelAutoPrint.Location = new System.Drawing.Point(16, 184);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(28, 196);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
@@ -1595,9 +1487,9 @@
             this.OutBoxLabel.Controls.Add(this.OutBoxCombox);
             this.OutBoxLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxLabel.Location = new System.Drawing.Point(2134, 12);
-            this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(4);
             this.OutBoxLabel.Name = "OutBoxLabel";
-            this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(4);
             this.OutBoxLabel.Size = new System.Drawing.Size(366, 422);
             this.OutBoxLabel.TabIndex = 79;
             this.OutBoxLabel.TabStop = false;
@@ -1607,7 +1499,7 @@
             // 
             this.DiffLotNo.AutoSize = true;
             this.DiffLotNo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.DiffLotNo.Location = new System.Drawing.Point(222, 296);
+            this.DiffLotNo.Location = new System.Drawing.Point(234, 308);
             this.DiffLotNo.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffLotNo.Name = "DiffLotNo";
             this.DiffLotNo.Size = new System.Drawing.Size(126, 35);
@@ -1619,7 +1511,7 @@
             // 
             this.DiffDC.AutoSize = true;
             this.DiffDC.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.DiffDC.Location = new System.Drawing.Point(222, 236);
+            this.DiffDC.Location = new System.Drawing.Point(234, 248);
             this.DiffDC.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffDC.Name = "DiffDC";
             this.DiffDC.Size = new System.Drawing.Size(128, 35);
@@ -1631,7 +1523,7 @@
             // 
             this.OnlyOneRow.AutoSize = true;
             this.OnlyOneRow.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OnlyOneRow.Location = new System.Drawing.Point(222, 184);
+            this.OnlyOneRow.Location = new System.Drawing.Point(234, 196);
             this.OnlyOneRow.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.OnlyOneRow.Name = "OnlyOneRow";
             this.OnlyOneRow.Size = new System.Drawing.Size(118, 35);
@@ -1643,7 +1535,7 @@
             // 
             this.AllLabel.AutoSize = true;
             this.AllLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AllLabel.Location = new System.Drawing.Point(12, 184);
+            this.AllLabel.Location = new System.Drawing.Point(24, 196);
             this.AllLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AllLabel.Name = "AllLabel";
             this.AllLabel.Size = new System.Drawing.Size(190, 35);
@@ -1666,7 +1558,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(196, 8);
+            this.LogingOut.Location = new System.Drawing.Point(208, 20);
             this.LogingOut.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(82, 41);
@@ -1694,7 +1586,7 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(12, 308);
+            this.label10.Location = new System.Drawing.Point(24, 320);
             this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(62, 31);
@@ -1705,7 +1597,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(12, 240);
+            this.label6.Location = new System.Drawing.Point(24, 252);
             this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(62, 31);
@@ -1760,6 +1652,145 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
+            // pd_pdno
+            // 
+            this.pd_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.pd_pdno.DataPropertyName = "pd_pdno";
+            this.pd_pdno.HeaderText = "序号";
+            this.pd_pdno.Name = "pd_pdno";
+            this.pd_pdno.ReadOnly = true;
+            this.pd_pdno.Width = 103;
+            // 
+            // pd_piid
+            // 
+            this.pd_piid.DataPropertyName = "pd_piid";
+            this.pd_piid.HeaderText = "Column1";
+            this.pd_piid.Name = "pd_piid";
+            this.pd_piid.Visible = false;
+            // 
+            // Column1
+            // 
+            this.Column1.DataPropertyName = "combined";
+            this.Column1.HeaderText = "Column1";
+            this.Column1.Name = "Column1";
+            this.Column1.Visible = false;
+            // 
+            // pd_inoutno
+            // 
+            this.pd_inoutno.DataPropertyName = "pd_inoutno";
+            this.pd_inoutno.HeaderText = "Column1";
+            this.pd_inoutno.Name = "pd_inoutno";
+            this.pd_inoutno.Visible = false;
+            // 
+            // pd_whcode
+            // 
+            this.pd_whcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.pd_whcode.DataPropertyName = "pd_whcode";
+            this.pd_whcode.HeaderText = "仓别";
+            this.pd_whcode.Name = "pd_whcode";
+            this.pd_whcode.Width = 103;
+            // 
+            // pjd_id
+            // 
+            this.pjd_id.DataPropertyName = "pjd_id";
+            this.pjd_id.HeaderText = "pjd_id";
+            this.pjd_id.Name = "pjd_id";
+            this.pjd_id.Visible = false;
+            // 
+            // pd_custprodcode1
+            // 
+            this.pd_custprodcode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.pd_custprodcode1.DataPropertyName = "pd_custprodcode";
+            this.pd_custprodcode1.HeaderText = "客户料号";
+            this.pd_custprodcode1.Name = "pd_custprodcode1";
+            this.pd_custprodcode1.Width = 151;
+            // 
+            // pd_pocode1
+            // 
+            this.pd_pocode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
+            this.pd_pocode1.DataPropertyName = "pd_pocode";
+            this.pd_pocode1.HeaderText = "客户PO";
+            this.pd_pocode1.MinimumWidth = 200;
+            this.pd_pocode1.Name = "pd_pocode1";
+            this.pd_pocode1.Width = 200;
+            // 
+            // pd_prodcode
+            // 
+            this.pd_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.pd_prodcode.DataPropertyName = "pd_prodcode";
+            this.pd_prodcode.HeaderText = "物料编号";
+            this.pd_prodcode.Name = "pd_prodcode";
+            this.pd_prodcode.ReadOnly = true;
+            this.pd_prodcode.Width = 151;
+            // 
+            // CollectedNum
+            // 
+            this.CollectedNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.CollectedNum.DataPropertyName = "CollectedNum";
+            this.CollectedNum.HeaderText = "已采数";
+            this.CollectedNum.Name = "CollectedNum";
+            this.CollectedNum.ReadOnly = true;
+            this.CollectedNum.Width = 127;
+            // 
+            // UnCollectedNum
+            // 
+            this.UnCollectedNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.UnCollectedNum.DataPropertyName = "UnCollectedNum";
+            this.UnCollectedNum.HeaderText = "未采集";
+            this.UnCollectedNum.Name = "UnCollectedNum";
+            this.UnCollectedNum.ReadOnly = true;
+            this.UnCollectedNum.Visible = false;
+            this.UnCollectedNum.Width = 127;
+            // 
+            // pd_outqty
+            // 
+            this.pd_outqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.pd_outqty.DataPropertyName = "pd_outqty";
+            this.pd_outqty.HeaderText = "出库数量";
+            this.pd_outqty.Name = "pd_outqty";
+            this.pd_outqty.ReadOnly = true;
+            this.pd_outqty.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.pd_outqty.Width = 112;
+            // 
+            // pr_unit
+            // 
+            this.pr_unit.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
+            this.pr_unit.DataPropertyName = "pr_unit";
+            this.pr_unit.HeaderText = "单位";
+            this.pr_unit.MinimumWidth = 64;
+            this.pr_unit.Name = "pr_unit";
+            this.pr_unit.ReadOnly = true;
+            this.pr_unit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.pr_unit.Width = 64;
+            // 
+            // pd_brand
+            // 
+            this.pd_brand.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.pd_brand.DataPropertyName = "pd_brand";
+            this.pd_brand.HeaderText = "品牌";
+            this.pd_brand.Name = "pd_brand";
+            this.pd_brand.ReadOnly = true;
+            this.pd_brand.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.pd_brand.Width = 64;
+            // 
+            // pjd_zxbzs_user
+            // 
+            this.pjd_zxbzs_user.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pjd_zxbzs_user.DataPropertyName = "pjd_zxbzs_user";
+            this.pjd_zxbzs_user.HeaderText = "最小包装";
+            this.pjd_zxbzs_user.MinimumWidth = 80;
+            this.pjd_zxbzs_user.Name = "pjd_zxbzs_user";
+            this.pjd_zxbzs_user.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // pr_spec1
+            // 
+            this.pr_spec1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pr_spec1.DataPropertyName = "pr_spec";
+            this.pr_spec1.HeaderText = "规格";
+            this.pr_spec1.MinimumWidth = 250;
+            this.pr_spec1.Name = "pr_spec1";
+            this.pr_spec1.Width = 250;
+            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
@@ -1935,22 +1966,6 @@
         private System.Windows.Forms.Label label9;
         private System.Windows.Forms.Label ProcessCount;
         private System.Windows.Forms.CheckBox CombindetailTwo;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_pdno;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_piid;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_inoutno;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_whcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pjd_id;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_custprodcode1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_pocode1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_prodcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn CollectedNum;
-        private System.Windows.Forms.DataGridViewTextBoxColumn UnCollectedNum;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_outqty;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pr_unit;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_brand;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pjd_zxbzs_user;
         private System.Windows.Forms.Button Reset;
         private System.Windows.Forms.Button AddNewOutBox;
         private System.Windows.Forms.Button GetPDdata;
@@ -1964,6 +1979,7 @@
         private System.Windows.Forms.Button ButtonWeigh;
         private System.IO.Ports.SerialPort Com;
         private System.Windows.Forms.Button ConnectCom;
+        private System.Windows.Forms.CheckBox CurrentRowOnly;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
         private System.Windows.Forms.DataGridViewCheckBoxColumn pib_ifprint;
         private System.Windows.Forms.DataGridViewCheckBoxColumn pib_midifprint;
@@ -1987,5 +2003,21 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_totalweight;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_pdno;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_piid;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_inoutno;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_whcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pjd_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_custprodcode1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_pocode1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_prodcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn CollectedNum;
+        private System.Windows.Forms.DataGridViewTextBoxColumn UnCollectedNum;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_outqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_unit;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_brand;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pjd_zxbzs_user;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec1;
     }
 }

+ 32 - 9
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -14,7 +14,6 @@ using FastReport;
 using System.Linq;
 using System.Reflection;
 using UAS_LabelMachine.CustomControl;
-using System.ComponentModel;
 
 namespace UAS_LabelMachine
 {
@@ -1037,11 +1036,35 @@ namespace UAS_LabelMachine
                 DataTable dt;
                 if (MidLabelAutoPrint.Checked)
                 {
-                    dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号 in(" + pib_outboxcode1 + ")", "select");
+                    if (CurrentRowOnly.Checked)
+                    {
+                        string PDNO = "";
+                        if (SelectRowIndex >= 0)
+                        {
+                            PDNO = LabelInf.Rows[SelectRowIndex].Cells["pib_pdno"].Value.ToString();
+                        }
+                        dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号 in(" + pib_outboxcode1 + ") and 出货序号='" + (PDNO == "" ? CurrentPDNO : PDNO) + "'", "select");
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号 in(" + pib_outboxcode1 + ")", "select");
+                    }
                 }
                 else
                 {
-                    dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号 in(" + pib_outboxcode1 + ") and 中盒标识='外'", "select");
+                    if (CurrentRowOnly.Checked)
+                    {
+                        string PDNO = "";
+                        if (SelectRowIndex >= 0)
+                        {
+                            PDNO = LabelInf.Rows[SelectRowIndex].Cells["pib_pdno"].Value.ToString();
+                        }
+                        dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号 in(" + pib_outboxcode1 + ") and 中盒标识='外' and 出货序号='" + (PDNO == "" ? CurrentPDNO : PDNO) + "'", "select");
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号 in(" + pib_outboxcode1 + ") and 中盒标识='外'", "select");
+                    }
                 }
                 if (dt.Rows.Count > 0)
                 {
@@ -1192,11 +1215,11 @@ namespace UAS_LabelMachine
             {
                 Pack_Click(sender, e);
                 //记录整箱的重量
-                //sql.Clear();
-                //sql.Append("update prodiobarcode set pib_totalweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
-                //sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "'");
-                //dh.ExecuteSql(sql.ToString(), "update");
-                //LoadGridData(sender, e);
+                sql.Clear();
+                sql.Append("update prodiobarcode set pib_totalweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
+                sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "'");
+                dh.ExecuteSql(sql.ToString(), "update");
+                LoadGridData(sender, e);
                 thread = new Thread(OutBoxPrint);
                 stw = new SetLoadingWindow(thread, "正在打印外箱");
                 BaseUtil.SetFormCenter(stw);
@@ -1416,7 +1439,7 @@ namespace UAS_LabelMachine
         DataTable CSPrcode;
         private void LoadPrcodeData()
         {
-            DataTable Prcode = (DataTable)dh.ExecuteSql("select '' pd_piid,pd_inoutno,pd_custprodcode,pd_pocode,pd_whcode,pd_prodcode,'0' CollectedNum,'0' UnCollectedNum,pd_outqty,pr_unit,pr_spec,pd_brand,pjd_zxbzs_user,pjd_id,pd_pdno from prodiodetail left join prodinout on pi_id=pd_piid left join PRODJOINVENDDETAIL on pjd_brand =pd_brand and pjd_prodcode=pd_prodcode left join product on pd_prodcode=pr_code where pi_id='" + PI_ID + "' order by pd_pdno", "select");
+            DataTable Prcode = (DataTable)dh.ExecuteSql("select '' pd_piid,pd_inoutno,pd_custprodcode,pd_pocode,pd_whcode,pd_prodcode,'0' CollectedNum,'0' UnCollectedNum,pd_outqty,pr_unit,pd_brand,pjd_zxbzs_user,pjd_id,pd_pdno,pr_spec from prodiodetail left join prodinout on pi_id=pd_piid left join PRODJOINVENDDETAIL on pjd_brand =pd_brand and pjd_prodcode=pd_prodcode left join product on pd_prodcode=pr_code where pi_id='" + PI_ID + "' order by pd_pdno", "select");
             GridPrcode.DataSource = Prcode;
             List<int> RemoveIndex = new List<int>();
             double CollectNum = 0;

+ 3 - 3
UAS-出货标签管理(泽天)/UAS_出货标签管理.resx

@@ -162,15 +162,15 @@
   <metadata name="pr_unit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="pr_spec1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="pd_brand.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="pjd_zxbzs_user.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pr_spec1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="pib_midifprint.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>