Prechádzať zdrojové kódy

Merge branch 'master' of repos.ubtob.net:usoft/mes-client

caosy 1 rok pred
rodič
commit
16ea40dfa9
47 zmenil súbory, kde vykonal 2973 pridanie a 957 odobranie
  1. 2 2
      FileWatcher/AutoAnalysisDevice.cs
  2. 1 1
      FileWatcher/AutoAnalysisXml.Designer.cs
  3. 2 2
      FileWatcher/AutoAnalysisXml.cs
  4. 3 73
      FileWatcher/AutoAnalysisXmlByStep.Designer.cs
  5. 31 47
      FileWatcher/AutoAnalysisXmlByStep.cs
  6. 2 2
      FileWatcher/DataHelper.cs
  7. 2 2
      FileWatcher/Form4.cs
  8. 1 1
      FileWatcher/Login.cs
  9. 1 1
      FileWatcher/Program.cs
  10. 6 6
      FileWatcher/SOP.cs
  11. 13 0
      FileWatcher/ftpOperater.cs
  12. 70 69
      UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs
  13. 33 10
      UAS-出货标签管理(泽天)/UAS_出货标签管理.cs
  14. 1 1
      UAS_MES_LGDZ/CustomControl/HeadBar/HeadBar.cs
  15. 2 2
      UAS_MES_LGDZ/DataOperate/DataHelper.cs
  16. 30 0
      UAS_MES_LGDZ/FunctionCode/Make/Make_CollectNetCode.cs
  17. 111 8
      UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxLabelPrint.Designer.cs
  18. 16 0
      UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxLabelPrint.cs
  19. 408 0
      UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrintGetIMEI.Designer.cs
  20. 359 0
      UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrintGetIMEI.cs
  21. 120 0
      UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrintGetIMEI.resx
  22. 4 3
      UAS_MES_LGDZ/FunctionCode/Make/Make_GetReMakeSN.cs
  23. 4 2
      UAS_MES_LGDZ/FunctionCode/Make/Make_MakeCancelDown.cs
  24. 5 3
      UAS_MES_LGDZ/FunctionCode/Make/Make_MakeDown.cs
  25. 65 32
      UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh.Designer.cs
  26. 1 1
      UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs
  27. 18 0
      UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh.resx
  28. 65 32
      UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh_ReadLine.Designer.cs
  29. 1 1
      UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh_ReadLine.cs
  30. 2 1
      UAS_MES_LGDZ/FunctionCode/Special/Special_Delete.cs
  31. 1 0
      UAS_MES_LGDZ/FunctionCode/Special/Special_MakeBad.cs
  32. 11 8
      UAS_MES_LGDZ/FunctionCode/Special/Special_QCRecheck.cs
  33. 1 1
      UAS_MES_LGDZ/Login.cs
  34. 1 1
      UAS_MES_LGDZ/Main.cs
  35. 92 0
      UAS_MES_LGDZ/PublicMethod/LogicHandler.cs
  36. 2 2
      UAS_MES_LGDZ/PublicMethod/Print.cs
  37. 9 0
      UAS_MES_LGDZ/UAS_MES_LGDZ.csproj
  38. 1 1
      UAS_MES_YD/FunctionCode/Packing/Packing_PalletCollection.cs
  39. 8 0
      UAS_MES_YD/FunctionCode/Query/ArrayList.cs
  40. 235 317
      UAS_MES_YD/FunctionCode/Query/Query_SN.Designer.cs
  41. 292 307
      UAS_MES_YD/FunctionCode/Query/Query_SN.cs
  42. 268 9
      UAS_MES_YD/FunctionCode/Query/Query_SN.resx
  43. 173 0
      UAS_MES_YD/FunctionCode/Special/Special_CancelMaterial.Designer.cs
  44. 61 0
      UAS_MES_YD/FunctionCode/Special/Special_CancelMaterial.cs
  45. 383 0
      UAS_MES_YD/FunctionCode/Special/Special_CancelMaterial.resx
  46. 37 0
      UAS_MES_YD/PublicMethod/BaseUtil.cs
  47. 19 9
      UAS_MES_YD/UAS_MES_YD.csproj

+ 2 - 2
FileWatcher/AutoAnalysisDevice.cs

@@ -60,7 +60,7 @@ namespace FileWatcher
         /// </summary>
         List<string> _FileName = new List<string>();
 
-        string master = "WKS";
+        string master = "HUAG";
 
         ftpOperater ftp = new ftpOperater();
 
@@ -125,7 +125,7 @@ namespace FileWatcher
 
         private void ConnectDB()
         {
-            DataHelper.DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.101.253)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID="+Master+";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             dh = new DataHelper();
         }
 

+ 1 - 1
FileWatcher/AutoAnalysisXml.Designer.cs

@@ -279,7 +279,7 @@
             this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.MaximizeBox = false;
             this.Name = "AutoAnalysisXml";
-            this.Text = "UAS自动过站解析器 2022-07-20  15:05";
+            this.Text = "UAS自动过站解析器 2024-03-04";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
             this.Load += new System.EventHandler(this.Form1_Load);
             ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).EndInit();

+ 2 - 2
FileWatcher/AutoAnalysisXml.cs

@@ -105,7 +105,7 @@ namespace FileWatcher
             {
                 if (Master.Text == DB.Rows[i]["ma_user"].ToString())
                 {
-                    DataHelper.DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DGW;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+                    DataHelper.DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=HUAG;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
                     dh = new DataHelper();
                 }
             }
@@ -143,7 +143,7 @@ namespace FileWatcher
             {
                 if (Master.Text == DB.Rows[i]["ma_user"].ToString())
                 {
-                    DataHelper.DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DGW;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+                    DataHelper.DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=HUAG;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
                     dh = new DataHelper();
                     LogicHandler.dh = new DataHelper();
                 }

+ 3 - 73
FileWatcher/AutoAnalysisXmlByStep.Designer.cs

@@ -38,15 +38,10 @@
             this.ChooseFolder = new System.Windows.Forms.Button();
             this.OperateResult = new System.Windows.Forms.RichTextBox();
             this.Clean = new System.Windows.Forms.Button();
-            this.MakeCode_lable = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
             this.Master = new System.Windows.Forms.ComboBox();
             this.AutoStart = new System.Windows.Forms.CheckBox();
-            this.ma_code = new System.Windows.Forms.TextBox();
-            this.BatchAnalysus = new System.Windows.Forms.Button();
             this.Timer = new System.Windows.Forms.Timer(this.components);
-            this.Device = new System.Windows.Forms.ComboBox();
-            this.label3 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).BeginInit();
             this.SuspendLayout();
             // 
@@ -85,7 +80,7 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(48, 400);
+            this.label1.Location = new System.Drawing.Point(48, 350);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(162, 38);
@@ -95,7 +90,7 @@
             // FolderPath
             // 
             this.FolderPath.Enabled = false;
-            this.FolderPath.Location = new System.Drawing.Point(218, 400);
+            this.FolderPath.Location = new System.Drawing.Point(218, 350);
             this.FolderPath.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.FolderPath.Name = "FolderPath";
             this.FolderPath.Size = new System.Drawing.Size(436, 35);
@@ -104,7 +99,7 @@
             // ChooseFolder
             // 
             this.ChooseFolder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ChooseFolder.Location = new System.Drawing.Point(686, 394);
+            this.ChooseFolder.Location = new System.Drawing.Point(686, 344);
             this.ChooseFolder.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.ChooseFolder.Name = "ChooseFolder";
             this.ChooseFolder.Size = new System.Drawing.Size(156, 48);
@@ -134,17 +129,6 @@
             this.Clean.UseVisualStyleBackColor = true;
             this.Clean.Click += new System.EventHandler(this.Clean_Click);
             // 
-            // MakeCode_lable
-            // 
-            this.MakeCode_lable.AutoSize = true;
-            this.MakeCode_lable.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MakeCode_lable.Location = new System.Drawing.Point(48, 311);
-            this.MakeCode_lable.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.MakeCode_lable.Name = "MakeCode_lable";
-            this.MakeCode_lable.Size = new System.Drawing.Size(104, 38);
-            this.MakeCode_lable.TabIndex = 12;
-            this.MakeCode_lable.Text = "工单号";
-            // 
             // label4
             // 
             this.label4.AutoSize = true;
@@ -181,68 +165,19 @@
             this.AutoStart.Visible = false;
             this.AutoStart.CheckedChanged += new System.EventHandler(this.AutoStart_CheckedChanged);
             // 
-            // ma_code
-            // 
-            this.ma_code.Location = new System.Drawing.Point(218, 311);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.ma_code.Name = "ma_code";
-            this.ma_code.Size = new System.Drawing.Size(436, 35);
-            this.ma_code.TabIndex = 17;
-            // 
-            // BatchAnalysus
-            // 
-            this.BatchAnalysus.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BatchAnalysus.Location = new System.Drawing.Point(686, 308);
-            this.BatchAnalysus.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.BatchAnalysus.Name = "BatchAnalysus";
-            this.BatchAnalysus.Size = new System.Drawing.Size(156, 48);
-            this.BatchAnalysus.TabIndex = 18;
-            this.BatchAnalysus.Text = "批量解析";
-            this.BatchAnalysus.UseVisualStyleBackColor = true;
-            this.BatchAnalysus.Click += new System.EventHandler(this.BatchAnalysus_Click);
-            // 
             // Timer
             // 
             this.Timer.Interval = 10000;
             this.Timer.Tick += new System.EventHandler(this.Timer_Tick);
             // 
-            // Device
-            // 
-            this.Device.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.Device.FormattingEnabled = true;
-            this.Device.Items.AddRange(new object[] {
-            "AOI设备",
-            "测试设备"});
-            this.Device.Location = new System.Drawing.Point(218, 222);
-            this.Device.Margin = new System.Windows.Forms.Padding(6);
-            this.Device.Name = "Device";
-            this.Device.Size = new System.Drawing.Size(436, 32);
-            this.Device.TabIndex = 20;
-            // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(48, 222);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(75, 38);
-            this.label3.TabIndex = 19;
-            this.label3.Text = "工序";
-            // 
             // AutoAnalysisXmlByStep
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1443, 640);
-            this.Controls.Add(this.Device);
-            this.Controls.Add(this.label3);
-            this.Controls.Add(this.BatchAnalysus);
-            this.Controls.Add(this.ma_code);
             this.Controls.Add(this.AutoStart);
             this.Controls.Add(this.Master);
             this.Controls.Add(this.label4);
-            this.Controls.Add(this.MakeCode_lable);
             this.Controls.Add(this.Clean);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.ChooseFolder);
@@ -273,15 +208,10 @@
         private System.Windows.Forms.Button ChooseFolder;
         private System.Windows.Forms.RichTextBox OperateResult;
         private System.Windows.Forms.Button Clean;
-        private System.Windows.Forms.Label MakeCode_lable;
         private System.Windows.Forms.ComboBox Master;
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.CheckBox AutoStart;
-        private System.Windows.Forms.TextBox ma_code;
-        private System.Windows.Forms.Button BatchAnalysus;
         private System.Windows.Forms.Timer Timer;
-        private System.Windows.Forms.ComboBox Device;
-        private System.Windows.Forms.Label label3;
     }
 }
 

+ 31 - 47
FileWatcher/AutoAnalysisXmlByStep.cs

@@ -59,7 +59,7 @@ namespace FileWatcher
         /// </summary>
         List<string> _FileName = new List<string>();
 
-        ftpOperater ftp = new ftpOperater();
+        ftpOperater ftp;
         string imaster;
 
         public AutoAnalysisXmlByStep()
@@ -78,9 +78,11 @@ namespace FileWatcher
             imaster = iMaster;
             StartPosition = FormStartPosition.CenterScreen;
         }
-
+        string fieltype = "";
+        string ftpulr = "";
         private void Form1_Load(object sender, EventArgs e)
         {
+
             tipform.Show();
             CheckForIllegalCrossThreadCalls = false;
             FormBorderStyle = FormBorderStyle.FixedSingle;
@@ -91,6 +93,10 @@ namespace FileWatcher
             stw.StartPosition = FormStartPosition.CenterScreen;
             stw.ShowDialog();
             List<string> CacheInf = new List<string>();
+            ftpulr = dh.getFieldDataByCondition("configs", "data", "code='UploadFTP' and caller='MESSetting'").ToString();
+            fieltype = dh.getFieldDataByCondition("configs", "data", "code='UploadFile' and caller='MESSetting'").ToString();
+            string[] FTPInf = ftpulr.Split('#');
+            ftp = new ftpOperater(FTPInf[0], FTPInf[1], FTPInf[2]);
             //获取缓存信息
             try
             {
@@ -100,19 +106,6 @@ namespace FileWatcher
                 //AutoStart.Checked = (bool)BaseUtil.GetCacheData("AutoStart");
             }
             catch (Exception ex) { MessageBox.Show(ex.Message); }
-
-            //获取岗位资源相关信息
-            DataTable dt = (DataTable)dh.ExecuteSql("select sc_linecode,sc_stepcode,st_badgroupcode from source left join step on sc_stepcode=st_code where sc_code='" + isource + "'", "select");
-            if (dt.Rows.Count > 0)
-            {
-                ilinecode = dt.Rows[0]["sc_linecode"].ToString();
-                istepcode = dt.Rows[0]["sc_stepcode"].ToString();
-                ibadgroup = dt.Rows[0]["st_badgroupcode"].ToString();
-            }
-            dt = (DataTable)dh.ExecuteSql("select st_name,st_code from step", "select");
-            Device.DataSource = dt;
-            Device.DisplayMember = "st_name";
-            Device.ValueMember = "st_code";
         }
 
         private void ConnectDB()
@@ -135,14 +128,9 @@ namespace FileWatcher
                     return;
                 }
             }
-            //存在工单必须是已下放状态
-            if ((!dh.CheckExist("make", "ma_code='" + ma_code.Text + "'") || ma_code.Text == ""))
-            {
-                OperateResult.AppendText("工单不存在或者未下放\n");
-                return;
-            }
+
             XmlWatcher.Path = FolderPath.Text;
-            XmlWatcher.Filter = "*.txt";
+            XmlWatcher.Filter = "*.*";
             XmlWatcher.EnableRaisingEvents = true;
             //设置缓存数据
             //BaseUtil.SetCacheData("FolderPath", FolderPath.Text);
@@ -155,7 +143,6 @@ namespace FileWatcher
             StartWatch.Enabled = false;
             ChooseFolder.Enabled = false;
             Master.Enabled = false;
-            ma_code.Enabled = false;
             StopWatch.Enabled = true;
             OperateResult.AppendText("开始执行监控\n");
         }
@@ -169,7 +156,14 @@ namespace FileWatcher
 
         private void XmlWatcher_Created(object sender, FileSystemEventArgs e)
         {
-
+            string[] str = fieltype.Split('#');
+            for (int i = 0; i < str.Length; i++)
+            {
+                if (e.FullPath.EndsWith(str[i]))
+                {
+                    TxtHandleProcess(e.FullPath);
+                }
+            }
         }
 
         private void TxtHandleProcess(string FileName)
