Просмотр исходного кода

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

Hcsy 8 лет назад
Родитель
Сommit
5810cd0a6d
29 измененных файлов с 476 добавлено и 234 удалено
  1. 2 2
      UAS-MES/DataOperate/ExcelHandler.cs
  2. 3 3
      UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs
  3. 3 3
      UAS-MES/FunctionCode/Make/Make_BigBoxWeight.cs
  4. 3 3
      UAS-MES/FunctionCode/Make/Make_CartonBoxSNWeigh.cs
  5. 3 3
      UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs
  6. 3 3
      UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs
  7. 3 3
      UAS-MES/FunctionCode/Make/Make_ColorBoxLoadPrint.cs
  8. 3 3
      UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs
  9. 1 1
      UAS-MES/FunctionCode/Make/Make_CustomLabelPrint.cs
  10. 3 3
      UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.cs
  11. 3 3
      UAS-MES/FunctionCode/Make/Make_GetReMakeSN.cs
  12. 3 3
      UAS-MES/FunctionCode/Make/Make_PackageCollection.cs
  13. 4 4
      UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.Designer.cs
  14. 3 3
      UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs
  15. 3 3
      UAS-MES/FunctionCode/Make/Make_PalletCollection.cs
  16. 3 3
      UAS-MES/FunctionCode/Make/Make_PalletWeigh.cs
  17. 5 5
      UAS-MES/FunctionCode/Make/Make_RePrintLabel.cs
  18. 3 3
      UAS-MES/FunctionCode/Make/Make_SpecialCartonPack.cs
  19. 39 24
      UAS-MES/FunctionCode/Query/Query_SpecialReport.Designer.cs
  20. 92 48
      UAS-MES/FunctionCode/Query/Query_SpecialReport.cs
  21. 1 0
      UAS-MES/FunctionCode/Special/Special_CancelCollection.cs
  22. 1 1
      UAS-MES/FunctionCode/SystemSetting/SystemSetting_LabelMaintain.cs
  23. 151 97
      UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.Designer.cs
  24. 28 0
      UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.cs
  25. 18 0
      UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.resx
  26. 30 3
      UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.Designer.cs
  27. 30 0
      UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.cs
  28. 21 0
      UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.resx
  29. 11 7
      UAS-MES/PublicMethod/Print.cs

+ 2 - 2
UAS-MES/DataOperate/ExcelHandler.cs

@@ -158,7 +158,7 @@ namespace UAS_MES.DataOperate
             string Title = "";
             foreach (DataColumn dc in dt.Columns)
             {
-                Title += String.Format("{0,20}", dc.ColumnName.ToString());
+                Title += String.Format("{0,15}", dc.ColumnName.ToString());
             }
             sr.WriteLine(Title + "\r");
             foreach (DataRow dr in dt.Rows)
@@ -166,7 +166,7 @@ namespace UAS_MES.DataOperate
                 string text = "";
                 for (int i = 0; i < dt.Columns.Count; i++)
                 {
-                    text += String.Format("{0,20}", dr[i].ToString());
+                    text += String.Format("{0,15}", dr[i].ToString());
                 }
                 sr.WriteLine(text + "\r");
             }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -57,7 +57,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch
             {
@@ -429,8 +429,8 @@ namespace UAS_MES.Make
             {
                 if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
                 {
-                    doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
-                    if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "大箱标", "0", out ErrorMessage))
+                   // doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
+                    if (Print.CodeSoft(Tag.ToString(),ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "大箱标", "0", out ErrorMessage))
                     {
                         OperateResult.AppendText(">>打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
                     }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_BigBoxWeight.cs

@@ -86,7 +86,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch
             {
@@ -138,9 +138,9 @@ namespace UAS_MES.Make
                     {
                         try
                         {
-                            doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
+                            //doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
                             string ErrorMessage = "";
-                            if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "大箱标", "0", out ErrorMessage))
+                            if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "大箱标", "0", out ErrorMessage))
                             {
                                 OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                             }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_CartonBoxSNWeigh.cs

@@ -105,7 +105,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception)
             {
@@ -249,9 +249,9 @@ namespace UAS_MES.Make
         //确认打印
         private void Confirm_Click(object sender, EventArgs e)
         {
-            doc = lbl.Documents.Open(PrintLabel.Text);
+            //doc = lbl.Documents.Open(PrintLabel.Text);
             string ErrorMessage = "";
-            if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+            if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
             {
                 OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
             }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs

@@ -88,7 +88,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception)
             {
@@ -222,9 +222,9 @@ namespace UAS_MES.Make
         //确认打印
         private void Confirm_Click(object sender, EventArgs e)
         {
-            doc = lbl.Documents.Open(PrintLabel.Text);
+            //doc = lbl.Documents.Open(PrintLabel.Text);
             string ErrorMessage = "";
-            if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+            if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
             {
                 OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
             }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -101,7 +101,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -237,8 +237,8 @@ namespace UAS_MES.Make
                                     //提示正确返回时传递的信息
                                     if (ErrorMessage.Contains("AFTERSUCCESS"))
                                         OperateResult.AppendText(">>" + ErrorMessage + "\n");
-                                    doc = lbl.Documents.Open(PrintLabel.Text);
-                                    if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
+                                    // doc = lbl.Documents.Open(PrintLabel.Text);
+                                    if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
                                     {
                                         //提示用户打印成功
                                         OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -91,7 +91,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -288,8 +288,8 @@ namespace UAS_MES.Make
                                 BaseUtil.CleanDataTableData(ListA);
                             }
                             else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
-                            doc = lbl.Documents.Open(PrintLabel.Text);
-                            if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ms_sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out ErrorMessage))
+                            // doc = lbl.Documents.Open(PrintLabel.Text);
+                            if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ms_sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out ErrorMessage))
                             {
                                 OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                             }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -74,7 +74,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -264,9 +264,9 @@ namespace UAS_MES.Make
         {
             if (PrintLabel.Items.Count != 0)
             {
-                doc = lbl.Documents.Open(PrintLabel.Text);
+                //doc = lbl.Documents.Open(PrintLabel.Text);
                 string oErrorMessage;
-                if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ms_makecode.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
+                if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ms_makecode.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
                 {
                     OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
                 }

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CustomLabelPrint.cs

@@ -274,7 +274,7 @@ namespace UAS_MES.Make
                 {
                     lbl.Quit();
                     lbl = new ApplicationClass();
-                    BaseUtil.WriteLbl(lbl);
+                    BaseUtil.WriteLbl();
                     dh.UpdateByCondition("label", "la_lastwritetime = to_date('" + PrintFile.LastWriteTime.ToString() + "', 'yyyy-mm-dd hh24:mi:ss') ", "la_id = '" + listA.Rows[PrintLabel.SelectedIndex]["la_id"].ToString() + "'");
                 }
                 doc = lbl.Documents.Open(listA.Rows[PrintLabel.SelectedIndex]["la_url"].ToString());

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -67,7 +67,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -148,8 +148,8 @@ namespace UAS_MES.Make
                             }
                             OperateResult.AppendText("<<序列号:" + sncode.Text + "\n", Color.Black);
                             //按照打印张数打印
-                            doc = lbl.Documents.Open(PrintLabel.Text);
-                            if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, ma_prodcode.Text, "机身标", "0", out oErrorMessage))
+                            //doc = lbl.Documents.Open(PrintLabel.Text);
+                            if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, ma_prodcode.Text, "机身标", "0", out oErrorMessage))
                             {
                                 //提示用户打印成功
                                 OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_GetReMakeSN.cs

@@ -46,7 +46,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -291,8 +291,8 @@ namespace UAS_MES.Make
                                     if (PrintLabel.Items.Count != 0)
                                     {
                                         OperateResult.AppendText(">>打印序列号" + sn_code.Text + "\n", Color.Black);
-                                        doc = lbl.Documents.Open(PrintLabel.Text);
-                                        if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sn_code.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "SN标签", "0", out ErrMessage))
+                                        //doc = lbl.Documents.Open(PrintLabel.Text);
+                                        if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sn_code.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "SN标签", "0", out ErrMessage))
                                         {
                                             OperateResult.AppendText(ErrMessage + "\n", Color.Red);
                                             return;

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -46,7 +46,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -137,8 +137,8 @@ namespace UAS_MES.Make
                 if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
-                    doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                    //doc = lbl.Documents.Open(PrintLabel.Text);
+                    if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                     {
                         OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
                     }

+ 4 - 4
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.Designer.cs

@@ -1211,13 +1211,13 @@
             this.Load += new System.EventHandler(this.Make_PackageCollectionWeigh_Load);
             this.SizeChanged += new System.EventHandler(this.Make_PackageCollectionWeigh_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).EndInit();
-            this.groupBoxWithBorder1.ResumeLayout(false);
+            this.groupBoxWithBorder1.ResumeLayout(true);
             this.groupBoxWithBorder1.PerformLayout();
-            this.groupBoxWithBorder2.ResumeLayout(false);
+            this.groupBoxWithBorder2.ResumeLayout(true);
             this.groupBoxWithBorder2.PerformLayout();
-            this.groupBoxWithBorder3.ResumeLayout(false);
+            this.groupBoxWithBorder3.ResumeLayout(true);
             this.groupBoxWithBorder3.PerformLayout();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -64,7 +64,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -216,8 +216,8 @@ namespace UAS_MES.Make
                 if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
-                    doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                    //doc = lbl.Documents.Open(PrintLabel.Text);
+                    if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                     {
                         OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
                     }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -54,7 +54,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch
             {
@@ -406,8 +406,8 @@ namespace UAS_MES.Make
                         pa_outboxcode.Focus();
                         pa_outboxcode.SelectAll();
                     }
-                    doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
+                    //doc = lbl.Documents.Open(PrintLabel.Text);
+                    if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
                     {
                         OperateResult.AppendText(">>打印栈板" + pa_outboxcode.Text + "\n", Color.Black);
                     }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_PalletWeigh.cs

@@ -80,7 +80,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -170,9 +170,9 @@ namespace UAS_MES.Make
                                     OperateResult.AppendText(">>产品:" + pa_prodcode.Text + "未维护栈板标签模板\n", Color.Red, palletcode);
                                     return;
                                 }
