Browse Source

修改中盒打印BUG,添加物料采集自动滚动行

章政 7 years ago
parent
commit
09811cf30c

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

@@ -4,7 +4,7 @@
     {
     {
         /// <summary>
         /// <summary>
         /// 必需的设计器变量。
         /// 必需的设计器变量。
-        /// </summary>
+        /// </summary> 
         private System.ComponentModel.IContainer components = null;
         private System.ComponentModel.IContainer components = null;
 
 
         /// <summary>
         /// <summary>

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

@@ -376,6 +376,7 @@ namespace UAS_LabelMachine
                         if (int.Parse(GridPrcode.Rows[i].Cells["pd_pdno"].Value.ToString()) > int.Parse(CurrentPDNO))
                         if (int.Parse(GridPrcode.Rows[i].Cells["pd_pdno"].Value.ToString()) > int.Parse(CurrentPDNO))
                         {
                         {
                             GridPrcode.Rows[i].Selected = true;
                             GridPrcode.Rows[i].Selected = true;
+                            GridPrcode.FirstDisplayedScrollingRowIndex = i;
                             return;
                             return;
                         }
                         }
                     }
                     }
@@ -387,6 +388,7 @@ namespace UAS_LabelMachine
                     if (int.Parse(outqty) > int.Parse(collectnum == "" ? "0" : collectnum))
                     if (int.Parse(outqty) > int.Parse(collectnum == "" ? "0" : collectnum))
                     {
                     {
                         GridPrcode.Rows[i].Selected = true;
                         GridPrcode.Rows[i].Selected = true;
+                        GridPrcode.FirstDisplayedScrollingRowIndex = i;
                     }
                     }
                 }
                 }
             }
             }
@@ -575,6 +577,7 @@ namespace UAS_LabelMachine
                         if (int.Parse(outqty) > int.Parse(collectnum == "" ? "0" : collectnum))
                         if (int.Parse(outqty) > int.Parse(collectnum == "" ? "0" : collectnum))
                         {
                         {
                             GridPrcode.Rows[i].Selected = true;
                             GridPrcode.Rows[i].Selected = true;
+                            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();
                     bi_inman.Text = dh.getFieldDataByCondition("barcodeio left join employee on bi_inman=em_code", "wm_concat(distinct em_name)", "bi_piid=" + PI_ID).ToString();
@@ -931,7 +934,7 @@ namespace UAS_LabelMachine
                 }
                 }
                 else
                 else
                 {
                 {
-                    dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号='" + pib_outboxcode1 + "' and 中盒数量=10", "select");
+                    dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号='" + pib_outboxcode1 + "' and 中盒标识='外'", "select");
                 }
                 }
                 if (dt.Rows.Count > 0)
                 if (dt.Rows.Count > 0)
                 {
                 {
@@ -981,6 +984,7 @@ namespace UAS_LabelMachine
                         OutReport.GetDataSource("prodiooutinfo_view").Enabled = true;
                         OutReport.GetDataSource("prodiooutinfo_view").Enabled = true;
                         OutReport.PrintSettings.ShowDialog = false;
                         OutReport.PrintSettings.ShowDialog = false;
                         OutReport.PrintSettings.Printer = OutBoxPrinter.Text;
                         OutReport.PrintSettings.Printer = OutBoxPrinter.Text;
+                     
                         try
                         try
                         {
                         {
                             OutReport.Print();
                             OutReport.Print();
@@ -993,6 +997,8 @@ namespace UAS_LabelMachine
                         BaseUtil.CleanDataTableData(dt1);
                         BaseUtil.CleanDataTableData(dt1);
                     }
                     }
                 }
                 }
+                Properties.Settings.Default.OPrinter = OutBoxPrinter.Text;
+                Properties.Settings.Default.Save();
             }
             }
         }
         }
 
 
@@ -1284,6 +1290,7 @@ namespace UAS_LabelMachine
                 CurrentPrCount = GridPrcode.Rows[0].Cells["pd_outqty"].Value.ToString();
                 CurrentPrCount = GridPrcode.Rows[0].Cells["pd_outqty"].Value.ToString();
                 CurrentBrand = GridPrcode.Rows[0].Cells["pd_brand"].Value.ToString();
                 CurrentBrand = GridPrcode.Rows[0].Cells["pd_brand"].Value.ToString();
                 GridPrcode.Rows[0].Selected = true;
                 GridPrcode.Rows[0].Selected = true;
+                GridPrcode.FirstDisplayedScrollingRowIndex = 0;
             }
             }
         }
         }
 
 
@@ -1399,6 +1406,7 @@ namespace UAS_LabelMachine
             CurrentPrCount = GridPrcode.Rows[e.RowIndex].Cells["pd_outqty"].Value.ToString();
             CurrentPrCount = GridPrcode.Rows[e.RowIndex].Cells["pd_outqty"].Value.ToString();
             CurrentBrand = GridPrcode.Rows[e.RowIndex].Cells["pd_brand"].Value.ToString();
             CurrentBrand = GridPrcode.Rows[e.RowIndex].Cells["pd_brand"].Value.ToString();
             GridPrcode.Rows[e.RowIndex].Selected = true;
             GridPrcode.Rows[e.RowIndex].Selected = true;
+            GridPrcode.FirstDisplayedScrollingRowIndex = e.RowIndex;
             dh.ExecuteSql("delete from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and pib_pdno='" + CurrentPDNO + "' and pib_prodcode='" + CurrentPrCode + "'", "delete");
             dh.ExecuteSql("delete from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and pib_pdno='" + CurrentPDNO + "' and pib_prodcode='" + CurrentPrCode + "'", "delete");
             LoadGridData(sender, new EventArgs());
             LoadGridData(sender, new EventArgs());
         }
         }
@@ -1415,6 +1423,7 @@ namespace UAS_LabelMachine
                 CurrentPrCount = GridPrcode.Rows[dsc[0].Index].Cells["pd_outqty"].Value.ToString();
                 CurrentPrCount = GridPrcode.Rows[dsc[0].Index].Cells["pd_outqty"].Value.ToString();
                 CurrentBrand = GridPrcode.Rows[dsc[0].Index].Cells["pd_brand"].Value.ToString();
                 CurrentBrand = GridPrcode.Rows[dsc[0].Index].Cells["pd_brand"].Value.ToString();
                 GridPrcode.Rows[dsc[0].Index].Selected = true;
                 GridPrcode.Rows[dsc[0].Index].Selected = true;
+                GridPrcode.FirstDisplayedScrollingRowIndex = dsc[0].Index;
             }
             }
         }
         }
 
 
@@ -1425,6 +1434,7 @@ namespace UAS_LabelMachine
             if (e.RowIndex >= 0)
             if (e.RowIndex >= 0)
             {
             {
                 GridPrcode.Rows[e.RowIndex].Selected = true;
                 GridPrcode.Rows[e.RowIndex].Selected = true;
+                GridPrcode.FirstDisplayedScrollingRowIndex = e.RowIndex;
             }
             }
         }
         }