@@ -183,24 +177,15 @@ namespace FileWatcher
                 string folderpath = FileName.Substring(0, FileName.LastIndexOf(@"\"));
                 string SN = FileName.Substring(FileName.LastIndexOf(@"\") + 1);
                 {
-                    string makecode = ma_code.Text;
-                    DataTable dt = (DataTable)dh.ExecuteSql("select sc_linecode,sc_stepcode,st_badgroupcode from source left join step on sc_stepcode=st_code where sc_code='" + isource + "'", "select");
-                    if (dt.Rows.Count > 0)
-                    {
-                        ilinecode = dt.Rows[0]["sc_linecode"].ToString();
-                        istepcode = dt.Rows[0]["sc_stepcode"].ToString();
-                        ibadgroup = dt.Rows[0]["st_badgroupcode"].ToString();
-                    }
-                    ma_code.Text = makecode;
                     try
                     {
-                        string ftppath = "/" + imaster + "/" + DateTime.Now.ToString("yyyy-MM-dd") + "/";
+                        string ftppath = "/" + DateTime.Now.ToString("yyyy-MM-dd") + "/";
                         ftp.UpLoadFile(folderpath, SN, ftppath, "");
-                        int num = int.Parse(dh.ExecuteSql("insert into STEPTESTDETAIL (std_id,std_sn,std_makecode,std_indate,std_class,STD_RESCODE,std_stepcode)select STEPTESTDETAIL_seq.nextval,'" + SN + "','" + ma_code + "',sysdate,'http://81.71.42.91:8099/ftp/" + imaster + "/" + ftppath + SN + ".txt" + "','" + isource + "','" + Device.SelectedValue + "' from dual", "insert").ToString());
+                        int num = int.Parse(dh.ExecuteSql("insert into STEPTESTDETAIL (std_id,std_sn,std_makecode,std_indate,std_class,STD_RESCODE,std_stepcode)select STEPTESTDETAIL_seq.nextval,'" + SN + "','',sysdate,'" + ftpulr.Split('#')[0] + imaster + "/" + ftppath + SN + ".txt" + "','" + isource + "','' from dual", "insert").ToString());
                         if (num > 0)
                         {
                             OperateResult.AppendText("序列号:" + SN + "上传成功\n");
-                            File.Delete(FileName);
+                            //File.Delete(FileName);
                         }
                     }
                     catch (Exception ex)
@@ -219,7 +204,6 @@ namespace FileWatcher
         {
             XmlWatcher.EnableRaisingEvents = false;
             StartWatch.Enabled = true;
-            ma_code.Enabled = true;
             Master.Enabled = true;
             ChooseFolder.Enabled = true;
 
@@ -293,20 +277,20 @@ namespace FileWatcher
 
         private void BatchAnalysus_Click(object sender, EventArgs e)
         {
-            var AllXmls = Directory.GetFiles(FolderPath.Text, "*.txt");
-            foreach (var Xml in AllXmls)
-            {
-                TxtHandleProcess(Xml);
-            }
+            //var AllXmls = Directory.GetFiles(FolderPath.Text, "*.txt");
+            //foreach (var Xml in AllXmls)
+            //{
+            //    TxtHandleProcess(Xml);
+            //}
         }
 
         private void Timer_Tick(object sender, EventArgs e)
         {
-            var AllXmls = Directory.GetFiles(FolderPath.Text, "*.*", SearchOption.AllDirectories).Where(s => s.EndsWith(".txt") || s.EndsWith(".ini"));
-            foreach (var Xml in AllXmls)
-            {
-                TxtHandleProcess(Xml);
-            }
+            //var AllXmls = Directory.GetFiles(FolderPath.Text, "*.*", SearchOption.AllDirectories).Where(s => s.EndsWith(".txt") || s.EndsWith(".ini"));
+            //foreach (var Xml in AllXmls)
+            //{
+            //    TxtHandleProcess(Xml);
+            //}
         }
     }
 }

+ 2 - 2
FileWatcher/DataHelper.cs

@@ -9,9 +9,9 @@ namespace FileWatcher
    public class DataHelper
     {
         //系统默认的的连接字符串
-        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DGW;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         //用户选择的数据库的连接字符串
-        public static string DBConnectionString= "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DGW;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        public static string DBConnectionString= "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         public static OracleConnection connection = null;
         OracleCommand command = null;
         int ReconnectTime = 0;

+ 2 - 2
FileWatcher/Form4.cs

@@ -49,11 +49,11 @@ namespace FileWatcher
             string json = "";
             string json1 = "";
             MESHelper mes = new MESHelper();
-            mes.GetMEIOrNetCodeRange(null, "354904108016523", "", out json1, out json);
+            mes.GetMEIOrNetCodeRange("204295642X000002", "", "", out json1, out json);
             //mes.GetMobileAllInfo("F45112235030001",  out json1, out json);
             //Console.WriteLine(mes.CheckRoutePassed("S558B231013033559", "IMEI-01", out json));
             //Console.WriteLine(mes.GetMEIOrNetCodeRange(null, "352977841215497", null, out json1, out json));
-
+            Console.WriteLine(json1);
             Console.WriteLine(json);
 
             //mes.CheckRoutePassed( "204295638R002314", "ZZ_01_ATI", out json);

+ 1 - 1
FileWatcher/Login.cs

@@ -18,7 +18,7 @@ namespace FileWatcher
         private void CheckLogin_Click(object sender, EventArgs e)
         {
             string ErrMessage = "";
-            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + Master.Text + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.101.253)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + Master.Text + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             //重新执行一遍构造函数使得重置之后的链接字符串生效
             dh = new DataHelper();
             AutoAnalysisXmlByStep.dh = dh;

+ 1 - 1
FileWatcher/Program.cs

@@ -45,7 +45,7 @@ namespace FileWatcher
                 Application.EnableVisualStyles();
                 Application.SetCompatibleTextRenderingDefault(false);
                 if (principal.IsInRole(WindowsBuiltInRole.Administrator))
-                    Application.Run(new AutoAnalysisXml());
+                    Application.Run(new Form4());
                 else
                 {
                     //创建启动对象

+ 6 - 6
FileWatcher/SOP.cs

@@ -37,10 +37,10 @@ namespace FileWatcher
         {
             pr_code.Text = FilePath.Text.Substring(FilePath.Text.LastIndexOf(@"\") + 1).Replace(".xls", "").Replace(".xlsx", "");
             pr_code_Leave(new object(), new EventArgs());
-            DataTable dt = (DataTable)dh.ExecuteSql("select * from productsop where instr('" + pr_code.Text + "',ps_prodcode)>0 ", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select * from productsop where ps_prodcode='" + pr_code.Text + "' ", "select");
             if (dt.Rows.Count == 0)
             {
-                DataTable dt1 = (DataTable)dh.ExecuteSql("select pr_code from product where instr('" + pr_code.Text + "',pr_code)>0", "select");
+                DataTable dt1 = (DataTable)dh.ExecuteSql("select pr_code from product where pr_code='" + pr_code.Text + "'", "select");
                 if (dt1.Rows.Count > 0)
                 {
                     string code = LogicHandler.GetPiInoutCode("ProductSOP", "1");
@@ -92,8 +92,8 @@ namespace FileWatcher
                 {
                     Directory.CreateDirectory(Application.StartupPath + @"\" + pr_code.Text);
                 }
-                sheet.Pictures.Add(0, 18, @"图片\电子受控章.png");
-                sheet.Pictures.Add(0, 15, @"图片\签名.png");
+                //sheet.Pictures.Add(0, 18, @"图片\电子受控章.png");
+                //sheet.Pictures.Add(0, 15, @"图片\签名.png");
                 sheet.PageSetup.LeftMargin = 0;
                 sheet.PageSetup.RightMargin = 0;
                 sheet.PageSetup.BottomMargin = 0;
@@ -110,7 +110,7 @@ namespace FileWatcher
                 dic.Add("em_code", "ADMIN");
                 dic.Add("caller", "ProductSOP");
                 OperatResult.AppendText("上传文件【" + sheet.Name + ".jpg" + "】\n");
-                string fp_id = UploadFilesToRemoteUrl("http://192.168.101.253:8099/mes/MEScommon/uploadFiles.action?_noc=1", Application.StartupPath + @"\" + pr_code.Text + @"\" + sheet.Name + ".jpg", dic);
+                string fp_id = UploadFilesToRemoteUrl("http://10.98.0.21:8099/mes/MEScommon/uploadFiles.action?_noc=1", Application.StartupPath + @"\" + pr_code.Text + @"\" + sheet.Name + ".jpg", dic);
                 if (fp_id != "")
                 {
                     dh.ExecuteSql("update ProductSOP set ps_attachsop=ps_attachsop||" + fp_id + "||';' where ps_prodcode='" + pr_code.Text + "'", "update");
@@ -343,7 +343,7 @@ namespace FileWatcher
 
         private void LoadPrCode()
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select pr_code,pr_spec,pr_detail from product where instr('" + pr_code.Text + "',pr_code)>0", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select pr_code,pr_spec,pr_detail from product where pr_code='" + pr_code.Text + "'", "select");
             if (dt.Rows.Count > 0)
             {
                 pr_spec.Clear();

+ 13 - 0
FileWatcher/ftpOperater.cs

@@ -33,6 +33,19 @@ namespace FileWatcher
             //status = BaseUtil.connectState(FTPInf);
         }
 
+        public ftpOperater(string IP,string user,string password)
+        {
+        
+            this.ftpServerIP = IP;
+            this.ftpUser = user;
+            this.ftpPwd = password;
+            //string FTPInf = Properties.Settings.Default.Properties["FTPAddress"].DefaultValue.ToString();
+
+            //连接共享文件夹
+            //status = BaseUtil.connectState(FTPInf);
+        }
+
+
         #region
         public void UpLoadFile(string filepath, string filename, string UploadFolder,string BackUp)
         {

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

@@ -131,6 +131,7 @@
             this.CombindetailThree = new System.Windows.Forms.CheckBox();
             this.cu_controlinout = new System.Windows.Forms.Label();
             this.CheckDC = new System.Windows.Forms.CheckBox();
+            this.forinput = new System.Windows.Forms.CheckBox();
             this.richTextAutoBottom1 = new UAS_LabelMachine.CustomControl.RichText.RichTextAutoBottom();
             this.groupBoxWithBorder2 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.label15 = new System.Windows.Forms.Label();
@@ -172,7 +173,6 @@
             this.SingleBoxBegin = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.label12 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
-            this.SingleLabelPrint = new System.Windows.Forms.Button();
             this.Input = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
             this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -217,6 +217,7 @@
             this.label13 = new System.Windows.Forms.Label();
             this.CurrentBoxNum = new System.Windows.Forms.NumericUpDown();
             this.SingleLabelPrinter = new UAS_LabelMachine.CustomControl.PrinterCombox();
+            this.SingleLabelPrint = new System.Windows.Forms.Button();
             this.SingleLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.SingleLabelCombox = new System.Windows.Forms.ComboBox();
             this.MidLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
@@ -249,7 +250,6 @@
             this.OutboxCapacity = new System.Windows.Forms.NumericUpDown();
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
-            this.forinput = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.ShowMenu_Total.SuspendLayout();
@@ -1252,6 +1252,18 @@
             this.CheckDC.Text = "校验DC";
             this.CheckDC.UseVisualStyleBackColor = true;
             // 
+            // forinput
+            // 
+            this.forinput.AutoSize = true;
+            this.forinput.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.forinput.Location = new System.Drawing.Point(951, 156);
+            this.forinput.Margin = new System.Windows.Forms.Padding(4);
+            this.forinput.Name = "forinput";
+            this.forinput.Size = new System.Drawing.Size(142, 35);
+            this.forinput.TabIndex = 124;
+            this.forinput.Text = "持续输入";
+            this.forinput.UseVisualStyleBackColor = true;
+            // 
             // richTextAutoBottom1
             // 
             this.richTextAutoBottom1.Location = new System.Drawing.Point(12, 1460);
@@ -1283,7 +1295,7 @@
             // 
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label15.Location = new System.Drawing.Point(11, 34);
+            this.label15.Location = new System.Drawing.Point(17, 40);
             this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label15.Name = "label15";
             this.label15.Size = new System.Drawing.Size(62, 31);
@@ -1353,7 +1365,7 @@
             this.Weight.AutoSize = true;
             this.Weight.Font = new System.Drawing.Font("微软雅黑", 25F);
             this.Weight.ForeColor = System.Drawing.Color.Red;
-            this.Weight.Location = new System.Drawing.Point(69, 122);
+            this.Weight.Location = new System.Drawing.Point(75, 128);
             this.Weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.Weight.Name = "Weight";
             this.Weight.Size = new System.Drawing.Size(0, 88);
@@ -1461,7 +1473,7 @@
             this.pd_whcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.pd_whcode.DataPropertyName = "pd_whcode";
             this.pd_whcode.HeaderText = "仓别";
-            this.pd_whcode.MinimumWidth = 10;
+            this.pd_whcode.MinimumWidth = 50;
             this.pd_whcode.Name = "pd_whcode";
             this.pd_whcode.Width = 103;
             // 
@@ -1488,9 +1500,9 @@
             this.pd_pocode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.pd_pocode1.DataPropertyName = "pd_pocode";
             this.pd_pocode1.HeaderText = "客户PO";
-            this.pd_pocode1.MinimumWidth = 200;
+            this.pd_pocode1.MinimumWidth = 150;
             this.pd_pocode1.Name = "pd_pocode1";
-            this.pd_pocode1.Width = 200;
+            this.pd_pocode1.Width = 150;
             // 
             // pd_prodcode
             // 
@@ -1504,35 +1516,36 @@
             // 
             // CollectedNum
             // 
-            this.CollectedNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.CollectedNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.CollectedNum.DataPropertyName = "CollectedNum";
             this.CollectedNum.HeaderText = "已采数";
-            this.CollectedNum.MinimumWidth = 10;
+            this.CollectedNum.MinimumWidth = 80;
             this.CollectedNum.Name = "CollectedNum";
             this.CollectedNum.ReadOnly = true;
-            this.CollectedNum.Width = 127;
+            this.CollectedNum.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.CollectedNum.Width = 150;
             // 
             // UnCollectedNum
             // 
-            this.UnCollectedNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.UnCollectedNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.UnCollectedNum.DataPropertyName = "UnCollectedNum";
             this.UnCollectedNum.HeaderText = "未采集";
-            this.UnCollectedNum.MinimumWidth = 10;
+            this.UnCollectedNum.MinimumWidth = 80;
             this.UnCollectedNum.Name = "UnCollectedNum";
             this.UnCollectedNum.ReadOnly = true;
             this.UnCollectedNum.Visible = false;
-            this.UnCollectedNum.Width = 200;
+            this.UnCollectedNum.Width = 80;
             // 
             // pd_outqty
             // 
-            this.pd_outqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.pd_outqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.pd_outqty.DataPropertyName = "pd_outqty";
             this.pd_outqty.HeaderText = "出库数量";
-            this.pd_outqty.MinimumWidth = 10;
+            this.pd_outqty.MinimumWidth = 110;
             this.pd_outqty.Name = "pd_outqty";
             this.pd_outqty.ReadOnly = true;
             this.pd_outqty.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.pd_outqty.Width = 112;
+            this.pd_outqty.Width = 110;
             // 
             // pr_unit
             // 
@@ -1547,14 +1560,14 @@
             // 
             // pd_brand
             // 
-            this.pd_brand.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.pd_brand.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.pd_brand.DataPropertyName = "pd_brand";
             this.pd_brand.HeaderText = "品牌";
             this.pd_brand.MinimumWidth = 10;
             this.pd_brand.Name = "pd_brand";
             this.pd_brand.ReadOnly = true;
             this.pd_brand.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.pd_brand.Width = 64;
+            this.pd_brand.Width = 200;
             // 
             // pjd_zxbzs_user
             // 
@@ -1579,7 +1592,7 @@
             // 
             this.checknum.DataPropertyName = "checknum";
             this.checknum.HeaderText = "复核数量";
-            this.checknum.MinimumWidth = 10;
+            this.checknum.MinimumWidth = 100;
             this.checknum.Name = "checknum";
             this.checknum.Width = 200;
             // 
@@ -1617,7 +1630,7 @@
             // 
             this.label17.AutoSize = true;
             this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label17.Location = new System.Drawing.Point(34, 287);
+            this.label17.Location = new System.Drawing.Point(40, 293);
             this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label17.Name = "label17";
             this.label17.Size = new System.Drawing.Size(110, 31);
@@ -1653,7 +1666,7 @@
             // 
             this.label18.AutoSize = true;
             this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label18.Location = new System.Drawing.Point(139, 185);
+            this.label18.Location = new System.Drawing.Point(145, 191);
             this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(24, 31);
@@ -1688,7 +1701,7 @@
             // 
             this.label16.AutoSize = true;
             this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label16.Location = new System.Drawing.Point(140, 93);
+            this.label16.Location = new System.Drawing.Point(146, 99);
             this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(24, 31);
@@ -1723,7 +1736,7 @@
             // 
             this.label12.AutoSize = true;
             this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label12.Location = new System.Drawing.Point(34, 140);
+            this.label12.Location = new System.Drawing.Point(40, 146);
             this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(110, 31);
@@ -1734,26 +1747,13 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(34, 45);
+            this.label7.Location = new System.Drawing.Point(40, 51);
             this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(110, 31);
             this.label7.TabIndex = 76;
             this.label7.Text = "单盘范围";
             // 
-            // SingleLabelPrint
-            // 
-            this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrint.Location = new System.Drawing.Point(38, 357);
-            this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
-            this.SingleLabelPrint.Name = "SingleLabelPrint";
-            this.SingleLabelPrint.Size = new System.Drawing.Size(136, 52);
-            this.SingleLabelPrint.TabIndex = 36;
-            this.SingleLabelPrint.Text = "打印盘标";
-            this.SingleLabelPrint.UseVisualStyleBackColor = true;
-            this.SingleLabelPrint.Click += new System.EventHandler(this.SingleLabelPrint_Click);
-            // 
             // Input
             // 
             this.Input.ID = null;
@@ -2186,7 +2186,7 @@
             // 
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(53, 296);
+            this.label14.Location = new System.Drawing.Point(59, 302);
             this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label14.Name = "label14";
             this.label14.Size = new System.Drawing.Size(155, 36);
@@ -2206,7 +2206,7 @@
             // 
             this.label13.AutoSize = true;
             this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label13.Location = new System.Drawing.Point(53, 250);
+            this.label13.Location = new System.Drawing.Point(59, 256);
             this.label13.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label13.Name = "label13";
             this.label13.Size = new System.Drawing.Size(155, 36);
@@ -2232,11 +2232,24 @@
             this.SingleLabelPrinter.Size = new System.Drawing.Size(304, 50);
             this.SingleLabelPrinter.TabIndex = 40;
             // 
+            // SingleLabelPrint
+            // 
+            this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SingleLabelPrint.Location = new System.Drawing.Point(23, 359);
+            this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.SingleLabelPrint.Name = "SingleLabelPrint";
+            this.SingleLabelPrint.Size = new System.Drawing.Size(136, 52);
+            this.SingleLabelPrint.TabIndex = 36;
+            this.SingleLabelPrint.Text = "打印盘标";
+            this.SingleLabelPrint.UseVisualStyleBackColor = true;
+            this.SingleLabelPrint.Click += new System.EventHandler(this.SingleLabelPrint_Click);
+            // 
             // SingleLabelAutoPrint
             // 
             this.SingleLabelAutoPrint.AutoSize = true;
             this.SingleLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(32, 199);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(38, 205);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
@@ -2282,7 +2295,7 @@
             // 
             this.AutoPrintMidBox.AutoSize = true;
             this.AutoPrintMidBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoPrintMidBox.Location = new System.Drawing.Point(16, 368);
+            this.AutoPrintMidBox.Location = new System.Drawing.Point(22, 374);
             this.AutoPrintMidBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AutoPrintMidBox.Name = "AutoPrintMidBox";
             this.AutoPrintMidBox.Size = new System.Drawing.Size(166, 35);
@@ -2294,7 +2307,7 @@
             // 
             this.CurrentRowOnly.AutoSize = true;
             this.CurrentRowOnly.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CurrentRowOnly.Location = new System.Drawing.Point(185, 208);
+            this.CurrentRowOnly.Location = new System.Drawing.Point(191, 214);
             this.CurrentRowOnly.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.CurrentRowOnly.Name = "CurrentRowOnly";
             this.CurrentRowOnly.Size = new System.Drawing.Size(166, 35);
@@ -2325,7 +2338,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(31, 250);
+            this.label2.Location = new System.Drawing.Point(37, 256);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(62, 31);
@@ -2349,7 +2362,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(31, 315);
+            this.label5.Location = new System.Drawing.Point(37, 321);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(62, 31);
@@ -2381,7 +2394,7 @@
             // 
             this.MidLabelAutoPrint.AutoSize = true;
             this.MidLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelAutoPrint.Location = new System.Drawing.Point(33, 208);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(39, 214);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
@@ -2435,7 +2448,7 @@
             // 
             this.AutoPrintOutBox.AutoSize = true;
             this.AutoPrintOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoPrintOutBox.Location = new System.Drawing.Point(151, 181);
+            this.AutoPrintOutBox.Location = new System.Drawing.Point(157, 187);
             this.AutoPrintOutBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AutoPrintOutBox.Name = "AutoPrintOutBox";
             this.AutoPrintOutBox.Size = new System.Drawing.Size(118, 35);
@@ -2447,7 +2460,7 @@
             // 
             this.AutoSetOutBox.AutoSize = true;
             this.AutoSetOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoSetOutBox.Location = new System.Drawing.Point(22, 223);
+            this.AutoSetOutBox.Location = new System.Drawing.Point(28, 229);
             this.AutoSetOutBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AutoSetOutBox.Name = "AutoSetOutBox";
             this.AutoSetOutBox.Size = new System.Drawing.Size(142, 35);
@@ -2459,7 +2472,7 @@
             // 
             this.DiffDetno.AutoSize = true;
             this.DiffDetno.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffDetno.Location = new System.Drawing.Point(264, 375);
+            this.DiffDetno.Location = new System.Drawing.Point(270, 381);
             this.DiffDetno.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffDetno.Name = "DiffDetno";
             this.DiffDetno.Size = new System.Drawing.Size(133, 34);
@@ -2471,7 +2484,7 @@
             // 
             this.DiffCPN.AutoSize = true;
             this.DiffCPN.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffCPN.Location = new System.Drawing.Point(264, 331);
+            this.DiffCPN.Location = new System.Drawing.Point(270, 337);
             this.DiffCPN.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffCPN.Name = "DiffCPN";
             this.DiffCPN.Size = new System.Drawing.Size(135, 34);
@@ -2483,7 +2496,7 @@
             // 
             this.BoxCount.AutoSize = true;
             this.BoxCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BoxCount.Location = new System.Drawing.Point(317, 429);
+            this.BoxCount.Location = new System.Drawing.Point(323, 435);
             this.BoxCount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.BoxCount.Name = "BoxCount";
             this.BoxCount.Size = new System.Drawing.Size(0, 31);
@@ -2493,7 +2506,7 @@
             // 
             this.DiffLotNo.AutoSize = true;
             this.DiffLotNo.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffLotNo.Location = new System.Drawing.Point(264, 283);
+            this.DiffLotNo.Location = new System.Drawing.Point(270, 289);
             this.DiffLotNo.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffLotNo.Name = "DiffLotNo";
             this.DiffLotNo.Size = new System.Drawing.Size(118, 34);
@@ -2505,7 +2518,7 @@
             // 
             this.DiffDC.AutoSize = true;
             this.DiffDC.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffDC.Location = new System.Drawing.Point(264, 231);
+            this.DiffDC.Location = new System.Drawing.Point(270, 237);
             this.DiffDC.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffDC.Name = "DiffDC";
             this.DiffDC.Size = new System.Drawing.Size(121, 34);
@@ -2517,7 +2530,7 @@
             // 
             this.OnlyOneRow.AutoSize = true;
             this.OnlyOneRow.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.OnlyOneRow.Location = new System.Drawing.Point(264, 183);
+            this.OnlyOneRow.Location = new System.Drawing.Point(270, 189);
             this.OnlyOneRow.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.OnlyOneRow.Name = "OnlyOneRow";
             this.OnlyOneRow.Size = new System.Drawing.Size(111, 34);
@@ -2529,7 +2542,7 @@
             // 
             this.AllLabel.AutoSize = true;
             this.AllLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AllLabel.Location = new System.Drawing.Point(22, 181);
+            this.AllLabel.Location = new System.Drawing.Point(28, 187);
             this.AllLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AllLabel.Name = "AllLabel";
             this.AllLabel.Size = new System.Drawing.Size(142, 35);
@@ -2552,7 +2565,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(281, 40);
+            this.LogingOut.Location = new System.Drawing.Point(287, 46);
             this.LogingOut.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(82, 41);
@@ -2580,7 +2593,7 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(62, 323);
+            this.label10.Location = new System.Drawing.Point(68, 329);
             this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(62, 31);
@@ -2591,7 +2604,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(62, 276);
+            this.label6.Location = new System.Drawing.Point(68, 282);
             this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(62, 31);
@@ -2646,18 +2659,6 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
-            // forinput
-            // 
-            this.forinput.AutoSize = true;
-            this.forinput.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.forinput.Location = new System.Drawing.Point(951, 156);
-            this.forinput.Margin = new System.Windows.Forms.Padding(4);
-            this.forinput.Name = "forinput";
-            this.forinput.Size = new System.Drawing.Size(142, 35);
-            this.forinput.TabIndex = 124;
-            this.forinput.Text = "持续输入";
-            this.forinput.UseVisualStyleBackColor = true;
-            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);

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

@@ -719,13 +719,21 @@ namespace UAS_LabelMachine
                 if (LabelInf.Rows.Count > 0)
                     LabelInf.Rows[LabelInf.Rows.Count - 1].Selected = true;
                 if (AutoPrintMidBox.Checked)
+                {
+                    CheckPassWord = false;
                     MidLabelPrint.PerformClick();
+                    CheckPassWord = true;
+                }
             }
             //采集达到了数量进行换行
             if (CollectQty == double.Parse(CurrentPrCount))
             {
                 if (AutoPrintMidBox.Checked && (CollectQty / double.Parse(CurrentZXBZ) % double.Parse(MidboxCapacity.Value.ToString()) != 0))
+                {
+                    CheckPassWord = false;
                     MidLabelPrint.PerformClick();
+                    CheckPassWord = true;
+                }
                 //需要换行,当前最后一盒
                 DataGridViewSelectedRowCollection selectrow = GridPrcode.SelectedRows;
                 if (selectrow.Count > 0)
@@ -998,10 +1006,23 @@ namespace UAS_LabelMachine
                     Dictionary<string, bool> outboxcode1 = new Dictionary<string, bool>();
                     //判断所有盒号为该盒的是否勾选已采集
                     outboxcode1.Add(LabelInf.Rows[0].Cells["pib_outboxcode1"].Value.ToString(), true);
+                    bool NeedPassword = false;
                     for (int i = 0; i < LabelInf.Rows.Count; i++)
                     {
                         if (!SingleID.Contains(LabelInf.Rows[i].Cells["pib_id1"].Value.ToString()))
                             SingleID.Add(LabelInf.Rows[i].Cells["pib_id1"].Value.ToString());
+                        if (LabelInf.Rows[i].Cells["pib_ifprint"].FormattedValue.ToString().ToUpper() == "TRUE")
+                        {
+                            NeedPassword = true;
+                        }
+                    }
+                    if (NeedPassword)
+                    {
+                        if (PassCheck() != dh.getFieldDataByCondition("configs", "data", "code='PassWord' and caller='BarCodeSetting'").ToString())
+                        {
+                            MessageBox.Show("密码不正确,不允许操作");
+                            return;
+                        }
                     }
                     if (SingleID.ToArray().Length == 0)
                     {
@@ -1081,11 +1102,6 @@ namespace UAS_LabelMachine
 
         private void SingleLabelPrint_Click(object sender, EventArgs e)
         {
-            if (PassCheck() != dh.getFieldDataByCondition("configs", "data", "code='PassWord' and caller='BarCodeSetting'").ToString())
-            {
-                MessageBox.Show("密码不正确,不允许操作");
-                return;
-            }
             if (SingleLabelCombox.Text != "")
             {
                 if (SingleBoxBegin.Text != "" || SingleBoxEnd.Text != "")
@@ -1098,6 +1114,7 @@ namespace UAS_LabelMachine
                         {
                             for (int i = begin - 1; i < end; i++)
                             {
+
                                 LabelInf.Rows[i].Cells["Choose"].Value = true;
                                 LabelInf.Rows[i].Cells["pib_ifprint"].Value = false;
                             }
@@ -1129,6 +1146,11 @@ namespace UAS_LabelMachine
 
         private void MidBoxLabelPrint()
         {
+            //if (CheckPassWord && PassCheck() != dh.getFieldDataByCondition("configs", "data", "code='PassWord' and caller='BarCodeSetting'").ToString())
+            //{
+            //    MessageBox.Show("密码不正确,不允许操作");
+            //    return;
+            //}
             //未输入内容打印全部中盒
             if (MidLabelNum.Text == "")
             {
@@ -1552,6 +1574,7 @@ namespace UAS_LabelMachine
                 string close = MessageBox.Show(this.ParentForm, "删除后不可恢复,是否确认删除", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (close.ToString() == "Yes")
                 {
+                    dh.BatchInsert("insert into prodiobarcode_delete select * from prodiobarcode where pib_id=:pib_id", new string[] { "pib_id" }, DeleteID.ToArray());
                     dh.BatchInsert("delete from prodiobarcode where pib_id=:pib_id", new string[] { "pib_id" }, DeleteID.ToArray());
                     dh.UpdateByCondition("CS$InoutPrcode", "collectednum=(select nvl(sum(pib_qty),0) from prodiobarcode where pib_inoutno=pd_inoutno and pib_pdno=pd_pdno)", "pd_inoutno='" + pi_inoutno.Text + "'");
                     //dh.UpdateByCondition("CS$InoutPrcode", "checknum=CollectedNum/pjd_zxbzs_user", "pd_inoutno='" + pi_inoutno.Text + "'");
@@ -1584,11 +1607,11 @@ namespace UAS_LabelMachine
 
         private void OutBoxLabelPrint_Click(object sender, EventArgs e)
         {
-            if (CheckPassWord && PassCheck() != dh.getFieldDataByCondition("configs", "data", "code='PassWord' and caller='BarCodeSetting'").ToString())
-            {
-                MessageBox.Show("密码不正确,不允许操作");
-                return;
-            }
+            //if (CheckPassWord && PassCheck() != dh.getFieldDataByCondition("configs", "data", "code='PassWord' and caller='BarCodeSetting'").ToString())
+            //{
+            //    MessageBox.Show("密码不正确,不允许操作");
+            //    return;
+            //}
             if (OutBoxCombox.Text != "")
             {
                 Pack_Click(sender, e);

+ 1 - 1
UAS_MES_LGDZ/CustomControl/HeadBar/HeadBar.cs

@@ -122,7 +122,7 @@ namespace UAS_MES_NEW.CustomControl
                 if (logout_confirm == "Yes")
                 {
                     //注销的时候切换回默认数据库
-                    SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+                    SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.11.28.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
                     DataHelper.DBConnectionString = SystemInf.ConnectionString;
                     //清除上个用户的权限信息
                     SystemInf.Caller.Clear();

+ 2 - 2
UAS_MES_LGDZ/DataOperate/DataHelper.cs

@@ -10,11 +10,11 @@ namespace UAS_MES_NEW.DataOperate
     class DataHelper
     {
         //系统默认的的连接字符串
-        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.11.28.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
 
         //public static readonly string ERPAddesss = "http://218.64.89.153:8099/mes/";
 
-        public static readonly string ERPAddesss = "http://10.98.0.21:8099/mes/";
+        public static readonly string ERPAddesss = "http://10.11.28.21:8099/mes/";
 
         //用户选择的数据库的连接字符串
         public static string DBConnectionString;

+ 30 - 0
UAS_MES_LGDZ/FunctionCode/Make/Make_CollectNetCode.cs

@@ -67,6 +67,35 @@ namespace UAS_MES_NEW.Make
                     {
                         //判断界面工单是否为空时的序列号是否自动归属工单
                         string oStatus = "";
+                        dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + sncode.Text + "' order by ms_id desc", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                        }
+                        else
+                        {
+                            dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + sncode.Text + "' order by ms_id desc", "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                            }
+                            else
+                            {
+                                dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei1='" + sncode.Text + "' order by mil_id desc", "select");
+                                if (dt.Rows.Count > 0)
+                                {
+                                    sncode.Text = dt.Rows[0]["mil_sncode"].ToString();
+                                }
+                                else
+                                {
+                                    dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei2='" + sncode.Text + "' order by mil_id desc", "select");
+                                    if (dt.Rows.Count > 0)
+                                    {
+                                        sncode.Text = dt.Rows[0]["mil_sncode"].ToString();
+                                    }
+                                }
+                            }
+                        }
                         if (!LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out oStatus, out ErrorMessage2))
                         {
                             if (ms_makecode.Text == "")
@@ -75,6 +104,7 @@ namespace UAS_MES_NEW.Make
                                 return;
                             }
                         }
+                       
                         OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
                         // 获取工单归属工单下一工序是否正确
                         if (LogicHandler.CheckStepSNAndMacode(ms_makecode.Text == "" ? oMakeCode : ms_makecode.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage2))

+ 111 - 8
UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxLabelPrint.Designer.cs

@@ -54,6 +54,13 @@
             this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.locksalecode = new System.Windows.Forms.CheckBox();
+            this.PrintSecond = new System.Windows.Forms.CheckBox();
+            this.PrintLabel1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.label7 = new System.Windows.Forms.Label();
+            this.PrintList1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.label8 = new System.Windows.Forms.Label();
+            this.PrintNum1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.label3 = new System.Windows.Forms.Label();
             this.SuspendLayout();
             // 
             // label2
@@ -71,7 +78,7 @@
             // 
             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(1450, 390);
+            this.label1.Location = new System.Drawing.Point(1450, 347);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(82, 41);
@@ -176,7 +183,7 @@
             this.CollectRemark.Checked = true;
             this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.CollectRemark.Location = new System.Drawing.Point(1458, 578);
+            this.CollectRemark.Location = new System.Drawing.Point(1458, 670);
             this.CollectRemark.Margin = new System.Windows.Forms.Padding(6);
             this.CollectRemark.Name = "CollectRemark";
             this.CollectRemark.Size = new System.Drawing.Size(155, 39);
@@ -187,7 +194,7 @@
             // Remark
             // 
             this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Remark.Location = new System.Drawing.Point(1450, 632);
+            this.Remark.Location = new System.Drawing.Point(1450, 724);
             this.Remark.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3);
             this.Remark.Name = "Remark";
             this.Remark.Size = new System.Drawing.Size(404, 156);
@@ -197,7 +204,7 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(1458, 491);
+            this.StepCount.Location = new System.Drawing.Point(1457, 613);
             this.StepCount.Margin = new System.Windows.Forms.Padding(6);
             this.StepCount.Name = "StepCount";
             this.StepCount.Size = new System.Drawing.Size(159, 45);
@@ -242,7 +249,7 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1578, 390);
+            this.PrintLabel.Location = new System.Drawing.Point(1578, 347);
             this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(264, 32);
@@ -308,9 +315,8 @@
             // 
             this.PrintNum.AllPower = null;
             this.PrintNum.BackColor = System.Drawing.Color.White;
-            this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(1468, 178);
+            this.PrintNum.Location = new System.Drawing.Point(1458, 184);
             this.PrintNum.Margin = new System.Windows.Forms.Padding(6);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Negative = false;
@@ -347,7 +353,7 @@
             this.OperateResult.Location = new System.Drawing.Point(28, 258);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(1408, 606);
+            this.OperateResult.Size = new System.Drawing.Size(1403, 606);
             this.OperateResult.TabIndex = 168;
             this.OperateResult.Text = "";
             // 
@@ -366,11 +372,101 @@
             this.locksalecode.Text = "当前订单锁定";
             this.locksalecode.UseVisualStyleBackColor = true;
             // 
+            // PrintSecond
+            // 
+            this.PrintSecond.AutoSize = true;
+            this.PrintSecond.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintSecond.ForeColor = System.Drawing.Color.Red;
+            this.PrintSecond.Location = new System.Drawing.Point(1458, 411);
+            this.PrintSecond.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintSecond.Name = "PrintSecond";
+            this.PrintSecond.Size = new System.Drawing.Size(162, 28);
+            this.PrintSecond.TabIndex = 211;
+            this.PrintSecond.Text = "打印副标签";
+            this.PrintSecond.UseVisualStyleBackColor = true;
+            // 
+            // PrintLabel1
+            // 
+            this.PrintLabel1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel1.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintLabel1.FormattingEnabled = true;
+            this.PrintLabel1.Location = new System.Drawing.Point(1578, 542);
+            this.PrintLabel1.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintLabel1.Name = "PrintLabel1";
+            this.PrintLabel1.Size = new System.Drawing.Size(264, 39);
+            this.PrintLabel1.TabIndex = 209;
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(1450, 537);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(101, 41);
+            this.label7.TabIndex = 210;
+            this.label7.Text = "标签1";
+            // 
+            // PrintList1
+            // 
+            this.PrintList1.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintList1.Location = new System.Drawing.Point(1578, 472);
+            this.PrintList1.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.PrintList1.Name = "PrintList1";
+            this.PrintList1.Size = new System.Drawing.Size(264, 56);
+            this.PrintList1.TabIndex = 208;
+            // 
+            // label8
+            // 
+            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(1443, 472);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(133, 41);
+            this.label8.TabIndex = 207;
+            this.label8.Text = "打印机1";
+            // 
+            // PrintNum1
+            // 
+            this.PrintNum1.AllPower = null;
+            this.PrintNum1.BackColor = System.Drawing.Color.White;
+            this.PrintNum1.ID = null;
+            this.PrintNum1.Location = new System.Drawing.Point(1726, 404);
+            this.PrintNum1.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum1.Name = "PrintNum1";
+            this.PrintNum1.Negative = false;
+            this.PrintNum1.Power = null;
+            this.PrintNum1.Size = new System.Drawing.Size(85, 35);
+            this.PrintNum1.Str = null;
+            this.PrintNum1.Str1 = null;
+            this.PrintNum1.Str2 = null;
+            this.PrintNum1.TabIndex = 213;
+            this.PrintNum1.Text = "1";
+            // 
+            // label3
+            // 
+            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(1632, 400);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(82, 41);
+            this.label3.TabIndex = 212;
+            this.label3.Text = "份数";
+            // 
             // Make_ColorBoxLabelPrint
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1876, 960);
+            this.Controls.Add(this.PrintNum1);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.PrintSecond);
+            this.Controls.Add(this.PrintLabel1);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.PrintList1);
+            this.Controls.Add(this.label8);
             this.Controls.Add(this.locksalecode);
             this.Controls.Add(this.CollectRemark);
             this.Controls.Add(this.Remark);
@@ -437,5 +533,12 @@
         private System.Windows.Forms.CheckBox CollectRemark;
         private CustomControl.RichText.RichTextAutoBottom Remark;
         private System.Windows.Forms.CheckBox locksalecode;
+        private System.Windows.Forms.CheckBox PrintSecond;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel1;
+        private System.Windows.Forms.Label label7;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrintList1;
+        private System.Windows.Forms.Label label8;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum1;
+        private System.Windows.Forms.Label label3;
     }
 }

+ 16 - 0
UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -277,6 +277,17 @@ namespace UAS_MES_NEW.Make
                                     {
                                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                                     }
+                                    if (PrintSecond.Checked)
+                                    {
+                                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, sncode.Text, int.Parse(PrintNum1.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
+                                        {
+                                            OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
+                                        }
+                                        else
+                                        {
+                                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                                        }
+                                    }
                                     if (CollectRemark.Checked && Remark.Text != "")
                                     {
                                         LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, pr_code.Text, Remark.Text);
@@ -351,6 +362,11 @@ namespace UAS_MES_NEW.Make
                 PrintLabel.DataSource = _dt;
                 PrintLabel.DisplayMember = "la_url";
                 PrintLabel.ValueMember = "la_id";
+
+                PrintLabel1.DataSource = _dt.Copy();
+                PrintLabel1.DisplayMember = "la_url";
+                PrintLabel1.ValueMember = "la_id";
+
                 pr_change = true;
             }
         }

+ 408 - 0
UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrintGetIMEI.Designer.cs

@@ -0,0 +1,408 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_FuselageLabelPrintGetIMEI
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            this.sncode_label = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.mcd_remainqty_label = new System.Windows.Forms.Label();
+            this.mcd_okqty_label = new System.Windows.Forms.Label();
+            this.pr_code_label = new System.Windows.Forms.Label();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.CollectRemark = new System.Windows.Forms.CheckBox();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
+            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.mcd_okqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.ma_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.SuspendLayout();
+            // 
+            // label2
+            // 
+            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(1398, 38);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(114, 41);
+            this.label2.TabIndex = 180;
+            this.label2.Text = "打印机";
+            // 
+            // label1
+            // 
+            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(1422, 216);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(82, 41);
+            this.label1.TabIndex = 179;
+            this.label1.Text = "标签";
+            // 
+            // pr_detail_label
+            // 
+            this.pr_detail_label.AutoSize = true;
+            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail_label.Location = new System.Drawing.Point(931, 42);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail_label.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
+            this.pr_detail_label.TabIndex = 171;
+            this.pr_detail_label.Text = "产品名称";
+            // 
+            // sncode_label
+            // 
+            this.sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.sncode_label.AutoSize = true;
+            this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sncode_label.Location = new System.Drawing.Point(24, 830);
+            this.sncode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.sncode_label.Name = "sncode_label";
+            this.sncode_label.Size = new System.Drawing.Size(114, 41);
+            this.sncode_label.TabIndex = 170;
+            this.sncode_label.Text = "序列号";
+            // 
+            // label4
+            // 
+            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(1366, 138);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(146, 41);
+            this.label4.TabIndex = 167;
+            this.label4.Text = "打印张数";
+            // 
+            // mcd_remainqty_label
+            // 
+            this.mcd_remainqty_label.AutoSize = true;
+            this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty_label.Location = new System.Drawing.Point(493, 136);
+            this.mcd_remainqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_remainqty_label.Name = "mcd_remainqty_label";
+            this.mcd_remainqty_label.Size = new System.Drawing.Size(114, 41);
+            this.mcd_remainqty_label.TabIndex = 166;
+            this.mcd_remainqty_label.Text = "剩余数";
+            // 
+            // mcd_okqty_label
+            // 
+            this.mcd_okqty_label.AutoSize = true;
+            this.mcd_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_okqty_label.Location = new System.Drawing.Point(24, 136);
+            this.mcd_okqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_okqty_label.Name = "mcd_okqty_label";
+            this.mcd_okqty_label.Size = new System.Drawing.Size(146, 41);
+            this.mcd_okqty_label.TabIndex = 165;
+            this.mcd_okqty_label.Text = "打印计数";
+            // 
+            // pr_code_label
+            // 
+            this.pr_code_label.AutoSize = true;
+            this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_code_label.Location = new System.Drawing.Point(493, 42);
+            this.pr_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_code_label.Name = "pr_code_label";
+            this.pr_code_label.Size = new System.Drawing.Size(146, 41);
+            this.pr_code_label.TabIndex = 164;
+            this.pr_code_label.Text = "产品编号";
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(25, 42);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(146, 41);
+            this.ms_makecode_label.TabIndex = 163;
+            this.ms_makecode_label.Text = "工单编号";
+            // 
+            // CollectRemark
+            // 
+            this.CollectRemark.AutoSize = true;
+            this.CollectRemark.Checked = true;
+            this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.CollectRemark.Location = new System.Drawing.Point(1437, 315);
+            this.CollectRemark.Margin = new System.Windows.Forms.Padding(6);
+            this.CollectRemark.Name = "CollectRemark";
+            this.CollectRemark.Size = new System.Drawing.Size(155, 39);
+            this.CollectRemark.TabIndex = 197;
+            this.CollectRemark.Text = "采集备注";
+            this.CollectRemark.UseVisualStyleBackColor = true;
+            // 
+            // LockMakeCode
+            // 
+            this.LockMakeCode.AutoSize = true;
+            this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LockMakeCode.LeaveEvent = false;
+            this.LockMakeCode.Location = new System.Drawing.Point(392, 48);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(6);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
+            this.LockMakeCode.TabIndex = 199;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = null;
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = null;
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(177, 46);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = null;
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(203, 42);
+            this.ma_code.TabIndex = 198;
+            this.ma_code.TableName = null;
+            this.ma_code.TextBoxEnable = true;
+            // 
+            // Remark
+            // 
+            this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Remark.Location = new System.Drawing.Point(1430, 370);
+            this.Remark.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3);
+            this.Remark.Name = "Remark";
+            this.Remark.Size = new System.Drawing.Size(378, 156);
+            this.Remark.TabIndex = 196;
+            this.Remark.Text = "";
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(931, 136);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(176, 45);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 183;
+            this.StepCount.Load += new System.EventHandler(this.StepCount_Load);
+            // 
+            // PrintLabel
+            // 
+            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel.FormattingEnabled = true;
+            this.PrintLabel.Location = new System.Drawing.Point(1534, 216);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.PrintLabel.Name = "PrintLabel";
+            this.PrintLabel.Size = new System.Drawing.Size(200, 32);
+            this.PrintLabel.TabIndex = 181;
+            this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
+            // 
+            // Printer
+            // 
+            this.Printer.Location = new System.Drawing.Point(1526, 38);
+            this.Printer.Margin = new System.Windows.Forms.Padding(8);
+            this.Printer.Name = "Printer";
+            this.Printer.Size = new System.Drawing.Size(212, 50);
+            this.Printer.TabIndex = 178;
+            // 
+            // mcd_remainqty
+            // 
+            this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty.Location = new System.Drawing.Point(617, 136);
+            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(37, 41);
+            this.mcd_remainqty.TabIndex = 177;
+            this.mcd_remainqty.Text = "0";
+            // 
+            // mcd_okqty
+            // 
+            this.mcd_okqty.AutoSize = true;
+            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_okqty.Location = new System.Drawing.Point(170, 136);
+            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_okqty.Name = "mcd_okqty";
+            this.mcd_okqty.Size = new System.Drawing.Size(37, 41);
+            this.mcd_okqty.TabIndex = 176;
+            this.mcd_okqty.Text = "0";
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.CutLength = null;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode.Location = new System.Drawing.Point(639, 42);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(266, 0);
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_prodcode.TabIndex = 175;
+            this.ma_prodcode.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.CutLength = null;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail.Location = new System.Drawing.Point(1089, 42);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(266, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.TabIndex = 174;
+            // 
+            // PrintNum
+            // 
+            this.PrintNum.AllPower = null;
+            this.PrintNum.BackColor = System.Drawing.Color.White;
+            this.PrintNum.Enabled = false;
+            this.PrintNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintNum.ID = null;
+            this.PrintNum.Location = new System.Drawing.Point(1534, 131);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum.Name = "PrintNum";
+            this.PrintNum.Negative = false;
+            this.PrintNum.Power = null;
+            this.PrintNum.Size = new System.Drawing.Size(200, 39);
+            this.PrintNum.Str = null;
+            this.PrintNum.Str1 = null;
+            this.PrintNum.Str2 = null;
+            this.PrintNum.TabIndex = 172;
+            this.PrintNum.Text = "1";
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = "ifall";
+            this.sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(190, 830);
+            this.sncode.Margin = new System.Windows.Forms.Padding(6);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(388, 35);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 169;
+            this.sncode.Tag = "ifRead";
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(1, 204);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(1360, 580);
+            this.OperateResult.TabIndex = 168;
+            this.OperateResult.Text = "";
+            // 
+            // Make_FuselageLabelPrint
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1828, 896);
+            this.Controls.Add(this.LockMakeCode);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.CollectRemark);
+            this.Controls.Add(this.Remark);
+            this.Controls.Add(this.StepCount);
+            this.Controls.Add(this.PrintLabel);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.Printer);
+            this.Controls.Add(this.mcd_remainqty);
+            this.Controls.Add(this.mcd_okqty);
+            this.Controls.Add(this.ma_prodcode);
+            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.PrintNum);
+            this.Controls.Add(this.pr_detail_label);
+            this.Controls.Add(this.sncode_label);
+            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.mcd_remainqty_label);
+            this.Controls.Add(this.mcd_okqty_label);
+            this.Controls.Add(this.pr_code_label);
+            this.Controls.Add(this.ms_makecode_label);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Name = "Make_FuselageLabelPrint";
+            this.Tag = "Make!FuselageLabelPrint";
+            this.Text = "Make_FuselageLabelPrint";
+            this.Activated += new System.EventHandler(this.Make_FuselageLabelPrint_Activated);
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_FuselageLabelPrint_FormClosing);
+            this.Load += new System.EventHandler(this.Make_FuselageLabelPrint_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_FuselageLabelPrint_SizeChanged);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
+        private CustomControl.ValueLabel.ValueNumLabel mcd_remainqty;
+        private CustomControl.ValueLabel.ValueNumLabel mcd_okqty;
+        private CustomControl.ValueLabel.ValueLabel ma_prodcode;
+        private CustomControl.ValueLabel.ValueLabel pr_detail;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum;
+        private System.Windows.Forms.Label pr_detail_label;
+        private System.Windows.Forms.Label sncode_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label mcd_remainqty_label;
+        private System.Windows.Forms.Label mcd_okqty_label;
+        private System.Windows.Forms.Label pr_code_label;
+        private System.Windows.Forms.Label ms_makecode_label;
+        private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private System.Windows.Forms.CheckBox CollectRemark;
+        private CustomControl.RichText.RichTextAutoBottom Remark;
+        private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+    }
+}

+ 359 - 0
UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrintGetIMEI.cs

@@ -0,0 +1,359 @@
+using System;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.PublicMethod;
+using UAS_MES_NEW.Entity;
+using LabelManager2;
+using System.IO;
+using System.Threading;
+using UAS_MES_NEW.PublicForm;
+using Seagull.BarTender.Print;
+using static System.Runtime.CompilerServices.RuntimeHelpers;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_FuselageLabelPrintGetIMEI : Form
+    {
+        DataHelper dh;
+        DataTable dt;
+        LogStringBuilder sql = new LogStringBuilder();
+        Document doc;
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        //保存StepProduct查询出来的数据
+        //        DataTable ListA = new DataTable();
+        //保存make left join makecraftdetail left join product的数据
+        // DataTable ListB;
+        DataTable mapB;
+
+        string ma_unlimitin = "";
+
+        ApplicationClass lbl;
+
+        string oMakeCode = "";
+        string oMsId = "";
+
+        string oErrorMessage = "";
+
+        Thread InitPrint;
+
+        bool pr_change = false;
+
+        ftpOperater ftp;
+
+        DataTable Dbfind;
+
+        public Make_FuselageLabelPrintGetIMEI()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_FuselageLabelPrint_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            OperateResult.AppendText(">>请输入SN\n", Color.Black);
+            InitPrint = new Thread(InPrint);
+            SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
+            BaseUtil.SetFormCenter(stw);
+            stw.ShowDialog();
+            sncode.Focus();
+            LockMakeCode.GetMakeCodeCtl(ma_code);
+            ma_code.SetLockCheckBox(LockMakeCode);
+            //工单号放大镜配置
+            ma_code.TableName = "make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,pr_detail # 产品名称";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "pr_detail" };
+            ma_code.DbChange += Ma_code_DbChange;
+            ma_code.Condition = "(ma_statuscode='STARTED' or ma_statuscode='FINISH')";
+            dh = SystemInf.dh;
+            StepCount.StepCode = User.CurrentStepCode;
+            StepCount.Source = User.UserSourceCode;
+            StepCount.LineCode = User.UserLineCode;
+            StepCount.Dh = dh;
+            StepCount.Start();
+        }
+
+        private void Ma_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+            ////获取工单的其他信息
+            //sql.Clear();
+            //sql.Append("select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode as pr_code ,pr_detail,");
+            //sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
+            //sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+            //dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            //if (dt.Rows.Count > 0)
+            //{
+            //    BaseUtil.SetFormValue(this.Controls, dt);
+            //}
+        }
+        Engine engine;
+
+        private void InPrint()
+        {
+            try
+            {
+                engine = new Engine(true);
+            }
+            catch (Exception ex)
+            {
+                OperateResult.AppendText("未正确安装BarTender软件\n", Color.Red);
+            }
+        }
+
+        private void sn_code_KeyDown(object sender, KeyEventArgs e)
+        {
+            //按下enter键
+            if (e.KeyCode == Keys.Enter)
+            {
+                //如果输入的值为空的话,提示不能为空
+                if (sncode.Text == "")
+                {
+                    OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
+                    return;
+                }
+                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out oErrorMessage))
+                {
+                    //定义临时变量
+                    string oStatus = "";
+                    //调用公共方法CheckStepSNAndMacode判断工序是否正确
+                    string status = "";
+                    dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + sncode.Text + "' order by ms_id desc", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + sncode.Text + "' order by ms_id desc", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                        }
+                        else
+                        {
+                            dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei1='" + sncode.Text + "' order by mil_id desc", "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                sncode.Text = dt.Rows[0]["mil_sncode"].ToString();
+                            }
+                            else
+                            {
+                                dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei2='" + sncode.Text + "' order by mil_id desc", "select");
+                                if (dt.Rows.Count > 0)
+                                {
+                                    sncode.Text = dt.Rows[0]["mil_sncode"].ToString();
+                                }
+                            }
+                        }
+                    }
+                    LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out oErrorMessage);
+                    if (oMakeCode == "" || oMakeCode == null)
+                        oMakeCode = ma_code.Text;
+                    if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out oErrorMessage))
+                    {
+                        string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsId + "'").ToString();
+                        if (nextstepcode != User.CurrentStepCode)
+                        {
+                            string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
+                            OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sncode);
+                            return;
+                        }
+                        //IF (如果ma_code 为空)THEN
+                        if (ma_code.Text == "" || ma_code.Text != oMakeCode)
+                        {
+                            //获取工单的其他信息
+                            sql.Clear();
+                            sql.Append("select ma_code,nvl(mcd_okqty,0),ma_prodcode,pr_detail,nvl(ma_unlimitin,0)ma_unlimitin,");
+                            sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
+                            sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + oMakeCode + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                            mapB = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            //如果有数据的话
+                            if (mapB.Rows.Count > 0)
+                            {
+                                ma_unlimitin = mapB.Rows[0]["ma_unlimitin"].ToString();
+                                //将工单的其他信息赋值到对应的控件
+                                BaseUtil.SetFormValue(this.Controls, mapB);
+                                //提示用户“<<工单号:取ma_makecode”
+                                OperateResult.AppendText("<<工单号:" + ma_code.Text + "\n", Color.Black);
+                                //提示用户“<< 序列号:XXXX”
+                                if (PrintLabel.SelectedValue == null)
+                                {
+                                    OperateResult.AppendText(">>产品编号:" + ma_prodcode.Text + "未维护机身标签\n", Color.Red, sncode);
+                                    return;
+                                }
+                                if (pr_change)
+                                {
+                                    pr_change = false;
+                                    if (MessageBox.Show("是否使用默认标签", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
+                                    {
+                                        OperateResult.AppendText(">>请选择标签模板\n", Color.Green, sncode);
+                                        return;
+                                    }
+                                }
+                            }
+                            //没有数据
+                            else
+                            {
+                                OperateResult.AppendText(">>无序列号" + sncode.Text + "对应工单信息\n", Color.Red);
+                                return;
+                            }
+                        }
+                        //所选标签不为空
+                        if (PrintLabel.SelectedValue != null)
+                        {
+                            //如果打印张数为空,返回
+                            if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
+                            {
+                                OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red, sncode);
+                                //清空输入框的值,聚焦
+                                sncode.Focus();
+                                //提示用户“>>请输入SN”
+                                OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                return;
+                            }
+                            OperateResult.AppendText("<<序列号:" + sncode.Text + "\n", Color.Black);
+                            //按照打印张数打印
+                            string oIMEI1 = "";
+                            string oIMEI2 = "";
+                            string oMEID = "";
+                            string oNetcode = "";
+                            string oPSN = "";
+                            string oID1 = "";
+                            string oID2 = "";
+                            string oID3 = "";
+                            LogicHandler.GetMEIOrNetCodeRange(sncode.Text, "", "", out oIMEI1, out oIMEI2, out oMEID, out oNetcode, out oPSN, out oID1, out oID2, out oID3, out oErrorMessage);
+                            dh.ExecuteSql("update makeserial set ms_sncode='" + oPSN + "',ms_firstsn='" + oPSN + "',ms_tsn='" + sncode.Text + "' where ms_id='" + oMsId + "' ", "update");
+                            string oBT = "";
+                            string oWifi = "";
+                            string oCode1 = "";
+                            string oCode2 = "";
+                            string oCode3 = "";
+                            LogicHandler.GetAddressRangeByMO(oPSN, out oWifi, out oBT, out oCode1, out oCode2, out oCode3, out oErrorMessage);
+                            //清空输入框的值,聚焦
+                            //doc = lbl.Documents.Open(PrintLabel.Text);
+                            if (Print.BarTender(Tag.ToString(), ref engine, 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);
+                            }
+                            else
+                            {
+                                OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
+                            }
+                            //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);
+                            //}
+                            //else
+                            //{
+                            //    OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
+                            //}
+                            //记录日志
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "机身标打印", "机身标打印成功", sncode.Text, "");
+                            //更新打印的数据
+                            if (LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, oPSN, "机身标打印", "机身标打印成功", User.UserCode, out oErrorMessage))
+                            {
+                                //提示正确返回时传递的信息
+                                if (oErrorMessage.Contains("AFTERSUCCESS"))
+                                    OperateResult.AppendText(">>" + oErrorMessage + "\n");
+                                if (CollectRemark.Checked && Remark.Text != "")
+                                {
+                                    LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, ma_prodcode.Text, Remark.Text);
+                                }
+                              
+                                sncode.Text = "";
+                                sncode.Focus();
+                                //刷新打印数量和剩余数量
+                                dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,nvl(ma_unlimitin,0)ma_unlimitin from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
+                                BaseUtil.SetFormValue(Controls, dt);
+                                mcd_okqty.Text = int.Parse(mcd_okqty.Text) + 1 + "";
+                                //IF 剩余数=0,则清空form中的数据, 提示用户“工单:xx已经打印完成,>>请输入SN”, 清空mapB,listC 中的数据
+                                if (int.Parse(mcd_remainqty.Text) == 0 && ma_unlimitin == "0")
+                                {
+                                    OperateResult.AppendText(">>工单:" + ma_code.Text + "打印完成,>>请输入SN\n", Color.Green);
+                                }
+                                //剩余数量不为0
+                                else
+                                {
+                                    OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                }
+                            }
+                            else
+                            {
+                                OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                                //清空输入框的值,聚焦
+                                sncode.Text = "";
+                                sncode.Focus();
+                            }
+                        }
+                        //标签为空
+                        else
+                        {
+                            OperateResult.AppendText(">>产品编号:" + ma_prodcode.Text + "未维护机身标签\n", Color.Red, sncode);
+                        }
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                    }
+                }
+                else
+                {
+                    OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                }
+            }
+        }
+        private void pr_code_TextChanged(object sender, EventArgs e)
+        {
+            DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode='" + ma_prodcode.Text + "' and la_templatetype='机身标' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            if (_dt.Rows.Count == 0)
+            {
+                _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode is null and la_templatetype='机身标' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            }
+            if (_dt.Rows.Count > 0)
+            {
+                string la_id = _dt.Rows[0]["la_id"].ToString();
+                _dt = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id from FILEPATH where fp_id in (select *  from table(select parsestring(LA_SOFTTYPE,';') from label where la_id='" + la_id + "' ) where COLUMN_VALUE is not null)", "select");
+                PrintLabel.DataSource = _dt;
+                PrintLabel.DisplayMember = "la_url";
+                PrintLabel.ValueMember = "la_id";
+                pr_change = true;
+            }
+        }
+
+        private void Make_FuselageLabelPrint_Activated(object sender, EventArgs e)
+        {
+            sncode.Focus();
+        }
+
+        private void Make_FuselageLabelPrint_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            BaseUtil.ClosePrint(lbl);
+        }
+
+        private void Make_FuselageLabelPrint_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void PrintLabel_SelectedValueChanged(object sender, EventArgs e)
+        {
+            if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
+            {
+                string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
+                PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            }
+        }
+
+        private void StepCount_Load(object sender, EventArgs e)
+        {
+
+        }
+    }
+}