-                                doc = lbl.Documents.Open(PrintLabel.Text);
+                                //doc = lbl.Documents.Open(PrintLabel.Text);
                                 string ErrorMessage = "";
-                                if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
+                                if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
                                 {
                                     //打印成功,请输入栈板号
                                     OperateResult.AppendText("<<打印成功\n", Color.Green);

+ 5 - 5
UAS-MES/FunctionCode/Make/Make_RePrintLabel.cs

@@ -74,7 +74,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -180,7 +180,7 @@ namespace UAS_MES.Make
             else
                 type = "卡通箱标";
 
-            getlabel = "select la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='"+type+"' and la_statuscode='AUDITED' order by la_isdefault";
+            getlabel = "select la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='" + type + "' and la_statuscode='AUDITED' order by la_isdefault";
 
             listA = (DataTable)dh.ExecuteSql(getlabel, "select");
             if (listA.Rows.Count == 0)
@@ -220,9 +220,9 @@ namespace UAS_MES.Make
                     OperateResult.AppendText("<<SN:" + inputValue.Text + "已经装箱" + mapB.Rows[0]["ms_outboxcode"].ToString() + "不允许单独补打\n", Color.Red);
                     return;
                 }
-                //判定通过进行打印
+                //判定通过进行打印 
                 //doc = lbl.Documents.Open(PrintLabel.Text);
-                if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text),ms_makecode.Text,pr_code.Text,giftBox.Checked?"彩盒标":"机身标","-1",out errorMessage))
+                if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, giftBox.Checked ? "彩盒标" : "机身标", "-1", out errorMessage))
                 {
                     //按照打印张数打印
                     OperateResult.AppendText("<<打印成功\n", Color.Green);
@@ -254,7 +254,7 @@ namespace UAS_MES.Make
                     return;
                 }
                 //doc = lbl.Documents.Open(PrintLabel.Text);
-                if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text),ms_makecode.Text,pr_code.Text,"卡通箱标","-1",out errorMessage))
+                if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, "卡通箱标", "-1", out errorMessage))
                 {
                     //判断通过,打印
                     OperateResult.AppendText("<<打印成功\n", Color.Green);

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_SpecialCartonPack.cs

@@ -59,7 +59,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -191,8 +191,8 @@ namespace UAS_MES.Make
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                     OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
-                    doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), ms_makecode.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                    //doc = lbl.Documents.Open(PrintLabel.Text);
+                    if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), ms_makecode.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                     {
                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                     }

+ 39 - 24
UAS-MES/FunctionCode/Query/Query_SpecialReport.Designer.cs

@@ -50,12 +50,13 @@
             this.Export.DownImage = ((System.Drawing.Image)(resources.GetObject("Export.DownImage")));
             this.Export.Image = null;
             this.Export.IsShowBorder = true;
-            this.Export.Location = new System.Drawing.Point(181, 272);
+            this.Export.Location = new System.Drawing.Point(241, 340);
+            this.Export.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
             this.Export.Name = "Export";
             this.Export.NormalImage = ((System.Drawing.Image)(resources.GetObject("Export.NormalImage")));
             this.Export.Power = null;
