Browse Source

修改BUG

章政 7 years ago
parent
commit
68ad6429e2
1 changed files with 23 additions and 22 deletions
  1. 23 22
      UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

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

@@ -476,7 +476,7 @@ namespace UAS_LabelMachine
                 }
                 }
             if (SingleLabelCombox.Text != "")
             if (SingleLabelCombox.Text != "")
             {
             {
-                SingleReport.Load(@"F:/Simple List.frx");
+                SingleReport.Load(ftpOperater.DownLoadTo + SingleLabelCombox.Text);
             }
             }
             sql.Clear();
             sql.Clear();
             sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
             sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
@@ -498,7 +498,7 @@ namespace UAS_LabelMachine
                 }
                 }
             if (MidLabelCombox.Text != "")
             if (MidLabelCombox.Text != "")
             {
             {
-                MidReport.Load(@"F:/Simple List.frx");
+                MidReport.Load(ftpOperater.DownLoadTo+ MidLabelCombox.Text);
             }
             }
             //缓存中盒参数
             //缓存中盒参数
             sql.Clear();
             sql.Clear();
@@ -521,21 +521,21 @@ namespace UAS_LabelMachine
                 }
                 }
             if (OutBoxCombox.Text != "")
             if (OutBoxCombox.Text != "")
             {
             {
-                OutReport.Load(@"F:/Simple List.frx");
-            }
-            if (!File.Exists(ftpOperater.DownLoadTo + "唛头.lab"))
-            {
-                BaseUtil.GetLabelUrl(DataHelper.FTPAdress, "唛头.lab", System.DateTime.Now);
-                if (FootDoc != null)
-                    FootDoc.Close();
-                FootDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + "唛头.lab");
-            }
-            else
-            {
-                if (FootDoc != null)
-                    FootDoc.Close();
-                FootDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + "唛头.lab");
-            }
+                OutReport.Load(ftpOperater.DownLoadTo + OutBoxCombox.Text);
+            }
+            //if (!File.Exists(ftpOperater.DownLoadTo + "唛头.lab"))
+            //{
+            //    BaseUtil.GetLabelUrl(DataHelper.FTPAdress, "唛头.lab", System.DateTime.Now);
+            //    if (FootDoc != null)
+            //        FootDoc.Close();
+            //    FootDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + "唛头.lab");
+            //}
+            //else
+            //{
+            //    if (FootDoc != null)
+            //        FootDoc.Close();
+            //    FootDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + "唛头.lab");
+            //}
             //缓存外箱参数
             //缓存外箱参数
             ComBoxClickChangeLabelDoc = true;
             ComBoxClickChangeLabelDoc = true;
         }
         }
@@ -838,8 +838,8 @@ namespace UAS_LabelMachine
                 //按获取到的箱号列表进行打印
                 //按获取到的箱号列表进行打印
                 if (Outboxcode.ToArray().Length > 0)
                 if (Outboxcode.ToArray().Length > 0)
                 {
                 {
-                    try
-                    {
+                    //try
+                    //{
                         // 循环打印外箱号
                         // 循环打印外箱号
                         for (int i = 0; i < Outboxcode.ToArray().Length; i++)
                         for (int i = 0; i < Outboxcode.ToArray().Length; i++)
                         {
                         {
@@ -852,8 +852,8 @@ namespace UAS_LabelMachine
                                 }
                                 }
                             }
                             }
                         }
                         }
-                    }
-                    catch { }
+                    //}
+                    //catch { }
                 }
                 }
                 else
                 else
                 {
                 {
@@ -905,7 +905,7 @@ namespace UAS_LabelMachine
                 //名称相等的时候,取SQL进行值的查询
                 //名称相等的时候,取SQL进行值的查询
                 string pib_id = LabelInf.Rows[rowindex].Cells["pib_id1"].Value.ToString();
                 string pib_id = LabelInf.Rows[rowindex].Cells["pib_id1"].Value.ToString();
                 string pib_outboxcode1 = LabelInf.Rows[rowindex].Cells["pib_outboxcode1"].Value.ToString();
                 string pib_outboxcode1 = LabelInf.Rows[rowindex].Cells["pib_outboxcode1"].Value.ToString();
-                DataTable dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 主键ID=" + pib_id + "' and 中盒号='" + pib_outboxcode1 + "'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where =" + pib_id + "' and 中盒号='" + pib_outboxcode1 + "'", "select");
                 MidReport.RegisterData(dt, "prodiomidinfo_view");
                 MidReport.RegisterData(dt, "prodiomidinfo_view");
                 MidReport.GetDataSource("prodiomidinfo_view").Enabled = true;
                 MidReport.GetDataSource("prodiomidinfo_view").Enabled = true;
                 MidReport.PrintSettings.Printer = MidLabelPrinter.Text;
                 MidReport.PrintSettings.Printer = MidLabelPrinter.Text;
@@ -932,6 +932,7 @@ namespace UAS_LabelMachine
                         }
                         }
                     }
                     }
                 }
                 }
+                string pib_outboxcode2 = LabelInf.Rows[rowindex].Cells["pib_outboxcode2"].Value.ToString();
                 DataTable dt = (DataTable)dh.ExecuteSql("select * from prodiooutinfo_view where 出货单号='" + pi_inoutno.Text + "' and 外箱号='" + pib_outboxcode2 + "'", "select");
                 DataTable dt = (DataTable)dh.ExecuteSql("select * from prodiooutinfo_view where 出货单号='" + pi_inoutno.Text + "' and 外箱号='" + pib_outboxcode2 + "'", "select");
                 DataTable dt1 = dt.Clone();
                 DataTable dt1 = dt.Clone();
                 for (int i = 0; i < dt.Rows.Count; i++)
                 for (int i = 0; i < dt.Rows.Count; i++)