+ 120 - 0
UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrintGetIMEI.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 4 - 3
UAS_MES_LGDZ/FunctionCode/Make/Make_GetReMakeSN.cs

@@ -112,12 +112,12 @@ namespace UAS_MES_NEW.Make
                         if (sn_code.Text != "")
                         {
                             //判断序列号是否有效
-                            string Msid = dh.getFieldDataByCondition("makeserial ", "max(ms_id)", "ms_sncode='" + sn_code.Text + "' and ms_makecode<>'" + ma_code.Text + "'").ToString();
+                            string Msid = dh.getFieldDataByCondition("makeserial ", "max(ms_id)", "(ms_sncode='" + sn_code.Text + "' or ms_imei1='" + sn_code.Text + "' or ms_imei2='" + sn_code.Text + "' or ms_imei3='" + sn_code.Text + "' ) and ms_makecode<>'" + ma_code.Text + "' ").ToString();
                             if (Msid != "")
                             {
                                 //序列号信息
                                 sql.Clear();
-                                sql.Append("select ms_beforesn,ms_status,ms_makecode,ms_firstsn,ms_outboxcode,ms_nextmacode,ms_prodcode,ms_salecode,");
+                                sql.Append("select ms_beforesn,ms_sncode,ms_status,ms_makecode,ms_firstsn,ms_outboxcode,ms_nextmacode,ms_prodcode,ms_salecode,");
                                 sql.Append("MS_IMEI1,MS_MAC,MS_NETCODE,MS_MEID,ms_imei2,ms_imei3,ms_othid1,ms_othid2,ms_othid3");
                                 sql.Append(",MS_OTHCODE3,MS_OTHCODE2,MS_OTHCODE1,ms_bt from makeserial where ms_id='" + Msid + "'");
                                 DataTable SnInf = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -125,6 +125,7 @@ namespace UAS_MES_NEW.Make
                                 string ms_salecode = SnInf.Rows[0]["ms_salecode"].ToString();
                                 string ms_beforesn = SnInf.Rows[0]["ms_beforesn"].ToString();
                                 string ms_makecode = SnInf.Rows[0]["ms_makecode"].ToString();
+                                string Sn = SnInf.Rows[0]["ms_sncode"].ToString();
                                 string ms_status = SnInf.Rows[0]["ms_status"].ToString();
                                 string ms_outboxcode = SnInf.Rows[0]["ms_outboxcode"].ToString();
                                 //判断序列号是否已经被使用
@@ -168,7 +169,7 @@ namespace UAS_MES_NEW.Make
                                     OperateResult.AppendText(">>工单不允许超数投产\n", Color.Red, sn_code);
                                     return;
                                 }
-                                string Sn = sn_code.Text;
+                              
                                 if (re_ifsnok != "0")
                                 {
                                     if (ms_status == "3" && dh.CheckExist("makebad", "mb_sncode = '" + sn_code.Text + "'and mb_makecode = '" + ms_makecode + "' and mb_status = '0'"))

+ 4 - 2
UAS_MES_LGDZ/FunctionCode/Make/Make_MakeCancelDown.cs

@@ -1,4 +1,5 @@
-using System;
+using HslCommunication.Profinet.Knx;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
@@ -101,10 +102,11 @@ namespace UAS_MES_NEW.Make
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append("select md_code,md_sncode,md_macode,md_prodcode,pr_detail from makedown left join product on pr_code=md_prodcode where md_sncode='" + sn_code.Text + "' and md_status=-1");
+                sql.Append("select md_code,md_sncode,md_macode,md_prodcode,pr_detail from makedown left join product on pr_code=md_prodcode left join makeserial on ms_sncode=md_sncode and ms_makecode=md_macode where md_sncode='" + sn_code.Text + "' or ms_imei1='" + sn_code.Text + "' or ms_imei2='" + sn_code.Text + "' or ms_imei3='" + sn_code.Text + "' and md_status=-1");
                 dtbar = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dtbar.Rows.Count > 0)
                 {
+                    sn_code.Text = dtbar.Rows[0]["md_sncode"].ToString();
                     BaseUtil.FillDgvWithDataTable(LabelDataGridView, dtbar);
                 }
                 else

+ 5 - 3
UAS_MES_LGDZ/FunctionCode/Make/Make_MakeDown.cs

@@ -1,4 +1,5 @@
-using System;
+using HslCommunication.Profinet.Knx;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
@@ -69,13 +70,14 @@ namespace UAS_MES_NEW.Make
                 if (inputreson.Text.Trim() != "")
                 {
                     sql.Clear();
-                    sql.Append("select max(ms_id) from makeserial where ms_sncode='" + sn_code.Text + "'");
+                    sql.Append("select max(ms_id) from makeserial where ms_sncode='" + sn_code.Text + "' or ms_imei1='"+sn_code.Text+"' or ms_imei2='"+sn_code.Text+"' or ms_imei3='"+md_sncode.HeaderText+"'");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     ms_id = dt.Rows[0][0].ToString();
                     if (ms_id != "")
                     {
                         //界面赋值
-                        dtbar = (DataTable)dh.ExecuteSql("select ms_makecode,pr_code,pr_detail from makeserial left join product on MS_PRODCODE=pr_code where ms_id='" + ms_id + "'", "select");
+                        dtbar = (DataTable)dh.ExecuteSql("select ms_makecode,ms_sncode,pr_code,pr_detail from makeserial left join product on MS_PRODCODE=pr_code where ms_id='" + ms_id + "'", "select");
+                        sn_code.Text = dtbar.Rows[0]["ms_sncode"].ToString();
                         BaseUtil.SetFormValue(this.Controls, dtbar);
                         sql.Clear();
                         sql.Append("select ms_outboxcode, ms_downstatus,ms_outno,nvl(ms_iostatus,0) ms_iostatus,ms_prodcode from makeserial where ms_id ='" + ms_id + "' ");

+ 65 - 32
UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh.Designer.cs

@@ -117,6 +117,8 @@
             this.PrintList1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.label8 = new System.Windows.Forms.Label();
             this.PrintSecond = new System.Windows.Forms.CheckBox();
+            this.PrintNum1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label9 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             this.groupBoxWithBorder2.SuspendLayout();
@@ -150,7 +152,7 @@
             // 
             this.pa_code_label.AutoSize = true;
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_code_label.Location = new System.Drawing.Point(10, 92);
+            this.pa_code_label.Location = new System.Drawing.Point(11, 93);
             this.pa_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_code_label.Name = "pa_code_label";
             this.pa_code_label.Size = new System.Drawing.Size(82, 41);
@@ -161,7 +163,7 @@
             // 
             this.PrintList_label.AutoSize = true;
             this.PrintList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintList_label.Location = new System.Drawing.Point(14, 106);
+            this.PrintList_label.Location = new System.Drawing.Point(15, 107);
             this.PrintList_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintList_label.Name = "PrintList_label";
             this.PrintList_label.Size = new System.Drawing.Size(178, 41);
@@ -172,7 +174,7 @@
             // 
             this.PrintNum_label.AutoSize = true;
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintNum_label.Location = new System.Drawing.Point(384, 258);
+            this.PrintNum_label.Location = new System.Drawing.Point(385, 259);
             this.PrintNum_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintNum_label.Name = "PrintNum_label";
             this.PrintNum_label.Size = new System.Drawing.Size(82, 41);
@@ -218,7 +220,7 @@
             // 
             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(14, 182);
+            this.label3.Location = new System.Drawing.Point(15, 183);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(146, 41);
@@ -451,7 +453,7 @@
             // 
             this.PreFix_label.AutoSize = true;
             this.PreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PreFix_label.Location = new System.Drawing.Point(354, 28);
+            this.PreFix_label.Location = new System.Drawing.Point(355, 29);
             this.PreFix_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PreFix_label.Name = "PreFix_label";
             this.PreFix_label.Size = new System.Drawing.Size(71, 36);
@@ -482,7 +484,7 @@
             this.locksalecode.CheckState = System.Windows.Forms.CheckState.Checked;
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.ForeColor = System.Drawing.Color.Red;
-            this.locksalecode.Location = new System.Drawing.Point(598, 32);
+            this.locksalecode.Location = new System.Drawing.Point(599, 33);
             this.locksalecode.Margin = new System.Windows.Forms.Padding(6);
             this.locksalecode.Name = "locksalecode";
             this.locksalecode.Size = new System.Drawing.Size(186, 28);
@@ -494,7 +496,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(422, 274);
+            this.label5.Location = new System.Drawing.Point(423, 275);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(146, 41);
@@ -505,7 +507,7 @@
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(10, 274);
+            this.ms_makecode_label.Location = new System.Drawing.Point(11, 275);
             this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_makecode_label.Name = "ms_makecode_label";
             this.ms_makecode_label.Size = new System.Drawing.Size(114, 41);
@@ -516,7 +518,7 @@
             // 
             this.ms_salecode.AutoSize = true;
             this.ms_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_salecode.Location = new System.Drawing.Point(590, 274);
+            this.ms_salecode.Location = new System.Drawing.Point(591, 275);
             this.ms_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_salecode.Name = "ms_salecode";
             this.ms_salecode.Size = new System.Drawing.Size(0, 41);
@@ -526,7 +528,7 @@
             // 
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(172, 274);
+            this.ms_makecode.Location = new System.Drawing.Point(173, 275);
             this.ms_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_makecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_makecode.Name = "ms_makecode";
@@ -537,7 +539,7 @@
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(172, 28);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(173, 29);
             this.OutBoxLength_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
             this.OutBoxLength_label.Size = new System.Drawing.Size(71, 36);
@@ -602,7 +604,7 @@
             // 
             this.pa_currentqty_label.AutoSize = true;
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty_label.Location = new System.Drawing.Point(422, 158);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(423, 159);
             this.pa_currentqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
             this.pa_currentqty_label.Size = new System.Drawing.Size(146, 41);
@@ -613,7 +615,7 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(422, 214);
+            this.pr_detail_label.Location = new System.Drawing.Point(423, 215);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
@@ -624,7 +626,7 @@
             // 
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty.Location = new System.Drawing.Point(590, 158);
+            this.pa_currentqty.Location = new System.Drawing.Point(591, 159);
             this.pa_currentqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_currentqty.Name = "pa_currentqty";
             this.pa_currentqty.Size = new System.Drawing.Size(0, 41);
@@ -634,7 +636,7 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(10, 216);
+            this.pr_code_label.Location = new System.Drawing.Point(11, 217);
             this.pr_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code_label.Name = "pr_code_label";
             this.pr_code_label.Size = new System.Drawing.Size(146, 41);
@@ -645,7 +647,7 @@
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(590, 214);
+            this.pr_detail.Location = new System.Drawing.Point(591, 215);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 41);
@@ -655,7 +657,7 @@
             // 
             this.pr_outboxinnerqty_label.AutoSize = true;
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(10, 150);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(11, 151);
             this.pr_outboxinnerqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
             this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(146, 41);
@@ -666,7 +668,7 @@
             // 
             this.pr_code.AutoSize = true;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(172, 216);
+            this.pr_code.Location = new System.Drawing.Point(173, 217);
             this.pr_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_code.Name = "pr_code";
@@ -677,7 +679,7 @@
             // AutoGenBoxCode
             // 
             this.AutoGenBoxCode.AutoSize = true;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(486, 94);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(487, 95);
             this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(4);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
             this.AutoGenBoxCode.Size = new System.Drawing.Size(178, 45);
@@ -749,7 +751,7 @@
             // 
             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(540, 46);
+            this.label1.Location = new System.Drawing.Point(541, 47);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(146, 41);
@@ -761,7 +763,7 @@
             this.checkweightlabel.AutoSize = true;
             this.checkweightlabel.CutLength = null;
             this.checkweightlabel.ForeColor = System.Drawing.Color.Black;
-            this.checkweightlabel.Location = new System.Drawing.Point(32, 44);
+            this.checkweightlabel.Location = new System.Drawing.Point(33, 45);
             this.checkweightlabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.checkweightlabel.MaximumSize = new System.Drawing.Size(400, 0);
             this.checkweightlabel.Name = "checkweightlabel";
@@ -772,7 +774,7 @@
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(702, 186);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(703, 187);
             this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 41);
@@ -782,7 +784,7 @@
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.Location = new System.Drawing.Point(702, 114);
+            this.ob_batchqty.Location = new System.Drawing.Point(703, 115);
             this.ob_batchqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 41);