-            this.Export.Size = new System.Drawing.Size(75, 28);
+            this.Export.Size = new System.Drawing.Size(100, 35);
             this.Export.TabIndex = 0;
             this.Export.Text = "导出";
             this.Export.UseVisualStyleBackColor = false;
@@ -65,9 +66,10 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(53, 80);
+            this.label1.Location = new System.Drawing.Point(71, 100);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(52, 21);
+            this.label1.Size = new System.Drawing.Size(65, 27);
             this.label1.TabIndex = 1;
             this.label1.Text = "SERIE";
             // 
@@ -75,9 +77,10 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(53, 116);
+            this.label2.Location = new System.Drawing.Point(71, 145);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(77, 21);
+            this.label2.Size = new System.Drawing.Size(95, 27);
             this.label2.TabIndex = 2;
             this.label2.Text = "CARTON";
             // 
@@ -85,9 +88,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(53, 194);
+            this.label3.Location = new System.Drawing.Point(71, 242);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(81, 21);
+            this.label3.Size = new System.Drawing.Size(100, 27);
             this.label3.TabIndex = 3;
             this.label3.Text = "DATECRE";
             // 
@@ -95,9 +99,10 @@
             // 
             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(53, 153);
+            this.label4.Location = new System.Drawing.Point(71, 191);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(75, 21);
+            this.label4.Size = new System.Drawing.Size(92, 27);
             this.label4.TabIndex = 4;
             this.label4.Text = "PALETTE";
             // 
@@ -106,10 +111,11 @@
             this.SerialNum.AllPower = null;
             this.SerialNum.BackColor = System.Drawing.Color.White;
             this.SerialNum.ID = null;
-            this.SerialNum.Location = new System.Drawing.Point(181, 80);
+            this.SerialNum.Location = new System.Drawing.Point(241, 100);
+            this.SerialNum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.SerialNum.Name = "SerialNum";
             this.SerialNum.Power = null;
-            this.SerialNum.Size = new System.Drawing.Size(196, 21);
+            this.SerialNum.Size = new System.Drawing.Size(260, 25);
             this.SerialNum.Str = null;
             this.SerialNum.Str1 = null;
             this.SerialNum.Str2 = null;
@@ -120,10 +126,11 @@
             this.CartonBegin.AllPower = null;
             this.CartonBegin.BackColor = System.Drawing.Color.White;
             this.CartonBegin.ID = null;
-            this.CartonBegin.Location = new System.Drawing.Point(181, 120);
+            this.CartonBegin.Location = new System.Drawing.Point(241, 150);
+            this.CartonBegin.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.CartonBegin.Name = "CartonBegin";
             this.CartonBegin.Power = null;
-            this.CartonBegin.Size = new System.Drawing.Size(196, 21);
+            this.CartonBegin.Size = new System.Drawing.Size(260, 25);
             this.CartonBegin.Str = null;
             this.CartonBegin.Str1 = null;
             this.CartonBegin.Str2 = null;
@@ -134,10 +141,11 @@
             this.CartonEnd.AllPower = null;
             this.CartonEnd.BackColor = System.Drawing.Color.White;
             this.CartonEnd.ID = null;
-            this.CartonEnd.Location = new System.Drawing.Point(377, 120);
+            this.CartonEnd.Location = new System.Drawing.Point(503, 150);
+            this.CartonEnd.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.CartonEnd.Name = "CartonEnd";
             this.CartonEnd.Power = null;
-            this.CartonEnd.Size = new System.Drawing.Size(196, 21);
+            this.CartonEnd.Size = new System.Drawing.Size(260, 25);
             this.CartonEnd.Str = null;
             this.CartonEnd.Str1 = null;
             this.CartonEnd.Str2 = null;
@@ -148,10 +156,11 @@
             this.PaletteEnd.AllPower = null;
             this.PaletteEnd.BackColor = System.Drawing.Color.White;
             this.PaletteEnd.ID = null;
-            this.PaletteEnd.Location = new System.Drawing.Point(377, 157);
+            this.PaletteEnd.Location = new System.Drawing.Point(503, 196);
+            this.PaletteEnd.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.PaletteEnd.Name = "PaletteEnd";
             this.PaletteEnd.Power = null;
-            this.PaletteEnd.Size = new System.Drawing.Size(196, 21);
+            this.PaletteEnd.Size = new System.Drawing.Size(260, 25);
             this.PaletteEnd.Str = null;
             this.PaletteEnd.Str1 = null;
             this.PaletteEnd.Str2 = null;
@@ -162,10 +171,11 @@
             this.PaletteBegin.AllPower = null;
             this.PaletteBegin.BackColor = System.Drawing.Color.White;
             this.PaletteBegin.ID = null;
-            this.PaletteBegin.Location = new System.Drawing.Point(181, 157);
+            this.PaletteBegin.Location = new System.Drawing.Point(241, 196);
+            this.PaletteBegin.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.PaletteBegin.Name = "PaletteBegin";
             this.PaletteBegin.Power = null;
-            this.PaletteBegin.Size = new System.Drawing.Size(196, 21);
+            this.PaletteBegin.Size = new System.Drawing.Size(260, 25);
             this.PaletteBegin.Str = null;
             this.PaletteBegin.Str1 = null;
             this.PaletteBegin.Str2 = null;
@@ -173,16 +183,19 @@
             // 
             // InDate
             // 
-            this.InDate.Location = new System.Drawing.Point(181, 194);
+            this.InDate.Checked = false;
+            this.InDate.Location = new System.Drawing.Point(241, 242);
+            this.InDate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.InDate.Name = "InDate";
-            this.InDate.Size = new System.Drawing.Size(196, 21);
+            this.InDate.ShowCheckBox = true;
+            this.InDate.Size = new System.Drawing.Size(260, 25);
             this.InDate.TabIndex = 10;
             // 
             // Query_SpecialReport
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(747, 538);
+            this.ClientSize = new System.Drawing.Size(996, 672);
             this.Controls.Add(this.InDate);
             this.Controls.Add(this.PaletteEnd);
             this.Controls.Add(this.PaletteBegin);
@@ -195,9 +208,11 @@
             this.Controls.Add(this.label1);
             this.Controls.Add(this.Export);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Query_SpecialReport";
             this.Tag = "Query!SpecialReport";
             this.Text = "Query_SpecialReport";
+            this.Load += new System.EventHandler(this.Query_SpecialReport_Load);
             this.ResumeLayout(false);
             this.PerformLayout();
 

