Browse Source

按钮回复

章政 7 years ago
parent
commit
559031933c

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

@@ -796,7 +796,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(85, 132);
+            this.label18.Location = new System.Drawing.Point(85, 131);
             this.label18.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(15, 20);
@@ -831,7 +831,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(84, 53);
+            this.label16.Location = new System.Drawing.Point(84, 52);
             this.label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(15, 20);
@@ -866,7 +866,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(9, 85);
+            this.label12.Location = new System.Drawing.Point(9, 84);
             this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(69, 20);
@@ -877,7 +877,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(9, 14);
+            this.label7.Location = new System.Drawing.Point(9, 13);
             this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(69, 20);
@@ -1132,7 +1132,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(229, 215);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(109, 215);
             this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
             this.SingleLabelPrint.Size = new System.Drawing.Size(91, 32);
@@ -1147,7 +1147,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(8, 110);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(8, 109);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(91, 24);
@@ -1200,7 +1200,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(5, 145);
+            this.label2.Location = new System.Drawing.Point(5, 144);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(39, 20);
@@ -1224,7 +1224,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(7, 185);
+            this.label5.Location = new System.Drawing.Point(7, 184);
             this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(39, 20);
@@ -1258,7 +1258,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(12, 111);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(12, 110);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(91, 24);
@@ -1301,7 +1301,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(145, 2);
+            this.LogingOut.Location = new System.Drawing.Point(145, 1);
             this.LogingOut.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(52, 27);
@@ -1328,7 +1328,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(9, 179);
+            this.label10.Location = new System.Drawing.Point(9, 178);
             this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(39, 20);
@@ -1339,7 +1339,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(9, 132);
+            this.label6.Location = new System.Drawing.Point(9, 131);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(39, 20);

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

@@ -378,7 +378,10 @@ namespace UAS_LabelMachine
                         if (int.Parse(GridPrcode.Rows[i].Cells["pd_pdno"].Value.ToString()) > int.Parse(CurrentPDNO))
                         {
                             GridPrcode.Rows[i].Selected = true;
-                            GridPrcode.FirstDisplayedScrollingRowIndex = i;
+                            if (i - 1 > 0)
+                                GridPrcode.FirstDisplayedScrollingRowIndex = i - 1;
+                            else
+                                GridPrcode.FirstDisplayedScrollingRowIndex = i;
                             Input.Clear();
                             OutBoxNum_Click(new object(), new EventArgs());
                             return;
@@ -587,7 +590,10 @@ namespace UAS_LabelMachine
                         if (double.Parse(outqty) > double.Parse(collectnum == "" ? "0" : collectnum))
                         {
                             GridPrcode.Rows[i].Selected = true;
-                            GridPrcode.FirstDisplayedScrollingRowIndex = i;
+                            if (i - 1 > 0)
+                                GridPrcode.FirstDisplayedScrollingRowIndex = i - 1;
+                            else
+                                GridPrcode.FirstDisplayedScrollingRowIndex = i;
                         }
                     }
                     bi_inman.Text = dh.getFieldDataByCondition("barcodeio left join employee on bi_inman=em_code", "wm_concat(distinct em_name)", "bi_piid=" + PI_ID).ToString();
@@ -918,7 +924,7 @@ namespace UAS_LabelMachine
         {
             if (EnablePrint)
             {
-               
+
                 //名称相等的时候,取SQL进行值的查询
                 string pib_id = LabelInf.Rows[rowindex].Cells["pib_id1"].Value.ToString();
                 string pib_outboxcode1 = LabelInf.Rows[rowindex].Cells["pib_outboxcode1"].Value.ToString();
@@ -1436,7 +1442,10 @@ namespace UAS_LabelMachine
                 CurrentPrCount = GridPrcode.Rows[dsc[0].Index].Cells["pd_outqty"].Value.ToString();
                 CurrentBrand = GridPrcode.Rows[dsc[0].Index].Cells["pd_brand"].Value.ToString();
                 GridPrcode.Rows[dsc[0].Index].Selected = true;
-                GridPrcode.FirstDisplayedScrollingRowIndex = dsc[0].Index;
+                if (dsc[0].Index - 1 > 0)
+                    GridPrcode.FirstDisplayedScrollingRowIndex = dsc[0].Index - 1;
+                else
+                    GridPrcode.FirstDisplayedScrollingRowIndex = dsc[0].Index;
             }
         }
 
@@ -1447,7 +1456,10 @@ namespace UAS_LabelMachine
             if (e.RowIndex >= 0)
             {
                 GridPrcode.Rows[e.RowIndex].Selected = true;
-                GridPrcode.FirstDisplayedScrollingRowIndex = e.RowIndex;
+                if (e.RowIndex - 1 > 0)
+                    GridPrcode.FirstDisplayedScrollingRowIndex = e.RowIndex - 1;
+                else
+                    GridPrcode.FirstDisplayedScrollingRowIndex = e.RowIndex;
             }
         }