@@ -792,7 +794,7 @@
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(540, 186);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(541, 187);
             this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
             this.ob_nowcheckqty_label.Size = new System.Drawing.Size(146, 41);
@@ -803,7 +805,7 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.Location = new System.Drawing.Point(540, 114);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(541, 115);
             this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(146, 41);
@@ -855,7 +857,7 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno.Location = new System.Drawing.Point(702, 46);
+            this.ob_checkno.Location = new System.Drawing.Point(703, 47);
             this.ob_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 41);
@@ -930,7 +932,7 @@
             // 
             this.pr_cartonunit1.AutoSize = true;
             this.pr_cartonunit1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_cartonunit1.Location = new System.Drawing.Point(156, 246);
+            this.pr_cartonunit1.Location = new System.Drawing.Point(157, 247);
             this.pr_cartonunit1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_cartonunit1.Name = "pr_cartonunit1";
             this.pr_cartonunit1.Size = new System.Drawing.Size(38, 41);
@@ -943,7 +945,7 @@
             // 
             this.pr_cartonunit.AutoSize = true;
             this.pr_cartonunit.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_cartonunit.Location = new System.Drawing.Point(94, 40);
+            this.pr_cartonunit.Location = new System.Drawing.Point(95, 41);
             this.pr_cartonunit.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_cartonunit.Name = "pr_cartonunit";
             this.pr_cartonunit.Size = new System.Drawing.Size(38, 41);