+ 92 - 48
UAS-MES/FunctionCode/Query/Query_SpecialReport.cs

@@ -8,6 +8,7 @@ using System.Text;
 using System.Windows.Forms;
 using UAS_MES.DataOperate;
 using UAS_MES.Entity;
+using UAS_MES.PublicMethod;
 
 namespace UAS_MES.Query
 {
@@ -26,7 +27,6 @@ namespace UAS_MES.Query
             ExcelExport("");
         }
 
-
         //选择导出Excel时是选择导出数据的还是模板
         private void ExcelExport(string DataOrTemplet)
         {
@@ -45,89 +45,133 @@ namespace UAS_MES.Query
                 dt = (DataTable)dh.ExecuteSql("select st_id,st_tablesql,st_condition from SEARCHTEMPLATE where st_title='ZIDE出货报表'", "select");
                 if (dt.Rows.Count > 0)
                 {
+                    string InOutNo = "";
                     st_tablesql = dt.Rows[0]["st_tablesql"].ToString();
                     st_id = dt.Rows[0]["st_id"].ToString();
                     st_condition = dt.Rows[0]["st_condition"].ToString();
-                    dt = (DataTable)dh.ExecuteSql("select stg_field,stg_text,stg_table,stg_formula,stg_type from  SEARCHTEMPLATEgrid where stg_stid='" + st_id + "'", "select");
                     string SQLField = "";
-                    for (int i = 0; i < dt.Rows.Count; i++)
-                    {
-                        if (dt.Rows[i]["stg_table"].ToString() != "")
-                        {
-                            if (dt.Rows[i]["stg_type"].ToString() == "DATE")
-                            {
-                                SQLField += "to_char(" + dt.Rows[i]["stg_field"].ToString() + ",'YYYYMMDD') as " + dt.Rows[i]["stg_text"].ToString() + ",";
-                            }
-                            else
-                            {
-                                SQLField += dt.Rows[i]["stg_field"].ToString() + " as " + dt.Rows[i]["stg_text"].ToString() + ",";
-                            }
-                        }
-                        else
-                        {
-                            if (dt.Rows[i]["stg_formula"].ToString().Replace("'", "").Trim() == "")
-                                SQLField += "''" + " as " + dt.Rows[i]["stg_text"].ToString() + ",";
-                            else
-                                SQLField += dt.Rows[i]["stg_formula"].ToString() + " as " + dt.Rows[i]["stg_text"].ToString() + ",";
-                        }
-                    }
-                    SQLField = SQLField.Substring(0, SQLField.Length - 1);
-                    string sql = "select " + SQLField + " from " + st_tablesql;
-                    if (st_condition != "")
-                    {
-                        sql += " where " + st_condition;
-                    }
+                    string AddCondition = "";
                     if (SerialNum.Text != "")
                     {
-                        sql += " and ms_sncode='" + SerialNum.Text + "'";
+                        AddCondition += " and ms_sncode='" + SerialNum.Text + "'";
                     }
                     if (CartonBegin.Text != "" || CartonEnd.Text != "")
                     {
                         if (CartonBegin.Text != "" && CartonEnd.Text == "")
                         {
-                            sql += " and ms_outboxcode> '" + CartonBegin.Text + "' ";
+                            AddCondition += " and ms_outboxcode> '" + CartonBegin.Text + "' ";
                         }
                         if (CartonBegin.Text == "" && CartonEnd.Text != "")
                         {
-                            sql += " and ms_outboxcode< '" + CartonBegin.Text + "' ";
+                            AddCondition += " and ms_outboxcode< '" + CartonBegin.Text + "' ";
                         }
                         if (CartonBegin.Text != "" && CartonEnd.Text != "")
                         {
-                            sql += " and ms_outboxcode between '" + CartonBegin.Text + "' and '" + CartonEnd.Text + "' ";
+                            AddCondition += " and ms_outboxcode between '" + CartonBegin.Text + "' and '" + CartonEnd.Text + "' ";
                         }
                     }
                     if (PaletteBegin.Text != "" || PaletteBegin.Text != "")
                     {
                         if (PaletteBegin.Text != "" && PaletteEnd.Text == "")
                         {
-                            sql += " and v_outboxcode> '" + PaletteBegin.Text + "' ";
+                            AddCondition += " and v_outboxcode> '" + PaletteBegin.Text + "' ";
                         }
                         if (PaletteBegin.Text == "" && PaletteEnd.Text != "")
                         {
-                            sql += " and v_outboxcode< '" + PaletteEnd.Text + "' ";
+                            AddCondition += " and v_outboxcode< '" + PaletteEnd.Text + "' ";
                         }
                         if (PaletteBegin.Text != "" && PaletteEnd.Text != "")
                         {
-                            sql += " and v_outboxcode between '" + PaletteBegin.Text + "' and '" + PaletteEnd.Text + "' ";
+                            AddCondition += " and v_outboxcode between '" + PaletteBegin.Text + "' and '" + PaletteEnd.Text + "' ";
+                        }
+                    }
+                    if (InDate.Checked)
+                    {
+                        AddCondition += " and trunc(ms_indate) = trunc(to_date('" + InDate.Value.ToString("yyyy-MM-dd") + "','yyyy-MM-dd')) ";
+                    }
+                    string GetInOutNoSQL = "select ms_outno from " + st_tablesql;
+                    if (st_condition != "")
+                    {
+                        GetInOutNoSQL += " where " + st_condition;
+                    }
+                    //获取出货单号
+                    dt = (DataTable)dh.ExecuteSql(GetInOutNoSQL + AddCondition + " and rownum=1", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        InOutNo = dt.Rows[0]["ms_outno"].ToString();
+                    }
+                    DataTable SeqTanle = (DataTable)dh.ExecuteSql("select cl_code,cl_result from commandlog where cl_operate='导出特殊报表' order by cl_id desc", "select");
+                    string SEQ_NUMBER = "";
+                    string SEQ = "";
+                    string SEQ_PreFix = "NL" + DateTime.Now.Year.ToString().Substring(2, 2) + (DateTime.Now.DayOfYear < 100 ? "0" + DateTime.Now.DayOfYear.ToString() : DateTime.Now.DayOfYear.ToString()) + "COC";
+                    if (SeqTanle.Rows.Count > 0)
+                    {
+                        //如果今天已经包含本出货单则导出的使用之前的流水
+                        DataRow[] dr = SeqTanle.Select("cl_result='" + InOutNo + "'");
+                        if (dr.Length > 0)
+                        {
+                            SEQ_NUMBER = dr[0]["cl_code"].ToString();
+                            SEQ = SEQ_PreFix + SEQ_NUMBER;
+                        }
+                        else
+                        {
+                            SEQ_NUMBER = SeqTanle.Rows[0]["cl_code"].ToString();
+                            int temp = int.Parse(SEQ_NUMBER) + 1;
+                            SEQ_NUMBER = temp.ToString().PadLeft(5, '0');
+                            SEQ = SEQ_PreFix + SEQ_NUMBER;
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.CurrentStepCode, "", "", User.UserSourceCode, "导出特殊报表", InOutNo, SEQ, SEQ_NUMBER);
                         }
                     }
-                    if (InDate.Text != "")
+                    else
                     {
-                        sql += " and trunc(ms_indate) = trunc(to_date('" + InDate.Value.ToString("yyyy-MM-dd") + "','yyyy-MM-dd')) ";
+                        SEQ = SEQ_PreFix + "00001";
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.CurrentStepCode, "", "", User.UserSourceCode, "导出特殊报表", InOutNo, SEQ, "00001");
                     }