@@ -955,7 +957,7 @@
             // 
             this.pr_cartonboxgw.AutoSize = true;
             this.pr_cartonboxgw.Font = new System.Drawing.Font("微软雅黑", 25F);
-            this.pr_cartonboxgw.Location = new System.Drawing.Point(26, 320);
+            this.pr_cartonboxgw.Location = new System.Drawing.Point(27, 321);
             this.pr_cartonboxgw.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_cartonboxgw.Name = "pr_cartonboxgw";
             this.pr_cartonboxgw.Size = new System.Drawing.Size(0, 88);
@@ -965,7 +967,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(10, 246);
+            this.label4.Location = new System.Drawing.Point(11, 247);
             this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(146, 41);
@@ -977,7 +979,7 @@
             this.weight.AutoSize = true;
             this.weight.Font = new System.Drawing.Font("微软雅黑", 35F);
             this.weight.ForeColor = System.Drawing.Color.DarkGreen;
-            this.weight.Location = new System.Drawing.Point(22, 108);
+            this.weight.Location = new System.Drawing.Point(23, 109);
             this.weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.weight.Name = "weight";
             this.weight.Size = new System.Drawing.Size(0, 121);
@@ -987,7 +989,7 @@
             // 
             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(10, 40);
+            this.label2.Location = new System.Drawing.Point(11, 41);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(82, 41);
@@ -1246,12 +1248,41 @@
             this.PrintSecond.Text = "打印副标签";
             this.PrintSecond.UseVisualStyleBackColor = true;
             // 
+            // PrintNum1
+            // 
+            this.PrintNum1.AllPower = null;
+            this.PrintNum1.BackColor = System.Drawing.Color.White;
+            this.PrintNum1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintNum1.ID = null;
+            this.PrintNum1.Location = new System.Drawing.Point(1501, 856);
+            this.PrintNum1.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum1.Name = "PrintNum1";
+            this.PrintNum1.Power = null;
+            this.PrintNum1.Size = new System.Drawing.Size(60, 39);
+            this.PrintNum1.Str = null;
+            this.PrintNum1.Str1 = null;
+            this.PrintNum1.Str2 = null;
+            this.PrintNum1.TabIndex = 194;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(1402, 857);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(82, 41);
+            this.label9.TabIndex = 193;
+            this.label9.Text = "份数";
+            // 
             // Packing_PackageCollectionWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1758, 1164);
+            this.Controls.Add(this.PrintNum1);
             this.Controls.Add(this.PrintSecond);
+            this.Controls.Add(this.label9);
             this.Controls.Add(this.PrintLabel1);
             this.Controls.Add(this.label6);
             this.Controls.Add(this.label7);
@@ -1396,5 +1427,7 @@
         private CustomControl.ComBoxWithFocus.PrinterCombox PrintList1;
         private System.Windows.Forms.Label label8;
         private System.Windows.Forms.CheckBox PrintSecond;
+        private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum1;
+        private System.Windows.Forms.Label label9;
     }
 }

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -237,7 +237,7 @@ namespace UAS_MES_NEW.Packing
                     }
                     if (PrintSecond.Checked)
                     {
-                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, pa_outboxcode.Text, int.Parse(PrintNum1.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                         {
                             OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
                         }

+ 18 - 0
UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh.resx

@@ -212,6 +212,24 @@
   <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pd_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pa_outboxcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pa_prodcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pa_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <data name="DeleteAll.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 65 - 32
UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh_ReadLine.Designer.cs

@@ -117,6 +117,8 @@
             this.label7 = new System.Windows.Forms.Label();
             this.PrintList1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.label8 = new System.Windows.Forms.Label();
+            this.PrintNum1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label9 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             this.groupBoxWithBorder2.SuspendLayout();
@@ -150,7 +152,7 @@
             // 
             this.pa_code_label.AutoSize = true;
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_code_label.Location = new System.Drawing.Point(11, 93);
+            this.pa_code_label.Location = new System.Drawing.Point(12, 94);
             this.pa_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_code_label.Name = "pa_code_label";
             this.pa_code_label.Size = new System.Drawing.Size(82, 41);
@@ -161,7 +163,7 @@
             // 
             this.PrintList_label.AutoSize = true;
             this.PrintList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintList_label.Location = new System.Drawing.Point(15, 107);
+            this.PrintList_label.Location = new System.Drawing.Point(16, 108);
             this.PrintList_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintList_label.Name = "PrintList_label";
             this.PrintList_label.Size = new System.Drawing.Size(178, 41);
@@ -172,7 +174,7 @@
             // 
             this.PrintNum_label.AutoSize = true;
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintNum_label.Location = new System.Drawing.Point(385, 259);
+            this.PrintNum_label.Location = new System.Drawing.Point(386, 260);
             this.PrintNum_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintNum_label.Name = "PrintNum_label";
             this.PrintNum_label.Size = new System.Drawing.Size(82, 41);
@@ -218,7 +220,7 @@
             // 
             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(15, 183);
+            this.label3.Location = new System.Drawing.Point(16, 184);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(146, 41);
@@ -451,7 +453,7 @@
             // 
             this.PreFix_label.AutoSize = true;
             this.PreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PreFix_label.Location = new System.Drawing.Point(355, 29);
+            this.PreFix_label.Location = new System.Drawing.Point(356, 30);
             this.PreFix_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PreFix_label.Name = "PreFix_label";
             this.PreFix_label.Size = new System.Drawing.Size(71, 36);
@@ -482,7 +484,7 @@
             this.locksalecode.CheckState = System.Windows.Forms.CheckState.Checked;
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.ForeColor = System.Drawing.Color.Red;
-            this.locksalecode.Location = new System.Drawing.Point(599, 33);
+            this.locksalecode.Location = new System.Drawing.Point(600, 34);
             this.locksalecode.Margin = new System.Windows.Forms.Padding(6);
             this.locksalecode.Name = "locksalecode";
             this.locksalecode.Size = new System.Drawing.Size(186, 28);
@@ -494,7 +496,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(423, 275);
+            this.label5.Location = new System.Drawing.Point(424, 276);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(146, 41);
@@ -505,7 +507,7 @@
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(11, 275);
+            this.ms_makecode_label.Location = new System.Drawing.Point(12, 276);
             this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_makecode_label.Name = "ms_makecode_label";
             this.ms_makecode_label.Size = new System.Drawing.Size(114, 41);
@@ -516,7 +518,7 @@
             // 
             this.ms_salecode.AutoSize = true;
             this.ms_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_salecode.Location = new System.Drawing.Point(591, 275);
+            this.ms_salecode.Location = new System.Drawing.Point(592, 276);
             this.ms_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_salecode.Name = "ms_salecode";
             this.ms_salecode.Size = new System.Drawing.Size(0, 41);
@@ -526,7 +528,7 @@
             // 
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(173, 275);
+            this.ms_makecode.Location = new System.Drawing.Point(174, 276);
             this.ms_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_makecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_makecode.Name = "ms_makecode";
@@ -537,7 +539,7 @@
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(173, 29);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(174, 30);
             this.OutBoxLength_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
             this.OutBoxLength_label.Size = new System.Drawing.Size(71, 36);
@@ -602,7 +604,7 @@
             // 
             this.pa_currentqty_label.AutoSize = true;
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty_label.Location = new System.Drawing.Point(423, 159);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(424, 160);
             this.pa_currentqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
             this.pa_currentqty_label.Size = new System.Drawing.Size(146, 41);
@@ -613,7 +615,7 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(423, 215);
+            this.pr_detail_label.Location = new System.Drawing.Point(424, 216);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
@@ -624,7 +626,7 @@
             // 
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty.Location = new System.Drawing.Point(591, 159);
+            this.pa_currentqty.Location = new System.Drawing.Point(592, 160);
             this.pa_currentqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_currentqty.Name = "pa_currentqty";
             this.pa_currentqty.Size = new System.Drawing.Size(0, 41);
@@ -634,7 +636,7 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(11, 217);
+            this.pr_code_label.Location = new System.Drawing.Point(12, 218);
             this.pr_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code_label.Name = "pr_code_label";
             this.pr_code_label.Size = new System.Drawing.Size(146, 41);
@@ -645,7 +647,7 @@
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(591, 215);
+            this.pr_detail.Location = new System.Drawing.Point(592, 216);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 41);
@@ -655,7 +657,7 @@
             // 
             this.pr_outboxinnerqty_label.AutoSize = true;
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(11, 151);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(12, 152);
             this.pr_outboxinnerqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
             this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(146, 41);
@@ -666,7 +668,7 @@
             // 
             this.pr_code.AutoSize = true;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(173, 217);
+            this.pr_code.Location = new System.Drawing.Point(174, 218);
             this.pr_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_code.Name = "pr_code";
@@ -679,7 +681,7 @@
             this.AutoGenBoxCode.AutoSize = true;
             this.AutoGenBoxCode.Checked = true;
             this.AutoGenBoxCode.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(487, 95);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(488, 96);
             this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(4);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
             this.AutoGenBoxCode.Size = new System.Drawing.Size(178, 45);
@@ -751,7 +753,7 @@
             // 
             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(541, 47);
+            this.label1.Location = new System.Drawing.Point(542, 48);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(146, 41);
@@ -763,7 +765,7 @@
             this.checkweightlabel.AutoSize = true;
             this.checkweightlabel.CutLength = null;
             this.checkweightlabel.ForeColor = System.Drawing.Color.Black;
-            this.checkweightlabel.Location = new System.Drawing.Point(33, 45);
+            this.checkweightlabel.Location = new System.Drawing.Point(34, 46);
             this.checkweightlabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.checkweightlabel.MaximumSize = new System.Drawing.Size(400, 0);
             this.checkweightlabel.Name = "checkweightlabel";
@@ -774,7 +776,7 @@
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(703, 187);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(704, 188);
             this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 41);
@@ -784,7 +786,7 @@
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.Location = new System.Drawing.Point(703, 115);
+            this.ob_batchqty.Location = new System.Drawing.Point(704, 116);
             this.ob_batchqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 41);
@@ -794,7 +796,7 @@
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(541, 187);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(542, 188);
             this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
             this.ob_nowcheckqty_label.Size = new System.Drawing.Size(146, 41);
@@ -805,7 +807,7 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.Location = new System.Drawing.Point(541, 115);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(542, 116);
             this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(146, 41);
@@ -857,7 +859,7 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno.Location = new System.Drawing.Point(703, 47);
+            this.ob_checkno.Location = new System.Drawing.Point(704, 48);
             this.ob_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 41);
@@ -932,7 +934,7 @@
             // 
             this.pr_cartonunit1.AutoSize = true;
             this.pr_cartonunit1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_cartonunit1.Location = new System.Drawing.Point(157, 247);
+            this.pr_cartonunit1.Location = new System.Drawing.Point(158, 248);
             this.pr_cartonunit1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_cartonunit1.Name = "pr_cartonunit1";
             this.pr_cartonunit1.Size = new System.Drawing.Size(38, 41);
@@ -945,7 +947,7 @@
             // 
             this.pr_cartonunit.AutoSize = true;
             this.pr_cartonunit.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_cartonunit.Location = new System.Drawing.Point(95, 41);
+            this.pr_cartonunit.Location = new System.Drawing.Point(96, 42);
             this.pr_cartonunit.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_cartonunit.Name = "pr_cartonunit";
             this.pr_cartonunit.Size = new System.Drawing.Size(38, 41);
@@ -957,7 +959,7 @@
             // 
             this.pr_cartonboxgw.AutoSize = true;
             this.pr_cartonboxgw.Font = new System.Drawing.Font("微软雅黑", 25F);
-            this.pr_cartonboxgw.Location = new System.Drawing.Point(27, 321);
+            this.pr_cartonboxgw.Location = new System.Drawing.Point(28, 322);
             this.pr_cartonboxgw.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_cartonboxgw.Name = "pr_cartonboxgw";
             this.pr_cartonboxgw.Size = new System.Drawing.Size(0, 88);
@@ -967,7 +969,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(11, 247);
+            this.label4.Location = new System.Drawing.Point(12, 248);
             this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(146, 41);
@@ -979,7 +981,7 @@
             this.weight.AutoSize = true;
             this.weight.Font = new System.Drawing.Font("微软雅黑", 35F);
             this.weight.ForeColor = System.Drawing.Color.DarkGreen;
-            this.weight.Location = new System.Drawing.Point(23, 109);
+            this.weight.Location = new System.Drawing.Point(24, 110);
             this.weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.weight.Name = "weight";
             this.weight.Size = new System.Drawing.Size(0, 121);
@@ -989,7 +991,7 @@
             // 
             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(11, 41);
+            this.label2.Location = new System.Drawing.Point(12, 42);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(82, 41);
@@ -1248,12 +1250,41 @@
             this.label8.TabIndex = 213;
             this.label8.Text = "打印机列表1";
             // 
+            // PrintNum1
+            // 
+            this.PrintNum1.AllPower = null;
+            this.PrintNum1.BackColor = System.Drawing.Color.White;
+            this.PrintNum1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintNum1.ID = null;
+            this.PrintNum1.Location = new System.Drawing.Point(1481, 856);
+            this.PrintNum1.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum1.Name = "PrintNum1";
+            this.PrintNum1.Power = null;
+            this.PrintNum1.Size = new System.Drawing.Size(60, 39);
+            this.PrintNum1.Str = null;
+            this.PrintNum1.Str1 = null;
+            this.PrintNum1.Str2 = null;
+            this.PrintNum1.TabIndex = 196;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(1382, 857);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(82, 41);
+            this.label9.TabIndex = 195;
+            this.label9.Text = "份数";
+            // 
             // Packing_PackageCollectionWeigh_ReadLine
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1758, 1164);
+            this.Controls.Add(this.PrintNum1);
             this.Controls.Add(this.PrintSecond);
+            this.Controls.Add(this.label9);
             this.Controls.Add(this.PrintLabel1);
             this.Controls.Add(this.label7);
             this.Controls.Add(this.PrintList1);
@@ -1398,5 +1429,7 @@
         private System.Windows.Forms.Label label7;
         private CustomControl.ComBoxWithFocus.PrinterCombox PrintList1;
         private System.Windows.Forms.Label label8;
+        private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum1;
+        private System.Windows.Forms.Label label9;
     }
 }

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh_ReadLine.cs

@@ -237,7 +237,7 @@ namespace UAS_MES_NEW.Packing
                     }
                     if (PrintSecond.Checked)
                     {
-                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, pa_outboxcode.Text, 1, oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, pa_outboxcode.Text, int.Parse(PrintNum1.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                         {
                             OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
                         }

+ 2 - 1
UAS_MES_LGDZ/FunctionCode/Special/Special_Delete.cs

@@ -61,7 +61,7 @@ namespace UAS_MES_NEW.Special
             {
                 string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
                 string ms_sncode = dt.Rows[0]["ms_sncode"].ToString();
-                dh.ExecuteSql("delete makeserial set ms_status=1,ms_outboxcode='',ms_printcount = 0 where ms_sncode='" + sncode + "' and ms_makecode='" + ms_makecode + "'", "update");
+                dh.ExecuteSql("delete makeserial  where ms_sncode='" + sncode + "' and ms_makecode='" + ms_makecode + "'", "update");
                 dh.ExecuteSql("delete makebad where mb_sncode = '" + sncode + "' and mb_status = 0", "delete");
                 dh.ExecuteSql("delete labelprintlog where lpl_value = '" + sncode + "' and lpl_makecode='" + ms_makecode + "'", "delete");
                 sql.Clear();
@@ -275,6 +275,7 @@ namespace UAS_MES_NEW.Special
                     ReSN(dt.Rows[i]["ms_sncode"].ToString());
                     RemainSN.Text = "已解绑" + (i + 1);
                 }
+                dh.ExecuteSql("update make set ma_inqty=0,ma_endty=0 where ma_code='" + ma_code.Text + "'", "update");
             }
             else
             {

+ 1 - 0
UAS_MES_LGDZ/FunctionCode/Special/Special_MakeBad.cs

@@ -100,6 +100,7 @@ namespace UAS_MES_NEW.Special
             }
             dh.ExecuteSql("insert into makebadreason(MBR_ID,mbr_badlocation,MBR_BADCODE, MBR_SNCODE, MBR_MAKECODE, MBR_SOLUTIONNAME, MBR_DUTYNAME,mbr_linecode,MBR_INMAN,mbr_prodcode)values(makebadreason_seq.nextval,'" + mb_badlocation.Text + "','" + bc_code.Text + "','" + sn_code.Text + "','" + ma_code.Text + "','" + so_name.Text + "','" + mbr_dutyname.Text + "','" + li_code.Text + "','" + (mbr_inman.Text == "" ? User.UserName : mbr_inman.Text) + "','" + pr_code.Text + "')", "insert");
             OperateResult.AppendText("序列号" + sn_code.Text + "记录维修信息成功\n", System.Drawing.Color.Green, sn_code);
+            sn_code.Focus();
             //nrg_name.Text = "";
             //nr_name.Text = "";
             //mbr_dutyname.Text = "";

+ 11 - 8
UAS_MES_LGDZ/FunctionCode/Special/Special_QCRecheck.cs

@@ -36,7 +36,7 @@ namespace UAS_MES_NEW.Special
                     OperateResult.AppendText(">>序列号" + sn_code.Text + "不处于QC判定状态\n", Color.Red, sn_code);
                     return;
                 }
-                dh.ExecuteSql("update makeserial set ms_qccheck=0 where ms_sncode='"+sn_code.Text+"'","update");
+                dh.ExecuteSql("update makeserial set ms_qccheck=0 where ms_sncode='" + sn_code.Text + "'", "update");
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "维修品判定", "维修品判定为良品", sn_code.Text, "");
                 OperateResult.AppendText(">>序列号" + sn_code.Text + "QC确认良品\n", Color.Green, sn_code);
             }
@@ -61,15 +61,18 @@ namespace UAS_MES_NEW.Special
 
         private void sn_code_KeyDown(object sender, KeyEventArgs e)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select pr_detail,ms_outboxcode,ms_sncode,ms_firstsn,ms_id,ms_nextstepcode,ms_currentstepcode,ms_makecode,ms_status,ms_checkno,ms_craftcode,ms_prodcode,ms_stepcode,nvl(ms_qccheck,0)ms_qccheck from makeserial left join product on pr_code=ms_prodcode where (ms_sncode='" + sn_code.Text + "'  or ms_imei1='" + sn_code.Text + "' and ms_imei2='" + sn_code.Text + "')  order by ms_id desc", "select");