-                    dt = (DataTable)dh.ExecuteSql(sql, "select");
+                    dt = (DataTable)dh.ExecuteSql("select stg_field,stg_text,stg_table,stg_formula,stg_type from  SEARCHTEMPLATEgrid where stg_stid='" + st_id + "'", "select");
+                    for (int i = 0; i < dt.Rows.Count; i++)
+                    {
+                        if (dt.Rows[i]["stg_table"].ToString() != "")
+                        {
+                            if (dt.Rows[i]["stg_type"].ToString() == "DATE")
+                            {
+                                SQLField += "to_char(" + dt.Rows[i]["stg_field"].ToString() + ",'YYYYMMDD') as " + dt.Rows[i]["stg_text"].ToString() + ",";
+                            }
+                            else
+                            {
+                                SQLField += dt.Rows[i]["stg_field"].ToString() + " as " + dt.Rows[i]["stg_text"].ToString() + ",";
+                            }
+                        }
+                        else
+                        {
+                            if (dt.Rows[i]["stg_text"].ToString() == "SEQ")
+                            {
+                                SQLField += "'" + SEQ + "'" + " as " + dt.Rows[i]["stg_text"].ToString() + ",";
+                            }
+                            else if (dt.Rows[i]["stg_formula"].ToString().Replace("'", "").Trim() == "")
+                                SQLField += "''" + " as " + dt.Rows[i]["stg_text"].ToString() + ",";
+                            else
+                                SQLField += dt.Rows[i]["stg_formula"].ToString() + " as " + dt.Rows[i]["stg_text"].ToString() + ",";
+                        }
+                    }
+                    SQLField = SQLField.Substring(0, SQLField.Length - 1);
+                    string sql = "select " + SQLField + " from " + st_tablesql;
+                    //单独获取出货单号对流水进行标识
+                    if (st_condition != "")
+                    {
+                        sql += " where " + st_condition;
+                    }
+                    //界面生成的条件
+                    dt = (DataTable)dh.ExecuteSql(sql + AddCondition, "select");
                     //导出Excel的时候返回一个文件名,用户选择是否打开
-                    /*string filePath = */
-                    eh.WriteTxt(dt, FolderPath, "NL" + DateTime.Now.Year.ToString().Substring(2,2) + (DateTime.Now.DayOfYear < 100 ? "0" + DateTime.Now.DayOfYear.ToString() : DateTime.Now.DayOfYear.ToString()) + "COC");
-                    ////用户选择导出之后是否立即打开
-                    //MessageBoxButtons messButton = MessageBoxButtons.YesNo;
-                    //string openFile = MessageBox.Show(this.ParentForm, "是否打开文件", "提示", messButton).ToString();
-                    //if (openFile == "Yes")
-                    //{
-                    //    System.Diagnostics.Process.Start(filePath);
-                    //}
+                    eh.WriteTxt(dt, FolderPath, SEQ);
+                    MessageBox.Show("导出成功");
                 }
             }
         }
+
+        private void Query_SpecialReport_Load(object sender, EventArgs e)
+        {
+            InDate.Checked = false;
+        }
     }
 }

+ 1 - 0
UAS-MES/FunctionCode/Special/Special_CancelCollection.cs

@@ -97,6 +97,7 @@ namespace UAS_MES.Special
                     sqls.Add("delete from steppassed where sp_sncode='" + sn_code.Text + "' and sp_makecode='" + ms_makecode + "'");
                     sqls.Add("delete from makeserial where ms_id='" + ms_id + "'");
                     dh.ExecuteSQLTran(sqls.ToArray());
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "取消采集", "取消采集成功", sn_code.Text, "");
                     OperateResult.AppendText(">>序列号" + sn_code.Text + "成功解除绑定\n", Color.Green, sn_code);
                 }
                 else OperateResult.AppendText(">>序列号" + sn_code.Text + "不处于第一道工序,不允许取消采集\n", Color.Red, sn_code);

+ 1 - 1
UAS-MES/FunctionCode/SystemSetting/SystemSetting_LabelMaintain.cs

@@ -132,7 +132,7 @@ namespace UAS_MES.SystemSetting
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {

+ 151 - 97
UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.Designer.cs

@@ -34,6 +34,12 @@
             this.pi_titile_label = new System.Windows.Forms.Label();
             this.pi_title = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.datacount = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.Label = new System.Windows.Forms.Label();
+            this.boxqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.getqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.ungetqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.outqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.label10 = new System.Windows.Forms.Label();
             this.label8 = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
@@ -44,26 +50,24 @@
             this.pi_id = new System.Windows.Forms.Label();
             this.pi_type = new System.Windows.Forms.Label();
             this.bindingSource = new System.Windows.Forms.BindingSource(this.components);
+            this.Search = new System.Windows.Forms.Button();
+            this.pallecode = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.pi_type_check = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
             this.Clean = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.cancel = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
             this.input = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.InOutDetailDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
-            this.boxqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.getqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.ungetqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.outqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.ConfirmOut = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.NewProdInOut = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.ProdDetail = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.pi_inoutno = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.pim_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pim_mac = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pim_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.blank = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ConfirmOut = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.NewProdInOut = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.ProdDetail = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.pi_inoutno = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.InOutDetailDGV)).BeginInit();
@@ -101,6 +105,8 @@
             // panel1
             // 
             this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel1.Controls.Add(this.datacount);
+            this.panel1.Controls.Add(this.Label);
             this.panel1.Controls.Add(this.boxqty);
             this.panel1.Controls.Add(this.getqty);
             this.panel1.Controls.Add(this.ungetqty);
@@ -115,11 +121,76 @@
             this.panel1.Size = new System.Drawing.Size(169, 195);
             this.panel1.TabIndex = 217;
             // 
+            // datacount
+            // 
+            this.datacount.AutoSize = true;
+            this.datacount.CutLength = null;
+            this.datacount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.datacount.Location = new System.Drawing.Point(95, 155);
+            this.datacount.MaximumSize = new System.Drawing.Size(200, 0);
+            this.datacount.Name = "datacount";
+            this.datacount.Size = new System.Drawing.Size(0, 21);
+            this.datacount.TabIndex = 230;
+            // 
+            // Label
+            // 
+            this.Label.AutoSize = true;
+            this.Label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Label.Location = new System.Drawing.Point(9, 155);
+            this.Label.Name = "Label";
+            this.Label.Size = new System.Drawing.Size(74, 21);
+            this.Label.TabIndex = 229;
+            this.Label.Text = "当前明细";
+            // 
+            // boxqty
+            // 
+            this.boxqty.AutoSize = true;
+            this.boxqty.CutLength = null;
+            this.boxqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.boxqty.Location = new System.Drawing.Point(95, 120);
+            this.boxqty.MaximumSize = new System.Drawing.Size(200, 0);
+            this.boxqty.Name = "boxqty";
+            this.boxqty.Size = new System.Drawing.Size(0, 21);
+            this.boxqty.TabIndex = 227;
+            // 
+            // getqty
+            // 
+            this.getqty.AutoSize = true;
+            this.getqty.CutLength = null;
+            this.getqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.getqty.Location = new System.Drawing.Point(95, 84);
+            this.getqty.MaximumSize = new System.Drawing.Size(200, 0);
+            this.getqty.Name = "getqty";
+            this.getqty.Size = new System.Drawing.Size(0, 21);
+            this.getqty.TabIndex = 226;
+            // 
+            // ungetqty
+            // 
+            this.ungetqty.AutoSize = true;
+            this.ungetqty.CutLength = null;
+            this.ungetqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ungetqty.Location = new System.Drawing.Point(95, 44);
+            this.ungetqty.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ungetqty.Name = "ungetqty";
+            this.ungetqty.Size = new System.Drawing.Size(0, 21);
+            this.ungetqty.TabIndex = 225;
+            // 
+            // outqty
+            // 
+            this.outqty.AutoSize = true;
+            this.outqty.CutLength = null;
+            this.outqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.outqty.Location = new System.Drawing.Point(95, 11);
+            this.outqty.MaximumSize = new System.Drawing.Size(200, 0);
+            this.outqty.Name = "outqty";
+            this.outqty.Size = new System.Drawing.Size(0, 21);
+            this.outqty.TabIndex = 224;
+            // 
             // label10
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(9, 143);
+            this.label10.Location = new System.Drawing.Point(9, 120);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(58, 21);
             this.label10.TabIndex = 222;
@@ -129,7 +200,7 @@
             // 
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label8.Location = new System.Drawing.Point(9, 106);
+            this.label8.Location = new System.Drawing.Point(9, 84);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(74, 21);
             this.label8.TabIndex = 220;
@@ -139,7 +210,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(9, 60);
+            this.label6.Location = new System.Drawing.Point(9, 44);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(74, 21);
             this.label6.TabIndex = 218;
@@ -149,7 +220,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(9, 17);
+            this.label4.Location = new System.Drawing.Point(9, 11);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(74, 21);
             this.label4.TabIndex = 218;
@@ -215,6 +286,26 @@
             this.pi_type.TabIndex = 230;
             this.pi_type.Visible = false;
             // 
+            // Search
+            // 
+            this.Search.Location = new System.Drawing.Point(203, 51);
+            this.Search.Name = "Search";
+            this.Search.Size = new System.Drawing.Size(68, 21);
+            this.Search.TabIndex = 239;
+            this.Search.Text = "查询";
+            this.Search.UseVisualStyleBackColor = true;
+            this.Search.Click += new System.EventHandler(this.Search_Click);
+            // 
+            // pallecode
+            // 
+            this.pallecode.BackColor = System.Drawing.Color.Transparent;
+            this.pallecode.Location = new System.Drawing.Point(9, 51);
+            this.pallecode.Name = "pallecode";
+            this.pallecode.PlaceHolder = "栈板/箱搜索";
+            this.pallecode.Size = new System.Drawing.Size(170, 28);
+            this.pallecode.TabIndex = 238;
+            this.pallecode.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.pallecode_UserControlTextChanged);
+            // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -299,56 +390,60 @@
             this.pr_spec,
             this.blank});
             this.InOutDetailDGV.EnableContentClick = true;
-            this.InOutDetailDGV.Location = new System.Drawing.Point(9, 66);
+            this.InOutDetailDGV.Location = new System.Drawing.Point(9, 84);
             this.InOutDetailDGV.Margin = new System.Windows.Forms.Padding(2);
             this.InOutDetailDGV.Name = "InOutDetailDGV";
             this.InOutDetailDGV.RowTemplate.Height = 27;
-            this.InOutDetailDGV.Size = new System.Drawing.Size(544, 357);
+            this.InOutDetailDGV.Size = new System.Drawing.Size(544, 339);
             this.InOutDetailDGV.TabIndex = 218;
+            this.InOutDetailDGV.DataSourceChanged += new System.EventHandler(this.InOutDetailDGV_DataSourceChanged);
             // 
-            // boxqty
+            // pim_outboxcode
             // 
-            this.boxqty.AutoSize = true;
-            this.boxqty.CutLength = null;
-            this.boxqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.boxqty.Location = new System.Drawing.Point(95, 144);
-            this.boxqty.MaximumSize = new System.Drawing.Size(200, 0);
-            this.boxqty.Name = "boxqty";
-            this.boxqty.Size = new System.Drawing.Size(0, 21);
-            this.boxqty.TabIndex = 227;
+            this.pim_outboxcode.DataPropertyName = "pim_outboxcode";
+            this.pim_outboxcode.HeaderText = "栈板/箱号";
+            this.pim_outboxcode.MinimumWidth = 2;
+            this.pim_outboxcode.Name = "pim_outboxcode";
+            this.pim_outboxcode.ReadOnly = true;
+            this.pim_outboxcode.Width = 150;
             // 
-            // getqty
+            // pim_mac
             // 
-            this.getqty.AutoSize = true;
-            this.getqty.CutLength = null;
-            this.getqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.getqty.Location = new System.Drawing.Point(95, 107);
-            this.getqty.MaximumSize = new System.Drawing.Size(200, 0);
-            this.getqty.Name = "getqty";
-            this.getqty.Size = new System.Drawing.Size(0, 21);
-            this.getqty.TabIndex = 226;
+            this.pim_mac.DataPropertyName = "pim_mac";
+            this.pim_mac.HeaderText = "SN号";
+            this.pim_mac.Name = "pim_mac";
+            this.pim_mac.ReadOnly = true;
             // 