-            if (dt.Rows.Count > 0)
+            if (e.KeyCode == Keys.Enter)
             {
-                pr_code.Text = dt.Rows[0]["ms_prodcode"].ToString();
-                string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
-                string ms_qccheck = dt.Rows[0]["ms_qccheck"].ToString();
-                pr_detail.Text = dt.Rows[0]["pr_detail"].ToString();
+                DataTable dt = (DataTable)dh.ExecuteSql("select pr_detail,ms_outboxcode,ms_sncode,ms_firstsn,ms_id,ms_nextstepcode,ms_currentstepcode,ms_makecode,ms_status,ms_checkno,ms_craftcode,ms_prodcode,ms_stepcode,nvl(ms_qccheck,0)ms_qccheck from makeserial left join product on pr_code=ms_prodcode where (ms_sncode='" + sn_code.Text + "'  or ms_imei1='" + sn_code.Text + "' and ms_imei2='" + sn_code.Text + "')  order by ms_id desc", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    pr_code.Text = dt.Rows[0]["ms_prodcode"].ToString();
+                    string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
+                    string ms_qccheck = dt.Rows[0]["ms_qccheck"].ToString();
+                    pr_detail.Text = dt.Rows[0]["pr_detail"].ToString();
+                }
+                else OperateResult.AppendText(">>序列号" + sn_code.Text + "不存在\n", Color.Red, sn_code);
             }
-            else OperateResult.AppendText(">>序列号" + sn_code.Text + "不存在\n", Color.Red, sn_code);
         }
     }
 }

+ 1 - 1
UAS_MES_LGDZ/Login.cs

@@ -47,7 +47,7 @@ namespace UAS_MES_NEW
         {
             BaseUtil.FormStepInOrOut(this, true);
             //设置默认数据库
-            SystemInf.DefaultDB = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            SystemInf.DefaultDB = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.11.28.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.ProcessesID = System.Diagnostics.Process.GetCurrentProcess().Id;
             CheckForIllegalCrossThreadCalls = false;
             LoadMasterInf = new Thread(LoadMaster);

+ 1 - 1
UAS_MES_LGDZ/Main.cs

@@ -357,7 +357,7 @@ namespace UAS_MES_NEW
             if (logout_confirm == "Yes")
             {
                 //注销的时候切换回默认数据库
-                SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+                SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.11.28.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
                 DataHelper.DBConnectionString = SystemInf.ConnectionString;
                 //清除上个用户的权限信息
                 SystemInf.Caller.Clear();

+ 92 - 0
UAS_MES_LGDZ/PublicMethod/LogicHandler.cs

@@ -1,6 +1,7 @@
 using DevExpress.Utils.Drawing.Helpers;
 using System;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.Data;
 using System.Drawing;
 using System.IO;
@@ -66,6 +67,62 @@ namespace UAS_MES_NEW.PublicMethod
             }
         }
 
+        [Description("分配MAC和BT信息")]
+        public static bool GetAddressRangeByMO(string iSN, out string oWIFI, out string oBT, out string oCode1, out string oCode2, out string oCdoe3, out string oErrMessage)
+        {
+            oWIFI = "";
+            oBT = "";
+            oCode1 = "";
+            oCode2 = "";
+            oCdoe3 = "";
+            if (iSN == "")
+            {
+                oErrMessage = "SN不能为空";
+                return false;
+            }
+            oErrMessage = "";
+            string omakeCode = "";
+            GetRcardMOInfo(iSN, out omakeCode, out oErrMessage);
+            string[] param = new string[] { iSN, omakeCode, oWIFI, oBT, oCode1, oCode2, oCdoe3, oErrMessage };
+            string[] ParamName = new string[] { "v_i_sncode", "v_i_macode","v_o_mac", "v_o_bt", "v_o_code1", "v_o_code2", "v_o_code3", "v_o_errmsg" };
+            dh.CallProcedure("CS_GETADDRESSBYMAKECODE_TEST", ParamName, ref param);
+            oWIFI = param[2];
+            oBT = param[3];
+            oCode1 = param[4];
+            oCode2 = param[5];
+            oCdoe3 = param[6];
+            oErrMessage = param[7];
+            if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
+                return true;
+            else
+                return false;
+        }
+
+        public static bool GetRcardMOInfo(string iSN, out string oMoCode, out string oErrMessage)
+        {
+            //取MakeProcess表中的执行记录ID最大的一个工单的号码
+            oMoCode = "";
+            if (iSN == "")
+            {
+                oErrMessage = "SN不能为空";
+                return false;
+            }
+            oErrMessage = "";
+            sql.Clear();
+            sql.Append("select max(ms_id) from makeserial where ms_sncode in (select '" + iSN + "' from dual union select sn from ");
+            sql.Append("makesnrelation where beforesn='" + iSN + "' and sn<>' '  union select beforesn from makesnrelation where sn='" + iSN + "' and beforesn<>' ')");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+            string ms_id = dt.Rows[0][0].ToString();
+            oMoCode = dh.getFieldDataByCondition("MakeSerial", "ms_makecode", "ms_id='" + ms_id + "'").ToString();
+            if (oMoCode != "")
+                return true;
+            else
+            {
+                oErrMessage = "序列号:" + iSN + " 未归属工单";
+                return false;
+            }
+        }
+
         public static void GetSerialNumByCaller(string iCaller, out string SerialNum)
         {
             SerialNum = "";
@@ -137,6 +194,41 @@ namespace UAS_MES_NEW.PublicMethod
             return true;
         }
 
+        [Description("分配IMEI和NetCode信息")]
+        public static bool GetMEIOrNetCodeRange(string iSN, string iIMEI1, string iNetCode, out string oIMEI1, out string oIMEI2, out string oMEID, out string oNetCode, out string oPSN, out string oID1, out string oID2, out string oID3, out string oErrMessage)
+        {
+            oIMEI1 = "";
+            oIMEI2 = "";
+            oMEID = "";
+            oNetCode = "";
+            oPSN = "";
+            oID1 = "";
+            oID2 = "";
+            oID3 = "";
+            if (iSN == "")
+            {
+                oErrMessage = "SN不能为空";
+                return false;
+            }
+            oErrMessage = "";
+            string[] param = new string[] { iSN, "", iIMEI1, iNetCode, oIMEI1, oIMEI2, "", oMEID, oNetCode, oPSN, oID1, oID2, oID3, oErrMessage };
+            string[] ParamName = new string[] { "v_i_sncode", "v_i_macode", "v_i_imei", "v_i_netcode", "v_o_imei1", "v_o_imei2", "v_o_imei3", "v_o_meid", "v_o_netcode", "v_o_psn", "v_o_id1", "v_o_id2", "v_o_id3", "v_o_errmsg" };
+            dh.CallProcedure("CS_GETIMEIORNETCODERANGE_TEST", ParamName, ref param);
+            oIMEI1 = param[4];
+            oIMEI2 = param[5];
+            oMEID = param[7];
+            oNetCode = param[8];
+            oPSN = param[9];
+            oID1 = param[10];
+            oID2 = param[11];
+            oID3 = param[12];
+            oErrMessage = param[13];
+            if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
+                return true;
+            else
+                return false;
+        }
+
         /// <summary>
         /// 记录登陆信息
         /// </summary>

+ 2 - 2
UAS_MES_LGDZ/PublicMethod/Print.cs

@@ -279,7 +279,7 @@ namespace UAS_MES_NEW.PublicMethod
                                 string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                 fp_name = label.Rows[0]["fp_name"].ToString();
                                 WebClient wc = new WebClient();
-                                wc.DownloadFile("http://10.98.0.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                wc.DownloadFile("http://10.11.28.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
                             }
                         }
                     }
@@ -308,7 +308,7 @@ namespace UAS_MES_NEW.PublicMethod
                                     string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                     fp_name = label.Rows[0]["fp_name"].ToString();
                                     WebClient wc = new WebClient();
-                                    wc.DownloadFile("http://10.98.0.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                    wc.DownloadFile("http://10.11.28.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
                                     FileInfo file = new FileInfo(@"C:\打印标签\" + fp_name);
                                     file.CreationTime = Convert.ToDateTime(filelastwritetime);
                                 }

+ 9 - 0
UAS_MES_LGDZ/UAS_MES_LGDZ.csproj

@@ -587,6 +587,12 @@
     <Compile Include="FunctionCode\Make\Make_FeedingCollectionCombine.Designer.cs">
       <DependentUpon>Make_FeedingCollectionCombine.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_FuselageLabelPrintGetIMEI.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_FuselageLabelPrintGetIMEI.Designer.cs">
+      <DependentUpon>Make_FuselageLabelPrintGetIMEI.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_GetTestFileData.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1506,6 +1512,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_FeedingCollectionCombine.resx">
       <DependentUpon>Make_FeedingCollectionCombine.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_FuselageLabelPrintGetIMEI.resx">
+      <DependentUpon>Make_FuselageLabelPrintGetIMEI.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_GetTestFileData.resx">
       <DependentUpon>Make_GetTestFileData.cs</DependentUpon>
     </EmbeddedResource>

+ 1 - 1
UAS_MES_YD/FunctionCode/Packing/Packing_PalletCollection.cs

@@ -447,7 +447,7 @@ namespace UAS_MES_NEW.Packing
                 if (Delete == "Yes")
                 {
                     sql.Clear();
-                    sql.Append("select nvl(pa_iostatus,0) pa_iostatus,pa_outno from package where pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=2");
+                    sql.Append("select nvl(pa_iostatus,0) pa_iostatus,pa_outno from package where pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=3");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     if (dt.Rows.Count > 0)
                     {

+ 8 - 0
UAS_MES_YD/FunctionCode/Query/ArrayList.cs

@@ -0,0 +1,8 @@
+using System.Collections;
+
+namespace UAS_MES_NEW.Query
+{
+    internal class ArrayList<T> : ArrayList
+    {
+    }
+}

+ 235 - 317
UAS_MES_YD/FunctionCode/Query/Query_SN.Designer.cs

@@ -29,319 +29,138 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Query_SN));
-            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
-            this.label1 = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
+            this.ma_salecode_label = new System.Windows.Forms.Label();
+            this.ma_qty = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
-            this.label3 = new System.Windows.Forms.Label();
+            this.pr_detail = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
-            this.date = new System.Windows.Forms.DateTimePicker();
-            this.label6 = new System.Windows.Forms.Label();
-            this.label7 = new System.Windows.Forms.Label();
             this.label8 = new System.Windows.Forms.Label();
-            this.label9 = new System.Windows.Forms.Label();
-            this.label10 = new System.Windows.Forms.Label();
-            this.label11 = new System.Windows.Forms.Label();
-            this.currentSerial = new System.Windows.Forms.NumericUpDown();
-            this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
-            this.Print = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.BeginMac = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.num = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.status = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.seriallength = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.color = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.factory = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            ((System.ComponentModel.ISupportInitialize)(this.currentSerial)).BeginInit();
+            this.Setting = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.PrintTest = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.OneColumn = new System.Windows.Forms.RadioButton();
+            this.TwoColumn = new System.Windows.Forms.RadioButton();
+            this.ThreeColumn = new System.Windows.Forms.RadioButton();
+            this.FourColumn = new System.Windows.Forms.RadioButton();
+            this.GenSN = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.SuspendLayout();
             // 
-            // label1
-            // 
-            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(106, 313);
-            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(146, 41);
-            this.label1.TabIndex = 1;
-            this.label1.Text = "工厂代码";
+            // ma_salecode_label
+            // 
+            this.ma_salecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.ma_salecode_label.AutoSize = true;
+            this.ma_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_salecode_label.Location = new System.Drawing.Point(142, 143);
+            this.ma_salecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_salecode_label.Name = "ma_salecode_label";
+            this.ma_salecode_label.Size = new System.Drawing.Size(178, 41);
+            this.ma_salecode_label.TabIndex = 20;
+            this.ma_salecode_label.Text = "打印机列表";
+            // 
+            // ma_qty
+            // 
+            this.ma_qty.AutoSize = true;
+            this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty.Location = new System.Drawing.Point(349, 270);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_qty.Name = "ma_qty";
+            this.ma_qty.Size = new System.Drawing.Size(0, 41);
+            this.ma_qty.TabIndex = 236;
             // 
-            // label2
+            // label7
             // 
-            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(106, 181);
-            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(146, 41);
-            this.label2.TabIndex = 2;
-            this.label2.Text = "颜色代码";
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(171, 270);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(146, 41);
+            this.label7.TabIndex = 234;
+            this.label7.Text = "工单数量";
             // 
             // label5
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(106, 112);
+            this.label5.Location = new System.Drawing.Point(171, 204);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(146, 41);
-            this.label5.TabIndex = 11;
-            this.label5.Text = "产品代码";
+            this.label5.TabIndex = 232;
+            this.label5.Text = "工单编号";
             // 
-            // label3
+            // pr_detail
             // 
-            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(106, 456);
-            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(146, 41);
-            this.label3.TabIndex = 13;
-            this.label3.Text = "流水长度";
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail.Location = new System.Drawing.Point(349, 420);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.TabIndex = 241;
             // 
             // label4
             // 
             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(106, 383);
+            this.label4.Location = new System.Drawing.Point(171, 420);
             this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(146, 41);
-            this.label4.TabIndex = 15;
-            this.label4.Text = "组装状态";
-            // 
-            // date
-            // 
-            this.date.Location = new System.Drawing.Point(305, 249);
-            this.date.Name = "date";
-            this.date.Size = new System.Drawing.Size(388, 35);
-            this.date.TabIndex = 17;
-            this.date.Value = new System.DateTime(2020, 9, 7, 0, 0, 0, 0);
-            // 
-            // label6
-            // 
-            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(106, 247);
-            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(82, 41);
-            this.label6.TabIndex = 18;
-            this.label6.Text = "日期";
-            // 
-            // label7
-            // 
-            this.label7.AutoSize = true;
-            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(106, 526);
-            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(126, 41);
-            this.label7.TabIndex = 19;
-            this.label7.Text = "SN数量";
+            this.label4.TabIndex = 240;
+            this.label4.Text = "产品名称";
             // 
             // label8
             // 
             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(106, 599);
+            this.label8.Location = new System.Drawing.Point(171, 343);
             this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(157, 41);
-            this.label8.TabIndex = 21;
-            this.label8.Text = "起始MAC";
-            // 
-            // label9
-            // 
-            this.label9.AutoSize = true;
-            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(106, 44);
-            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(114, 41);
-            this.label9.TabIndex = 23;
-            this.label9.Text = "工单号";
-            // 
-            // 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(106, 669);
-            this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(146, 41);
-            this.label10.TabIndex = 25;
-            this.label10.Text = "当前流水";
-            // 
-            // label11
-            // 
-            this.label11.AutoSize = true;
-            this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label11.Location = new System.Drawing.Point(836, 44);
-            this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label11.Name = "label11";
-            this.label11.Size = new System.Drawing.Size(178, 41);
-            this.label11.TabIndex = 29;
-            this.label11.Text = "打印机列表";
-            // 
-            // currentSerial
-            // 
-            this.currentSerial.Location = new System.Drawing.Point(305, 675);
-            this.currentSerial.Name = "currentSerial";
-            this.currentSerial.Size = new System.Drawing.Size(388, 35);
-            this.currentSerial.TabIndex = 30;
-            // 
-            // Printer
-            // 
-            this.Printer.Location = new System.Drawing.Point(1030, 47);
-            this.Printer.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
-            this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(378, 45);
-            this.Printer.TabIndex = 28;
-            // 
-            // Print
-            // 
-            this.Print.AllPower = null;
-            this.Print.BackColor = System.Drawing.Color.Transparent;
-            this.Print.DownImage = ((System.Drawing.Image)(resources.GetObject("Print.DownImage")));
-            this.Print.Image = null;
-            this.Print.IsShowBorder = true;
-            this.Print.Location = new System.Drawing.Point(519, 742);
-            this.Print.Margin = new System.Windows.Forms.Padding(6);
-            this.Print.MoveImage = ((System.Drawing.Image)(resources.GetObject("Print.MoveImage")));
-            this.Print.Name = "Print";
-            this.Print.NormalImage = ((System.Drawing.Image)(resources.GetObject("Print.NormalImage")));
-            this.Print.Power = null;
-            this.Print.Size = new System.Drawing.Size(150, 56);
-            this.Print.TabIndex = 27;
-            this.Print.Text = "打印";
-            this.Print.UseVisualStyleBackColor = false;
-            this.Print.Click += new System.EventHandler(this.Print_Click);
-            // 
-            // ma_code
-            // 
-            this.ma_code.AllPower = null;
-            this.ma_code.BackColor = System.Drawing.Color.White;
-            this.ma_code.ID = null;
-            this.ma_code.Location = new System.Drawing.Point(305, 47);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
-            this.ma_code.Name = "ma_code";
-            this.ma_code.Power = null;
-            this.ma_code.Size = new System.Drawing.Size(388, 35);
-            this.ma_code.Str = null;
-            this.ma_code.Str1 = null;
-            this.ma_code.Str2 = null;
-            this.ma_code.TabIndex = 24;
-            // 
-            // BeginMac
-            // 
-            this.BeginMac.AllPower = null;
-            this.BeginMac.BackColor = System.Drawing.Color.White;
-            this.BeginMac.ID = null;
-            this.BeginMac.Location = new System.Drawing.Point(305, 601);
-            this.BeginMac.Margin = new System.Windows.Forms.Padding(6);
-            this.BeginMac.Name = "BeginMac";
-            this.BeginMac.Power = null;
-            this.BeginMac.Size = new System.Drawing.Size(388, 35);
-            this.BeginMac.Str = null;
-            this.BeginMac.Str1 = null;
-            this.BeginMac.Str2 = null;
-            this.BeginMac.TabIndex = 22;
-            // 
-            // num
-            // 
-            this.num.AllPower = null;
-            this.num.BackColor = System.Drawing.Color.White;
-            this.num.ID = null;
-            this.num.Location = new System.Drawing.Point(305, 527);
-            this.num.Margin = new System.Windows.Forms.Padding(6);
-            this.num.Name = "num";
-            this.num.Power = null;
-            this.num.Size = new System.Drawing.Size(388, 35);
-            this.num.Str = null;
-            this.num.Str1 = null;
-            this.num.Str2 = null;
-            this.num.TabIndex = 20;
-            // 
-            // status
-            // 
-            this.status.AllPower = null;
-            this.status.BackColor = System.Drawing.Color.White;
-            this.status.ID = null;
-            this.status.Location = new System.Drawing.Point(305, 386);
-            this.status.Margin = new System.Windows.Forms.Padding(6);
-            this.status.Name = "status";
-            this.status.Power = null;
-            this.status.Size = new System.Drawing.Size(388, 35);
-            this.status.Str = null;
-            this.status.Str1 = null;
-            this.status.Str2 = null;
-            this.status.TabIndex = 16;
-            // 
-            // seriallength
-            // 
-            this.seriallength.AllPower = null;
-            this.seriallength.BackColor = System.Drawing.Color.White;
-            this.seriallength.ID = null;
-            this.seriallength.Location = new System.Drawing.Point(305, 457);
-            this.seriallength.Margin = new System.Windows.Forms.Padding(6);
-            this.seriallength.Name = "seriallength";
-            this.seriallength.Power = null;
-            this.seriallength.Size = new System.Drawing.Size(388, 35);
-            this.seriallength.Str = null;
-            this.seriallength.Str1 = null;
-            this.seriallength.Str2 = null;
-            this.seriallength.TabIndex = 14;
-            this.seriallength.Text = "4";
+            this.label8.Size = new System.Drawing.Size(146, 41);
+            this.label8.TabIndex = 238;
+            this.label8.Text = "产品代码";
             // 
             // pr_code
             // 
             this.pr_code.AllPower = null;
             this.pr_code.BackColor = System.Drawing.Color.White;
             this.pr_code.ID = null;
-            this.pr_code.Location = new System.Drawing.Point(305, 118);
-            this.pr_code.Margin = new System.Windows.Forms.Padding(6);
+            this.pr_code.Location = new System.Drawing.Point(356, 352);
             this.pr_code.Name = "pr_code";
             this.pr_code.Power = null;
             this.pr_code.Size = new System.Drawing.Size(388, 35);
             this.pr_code.Str = null;
             this.pr_code.Str1 = null;
             this.pr_code.Str2 = null;
-            this.pr_code.TabIndex = 12;
-            // 
-            // color
-            // 
-            this.color.AllPower = null;
-            this.color.BackColor = System.Drawing.Color.White;
-            this.color.ID = null;
-            this.color.Location = new System.Drawing.Point(305, 186);
-            this.color.Margin = new System.Windows.Forms.Padding(6);
-            this.color.Name = "color";
-            this.color.Power = null;
-            this.color.Size = new System.Drawing.Size(388, 35);
-            this.color.Str = null;
-            this.color.Str1 = null;
-            this.color.Str2 = null;
-            this.color.TabIndex = 6;
-            this.color.Text = "5";
-            // 
-            // factory
-            // 
-            this.factory.AllPower = null;
-            this.factory.BackColor = System.Drawing.Color.White;
-            this.factory.ID = null;
-            this.factory.Location = new System.Drawing.Point(305, 315);
-            this.factory.Margin = new System.Windows.Forms.Padding(6);
-            this.factory.Name = "factory";
-            this.factory.Power = null;
-            this.factory.Size = new System.Drawing.Size(388, 35);
-            this.factory.Str = null;
-            this.factory.Str1 = null;
-            this.factory.Str2 = null;
-            this.factory.TabIndex = 5;
-            this.factory.Text = "D";
+            this.pr_code.TabIndex = 239;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = "IFALL";
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = "";
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(356, 204);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = "";
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(409, 46);
+            this.ma_code.TabIndex = 233;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "makecode";
+            this.ma_code.TextBoxEnable = true;
             // 
             // Export
             // 
@@ -350,85 +169,184 @@
             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(305, 742);
+            this.Export.Location = new System.Drawing.Point(603, 548);
             this.Export.Margin = new System.Windows.Forms.Padding(6);
             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(150, 56);
-            this.Export.TabIndex = 0;
-            this.Export.Text = "导出";
+            this.Export.TabIndex = 32;
+            this.Export.Text = "打印";
             this.Export.UseVisualStyleBackColor = false;
             this.Export.Click += new System.EventHandler(this.Export_Click);
             // 
+            // Setting
+            // 
+            this.Setting.AllPower = null;
+            this.Setting.BackColor = System.Drawing.Color.Transparent;
+            this.Setting.DownImage = ((System.Drawing.Image)(resources.GetObject("Setting.DownImage")));
+            this.Setting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Setting.Image = ((System.Drawing.Image)(resources.GetObject("Setting.Image")));
+            this.Setting.IsShowBorder = true;
+            this.Setting.Location = new System.Drawing.Point(988, 143);
+            this.Setting.Margin = new System.Windows.Forms.Padding(4);
+            this.Setting.MoveImage = ((System.Drawing.Image)(resources.GetObject("Setting.MoveImage")));
+            this.Setting.Name = "Setting";
+            this.Setting.NormalImage = ((System.Drawing.Image)(resources.GetObject("Setting.NormalImage")));
+            this.Setting.Power = null;
+            this.Setting.Size = new System.Drawing.Size(126, 48);
+            this.Setting.TabIndex = 23;
+            this.Setting.Text = "参数设置";
+            this.Setting.UseVisualStyleBackColor = true;
+            this.Setting.Click += new System.EventHandler(this.Setting_Click);
+            // 
+            // PrinterList
+            // 
+            this.PrinterList.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrinterList.Location = new System.Drawing.Point(356, 143);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8);
+            this.PrinterList.Name = "PrinterList";
+            this.PrinterList.Size = new System.Drawing.Size(426, 62);
+            this.PrinterList.TabIndex = 22;
+            // 
+            // PrintTest
+            // 
+            this.PrintTest.AllPower = null;
+            this.PrintTest.BackColor = System.Drawing.Color.Transparent;
+            this.PrintTest.DownImage = ((System.Drawing.Image)(resources.GetObject("PrintTest.DownImage")));
+            this.PrintTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintTest.Image = ((System.Drawing.Image)(resources.GetObject("PrintTest.Image")));
+            this.PrintTest.IsShowBorder = true;
+            this.PrintTest.Location = new System.Drawing.Point(826, 143);
+            this.PrintTest.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintTest.MoveImage = ((System.Drawing.Image)(resources.GetObject("PrintTest.MoveImage")));
+            this.PrintTest.Name = "PrintTest";
+            this.PrintTest.NormalImage = ((System.Drawing.Image)(resources.GetObject("PrintTest.NormalImage")));
+            this.PrintTest.Power = null;
+            this.PrintTest.Size = new System.Drawing.Size(126, 48);
+            this.PrintTest.TabIndex = 21;
+            this.PrintTest.Text = "打印测试";
+            this.PrintTest.UseVisualStyleBackColor = true;
+            this.PrintTest.Click += new System.EventHandler(this.PrintTest_Click);
+            // 
+            // OneColumn
+            // 
+            this.OneColumn.AutoSize = true;
+            this.OneColumn.Location = new System.Drawing.Point(356, 475);
+            this.OneColumn.Name = "OneColumn";
+            this.OneColumn.Size = new System.Drawing.Size(89, 28);
+            this.OneColumn.TabIndex = 242;
+            this.OneColumn.TabStop = true;
+            this.OneColumn.Text = "单排";
+            this.OneColumn.UseVisualStyleBackColor = true;
+            // 
+            // TwoColumn
+            // 
+            this.TwoColumn.AutoSize = true;
+            this.TwoColumn.Location = new System.Drawing.Point(465, 475);
+            this.TwoColumn.Name = "TwoColumn";
+            this.TwoColumn.Size = new System.Drawing.Size(89, 28);
+            this.TwoColumn.TabIndex = 243;
+            this.TwoColumn.TabStop = true;
+            this.TwoColumn.Text = "双排";
+            this.TwoColumn.UseVisualStyleBackColor = true;
+            // 
+            // ThreeColumn
+            // 
+            this.ThreeColumn.AutoSize = true;
+            this.ThreeColumn.Checked = true;
+            this.ThreeColumn.Location = new System.Drawing.Point(583, 475);
+            this.ThreeColumn.Name = "ThreeColumn";
+            this.ThreeColumn.Size = new System.Drawing.Size(89, 28);
+            this.ThreeColumn.TabIndex = 244;
+            this.ThreeColumn.TabStop = true;
+            this.ThreeColumn.Text = "三排";
+            this.ThreeColumn.UseVisualStyleBackColor = true;
+            // 
+            // FourColumn
+            // 
+            this.FourColumn.AutoSize = true;
+            this.FourColumn.Location = new System.Drawing.Point(693, 475);
+            this.FourColumn.Name = "FourColumn";
+            this.FourColumn.Size = new System.Drawing.Size(89, 28);
+            this.FourColumn.TabIndex = 245;
+            this.FourColumn.TabStop = true;
+            this.FourColumn.Text = "四排";
+            this.FourColumn.UseVisualStyleBackColor = true;
+            // 
+            // GenSN
+            // 
+            this.GenSN.AccessibleRole = System.Windows.Forms.AccessibleRole.PageTabList;
+            this.GenSN.AllPower = null;
+            this.GenSN.BackColor = System.Drawing.Color.Transparent;
+            this.GenSN.DownImage = ((System.Drawing.Image)(resources.GetObject("GenSN.DownImage")));
+            this.GenSN.Image = null;
+            this.GenSN.IsShowBorder = true;
+            this.GenSN.Location = new System.Drawing.Point(358, 548);
+            this.GenSN.Margin = new System.Windows.Forms.Padding(6);
+            this.GenSN.MoveImage = ((System.Drawing.Image)(resources.GetObject("GenSN.MoveImage")));
+            this.GenSN.Name = "GenSN";
+            this.GenSN.NormalImage = ((System.Drawing.Image)(resources.GetObject("GenSN.NormalImage")));
+            this.GenSN.Power = null;
+            this.GenSN.Size = new System.Drawing.Size(150, 56);
+            this.GenSN.TabIndex = 246;
+            this.GenSN.Text = "生成SN";
+            this.GenSN.UseVisualStyleBackColor = false;
+            this.GenSN.Click += new System.EventHandler(this.GenSN_Click);
+            // 
             // Query_SN
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1494, 1075);
-            this.Controls.Add(this.currentSerial);
-            this.Controls.Add(this.label11);
-            this.Controls.Add(this.Printer);
-            this.Controls.Add(this.Print);
-            this.Controls.Add(this.label10);
-            this.Controls.Add(this.ma_code);
-            this.Controls.Add(this.label9);
-            this.Controls.Add(this.BeginMac);
-            this.Controls.Add(this.label8);
-            this.Controls.Add(this.num);
-            this.Controls.Add(this.label7);
-            this.Controls.Add(this.label6);
-            this.Controls.Add(this.date);
-            this.Controls.Add(this.status);
+            this.ClientSize = new System.Drawing.Size(2034, 1118);
+            this.Controls.Add(this.GenSN);
+            this.Controls.Add(this.FourColumn);
+            this.Controls.Add(this.ThreeColumn);
+            this.Controls.Add(this.TwoColumn);
+            this.Controls.Add(this.OneColumn);
+            this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.label4);
-            this.Controls.Add(this.seriallength);
-            this.Controls.Add(this.label3);
             this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.label8);