-            // ungetqty
+            // pim_prodcode
             // 
-            this.ungetqty.AutoSize = true;
-            this.ungetqty.CutLength = null;
-            this.ungetqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ungetqty.Location = new System.Drawing.Point(95, 60);
-            this.ungetqty.MaximumSize = new System.Drawing.Size(200, 0);
-            this.ungetqty.Name = "ungetqty";
-            this.ungetqty.Size = new System.Drawing.Size(0, 21);
-            this.ungetqty.TabIndex = 225;
+            this.pim_prodcode.DataPropertyName = "pim_prodcode";
+            this.pim_prodcode.HeaderText = "产品代码";
+            this.pim_prodcode.Name = "pim_prodcode";
+            this.pim_prodcode.ReadOnly = true;
             // 
-            // outqty
+            // pr_detail
             // 
-            this.outqty.AutoSize = true;
-            this.outqty.CutLength = null;
-            this.outqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.outqty.Location = new System.Drawing.Point(95, 17);
-            this.outqty.MaximumSize = new System.Drawing.Size(200, 0);
-            this.outqty.Name = "outqty";
-            this.outqty.Size = new System.Drawing.Size(0, 21);
-            this.outqty.TabIndex = 224;
+            this.pr_detail.DataPropertyName = "pr_detail";
+            this.pr_detail.HeaderText = "名称";
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.ReadOnly = true;
+            // 
+            // pr_spec
+            // 
+            this.pr_spec.DataPropertyName = "pr_spec";
+            this.pr_spec.HeaderText = "规格";
+            this.pr_spec.MinimumWidth = 200;
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.ReadOnly = true;
+            this.pr_spec.Width = 200;
+            // 
+            // blank
+            // 
+            this.blank.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.blank.HeaderText = "";
+            this.blank.MinimumWidth = 2;
+            this.blank.Name = "blank";
+            this.blank.Width = 2;
             // 
             // ConfirmOut
             // 
@@ -429,58 +524,13 @@
             this.pi_inoutno.TableName = null;
             this.pi_inoutno.TextBoxEnable = true;
             // 
-            // pim_outboxcode
-            // 
-            this.pim_outboxcode.DataPropertyName = "pim_outboxcode";
-            this.pim_outboxcode.HeaderText = "栈板/箱号";
-            this.pim_outboxcode.MinimumWidth = 2;
-            this.pim_outboxcode.Name = "pim_outboxcode";
-            this.pim_outboxcode.ReadOnly = true;
-            this.pim_outboxcode.Width = 150;
-            // 
-            // pim_mac
-            // 
-            this.pim_mac.DataPropertyName = "pim_mac";
-            this.pim_mac.HeaderText = "SN号";
-            this.pim_mac.Name = "pim_mac";
-            this.pim_mac.ReadOnly = true;
-            // 
-            // pim_prodcode
-            // 
-            this.pim_prodcode.DataPropertyName = "pim_prodcode";
-            this.pim_prodcode.HeaderText = "产品代码";
-            this.pim_prodcode.Name = "pim_prodcode";
-            this.pim_prodcode.ReadOnly = true;
-            // 
-            // pr_detail
-            // 
-            this.pr_detail.DataPropertyName = "pr_detail";
-            this.pr_detail.HeaderText = "名称";
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.ReadOnly = true;
-            // 
-            // pr_spec
-            // 
-            this.pr_spec.DataPropertyName = "pr_spec";
-            this.pr_spec.HeaderText = "规格";
-            this.pr_spec.MinimumWidth = 200;
-            this.pr_spec.Name = "pr_spec";
-            this.pr_spec.ReadOnly = true;
-            this.pr_spec.Width = 200;
-            // 
-            // blank
-            // 
-            this.blank.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.blank.HeaderText = "";
-            this.blank.MinimumWidth = 2;
-            this.blank.Name = "blank";
-            this.blank.Width = 2;
-            // 
             // Warehouse_FinishedProductOut
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(740, 518);
+            this.Controls.Add(this.Search);
+            this.Controls.Add(this.pallecode);
             this.Controls.Add(this.pi_type);
             this.Controls.Add(this.pi_id);
             this.Controls.Add(this.OperateResult);
@@ -552,5 +602,9 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
         private System.Windows.Forms.DataGridViewTextBoxColumn blank;
+        private System.Windows.Forms.Button Search;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder pallecode;
+        private CustomControl.ValueLabel.ValueLabel datacount;
+        private System.Windows.Forms.Label Label;
     }
 }

+ 28 - 0
UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.cs

@@ -886,5 +886,33 @@ namespace UAS_MES.Warehouse
                 }
             }
         }
+
+        private void pallecode_UserControlTextChanged(object sender, EventArgs e)
+        {
+            if (pallecode.Text.Length == 0 && dh != null)
+            {
+                input.Enabled = true;
+                LoadFormData();
+                LoadGridData();
+            }
+        }
+
+        private void Search_Click(object sender, EventArgs e)
+        {
+            if (pallecode.Text.Length >= 0 && dh != null)
+            {
+                sql.Clear();
+                sql.Append("select pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec from prodiomac ");
+                sql.Append("left join product on pr_code=pim_prodcode where pim_inoutno='" + pi_inoutno.Text + "'and  pim_outboxcode like  '%" + pallecode.Text + "%' and pim_inorout='OUT' AND pim_class='出货' order by pim_id asc");
+                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                BaseUtil.FillDgvWithDataTable(InOutDetailDGV, dt);
+                input.Enabled = false;
+            }
+        }
+
+        private void InOutDetailDGV_DataSourceChanged(object sender, EventArgs e)
+        {
+            datacount.Text = InOutDetailDGV.Rows.Count.ToString();
+        }
     }
 }

+ 18 - 0
UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.resx

@@ -177,6 +177,24 @@
   <metadata name="blank.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pim_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pim_mac.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pim_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="blank.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <data name="ConfirmOut.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 30 - 3
UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.Designer.cs

@@ -35,6 +35,8 @@
             this.palletBtn = new System.Windows.Forms.RadioButton();
             this.label1 = new System.Windows.Forms.Label();
             this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
+            this.Search = new System.Windows.Forms.Button();
+            this.pallecode = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.cancel = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
             this.input = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
@@ -59,7 +61,7 @@
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(74, 21);
             this.label8.TabIndex = 227;
-            this.label8.Text = "已采集数";
+            this.label8.Text = "当前明细";
             // 
             // bigboxBtn
             // 