+            this.Controls.Add(this.ma_qty);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.ma_code);
             this.Controls.Add(this.label5);
-            this.Controls.Add(this.color);
-            this.Controls.Add(this.factory);
-            this.Controls.Add(this.label2);
-            this.Controls.Add(this.label1);
             this.Controls.Add(this.Export);
+            this.Controls.Add(this.Setting);
+            this.Controls.Add(this.PrinterList);
+            this.Controls.Add(this.PrintTest);
+            this.Controls.Add(this.ma_salecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "Query_SN";
-            this.Tag = "Query!SpecialReport";
-            this.Text = "Query_SpecialReport";
-            this.Load += new System.EventHandler(this.Query_SpecialReport_Load);
-            ((System.ComponentModel.ISupportInitialize)(this.currentSerial)).EndInit();
+            this.Tag = "Query_SN";
+            this.Text = "打印机调试";
+            this.Load += new System.EventHandler(this.SystemSetting_PrinterTest_Load);
             this.ResumeLayout(false);
             this.PerformLayout();
 
         }
 
         #endregion
-
+        private System.Windows.Forms.Label ma_salecode_label;
+        private CustomControl.ButtonUtil.NormalButton PrintTest;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrinterList;
+        private CustomControl.ButtonUtil.NormalButton Setting;
         private CustomControl.ButtonUtil.NormalButton Export;
-        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.Label label2;
-        private CustomControl.TextBoxWithIcon.EnterTextBox factory;
-        private CustomControl.TextBoxWithIcon.EnterTextBox color;
-        private CustomControl.TextBoxWithIcon.EnterTextBox pr_code;
+        private System.Windows.Forms.Label ma_qty;
+        private System.Windows.Forms.Label label7;
+        private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
         private System.Windows.Forms.Label label5;
-        private CustomControl.TextBoxWithIcon.EnterTextBox seriallength;
-        private System.Windows.Forms.Label label3;
-        private CustomControl.TextBoxWithIcon.EnterTextBox status;
+        private System.Windows.Forms.Label pr_detail;
         private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.DateTimePicker date;
-        private System.Windows.Forms.Label label6;
-        private CustomControl.TextBoxWithIcon.EnterTextBox num;
-        private System.Windows.Forms.Label label7;
-        private CustomControl.TextBoxWithIcon.EnterTextBox BeginMac;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pr_code;
         private System.Windows.Forms.Label label8;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ma_code;
-        private System.Windows.Forms.Label label9;
-        private System.Windows.Forms.Label label10;
-        private CustomControl.ButtonUtil.NormalButton Print;
-        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
-        private System.Windows.Forms.Label label11;
-        private System.Windows.Forms.NumericUpDown currentSerial;
+        private System.Windows.Forms.RadioButton OneColumn;
+        private System.Windows.Forms.RadioButton TwoColumn;
+        private System.Windows.Forms.RadioButton ThreeColumn;
+        private System.Windows.Forms.RadioButton FourColumn;
+        private CustomControl.ButtonUtil.NormalButton GenSN;
     }
 }

+ 292 - 307
UAS_MES_YD/FunctionCode/Query/Query_SN.cs

@@ -1,13 +1,12 @@
-using LabelManager2;
+using Seagull.BarTender.Print;
 using System;
 using System.Data;
-using System.Security.Cryptography;
-using System.Text;
-using System.Threading;
+using System.Drawing;
+using System.Drawing.Printing;
+using System.Text.RegularExpressions;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
-using UAS_MES_NEW.PublicForm;
 using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Query
@@ -15,107 +14,186 @@ namespace UAS_MES_NEW.Query
     public partial class Query_SN : Form
     {
 
-        DataHelper dh = SystemInf.dh;
+        int serialnum = 0;
+        //客户的流水号
+        int custserialnum = 0;
+
+        Engine engine = new Engine();
 
-        ApplicationClass lbl;
+        LabelFormatDocument format;
+
+        DataHelper dh = SystemInf.dh;
 
-        Thread InitPrint;
+        //前缀条件
 
-        Document doc;
+        //生成条码的流水号
 
+        DataTable Dbfind;
         public Query_SN()
         {
             InitializeComponent();
         }
 
-        private void Export_Click(object sender, EventArgs e)
+        private void PrintTest_Click(object sender, EventArgs e)
         {
-            ExcelExport("");
+            PrintDocument print = new PrintDocument();
+            print.PrinterSettings.PrinterName = PrinterList.Text;
+            print.PrintPage += Print_PrintPage;
+            print.Print();
         }
 
-        //选择导出Excel时是选择导出数据的还是模板
-        private void ExcelExport(string DataOrTemplet)
+        private void Print_PrintPage(object sender, PrintPageEventArgs e)
         {
-            //Data表示导出数据
-            //Templet表示导出模板
-            MD5 md5 = MD5.Create();
-            folderBrowserDialog1.Description = "选择导出的路径";
-            DialogResult result = folderBrowserDialog1.ShowDialog();
-            if (result == DialogResult.OK)
-            {
-                string FolderPath = folderBrowserDialog1.SelectedPath;
-                ExcelHandler eh = new ExcelHandler();
-                DataTable dt = new DataTable();
-                dt.Columns.Add("工单号");
-                dt.Columns.Add("序列号");
-                dt.Columns.Add("MAC");
-                dt.Columns.Add("BT");
-                dt.Columns.Add("拓展栏位1");
-                dt.Columns.Add("拓展栏位2");
-                dt.Columns.Add("拓展栏位3");
-                dt.Columns.Add("备注");
-                string prefix = BeginMac.Text.Substring(0, 8);
-                string suffix = BeginMac.Text.Substring(8, 4);
-                int Number = Int32.Parse(suffix, System.Globalization.NumberStyles.HexNumber);
-                for (decimal i = currentSerial.Value; i < currentSerial.Value + int.Parse(num.Text); i++)
-                {
-                    DataRow dr = dt.NewRow();
-
-                    dr["工单号"] = ma_code.Text;
-                    dr["MAC"] = prefix + Number.ToString("X");
-                    Number = Number + 1;
-                    dr["BT"] = prefix + Number.ToString("X");
-                    Number = Number + 1;
-
-                    string serial = pr_code.Text
-                        + color.Text
-                        + GetDate(date.Value.ToString("yyyy"), date.Value.ToString("MM"), date.Value.ToString("dd"))
-                        + factory.Text
-                        + status.Text
-                        + lpad(int.Parse(seriallength.Text), (i + 1).ToString());
-                    string encode = MD5Encoding(serial + ")G$d");
-                    dr["序列号"] = serial + encode.Substring(encode.Length - 2);
-                    dt.Rows.Add(dr);
-                }
-                eh.ExportExcel(dt, FolderPath);
-            }
+            Graphics g = e.Graphics;
+            float leftMargin = 10f; //左边距
+            SolidBrush myBrush = new SolidBrush(Color.Black);//刷子
+            float yPosition = 5f;//行定位
+            Font printFont = new Font("微软雅黑", 20f, FontStyle.Bold);//设置字体
+            yPosition += printFont.GetHeight(g);//另起一行
+            g.DrawString("成功连接此打印机", printFont, myBrush, leftMargin, yPosition, new StringFormat());
         }
 
-        private void Query_SpecialReport_Load(object sender, EventArgs e)
+        private void Setting_Click(object sender, EventArgs e)
         {
-            InitPrint = new Thread(InPrint);
-            SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
-            BaseUtil.SetFormCenter(stw);
-            stw.ShowDialog();
-            doc = lbl.Documents.Open(System.Windows.Forms.Application.StartupPath + @"\SN.lab");
+            PrintDialog printd = new PrintDialog();
+            printd.PrinterSettings.PrinterName = PrinterList.Text;
+            printd.ShowDialog();
         }
 
-        private void InPrint()
+        private void Export_Click(object sender, EventArgs e)
         {
-            try
+            if (!dh.CheckExist("make", "ma_code='" + ma_code.Text + "'"))
             {
-                lbl = new ApplicationClass();
-                BaseUtil.WriteLbl();
+                MessageBox.Show("工单号不存在");
+                return;
             }
-            catch (Exception)
+            DataTable dt = (DataTable)dh.ExecuteSql("select msl_sncode from makesnlist where  msl_makecode='" + ma_code.Text + "'", "select");
+            if (dt.Rows.Count == 0)
             {
-                MessageBox.Show("未正确安装CodeSoft软件");
+                MessageBox.Show("工单号未生成SN");
+                return;
+            }
+            if (OneColumn.Checked)
+            {
+                format = engine.Documents.Open(Application.StartupPath + "/单排.btw");
+                for (int i = 0; i < dt.Rows.Count; i = i + 1)
+                {
+                    int temp = i;
+                    for (int j = 0; j < format.SubStrings.Count; j++)
+                    {
+                        switch (format.SubStrings[j].Name)
+                        {
+                            case "SN":
+                                format.SubStrings[j].Value = dt.Rows[i]["msl_sncode"].ToString();
+                                break;
+                            default:
+                                break;
+                        }
+                    }
+                    format.PrintSetup.PrinterName = PrinterList.Text;
+                    format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                    format.Print();
+                }
+            }
+            if (TwoColumn.Checked)
+            {
+                format = engine.Documents.Open(Application.StartupPath + "/双排.btw");
+                for (int i = 0; i < dt.Rows.Count; i = i + 2)
+                {
+                    int temp = i;
+                    for (int j = 0; j < format.SubStrings.Count; j++)
+                    {
+                        switch (format.SubStrings[j].Name)
+                        {
+                            case "SN":
+                                format.SubStrings[j].Value = dt.Rows[i]["msl_sncode"].ToString();
+                                break;
+                            case "SN2":
+                                format.SubStrings[j].Value = dt.Rows[i + 1]["msl_sncode"].ToString();
+                                break;
+                            default:
+                                break;
+                        }
+                    }
+                    format.PrintSetup.PrinterName = PrinterList.Text;
+                    format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                    format.Print();
+                }
+            }
+            if (ThreeColumn.Checked)
+            {
+                format = engine.Documents.Open(Application.StartupPath + "/Label.btw");
+                for (int i = 0; i < dt.Rows.Count; i = i + 3)
+                {
+                    int temp = i;
+                    for (int j = 0; j < format.SubStrings.Count; j++)
+                    {
+                        switch (format.SubStrings[j].Name)
+                        {
+                            case "SN":
+                                format.SubStrings[j].Value = dt.Rows[i]["msl_sncode"].ToString();
+                                break;
+                            case "SN2":
+                                format.SubStrings[j].Value = dt.Rows[i + 1]["msl_sncode"].ToString();
+                                break;
+                            case "SN3":
+                                format.SubStrings[j].Value = dt.Rows[i + 2]["msl_sncode"].ToString();
+                                break;
+                            default:
+                                break;
+                        }
+                    }
+                    format.PrintSetup.PrinterName = PrinterList.Text;
+                    format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                    format.Print();
+                }
+            }
+            if (FourColumn.Checked)
+            {
+                format = engine.Documents.Open(Application.StartupPath + "/四排.btw");
+                for (int i = 0; i < dt.Rows.Count; i = i + 4)
+                {
+                    int temp = i;
+                    for (int j = 0; j < format.SubStrings.Count; j++)
+                    {
+                        switch (format.SubStrings[j].Name)
+                        {
+                            case "SN":
+                                format.SubStrings[j].Value = dt.Rows[i]["msl_sncode"].ToString();
+                                break;
+                            case "SN2":
+                                format.SubStrings[j].Value = dt.Rows[i + 1]["msl_sncode"].ToString();
+                                break;
+                            case "SN3":
+                                format.SubStrings[j].Value = dt.Rows[i + 2]["msl_sncode"].ToString();
+                                break;
+                            case "SN4":
+                                format.SubStrings[j].Value = dt.Rows[i + 3]["msl_sncode"].ToString();
+                                break;
+                            default:
+                                break;
+                        }
+                    }
+                    format.PrintSetup.PrinterName = PrinterList.Text;
+                    format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                    format.Print();
+                }
             }
         }
 
-        private static string MD5Encoding(string rawPass)
+        public string BarcodeMethod1(string Prefix, string Suffix, int Index, int Length, int radix)
         {
-            // 创建MD5类的默认实例:MD5CryptoServiceProvider
-            MD5 md5 = MD5.Create();
-            byte[] bs = Encoding.UTF8.GetBytes(rawPass);
-            byte[] hs = md5.ComputeHash(bs);
-            StringBuilder stb = new StringBuilder();
-            foreach (byte b in hs)
+            string str = Prefix;
+            //如果是流水则需要在前面加0
+            string serialcode = BaseUtil.DToAny(custserialnum, radix);
+            for (int j = serialcode.ToString().Length; j < Length; j++)
             {
-                // 以十六进制格式格式化
-                stb.Append(b.ToString("x2"));
+                serialcode = "0" + serialcode;
             }
-            return stb.ToString().ToUpper();
+            str += serialcode;
+            str += Suffix;
+            custserialnum = custserialnum + 1;
+            return str;
         }
 
         private static string lpad(int length, string number)
@@ -128,245 +206,152 @@ namespace UAS_MES_NEW.Query
             return number;
         }
 