@@ -112,6 +114,26 @@
             this.label1.TabIndex = 234;
             this.label1.Text = "采集框";
             // 
+            // Search
+            // 
+            this.Search.Location = new System.Drawing.Point(197, 45);
+            this.Search.Name = "Search";
+            this.Search.Size = new System.Drawing.Size(68, 21);
+            this.Search.TabIndex = 237;
+            this.Search.Text = "查询";
+            this.Search.UseVisualStyleBackColor = true;
+            this.Search.Click += new System.EventHandler(this.Search_Click);
+            // 
+            // pallecode
+            // 
+            this.pallecode.BackColor = System.Drawing.Color.Transparent;
+            this.pallecode.Location = new System.Drawing.Point(12, 45);
+            this.pallecode.Name = "pallecode";
+            this.pallecode.PlaceHolder = "栈板/箱搜索";
+            this.pallecode.Size = new System.Drawing.Size(159, 28);
+            this.pallecode.TabIndex = 236;
+            this.pallecode.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.textBoxWithPlaceHolder1_UserControlTextChanged);
+            // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -174,12 +196,13 @@
             this.pr_spec,
             this.Sp});
             this.InOutDetailDGV.EnableContentClick = true;
-            this.InOutDetailDGV.Location = new System.Drawing.Point(11, 42);
+            this.InOutDetailDGV.Location = new System.Drawing.Point(11, 78);
             this.InOutDetailDGV.Margin = new System.Windows.Forms.Padding(2);
             this.InOutDetailDGV.Name = "InOutDetailDGV";
             this.InOutDetailDGV.RowTemplate.Height = 27;
-            this.InOutDetailDGV.Size = new System.Drawing.Size(665, 329);
+            this.InOutDetailDGV.Size = new System.Drawing.Size(665, 293);
             this.InOutDetailDGV.TabIndex = 219;
+            this.InOutDetailDGV.DataSourceChanged += new System.EventHandler(this.InOutDetailDGV_DataSourceChanged);
             // 
             // pim_outboxcode
             // 
@@ -242,6 +265,8 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(700, 499);
+            this.Controls.Add(this.Search);
+            this.Controls.Add(this.pallecode);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.cancel);
@@ -285,5 +310,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
         private System.Windows.Forms.DataGridViewTextBoxColumn Sp;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder pallecode;
+        private System.Windows.Forms.Button Search;
     }
 }

+ 30 - 0
UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.cs

@@ -499,5 +499,35 @@ namespace UAS_MES.Warehouse
                 }
             }
         }
+
+        private void textBoxWithPlaceHolder1_UserControlTextChanged(object sender, EventArgs e)
+        {
+            if (pallecode.Text.Length == 0)
+            {
+                input.Enabled = true;
+                if (bindingSource1.DataSource != null)
+                {
+                    BaseUtil.FillDgvWithDataTable(InOutDetailDGV, (DataTable)bindingSource1.DataSource);
+                }
+            }
+        }
+
+        private void Search_Click(object sender, EventArgs e)
+        {
+            if (pallecode.Text.Length >= 0)
+            {
+                sql.Clear();
+                sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec from prodiomac ");
+                sql.Append("left join product on pr_code=pim_prodcode where pim_outboxcode like  '%" + pallecode.Text + "%' and pim_inorout='IN' AND pim_class='完工入库'");
+                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                BaseUtil.FillDgvWithDataTable(InOutDetailDGV, dt);
+                input.Enabled = false;
+            }
+        }
+
+        private void InOutDetailDGV_DataSourceChanged(object sender, EventArgs e)
+        {
+            getqty.Text = InOutDetailDGV.Rows.Count.ToString();
+        }
     }
 }

+ 21 - 0
UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.resx

@@ -141,4 +141,25 @@
   <metadata name="Sp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pim_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pim_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pim_mac.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pim_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Sp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 11 - 7
UAS-MES/PublicMethod/Print.cs

@@ -6,6 +6,7 @@ using System.IO;
 using UAS_MES.Entity;
 using System.Text.RegularExpressions;
 using System.Windows.Forms;
+using System;
 
 namespace UAS_MES.PublicMethod
 {
@@ -109,7 +110,7 @@ namespace UAS_MES.PublicMethod
             //doc.Save();
             doc.Printer.SwitchTo(PrinterName);
             doc.PrintDocument(PrintNum);
-          //doc.Close();
+            //doc.Close();
             LogicHandler.DoCommandLog(iCaller, User.UserCode, "", User.UserLineCode, User.UserSourceCode, "打印", "成功打印", SnCode, "");
             for (int k = 0; k < doc.Variables.FormVariables.Count; k++)
             {
@@ -128,7 +129,7 @@ namespace UAS_MES.PublicMethod
             {
                 if (LabelType == "卡通箱标" || LabelType == "大箱标" || LabelType == "栈板标")
                 {
-                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
+                       dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
                 }
                 else
                 {
@@ -141,7 +142,7 @@ namespace UAS_MES.PublicMethod
                     return false;
                 }
             }
-            string filelastwritetime = dh.getFieldDataByCondition("label", "la_lastwritetime", "la_id = '"+ LaID + "'").ToString();
+            string filelastwritetime = dh.getFieldDataByCondition("label", "la_lastwritetime", "la_id = '" + LaID + "'").ToString();
             FileInfo PrintFile = new FileInfo(LabelName);
             //打开模板路径
             //查询模板对应的取值SQL和参数名称
@@ -152,14 +153,17 @@ namespace UAS_MES.PublicMethod
                 MessageBox.Show("打印文件不存在");
                 return false;
             }
-            if (PrintFile.LastWriteTime.ToString() != filelastwritetime)
+            string filechangetime = PrintFile.LastWriteTime.ToString();
+            if (filechangetime != filelastwritetime)
             {
                 lbl.Quit();
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
-                dh.UpdateByCondition("label", "la_lastwritetime = to_date('"+PrintFile.LastWriteTime.ToString()+"', 'yyyy-mm-dd hh24:mi:ss') ", "la_id = '"+ LaID + "'");
+                BaseUtil.WriteLbl();
+                filechangetime = PrintFile.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
+                string update = "la_lastwritetime = to_date((regexp_substr('"+ filechangetime + "','\\d+.+\\d+')),'yyyy-mm-dd hh24:mi:ss')";
+                dh.UpdateByCondition("label", update, "la_id = '" + LaID + "'");
             }
-            doc = lbl.Documents.Open(LabelName,true);
+            doc = lbl.Documents.Open(LabelName, true);
             //执行全部的SQL
             for (int i = 0; i < dt.Rows.Count; i++)
             {