-        private string GetDate(string year, string month, string day)
+        private void SystemSetting_PrinterTest_Load(object sender, EventArgs e)
         {
-            string returndate = "";
-            switch (year)
-            {
-                case "2020":
-                    returndate = "C";
-                    break;
-                case "2021":
-                    returndate = "D";
-                    break;
-                case "2022":
-                    returndate = "E";
-                    break;
-                case "2023":
-                    returndate = "F";
-                    break;
-                case "2024":
-                    returndate = "G";
-                    break;
-                case "2025":
-                    returndate = "H";
-                    break;
-                case "2026":
-                    returndate = "I";
-                    break;
-                case "2027":
-                    returndate = "J";
-                    break;
-                case "2028":
-                    returndate = "K";
-                    break;
-                case "2029":
-                    returndate = "L";
-                    break;
-                case "2030":
-                    returndate = "M";
-                    break;
-                case "2031":
-                    returndate = "N";
-                    break;
-                case "2032":
-                    returndate = "O";
-                    break;
-                case "2033":
-                    returndate = "P";
-                    break;
-                case "2034":
-                    returndate = "Q";
-                    break;
-                default:
-                    break;
-            }
-            switch (month)
-            {
-                case "01":
-                    returndate += "1";
-                    break;
-                case "02":
-                    returndate += "2";
-                    break;
-                case "03":
-                    returndate += "3";
-                    break;
-                case "04":
-                    returndate += "4";
-                    break;
-                case "05":
-                    returndate += "5";
-                    break;
-                case "06":
-                    returndate += "6";
-                    break;
-                case "07":
-                    returndate += "7";
-                    break;
-                case "08":
-                    returndate += "8";
-                    break;
-                case "09":
-                    returndate += "9";
-                    break;
-                case "10":
-                    returndate += "A";
-                    break;
-                case "11":
-                    returndate += "B";
-                    break;
-                case "12":
-                    returndate += "C";
-                    break;
-                default:
-                    break;
-            }
-            switch (day)
+            engine.Start();
+
+
+            ma_code.TableName = " make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单编号,pr_code # 产品编号,pr_spec # 型号";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code" };
+            //ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += pr_code_DbChange;
+        }
+
+        private void pr_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+            DataTable dt = (DataTable)dh.ExecuteSql("select ma_qty,ma_prodcode,pr_detail from make left join product on ma_prodcode=pr_code  where ma_code='" + ma_code.Text + "'", "select");
+            if (dt.Rows.Count > 0)
             {
-                case "01":
-                    returndate += "1";
-                    break;
-                case "02":
-                    returndate += "2";
-                    break;
-                case "03":
-                    returndate += "3";
-                    break;
-                case "04":
-                    returndate += "4";
-                    break;
-                case "05":
-                    returndate += "5";
-                    break;
-                case "06":
-                    returndate += "6";
-                    break;
-                case "07":
-                    returndate += "7";
-                    break;
-                case "08":
-                    returndate += "8";
-                    break;
-                case "09":
-                    returndate += "9";
-                    break;
-                case "10":
-                    returndate += "A";
-                    break;
-                case "11":
-                    returndate += "B";
-                    break;
-                case "12":
-                    returndate += "C";
-                    break;
-                case "13":
-                    returndate += "D";
-                    break;
-                case "14":
-                    returndate += "E";
-                    break;
-                case "15":
-                    returndate += "F";
-                    break;
-                case "16":
-                    returndate += "G";
-                    break;
-                case "17":
-                    returndate += "H";
-                    break;
-                case "18":
-                    returndate += "I";
-                    break;
-                case "19":
-                    returndate += "J";
-                    break;
-                case "20":
-                    returndate += "K";
-                    break;
-                case "21":
-                    returndate += "L";
-                    break;
-                case "22":
-                    returndate += "M";
-                    break;
-                case "23":
-                    returndate += "N";
-                    break;
-                case "24":
-                    returndate += "O";
-                    break;
-                case "25":
-                    returndate += "P";
-                    break;
-                case "26":
-                    returndate += "Q";
-                    break;
-                case "27":
-                    returndate += "R";
-                    break;
-                case "28":
-                    returndate += "S";
-                    break;
-                case "29":
-                    returndate += "T";
-                    break;
-                case "30":
-                    returndate += "U";
-                    break;
-                case "31":
-                    returndate += "V";
-                    break;
-                default:
-                    break;
+                pr_code.Text = dt.Rows[0]["ma_prodcode"].ToString();
+                ma_qty.Text = dt.Rows[0]["ma_qty"].ToString();
+                pr_detail.Text = dt.Rows[0]["pr_detail"].ToString();
             }
-            return returndate;
         }
 
-        private void Print_Click(object sender, EventArgs e)
+        private void GenSN_Click(object sender, EventArgs e)
         {
+            string Prefix = "";
 
-            DataTable dt = new DataTable();
-            dt.Columns.Add("工单号");
-            dt.Columns.Add("序列号");
-            dt.Columns.Add("MAC");
-            dt.Columns.Add("BT");
-            dt.Columns.Add("拓展栏位1");
-            dt.Columns.Add("拓展栏位2");
-            dt.Columns.Add("拓展栏位3");
-            dt.Columns.Add("备注");
-            string prefix = BeginMac.Text.Substring(0, 8);
-            string suffix = BeginMac.Text.Substring(8, 4);
-            int Number = Int32.Parse(suffix, System.Globalization.NumberStyles.HexNumber);
-            for (decimal i = currentSerial.Value; i < currentSerial.Value + int.Parse(num.Text); i++)
+            string Suffix = "";
+            //获取编码规则
+            if (!dh.CheckExist("make", "ma_code='" + ma_code.Text + "'"))
             {
-                DataRow dr = dt.NewRow();
-
-                dr["工单号"] = ma_code.Text;
-                dr["MAC"] = prefix + Number.ToString("X");
-                Number = Number + 1;
-                dr["BT"] = prefix + Number.ToString("X");
-                Number = Number + 1;
-
-                string serial = pr_code.Text
-                    + color.Text
-                    + GetDate(date.Value.ToString("yyyy"), date.Value.ToString("MM"), date.Value.ToString("dd"))
-                    + factory.Text
-                    + status.Text
-                    + lpad(int.Parse(seriallength.Text), (i + 1).ToString());
-                string encode = MD5Encoding(serial + ")G$d");
-                dr["序列号"] = serial + encode.Substring(encode.Length - 2);
-                dt.Rows.Add(dr);
-                for (int j = 0; j < doc.Variables.FormVariables.Count; j++)
+                MessageBox.Show("工单号不存在");
+                return;
+            }
+            if (dh.getRowCount("makesnlist", "msl_makecode='" + ma_code.Text + "'") > 0)
+            {
+                MessageBox.Show("工单号" + ma_code.Text + "已存在导入清单");
+                return;
+            }
+            DataTable dt = (DataTable)dh.ExecuteSql("select pr_exbarcode,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + ma_code.Text + "'", "select");
+            string pr_exbarcode = "";
+            string ma_qty = "";
+            if (dt.Rows.Count > 0)
+            {
+                pr_exbarcode = dt.Rows[0]["pr_exbarcode"].ToString();
+                ma_qty = dt.Rows[0]["ma_qty"].ToString();
+            }
+            DataTable Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_type,nrd_radix,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_code='" + pr_exbarcode + "' order by nrd_detno", "select");
+            //如果没有则取公共规则
+            if (Nr.Rows.Count == 0)
+                Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_radix,nrd_type,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_custcode is null and nr_isdefault <> 0 order by nrd_detno", "select");
+            //用于过滤参数的正则表达式
+            Regex match = new Regex("{\\w+}");
+            //用于存放每一项的明细的数据
+            string[] NrData = new string[Nr.Rows.Count];
+            //流水号的索引
+            int SerialNumIndex = 0;
+            //流水长度
+            int SerialNumLength = 0;
+            //存放键值对
+            int Radix = 10;
+            string PrefixFixed = "";
+            for (int m = 0; m < Nr.Rows.Count; m++)
+            {
+                switch (Nr.Rows[m]["nrd_type"].ToString())
                 {
-                    if (doc.Variables.FormVariables.Item(j + 1).Name.ToUpper() == "SN")
-                    {
-                        doc.Variables.FormVariables.Item(j + 1).Value = (serial + encode.Substring(encode.Length - 2));
-                    }
+                    //常量直接进行拼接
+                    case "常量":
+                        NrData[m] = Nr.Rows[m]["nrd_sql"].ToString();
+                        Prefix += NrData[m];
+                        Suffix += NrData[m];
+                        break;
+                    case "SQL":
+                        string SQL = Nr.Rows[m]["nrd_sql"].ToString();
+                        DataTable Temp;
+                        //如果不包含参数替换
+                        if (SQL.IndexOf("{") == 0)
+                        {
+                            Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                        }
+                        else
+                        {
+                            //替换参数后重新执行SQL
+                            foreach (Match mch in match.Matches(SQL))
+                            {
+                                SQL = SQL.Replace(mch.Value.Trim(), "'" + ma_code.Text + "'");
+                            }
+                            Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                        }
+                        if (Temp.Rows.Count > 0)
+                        {
+                            NrData[m] = Temp.Rows[0][0].ToString();
+                            Prefix += NrData[m];
+                            Suffix += NrData[m];
+                        }
+                        else
+                        {
+                            NrData[m] = "";
+                            Prefix += NrData[m];
+                            Suffix += NrData[m];
+                        }
+                        break;
+                    //流水需要通过MaxNumber去取
+                    case "流水":
+                        NrData[m] = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + pr_exbarcode + "'").ToString();
+                        Suffix = "";
+                        PrefixFixed = Prefix;
+                        //设置当前流水
+                        custserialnum = int.Parse(NrData[m] == "" ? "0" : NrData[m]);
+                        SerialNumIndex = m;
+                        SerialNumLength = int.Parse(Nr.Rows[m]["nrd_length"].ToString());
+                        Radix = int.Parse(Nr.Rows[m]["nrd_radix"].ToString());
+                        break;
+                    default:
+                        break;
                 }
-                doc.Printer.SwitchTo(Printer.Text);
-                doc.PrintDocument(1);
             }
+            //获取最大的流水号
+            string maxnum = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + pr_exbarcode + "' and rmn_prefix='" + Prefix + "'").ToString();
+            //如果流水号为空则插入一条新记录,从1开始取
+            if (maxnum == "")
+            {
+                dh.ExecuteSql("insert into RuleMaxNum(rmn_id,rmn_nrcode,rmn_prefix,rmn_maxnumber) values(RuleMaxNum_seq.nextval,'" + pr_exbarcode + "','" + Prefix + "','1')", "insert");
+                custserialnum = 1;
+            }
+            //如果流水号不为空则取当前流水
+            else
+            {
+                custserialnum = int.Parse(maxnum);
+            }
+            //遍历整个Grid,勾选的项目全部进行条码生成
+            ArrayList<string> custbarcode = new ArrayList<string>();
+            for (int i = 0; i < int.Parse(ma_qty); i++)
+            {
+                custbarcode.Add(BarcodeMethod1(PrefixFixed, Suffix, SerialNumIndex, SerialNumLength, Radix));
+            }
+            //插入条码
+            string sql = "insert into makesnlist(MSL_ID, MSL_INDATE, MSL_MAKECODE, MSL_SNCODE, MSL_TYPE)" +
+                "values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "',:custbarcode,'before')";
+            dh.BatchInsert(sql, new string[] { "custbarcode" }, custbarcode.ToArray(), custbarcode.ToArray());
+            //更新最大流水号
+            dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + pr_exbarcode + "' and rmn_prefix='" + Prefix + "'");
+            MessageBox.Show("工单" + ma_code.Text + "生成SN清单成功");
         }
     }
-}
+}

+ 268 - 9
UAS_MES_YD/FunctionCode/Query/Query_SN.resx

@@ -117,11 +117,8 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="Print.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Export.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -133,7 +130,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Print.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Export.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -146,7 +143,7 @@
         gg==
 </value>
   </data>
-  <data name="Print.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Export.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -159,7 +156,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Export.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Setting.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -171,7 +168,100 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Export.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Setting.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+</value>
+  </data>
+  <data name="Setting.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -184,7 +274,176 @@
         gg==
 </value>
   </data>
-  <data name="Export.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Setting.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="PrintTest.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="PrintTest.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+</value>
+  </data>
+  <data name="PrintTest.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="PrintTest.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="GenSN.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="GenSN.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="GenSN.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE

+ 173 - 0
UAS_MES_YD/FunctionCode/Special/Special_CancelMaterial.Designer.cs

@@ -0,0 +1,173 @@
+namespace UAS_MES_NEW.Special
+{
+    partial class Special_CancelMaterial
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Special_CancelCollection));
+            this.sn_code_label = new System.Windows.Forms.Label();
+            this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Confirm = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ms_makecode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // sn_code_label
+            // 
+            this.sn_code_label.AutoSize = true;
+            this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sn_code_label.Location = new System.Drawing.Point(68, 259);
+            this.sn_code_label.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
+            this.sn_code_label.Name = "sn_code_label";
+            this.sn_code_label.Size = new System.Drawing.Size(114, 41);
+            this.sn_code_label.TabIndex = 104;
+            this.sn_code_label.Text = "序列号";
+            // 
+            // sn_code
+            // 
+            this.sn_code.AllPower = null;
+            this.sn_code.BackColor = System.Drawing.Color.White;
+            this.sn_code.ID = null;
+            this.sn_code.Location = new System.Drawing.Point(226, 262);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(8);
+            this.sn_code.Name = "sn_code";
+            this.sn_code.Power = null;
+            this.sn_code.Size = new System.Drawing.Size(348, 35);
+            this.sn_code.Str = null;
+            this.sn_code.Str1 = null;
+            this.sn_code.Str2 = null;
+            this.sn_code.TabIndex = 140;
+            // 
+            // Confirm
+            // 
+            this.Confirm.AllPower = null;
+            this.Confirm.BackColor = System.Drawing.Color.Transparent;
+            this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
+            this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
+            this.Confirm.IsShowBorder = true;
+            this.Confirm.Location = new System.Drawing.Point(660, 258);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(8);
+            this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
+            this.Confirm.Name = "Confirm";
+            this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
+            this.Confirm.Power = null;
+            this.Confirm.Size = new System.Drawing.Size(120, 50);
+            this.Confirm.TabIndex = 141;
+            this.Confirm.Text = "确认";
+            this.Confirm.UseVisualStyleBackColor = true;
+            this.Confirm.Click += new System.EventHandler(this.Confirm_Click);
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(832, 26);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(8);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(460, 614);
+            this.OperateResult.TabIndex = 142;
+            this.OperateResult.Text = "";
+            // 
+            // Clean
+            // 
+            this.Clean.AllPower = null;
+            this.Clean.BackColor = System.Drawing.Color.Transparent;
+            this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
+            this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
+            this.Clean.IsShowBorder = true;
+            this.Clean.Location = new System.Drawing.Point(1002, 659);
+            this.Clean.Margin = new System.Windows.Forms.Padding(8);
+            this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
+            this.Clean.Name = "Clean";
+            this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
+            this.Clean.Power = null;
+            this.Clean.Size = new System.Drawing.Size(120, 50);
+            this.Clean.TabIndex = 143;
+            this.Clean.Text = "清除";
+            this.Clean.UseVisualStyleBackColor = true;
+            this.Clean.Click += new System.EventHandler(this.Clean_Click);
+            // 
+            // ms_makecode
+            // 
+            this.ms_makecode.AllPower = null;
+            this.ms_makecode.BackColor = System.Drawing.Color.White;
+            this.ms_makecode.ID = null;
+            this.ms_makecode.Location = new System.Drawing.Point(226, 185);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(8);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Power = null;
+            this.ms_makecode.Size = new System.Drawing.Size(348, 35);
+            this.ms_makecode.Str = null;
+            this.ms_makecode.Str1 = null;
+            this.ms_makecode.Str2 = null;
+            this.ms_makecode.TabIndex = 145;
+            // 
+            // label1
+            // 
+            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(68, 182);
+            this.label1.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(114, 41);
+            this.label1.TabIndex = 144;
+            this.label1.Text = "工单号";
+            // 
+            // Special_CancelCollection
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1566, 802);
+            this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.Clean);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.Confirm);
+            this.Controls.Add(this.sn_code);
+            this.Controls.Add(this.sn_code_label);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.Name = "Special_CancelCollection";
+            this.Tag = "Special!CancelCollection";
+            this.Text = "取消采集";
+            this.Load += new System.EventHandler(this.Special_CancelCollection_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Label sn_code_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox sn_code;
+        private CustomControl.ButtonUtil.NormalButton Confirm;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private CustomControl.ButtonUtil.NormalButton Clean;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ms_makecode;
+        private System.Windows.Forms.Label label1;
+    }
+}

+ 61 - 0
UAS_MES_YD/FunctionCode/Special/Special_CancelMaterial.cs

@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Drawing;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Special
+{
+    public partial class Special_CancelMaterial : Form
+    {
+
+        DataHelper dh = SystemInf.dh;
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        public Special_CancelMaterial()
+        {
+            InitializeComponent();
+        }
+
+        private void Confirm_Click(object sender, EventArgs e)
+        {
+            //获取序列号的途程
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_firstsn,ms_id,ms_nextstepcode,ms_currentstepcode,ms_makecode,ms_status,ms_checkno,ms_craftcode,ms_prodcode,ms_stepcode from makeserial where ms_sncode='" + sn_code.Text + "' and ms_makecode='" + ms_makecode.Text + "' order by ms_id desc", "select");
+            if (dt.Rows.Count > 0)
+            {
+                string pr_code = dt.Rows[0]["ms_prodcode"].ToString();
+                string cr_code = dt.Rows[0]["ms_craftcode"].ToString();
+                string ms_nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
+                string ms_stepcode = dt.Rows[0]["ms_stepcode"].ToString();
+                string ms_checkno = dt.Rows[0]["ms_checkno"].ToString();
+                string ms_status = dt.Rows[0]["ms_status"].ToString();
+                string ms_currentstepcode = dt.Rows[0]["ms_currentstepcode"].ToString();
+                string ms_id = dt.Rows[0]["ms_id"].ToString();
+                string ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
+                if (ms_status != "3")
+                {
+                    OperateResult.AppendText(">>序列号" + sn_code.Text + "不处于维修状态,不允许拆解" + ms_makecode.Text + "\n", Color.Red, sn_code);
+                    return;
+                }
+                dh.ExecuteSql("update craftmaterial set cm_status=-1 where cm_firstsn='" + ms_firstsn + "' and cm_makecode='" + ms_makecode.Text + "'", "update");
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "解绑物料", "解绑物料成功", sn_code.Text, "");
+                OperateResult.AppendText(">>序列号" + sn_code.Text + "成功解除绑定\n", Color.Green, sn_code);
+            }
+            else OperateResult.AppendText(">>序列号" + sn_code.Text + "不存在于工单" + ms_makecode.Text + "\n", Color.Red, sn_code);
+        }
+
+        private void Clean_Click(object sender, EventArgs e)
+        {
+            OperateResult.Clear();
+        }
+
+        private void Special_CancelCollection_Load(object sender, EventArgs e)
+        {
+
+        }
+    }
+}

+ 383 - 0
UAS_MES_YD/FunctionCode/Special/Special_CancelMaterial.resx

@@ -0,0 +1,383 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="Confirm.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Confirm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+</value>
+  </data>
+  <data name="Confirm.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Confirm.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Clean.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+</value>
+  </data>
+  <data name="Clean.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Clean.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 37 - 0
UAS_MES_YD/PublicMethod/BaseUtil.cs

@@ -48,6 +48,43 @@ namespace UAS_MES_NEW.PublicMethod
                return GetControl(ctl.Parent, Name);
         }
 
+        public static string DToAny(double DB, int Type)
+        {
+            string H = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+            long D;
+            double B;
+            string tempD = "", tempB = "";
+            D = (long)DB;
+            B = DB - D;
+            if (D == 0)
+            {
+                tempD = "0";
+            }
+            while (D != 0)
+            {
+                tempD = H[(((int)D % Type))] + tempD;
+                D = D / Type;
+            }
+            for (int i = 0; i < 7; i++)
+            {
+                if (B == 0)
+                {
+                    break;
+                }
+                tempB += H[((int)(B * Type))];
+                B = B * Type - (int)(B * Type);
+            }
+            if (tempB == "")
+            {
+                return tempD;
+            }
+            else
+            {
+                return tempD + "." + tempB;
+            }
+        }
+
+
         /// <summary>
         /// 通过DataTable的ColumnName和Caption来拼接一条语句
         /// </summary>

+ 19 - 9
UAS_MES_YD/UAS_MES_YD.csproj

@@ -946,6 +946,7 @@
     <Compile Include="FunctionCode\Packing\Packing_ProdWeightSet.Designer.cs">
       <DependentUpon>Packing_ProdWeightSet.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\ArrayList.cs" />
     <Compile Include="FunctionCode\Query\Query_ExeProgress.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -976,12 +977,6 @@
     <Compile Include="FunctionCode\Query\Query_DateRate.Designer.cs">
       <DependentUpon>Query_DateRate.cs</DependentUpon>
     </Compile>
-    <Compile Include="FunctionCode\Query\Query_SN.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="FunctionCode\Query\Query_SN.Designer.cs">
-      <DependentUpon>Query_SN.cs</DependentUpon>
-    </Compile>
     <Compile Include="FunctionCode\Query\Query_SOP.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -994,6 +989,12 @@
     <Compile Include="FunctionCode\Query\Query_SpecialReport.Designer.cs">
       <DependentUpon>Query_SpecialReport.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\Query_SN.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_SN.Designer.cs">
+      <DependentUpon>Query_SN.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\SMT\SMT_ChangeLine.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1030,6 +1031,12 @@
     <Compile Include="FunctionCode\SMT\SMT_WaringSetting.Designer.cs">
       <DependentUpon>SMT_WaringSetting.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Special\Special_CancelMaterial.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_CancelMaterial.Designer.cs">
+      <DependentUpon>Special_CancelMaterial.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Special\Special_CancelOQCToLastStep.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1641,15 +1648,15 @@
     <EmbeddedResource Include="FunctionCode\Query\Query_DateRate.resx">
       <DependentUpon>Query_DateRate.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="FunctionCode\Query\Query_SN.resx">
-      <DependentUpon>Query_SN.cs</DependentUpon>
-    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_SOP.resx">
       <DependentUpon>Query_SOP.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_SpecialReport.resx">
       <DependentUpon>Query_SpecialReport.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_SN.resx">
+      <DependentUpon>Query_SN.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\SMT\SMT_ChangeLine.resx">
       <DependentUpon>SMT_ChangeLine.cs</DependentUpon>
     </EmbeddedResource>
@@ -1668,6 +1675,9 @@
     <EmbeddedResource Include="FunctionCode\SMT\SMT_WaringSetting.resx">
       <DependentUpon>SMT_WaringSetting.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_CancelMaterial.resx">
+      <DependentUpon>Special_CancelMaterial.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_CancelOQCToLastStep.resx">
       <DependentUpon>Special_CancelOQCToLastStep.cs</DependentUpon>
     </EmbeddedResource>