Pārlūkot izejas kodu

Merge repos.ubtob.net:usoft/mes-client

callm 1 mēnesi atpakaļ
vecāks
revīzija
b16af20690

+ 6 - 73
UAS_MES_BG/FunctionCode/Make/Make_ParseLog.Designer.cs

@@ -34,10 +34,6 @@
             this.txtPath = new System.Windows.Forms.TextBox();
             this.Choose = new System.Windows.Forms.Button();
             this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
-            this.logList = new System.Windows.Forms.ListView();
-            this.sn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-            this.time = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-            this.fileName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.panel1 = new System.Windows.Forms.Panel();
             this.onWatch = new System.Windows.Forms.Button();
             this.claerBtn = new System.Windows.Forms.Button();
@@ -46,14 +42,10 @@
             this.allParse = new System.Windows.Forms.Button();
             this.label3 = new System.Windows.Forms.Label();
             this.panel2 = new System.Windows.Forms.Panel();
-            this.panel4 = new System.Windows.Forms.Panel();
-            this.lstFiles = new System.Windows.Forms.ListBox();
-            this.panel3 = new System.Windows.Forms.Panel();
             this.openFileDialog2 = new System.Windows.Forms.OpenFileDialog();
+            this.lstFiles = new System.Windows.Forms.ListBox();
             this.panel1.SuspendLayout();
             this.panel2.SuspendLayout();
-            this.panel4.SuspendLayout();
-            this.panel3.SuspendLayout();
             this.SuspendLayout();
             // 
             // Device
@@ -119,38 +111,6 @@
             this.openFileDialog1.FileName = "openFileDialog1";
             this.openFileDialog1.RestoreDirectory = true;
             // 
-            // logList
-            // 
-            this.logList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
-            this.sn,
-            this.time,
-            this.fileName});
-            this.logList.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.logList.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.logList.HideSelection = false;
-            this.logList.Location = new System.Drawing.Point(0, 0);
-            this.logList.Name = "logList";
-            this.logList.Size = new System.Drawing.Size(326, 530);
-            this.logList.TabIndex = 6;
-            this.logList.UseCompatibleStateImageBehavior = false;
-            this.logList.View = System.Windows.Forms.View.Details;
-            this.logList.Visible = false;
-            // 
-            // sn
-            // 
-            this.sn.Text = "序号";
-            this.sn.Width = 55;
-            // 
-            // time
-            // 
-            this.time.Text = "时间";
-            this.time.Width = 220;
-            // 
-            // fileName
-            // 
-            this.fileName.Text = "文件名称";
-            this.fileName.Width = 380;
-            // 
             // panel1
             // 
             this.panel1.BackColor = System.Drawing.SystemColors.Control;
@@ -252,22 +212,16 @@
             // 
             // panel2
             // 
-            this.panel2.Controls.Add(this.panel4);
-            this.panel2.Controls.Add(this.panel3);
+            this.panel2.Controls.Add(this.lstFiles);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
             this.panel2.Location = new System.Drawing.Point(0, 296);
             this.panel2.Name = "panel2";
             this.panel2.Size = new System.Drawing.Size(1304, 530);
             this.panel2.TabIndex = 8;
             // 
-            // panel4
+            // openFileDialog2
             // 
-            this.panel4.Controls.Add(this.lstFiles);
-            this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.panel4.Location = new System.Drawing.Point(0, 0);
-            this.panel4.Name = "panel4";
-            this.panel4.Size = new System.Drawing.Size(978, 530);
-            this.panel4.TabIndex = 2;
+            this.openFileDialog2.FileName = "openFileDialog2";
             // 
             // lstFiles
             // 
@@ -276,22 +230,9 @@
             this.lstFiles.ItemHeight = 18;
             this.lstFiles.Location = new System.Drawing.Point(0, 0);
             this.lstFiles.Name = "lstFiles";
-            this.lstFiles.Size = new System.Drawing.Size(978, 530);
+            this.lstFiles.Size = new System.Drawing.Size(1304, 530);
             this.lstFiles.TabIndex = 0;
             // 
-            // panel3
-            // 
-            this.panel3.Controls.Add(this.logList);
-            this.panel3.Dock = System.Windows.Forms.DockStyle.Right;
-            this.panel3.Location = new System.Drawing.Point(978, 0);
-            this.panel3.Name = "panel3";
-            this.panel3.Size = new System.Drawing.Size(326, 530);
-            this.panel3.TabIndex = 1;
-            // 
-            // openFileDialog2
-            // 
-            this.openFileDialog2.FileName = "openFileDialog2";
-            // 
             // Make_ParseLog
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
@@ -307,8 +248,6 @@
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             this.panel2.ResumeLayout(false);
-            this.panel4.ResumeLayout(false);
-            this.panel3.ResumeLayout(false);
             this.ResumeLayout(false);
 
         }
@@ -321,21 +260,15 @@
         private System.Windows.Forms.TextBox txtPath;
         private System.Windows.Forms.Button Choose;
         private System.Windows.Forms.OpenFileDialog openFileDialog1;
-        private System.Windows.Forms.ListView logList;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Panel panel2;
-        private System.Windows.Forms.ColumnHeader time;
-        private System.Windows.Forms.ColumnHeader fileName;
-        private System.Windows.Forms.ColumnHeader sn;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Button allParse;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
         private System.Windows.Forms.OpenFileDialog openFileDialog2;
-        private System.Windows.Forms.ListBox lstFiles;
         private System.Windows.Forms.Button claerBtn;
-        private System.Windows.Forms.Panel panel4;
-        private System.Windows.Forms.Panel panel3;
         private System.Windows.Forms.Button onWatch;
+        private System.Windows.Forms.ListBox lstFiles;
     }
 }

+ 6 - 125
UAS_MES_BG/FunctionCode/Make/Make_ParseLog.cs

@@ -115,6 +115,7 @@ namespace UAS_MES_NEW.Make
         {
             if (Device.SelectedIndex == -1) return;
 
+            SPITimer.Stop();
             switch (Device.SelectedIndex)
             {
                 case 0:
@@ -134,22 +135,18 @@ namespace UAS_MES_NEW.Make
                 case 2:
                     currFileType = "txt";
                     equiType = "AOI";
-                    SPITimer.Stop();
                     break;
                 case 3:
                     currFileType = "csv";
                     equiType = "印刷机";
-                    SPITimer.Stop();
                     break;
                 case 4:
                     currFileType = "xml";
                     equiType = "贴片机";
-                    SPITimer.Stop();
                     break;
                 case 5:
                     currFileType = "xml";
                     equiType = "贴片机";
-                    SPITimer.Stop();
                     break;
             }
 
@@ -162,13 +159,6 @@ namespace UAS_MES_NEW.Make
                 txtPath.SelectAll();
                 return;
             }
-            //if (string.IsNullOrEmpty(ma_code.Text))
-            //{
-            //    Device.SelectedIndex = -1;
-            //    txtPath.Text = "";
-            //    MessageBox.Show(this.ParentForm, "请选择工单", "提示");
-            //    return;
-            //}
 
             txtPath.Text = fileList[Device.SelectedIndex];
             txtPath.Focus();
@@ -284,7 +274,7 @@ namespace UAS_MES_NEW.Make
             try
             {
                 #region
-                /* 识别文件类型
+                /*
                 var txtFiles = Directory.GetFiles(txtPath.Text, "*.txt");
                 var csvFiles = Directory.GetFiles(txtPath.Text, "*.csv");
                 currFileType = txtFiles.Length > csvFiles.Length ? "txt" : "csv";
@@ -335,24 +325,6 @@ namespace UAS_MES_NEW.Make
                     };
                     foreach (DataRow dr in dt.Rows)
                     {
-                        #region
-                        /*var hasFileAry = Directory.GetFiles(outXmlFilePath, $"*.{currFileType}");
-                        string xmlName;
-                        if (hasFileAry.Length > 0)
-                        {
-                            var lastFile = Directory.GetFiles(outXmlFilePath).Select(f => new FileInfo(f))
-                                            .Where(f => f.CreationTime.Date == DateTime.Today)
-                                            .OrderByDescending(f => f.CreationTime).FirstOrDefault().Name;
-
-                            string seqNumStr = lastFile.Substring(lastFile.Length - 7, 3);
-                            string fileSeqNum = (int.Parse(seqNumStr) + 1).ToString().PadLeft(seqNumStr.Length, '0'); ;
-                            xmlName = $"1.08_{currentDate}_{currentDate}{fileSeqNum}__RequestTotalProduction.xml";
-                        }
-                        else
-                        {
-                            xmlName = $"1.08_{currentDate}_{currentDate}001__RequestTotalProduction.xml";
-                        }*/
-                        #endregion
                         string xmlName = $"1.08__{currentDate1}T101505_{currentDate}001__RequestTotalProduction.xml";
                         string fullPath = Path.Combine(outXmlFilePath, xmlName);
 
@@ -486,13 +458,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 if (LogicHandler.SetStepResult(omakeCode, User.UserSourceCode, SN, "日志解析", "OK", User.UserCode, out oErrorMessage))
                                 {
-                                    string sqlStr = $@"select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode,pr_detail,ma_qty - nvl(mcd_okqty, 0) remain_qty 
-                                        from make left join makecraftdetail on mcd_maid=ma_id left join product on pr_code = ma_prodcode 
-                                        where ma_code='" + omakeCode + "' and mcd_stepcode='" + User.CurrentStepCode + "'";
-                                    dt = (DataTable)dh.ExecuteSql(sqlStr, "select");
-                                    BaseUtil.SetFormValue(Controls, dt);
-                                    //记录操作日志
-                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "日志解析", "日志解析成功", SN, "");
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, omakeCode, User.UserLineCode, User.UserSourceCode, "日志解析", "日志解析成功", SN, "");
                                     LogMessage($"处理过站成功");
                                 }
                                 else
@@ -520,83 +486,6 @@ namespace UAS_MES_NEW.Make
                                     File.Delete(file);
                                 }
                             }
-                            #region // 20250630 M 调整对接方式 
-                            /*List<SpiData> csvData; 
-                            //csvData = ParseCsvFile(file);
-                            csvData = ParseCsvFile<SpiData>(file, MapToSpiData);
-
-                            List<string> Barcode = new List<string>();
-                            List<string> Date = new List<string>();
-
-                            List<string> AreaPercent = new List<string>();
-                            List<string> Height = new List<string>();
-                            List<string> VolumePercent = new List<string>();
-                            List<string> XOffset = new List<string>();
-                            List<string> YOffset = new List<string>();
-                            List<string> PadSizeX = new List<string>();
-                            List<string> PadSizeY = new List<string>();
-                            List<string> Area = new List<string>();
-                            List<string> HeightPercent = new List<string>();
-                            List<string> Volume = new List<string>();
-                            List<string> Result = new List<string>();
-
-                            foreach (var item in csvData)
-                            {
-                                Barcode.Add(item.Barcode);
-                                Date.Add(item.Date);
-                                Result.Add(item.Result);
-
-                                AreaPercent.Add(item.AreaPercent);
-                                Height.Add(item.Height);
-                                VolumePercent.Add(item.VolumePercent);
-                                XOffset.Add(item.XOffset);
-                                YOffset.Add(item.YOffset);
-                                PadSizeX.Add(item.PadSizeX);
-                                PadSizeY.Add(item.PadSizeY);
-                                Area.Add(item.Area);
-                                HeightPercent.Add(item.HeightPercent);
-                                Volume.Add(item.Volume);
-                            }
-
-                            if (csvData.Count == 0)
-                            {
-                                LogMessage($"文件: {file},读取记录 {csvData.Count} 条");
-                                return;
-                            }
-
-                            sql.Clear();
-                            sql.Append($@"INSERT INTO steptestdetail (std_id,std_sn,std_makecode,
-                                                    std_testresult,std_class,std_actualvalue,
-                                                    std_rescode,STD_SUBCLASS1,STD_VALUE1,
-                                                    STD_VALUE2,STD_VALUE3,STD_VALUE4,
-                                                    STD_VALUE5,STD_VALUE6,STD_VALUE7,
-                                                    STD_VALUE8,STD_VALUE9,STD_VALUE10)
-                                                    (select steptestdetail_seq.nextval,:Barcode,'{ma_code.Text}',
-                                                    :Result,'{equiType}','notfound',
-                                                    '{User.UserSourceCode}','{equiType}',:AreaPercent,
-                                                    :Height,:VolumePercent,:XOffset,
-                                                    :YOffset,:PadSizeX,:PadSizeY,
-                                                    :Area,:HeightPercent,:Volume from dual)");
-
-                            dh.BatchInsert(sql.GetString(),
-                                new string[] { "Barcode", "Result", "AreaPercent",
-                                        "Height" ,"VolumePercent","XOffset",
-                                        "YOffset","PadSizeX","PadSizeY",
-                                        "Area","HeightPercent","Volume"},
-                                Barcode.ToArray(), Result.ToArray(), AreaPercent.ToArray(),
-                                Height.ToArray(), VolumePercent.ToArray(), XOffset.ToArray(),
-                                YOffset.ToArray(), PadSizeX.ToArray(), PadSizeY.ToArray(),
-                                Area.ToArray(), HeightPercent.ToArray(), Volume.ToArray());
-
-
-                            LogMessage($"文件: {file},共{csvData.Count}条记录,已解析");
-
-                            string xmlContent = File.ReadAllText(file);
-                            if (ConsoleLog(xmlContent, file))
-                            {
-                                File.Delete(file);
-                            }*/
-                            #endregion
                         }
                         else if (Device.SelectedIndex == 2) // AOI
                         {
@@ -775,9 +664,6 @@ namespace UAS_MES_NEW.Make
                             if (!dh.CheckExist("productsmt", "ps_prodcode='" + Part_ + "' and PS_LINECODE = '"+ lineId  + "'"))
                             {
                                 ps_id = dh.GetSEQ("productsmt_seq");
-                                /*dh.ExecuteSql("insert into productsmt(ps_id,ps_prodcode,ps_status,ps_statuscode,PS_LINECODE,PS_CODE,PS_TABLE,PS_INDATE,PS_AUDITDATE)" +
-                                    "values('" + ps_id + "','" + Part_ + "','在录入','ENTERING','" + lineId + "','" + PS_CODE + "','A',SYSDATE,SYSDATE)", "insert");*/
-
                                 dh.ExecuteSql("insert into productsmt(ps_id,ps_prodcode,ps_status,ps_statuscode,PS_LINECODE,PS_CODE,PS_TABLE,PS_INDATE,PS_AUDITDATE,PS_AUDITMAN)" +
                                     "values('" + ps_id + "','" + Part_ + "','已审核','AUDITED','" + lineId + "','" + PS_CODE + "','"+ Side_ + "',SYSDATE,SYSDATE,'"+ User.UserName +"')", "insert");
                             }
@@ -1060,7 +946,7 @@ namespace UAS_MES_NEW.Make
                                     return true;
                                 }
                                 LogMessage($"序列号: {item.SN}为不良品,不记录系统");
-                                break;
+                                continue;
                             }
                         }
 
@@ -1070,16 +956,11 @@ namespace UAS_MES_NEW.Make
                             if (equiType == "AOI")
                             {
                                 passStationRes = item.Result == "PASS" ? "OK" : "NG";
+                                ma_code.Text = "";
                             }
                             if (LogicHandler.SetStepResult(omakeCode, User.UserSourceCode, item.SN, "日志解析", passStationRes, User.UserCode, out oErrorMessage))
                             {
-                                string sqlStr = $@"select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode,pr_detail,ma_qty - nvl(mcd_okqty, 0) remain_qty 
-                                        from make left join makecraftdetail on mcd_maid=ma_id left join product on pr_code = ma_prodcode 
-                                        where ma_code='" + omakeCode + "' and mcd_stepcode='" + User.CurrentStepCode + "'";
-                                dt = (DataTable)dh.ExecuteSql(sqlStr, "select");
-                                BaseUtil.SetFormValue(Controls, dt);
-                                //记录操作日志
-                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "日志解析", "日志解析成功", item.SN, "");
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, omakeCode, User.UserLineCode, User.UserSourceCode, "日志解析", "日志解析成功", item.SN, "");
 
                                 param.Add(item.SN);
                                 param.Add(omakeCode);

+ 294 - 0
UAS_MES_HYSX/FunctionCode/Make/Make_ParseLog.Designer.cs

@@ -0,0 +1,294 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_ParseLog
+    {
+        /// <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.Device = new System.Windows.Forms.ComboBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.txtPath = new System.Windows.Forms.TextBox();
+            this.Choose = new System.Windows.Forms.Button();
+            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.onWatch = new System.Windows.Forms.Button();
+            this.claerBtn = new System.Windows.Forms.Button();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.allParse = new System.Windows.Forms.Button();
+            this.label3 = new System.Windows.Forms.Label();
+            this.lstOk = new System.Windows.Forms.ListBox();
+            this.lstFiles = new System.Windows.Forms.ListBox();
+            this.openFileDialog2 = new System.Windows.Forms.OpenFileDialog();
+            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+            this.panel1.SuspendLayout();
+            this.tableLayoutPanel1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // Device
+            // 
+            this.Device.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.Device.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Device.FormattingEnabled = true;
+            this.Device.Items.AddRange(new object[] {
+            "AOI设备",
+            "X-ray设备",
+            "CCD设备"});
+            this.Device.Location = new System.Drawing.Point(193, 88);
+            this.Device.Name = "Device";
+            this.Device.Size = new System.Drawing.Size(387, 39);
+            this.Device.TabIndex = 2;
+            this.Device.SelectedIndexChanged += new System.EventHandler(this.Device_SelectedIndexChanged);
+            // 
+            // label1
+            // 
+            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(61, 92);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(101, 30);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "设备类型";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(61, 154);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(123, 30);
+            this.label2.TabIndex = 4;
+            this.label2.Text = "文件夹路径";
+            // 
+            // txtPath
+            // 
+            this.txtPath.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtPath.Location = new System.Drawing.Point(193, 154);
+            this.txtPath.Name = "txtPath";
+            this.txtPath.Size = new System.Drawing.Size(387, 35);
+            this.txtPath.TabIndex = 3;
+            // 
+            // Choose
+            // 
+            this.Choose.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Choose.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Choose.Location = new System.Drawing.Point(601, 155);
+            this.Choose.Name = "Choose";
+            this.Choose.Size = new System.Drawing.Size(122, 38);
+            this.Choose.TabIndex = 4;
+            this.Choose.Text = "选择";
+            this.Choose.UseVisualStyleBackColor = true;
+            this.Choose.Click += new System.EventHandler(this.Choose_Click);
+            // 
+            // openFileDialog1
+            // 
+            this.openFileDialog1.FileName = "openFileDialog1";
+            this.openFileDialog1.RestoreDirectory = true;
+            // 
+            // panel1
+            // 
+            this.panel1.BackColor = System.Drawing.SystemColors.Control;
+            this.panel1.Controls.Add(this.onWatch);
+            this.panel1.Controls.Add(this.claerBtn);
+            this.panel1.Controls.Add(this.LockMakeCode);
+            this.panel1.Controls.Add(this.ma_code);
+            this.panel1.Controls.Add(this.allParse);
+            this.panel1.Controls.Add(this.label3);
+            this.panel1.Controls.Add(this.Device);
+            this.panel1.Controls.Add(this.label1);
+            this.panel1.Controls.Add(this.Choose);
+            this.panel1.Controls.Add(this.label2);
+            this.panel1.Controls.Add(this.txtPath);
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(1304, 296);
+            this.panel1.TabIndex = 7;
+            // 
+            // onWatch
+            // 
+            this.onWatch.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.onWatch.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.onWatch.Location = new System.Drawing.Point(66, 232);
+            this.onWatch.Name = "onWatch";
+            this.onWatch.Size = new System.Drawing.Size(122, 38);
+            this.onWatch.TabIndex = 8;
+            this.onWatch.Text = "开启解析";
+            this.onWatch.UseVisualStyleBackColor = true;
+            this.onWatch.Click += new System.EventHandler(this.onWatch_Click);
+            // 
+            // claerBtn
+            // 
+            this.claerBtn.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.claerBtn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.claerBtn.Location = new System.Drawing.Point(391, 231);
+            this.claerBtn.Name = "claerBtn";
+            this.claerBtn.Size = new System.Drawing.Size(122, 38);
+            this.claerBtn.TabIndex = 7;
+            this.claerBtn.Text = "清除";
+            this.claerBtn.UseVisualStyleBackColor = true;
+            this.claerBtn.Click += new System.EventHandler(this.claerBtn_Click);
+            // 
+            // 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(523, 30);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(72, 28);
+            this.LockMakeCode.TabIndex = 1;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = null;
+            this.ma_code.BackColor = System.Drawing.SystemColors.Control;
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = null;
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(193, 25);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            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(320, 42);
+            this.ma_code.TabIndex = 0;
+            this.ma_code.TableName = null;
+            this.ma_code.TextBoxEnable = true;
+            // 
+            // allParse
+            // 
+            this.allParse.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.allParse.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.allParse.Location = new System.Drawing.Point(230, 232);
+            this.allParse.Name = "allParse";
+            this.allParse.Size = new System.Drawing.Size(122, 38);
+            this.allParse.TabIndex = 5;
+            this.allParse.Text = "批量解析";
+            this.allParse.UseVisualStyleBackColor = true;
+            this.allParse.Click += new System.EventHandler(this.allParse_Click);
+            // 
+            // 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(61, 26);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(101, 30);
+            this.label3.TabIndex = 6;
+            this.label3.Text = "归属工单";
+            // 
+            // lstOk
+            // 
+            this.lstOk.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.lstOk.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lstOk.FormattingEnabled = true;
+            this.lstOk.ItemHeight = 28;
+            this.lstOk.Location = new System.Drawing.Point(3, 3);
+            this.lstOk.Name = "lstOk";
+            this.lstOk.Size = new System.Drawing.Size(1298, 206);
+            this.lstOk.TabIndex = 1;
+            // 
+            // lstFiles
+            // 
+            this.lstFiles.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.lstFiles.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+            this.lstFiles.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lstFiles.FormattingEnabled = true;
+            this.lstFiles.ItemHeight = 22;
+            this.lstFiles.Location = new System.Drawing.Point(3, 215);
+            this.lstFiles.Name = "lstFiles";
+            this.lstFiles.Size = new System.Drawing.Size(1298, 312);
+            this.lstFiles.TabIndex = 0;
+            this.lstFiles.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.lstFiles_DrawItem);
+            // 
+            // openFileDialog2
+            // 
+            this.openFileDialog2.FileName = "openFileDialog2";
+            // 
+            // tableLayoutPanel1
+            // 
+            this.tableLayoutPanel1.ColumnCount = 1;
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+            this.tableLayoutPanel1.Controls.Add(this.lstOk, 0, 0);
+            this.tableLayoutPanel1.Controls.Add(this.lstFiles, 0, 1);
+            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 296);
+            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+            this.tableLayoutPanel1.RowCount = 2;
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 60F));
+            this.tableLayoutPanel1.Size = new System.Drawing.Size(1304, 530);
+            this.tableLayoutPanel1.TabIndex = 8;
+            // 
+            // Make_ParseLog
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.SystemColors.Window;
+            this.ClientSize = new System.Drawing.Size(1304, 826);
+            this.Controls.Add(this.tableLayoutPanel1);
+            this.Controls.Add(this.panel1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Make_ParseLog";
+            this.Text = "Make_ParseLog";
+            this.Load += new System.EventHandler(this.Make_ParseLog_Load);
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
+            this.tableLayoutPanel1.ResumeLayout(false);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ComboBox Device;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TextBox txtPath;
+        private System.Windows.Forms.Button Choose;
+        private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Button allParse;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
+        private System.Windows.Forms.OpenFileDialog openFileDialog2;
+        private System.Windows.Forms.ListBox lstFiles;
+        private System.Windows.Forms.Button claerBtn;
+        private System.Windows.Forms.Button onWatch;
+        private System.Windows.Forms.ListBox lstOk;
+        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+    }
+}

+ 768 - 0
UAS_MES_HYSX/FunctionCode/Make/Make_ParseLog.cs

@@ -0,0 +1,768 @@
+using DevExpress.Utils.CodedUISupport;
+using DevExpress.Xpo.Logger;
+using HslCommunication;
+using NPOI.POIFS.NIO;
+using NPOI.SS.Formula.Functions;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Security.AccessControl;
+using System.Security.Principal;
+using System.Text;
+using System.Web.Services.Description;
+using System.Web.UI.WebControls;
+using System.Windows.Forms;
+using UAS_MES_NEW.CustomControl.ButtonUtil;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_ParseLog : Form
+    {
+        public Make_ParseLog()
+        {
+            InitializeComponent();
+        }
+
+        FileSystemWatcher watcher;
+
+        LogStringBuilder sql = new LogStringBuilder();
+        DataTable Dbfind;
+        DataTable dt;
+
+        DataHelper dh;
+        string currFileType = "", equiType = "";
+
+        string SN, omakeCode, oMsid, oErrorMessage = "";
+        List<string> fileList = new List<string>();
+
+        Timer ChangeWoTimer;
+
+        string outFileMsg;
+
+        private void Make_ParseLog_Load(object sender, EventArgs e)
+        {
+            dh = SystemInf.dh;
+            Choose.Enabled = false;
+            fileList.Add("E:\\AOIMes\\Mes");
+            fileList.Add("C:\\Users\\MI\\Desktop");
+            fileList.Add("C:\\Users\\MI\\Desktop");
+
+            ChangeWoTimer = new Timer();
+            ChangeWoTimer.Interval = 30000;
+            ChangeWoTimer.Tick += ChangeWoFunc;
+
+            watcher = new FileSystemWatcher();
+            watcher.NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastWrite;
+            watcher.Created += OnFileCreated;
+            watcher.Changed += OnFileChanged;
+            /*watcher.Deleted += OnFileChanged;
+            watcher.Renamed += OnFileChanged;*/
+
+            //设置锁定工单
+            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 # 工单号,pr_code # 产品编号,pr_detail # 产品名称";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code", "pr_code", "pr_detail" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += Ma_code_DbChange;
+        }
+
+        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);
+            }
+        }
+
+        private void Device_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (Device.SelectedIndex == -1) return;
+
+            if(ChangeWoTimer.Enabled)   ChangeWoTimer.Stop();
+            switch (Device.SelectedIndex)
+            {
+                case 0:
+                    currFileType = "Txt";
+                    equiType = "AOI";
+                    /*ChangeWoTimer.Start();
+                    ChangeWoFunc(null, null);*/
+                    break;
+                case 1:
+                    currFileType = "jpg";
+                    equiType = "Xray";
+                    break;
+                case 2:
+                    currFileType = "jpg";
+                    equiType = "CCD";
+                    break;
+            }
+
+            txtPath.Text = fileList[Device.SelectedIndex];
+            txtPath.Focus();
+            txtPath.SelectAll();
+            ma_code.Enabled = true;
+            Choose.Enabled = true;
+            txtPath.Enabled = false;
+        }
+
+        private void Choose_Click(object sender, EventArgs e)
+        {
+            using (var dialog = new FolderBrowserDialog())
+            {
+                if (dialog.ShowDialog() == DialogResult.OK)
+                {
+                    txtPath.Text = dialog.SelectedPath;
+                    txtPath.Enabled = false;
+                    Device.Enabled = false;
+                    watcher.EnableRaisingEvents = false;
+                }
+            }
+        }
+
+        private void claerBtn_Click(object sender, EventArgs e)
+        {
+            lstFiles.Items.Clear();
+        }
+
+        private void allParse_Click(object sender, EventArgs e)
+        {
+            if (Device.SelectedIndex == -1)
+            {
+                Device.Focus();
+                Device.SelectAll();
+                MessageBox.Show(this.ParentForm, "请选择设备", "提示");
+                return;
+            }
+            if (String.IsNullOrEmpty(txtPath.Text))
+            {
+                txtPath.Focus();
+                txtPath.SelectAll();
+                MessageBox.Show(this.ParentForm, "请选择解析路径", "提示");
+                return;
+            }
+            string[] txtFiles;
+            if (equiType == "Xray")
+            {
+                if (string.IsNullOrEmpty(ma_code.Text))
+                {
+                    MessageBox.Show(this.ParentForm, "请选择工单", "提示");
+                    return;
+                }
+
+                txtFiles = Directory.GetDirectories(txtPath.Text);
+                if (txtFiles.Length == 0)
+                {
+                    LogMessage(0, $"当前路径{txtPath.Text},没有{equiType}设备输出的文件夹");
+                    return;
+                }
+            }
+            else
+            {
+                txtFiles = Directory.GetFiles(txtPath.Text, $"*.{currFileType}");
+                if (txtFiles.Length == 0)
+                {
+                    LogMessage(0, $"当前{txtPath.Text},没有{equiType}设备输出的{currFileType.ToLower()}文件");
+                    return;
+                }
+            }
+            RefreshFileList();
+        }
+
+        private void onWatch_Click(object sender, EventArgs e)
+        {
+            if (Device.SelectedIndex == -1)
+            {
+                Device.Focus();
+                Device.SelectAll();
+                MessageBox.Show(this.ParentForm, "请选择设备", "提示");
+                return;
+            }
+            if (String.IsNullOrEmpty(txtPath.Text))
+            {
+                txtPath.Focus();
+                txtPath.SelectAll();
+                MessageBox.Show(this.ParentForm, "请选择解析路径", "提示");
+                return;
+            }
+            if (equiType == "Xray")
+            {
+                if (string.IsNullOrEmpty(ma_code.Text))
+                {
+                    MessageBox.Show(this.ParentForm, "请选择工单", "提示");
+                    return;
+                }
+            }
+            try
+            {
+                watcher.Path = txtPath.Text;
+                watcher.Filter = $"*.{currFileType}";
+                if (onWatch.Text == "开启解析")
+                {
+                    watcher.EnableRaisingEvents = true;
+                    onWatch.Text = "关闭解析";
+                }
+                else
+                {
+                    watcher.EnableRaisingEvents = false;
+                    onWatch.Text = "开启解析";
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(this.ParentForm, ex.Message, "警告");
+            }
+        }
+
+        private void OnFileCreated(object sender, FileSystemEventArgs e)
+        {
+            RefreshFileList();
+        }
+
+        private void OnFileChanged(object sender, FileSystemEventArgs e)
+        {
+            if (e.ChangeType == WatcherChangeTypes.Changed)
+            {
+                RefreshFileList();
+            }
+        }
+
+        private void RefreshFileList()
+        {
+            if (lstFiles.InvokeRequired)
+            {
+                lstFiles.Invoke(new Action(RefreshFileList));
+                lstFiles.BeginInvoke(new Action(RefreshFileList));
+                return;
+            }
+
+            try
+            {
+                if (!Directory.Exists(txtPath.Text))
+                {
+                    LogMessage(0, $"目录不存在: {txtPath.Text}");
+                    return;
+                }
+
+                string[] txtFiles;
+                if (equiType == "Xray")
+                {
+                    txtFiles = Directory.GetDirectories(txtPath.Text);
+                }
+                else
+                {
+                    txtFiles = Directory.GetFiles(txtPath.Text, $"*.{currFileType}");
+                }
+                if (txtFiles.Length == 0)
+                {
+                    return;
+                }
+
+                foreach (string file in txtFiles)
+                {
+                    if (equiType == "Xray")
+                    {
+                        if (Path.GetFileName(file).Contains("Log_"))
+                        {
+                            continue;
+                        }
+
+                        if (!Directory.Exists(file))
+                        {
+                            LogMessage(0, $"文件夹不存在: {file}");
+                        }
+
+                        outFileMsg = CheckFolderPermissions(file);
+
+                        if (outFileMsg != "OK")
+                        {
+                            LogMessage(0, outFileMsg);
+                            continue;
+                        }
+                    }
+                    else
+                    {
+                        if (!File.Exists(file))
+                        {
+                            LogMessage(0, $"文件不存在: {file}");
+                        }
+
+                        outFileMsg = CheckFileAccess(file);
+
+                        if (outFileMsg != "OK")
+                        {
+                            LogMessage(0, outFileMsg);
+                            continue;
+                        }
+
+                        if (File.ReadAllText(file).Length == 0)
+                        {
+                            continue;
+                        }
+                    }
+
+                    if (equiType == "AOI")
+                    {
+                        using (StreamReader SR = new StreamReader(file, Encoding.GetEncoding("GBK")))
+                        {
+                            string Content = SR.ReadToEnd();
+                            SR.Close();
+                            SR.Dispose();
+                            List<Log> logArr = new List<Log>() { };
+                            string[] lines = Content.Split(new string[] { "\r\n" }, StringSplitOptions.None);
+                            int fileNum = string.IsNullOrEmpty(lines[lines.Length - 1]) ? lines.Length - 1 : lines.Length;
+                            Log itemLog = new Log() { };
+                            foreach (var item in lines)
+                            {
+                                if (string.IsNullOrEmpty(item)) continue;
+
+                                if (Array.IndexOf(lines, item) == 1) itemLog.SN = item.Split(':')[1].ToString().Trim();
+                                if (Array.IndexOf(lines, item) == 2) itemLog.TestTime = item.Split(':')[1].Split('.')[0].ToString().Trim();
+                                if (Array.IndexOf(lines, item) == 3) itemLog.Result = item.Split(':')[1].ToString().Trim();
+                                if (Array.IndexOf(lines, item) == 4) itemLog.Side = item.Split(':')[1].ToString().Trim();
+
+                                if (item.IndexOf("元件位置") > -1)
+                                {
+                                    LogItem list = new LogItem();
+                                    int ind = Array.IndexOf(lines, item);
+                                    list.Location = lines[ind].Split(':')[1].ToString().Trim();
+                                    list.ReelNo = lines[ind + 1].Split(':')[1].ToString().Trim();
+                                    list.FirstType = lines[ind + 2].Split(':')[1].ToString().Trim();
+                                    list.SceondType = lines[ind + 3].Split(':')[1].ToString().Trim();
+                                    list.Name = lines[ind + 4].Split(':')[1].ToString().Trim();
+                                    itemLog.LogItemList.Add(list);
+                                }
+                            }
+                            logArr.Add(itemLog);
+                            if (logArr.Count == 0)
+                            {
+                                break;
+                            }
+
+                            if (InsertDb(logArr, file, fileNum))
+                            {
+                                if (ConsoleLog(Content, file, logArr[0].SN))
+                                {
+                                    File.WriteAllText(file, string.Empty);
+                                    File.Delete(file);
+                                }
+                            }
+                        }
+                    }
+                    else if (equiType == "Xray")
+                    {
+                        string[] floderFile = Directory.GetFiles(file, $"*.{currFileType}");
+                        foreach(string floderFileItem in floderFile)
+                        {
+                            SN = Path.GetFileName(floderFileItem).Split('-')[0];
+                            if (UploadImageToFtp(floderFileItem, SN))
+                            {
+                                dh.ExecuteSql($@"INSERT INTO steptestmain (sm_id, sm_sn,sm_makecode,sm_stepcode,sm_indate,sm_machinecode,sm_result) 
+                                    VALUES ( steptestmain_seq.NEXTVAL,'{SN}','{ma_code.Text}','{User.UserSourceCode}', sysdate,'Xray', 'http://192.168.1.5:8088/ftp/xray/{DateTime.Now.ToString("yyyyMMdd")}/{Path.GetFileName(floderFileItem)}' )", "insert");
+
+                                if (Array.IndexOf(floderFile, floderFileItem) == floderFile.Length - 1)
+                                {
+                                    string newFloderName = Path.GetDirectoryName(file);
+                                    Directory.Move(file, Path.Combine(newFloderName, "Log_" + Path.GetFileName(file)));
+                                }
+                            }
+                        }
+                    }
+                    else if(equiType == "CCD")
+                    {
+                        if (txtFiles.Length != 2) break;
+
+                        foreach (var fileItem in txtFiles)
+                        {
+                            string imageName = Path.GetFileName(fileItem);
+                            SN = imageName.Split('_')[0].ToString();
+
+                            if (imageName.ToUpper().Contains("NG"))
+                            {
+                                if (UploadImageToFtp(fileItem, SN))
+                                {
+                                    dh.ExecuteSql($@"INSERT INTO steptestmain (sm_id, sm_sn,sm_makecode,sm_stepcode,sm_indate,sm_machinecode,sm_result) 
+                                            VALUES ( steptestmain_seq.NEXTVAL,'{SN}','{ma_code.Text}','{User.UserSourceCode}', sysdate,'CCD', 'http://192.168.1.5:8088/ftp/ccd/{SN}/{Path.GetFileName(fileItem)}' )", "insert");
+                                }
+                            }
+                            string parentPath = Path.GetDirectoryName(file);
+                            string changeName = Path.Combine(parentPath, SN);
+
+                            if (!Directory.Exists(changeName))
+                            {
+                                Directory.CreateDirectory(changeName);
+                            }
+                            File.Move(file, changeName);
+                        }
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                LogMessage(0, $"Error: 解析文件列表失败: {ex.Message}");
+            }
+        }
+
+
+        private bool InsertDb(List<Log> logs, string PathName, int fileNum)
+        {
+            try
+            {
+                StringBuilder sql = new StringBuilder();
+                StringBuilder details = new StringBuilder();
+                List<string> param = new List<string>() { };
+                foreach (var item in logs)
+                {
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, item.SN, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
+                    {
+                        if (LogicHandler.SetStepResult(omakeCode, User.UserSourceCode, item.SN, "日志解析", "解析过站成功", User.UserCode, out oErrorMessage))
+                        {
+                            string outMsg = "";
+                            param.Add(omakeCode);
+                            param.Add(item.SN);
+                            param.Add(User.UserSourceCode);
+                            param.Add(item.Result.ToUpper());
+                            param.Add(item.TestTime);
+                            param.Add(item.Side);
+                            param.Add(equiType);
+                            details.Clear();
+                            foreach (LogItem LI in item.LogItemList)
+                            {
+                                details.Append($"{LI.Location}/{LI.ReelNo}/{LI.FirstType}/{LI.SceondType}/{LI.Name};");
+                            }
+                            param.Add(details.ToString());
+                            param.Add(outMsg);
+                            string[] paramList = param.ToArray();
+                            dh.CallProcedure("cs_insert_testrejects", ref paramList);
+                            if (paramList[8].Substring(0, 2) == "OK")
+                            {
+                                LogMessage(1, $"文件: {item.SN} 采集成功, 测试结果为{item.Result},共{item.LogItemList.Count}条信息");
+                            }
+                            else
+                            {
+                                LogMessage(1, paramList[8]);
+                            }
+                            param.Clear();
+
+                            if (logs.IndexOf(item) == logs.Count - 1)
+                            {
+                                //string sqlStr = $@"select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode,pr_detail,ma_qty - nvl(mcd_okqty, 0) remain_qty 
+                                //                    from make left join makecraftdetail on mcd_maid=ma_id left join product on pr_code = ma_prodcode 
+                                //                    where ma_code='{omakeCode}' and mcd_stepcode='" + User.CurrentStepCode + "'";
+                                //dt = (DataTable)dh.ExecuteSql(sqlStr, "select");
+                                //BaseUtil.SetFormValue(Controls, dt);
+
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, omakeCode, User.UserLineCode, User.UserSourceCode, "日志解析", "日志解析过站成功", item.SN, "");
+                                return true;
+                            }
+                        }
+                        else
+                        {
+                            LogMessage(0, $"处理过站NG:{oErrorMessage}");
+                            break;
+                        }
+                    }
+                    else
+                    {
+                        LogMessage(0, $"过站核对NG:{oErrorMessage}");
+                        break;
+                    }
+                }
+                return false;
+            }
+            catch (Exception ex)
+            {
+                LogMessage(0, $"Error,处理解析写入: {ex.Message}");
+                return false;
+            }
+        }
+
+        private void ChangeWoFunc(object sender, EventArgs e)
+        {
+            try
+            {
+                sql.Clear();
+                sql.Append($"SELECT dl_macode FROM deviceline WHERE dl_linecode = '{User.UserLineCode}'");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                if (dt.Rows.Count > 0 && !String.IsNullOrEmpty(dt.Rows[0]["dl_macode"].ToString()))
+                {
+                    ma_code.Text = dt.Rows[0]["dl_macode"].ToString().Trim();
+                    return;
+                }
+
+                LogMessage(0, $"NG,自动识别更新工单");
+            }
+            catch (Exception ex)
+            {
+                LogMessage(0, $"Error,自动切换工单: {ex.Message}");
+            }
+        }
+
+        private bool ConsoleLog(string Content, string PathName,string SN)
+        {
+            try
+            {
+                string sourcePaht = Path.GetDirectoryName(PathName);
+                string changeName = Path.Combine(sourcePaht, $"{SN}.{currFileType}");
+
+                string newFolderName = "Logs";
+                string newFolderPath = Path.Combine(sourcePaht, newFolderName);
+
+                if (!Directory.Exists(newFolderPath))
+                {
+                    Directory.CreateDirectory(newFolderPath);
+                }
+
+                string newFileName = "Log_" + Path.GetFileName(changeName);
+                string newFilePath = Path.Combine(newFolderPath, newFileName);
+
+                File.AppendAllText(newFilePath, Content + Environment.NewLine);
+                return true;
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(this.ParentForm, ex.Message, "警告");
+                return false;
+            }
+        }
+
+        private void LogMessage(int type, string message)
+        {
+            if (type == 0)
+            {
+                if (lstFiles.InvokeRequired)
+                {
+                    lstFiles.Invoke(new Action<int, string>(LogMessage), new object[] { type, message });
+                    return;
+                }
+                lstFiles.Items.Add($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] {message}");
+                lstFiles.TopIndex = lstFiles.Items.Count - 1;
+            }
+            else
+            {
+                if (lstOk.InvokeRequired)
+                {
+                    lstOk.Invoke(new Action<int, string>(LogMessage), new object[] { type, message });
+                    return;
+                }
+                lstOk.Items.Add($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] {message}");
+                lstOk.TopIndex = lstOk.Items.Count - 1;
+            }
+        }
+        private void lstFiles_DrawItem(object sender, DrawItemEventArgs e)
+        {
+            if (e.Index < 0) return;
+
+            e.DrawBackground();
+            string txt = lstFiles.Items[e.Index].ToString().ToUpper();
+            Brush color = Brushes.Black;
+            if (txt.Contains("NG"))
+            {
+                color = Brushes.Red;
+            }
+            else if (txt.Contains("ERROR"))
+            {
+                color = Brushes.Red;
+            }
+            else
+            {
+                color = Brushes.Green;
+            }
+            e.DrawFocusRectangle();
+            e.Graphics.DrawString(lstFiles.Items[e.Index].ToString(), e.Font, color, e.Bounds, StringFormat.GenericDefault);
+        }
+
+        public bool UploadImageToFtp(string localFilePath, string Sn)
+        {
+            string ftpServer;
+            //string ftpServer = "ftp://10.8.0.215:21/xray/";
+            //string ftpServer = "ftp://192.168.1.5:21/xray/";
+
+            ftpServer = equiType == "Xray" ? "ftp://10.8.0.215:21/xray/" : "ftp://10.8.0.215:21/ccd/";
+            ftpServer = equiType == "Xray" ? "ftp://192.168.1.5:21/xray/" : "ftp://192.168.1.5:21/ccd/";
+
+            string username = "vsftpd";
+            string password = "vsftpd3ef41637hy";
+
+            string currentDate = DateTime.Now.ToString("yyyyMMdd");
+            string ftpFullPath = $"{ftpServer.TrimEnd('/')}/{currentDate}";
+            /*string ftpFullPath = $"{ftpServer.TrimEnd('/')}/{Sn}";*/
+            string outResult = CreateFtpDirectoryIfNotExists(ftpFullPath, username, password);
+            if (outResult.Substring(0, 2) == "NG")
+            {
+                LogMessage(0, outResult);
+                return false;
+            }
+
+            string remoteFileName = Path.GetFileName(localFilePath);
+            string uri = $"{ftpFullPath}/{remoteFileName}";
+
+            try
+            {
+                var request = (FtpWebRequest)WebRequest.Create(uri);
+                request.Method = WebRequestMethods.Ftp.UploadFile;
+                request.Credentials = new NetworkCredential(username, password);
+                request.UsePassive = true;
+                request.UseBinary = true;
+                request.KeepAlive = false;
+
+                using (var fileStream = File.OpenRead(localFilePath))
+                using (var requestStream = request.GetRequestStream())
+                {
+                    byte[] buffer = new byte[4096];
+                    int bytesRead;
+                    while ((bytesRead = fileStream.Read(buffer, 0, buffer.Length)) > 0)
+                    {
+                        requestStream.Write(buffer, 0, bytesRead);
+                    }
+                }
+
+                using (var response = (FtpWebResponse)request.GetResponse())
+                {
+                    LogMessage(1, $"文件: {localFilePath}上传成功,状态{response.StatusDescription}");
+                    return true;
+                }
+            }
+            catch (WebException ex)
+            {
+                if (ex.Response is FtpWebResponse response)
+                {
+                    LogMessage(0, $"NG,FTP 错误码: {(int)response.StatusCode} - {response.StatusDescription}");
+                }
+                else
+                {
+                    LogMessage(0, $"NG,Web异常: {ex.Message}");
+                }
+                return false;
+            }
+            catch (Exception ex)
+            {
+                LogMessage(0, $"NG,上传失败: {ex.Message}");
+                return false;
+            }
+        }
+
+        private string CreateFtpDirectoryIfNotExists(string ftpDirectoryPath, string username, string password)
+        {
+            try
+            {
+                FtpWebRequest request = (FtpWebRequest)WebRequest.Create(ftpDirectoryPath);
+                request.Method = WebRequestMethods.Ftp.MakeDirectory;
+                request.Credentials = new NetworkCredential(username, password);
+                request.UsePassive = true;
+                request.UseBinary = true;
+                request.KeepAlive = false;
+
+                using (FtpWebResponse response = (FtpWebResponse)request.GetResponse())
+                {
+                    response.Close();
+                    return "OK,目录创建成功: " + response.StatusDescription;
+                }
+            }
+            catch (WebException ex)
+            {
+                if (ex.Response is FtpWebResponse response && response.StatusCode == FtpStatusCode.ActionNotTakenFileUnavailable)
+                {
+                    return "OK,目录已存在: " + response.StatusDescription;
+                }
+                else
+                {
+                    return "NG,创建目录时发生错误: " + ex.Message;
+                }
+            }
+        }
+        public string CheckFileAccess(string filePath)
+        {
+            try
+            {
+                using (FileStream fileStream = File.Open(filePath, FileMode.Open, FileAccess.Read, FileShare.None))
+                {
+                    return "OK";
+                }
+            }
+            catch (IOException ex)
+            {
+                return "NG,文件被占用: " + ex.Message;
+            }
+            catch (UnauthorizedAccessException ex)
+            {
+                return "NG,权限不足,无法访问文件: " + ex.Message;
+            }
+            catch (Exception ex)
+            {
+                return "NG," + ex.Message;
+            }
+        }
+        public string CheckFolderPermissions(string path)
+        {
+            try
+            {
+                DirectorySecurity security = Directory.GetAccessControl(path);
+                AuthorizationRuleCollection rules = security.GetAccessRules(true, true, typeof(NTAccount));
+
+                WindowsIdentity currentUser = WindowsIdentity.GetCurrent();
+
+                foreach (FileSystemAccessRule rule in rules)
+                {
+                    if (rule.IdentityReference.Value == currentUser.Name || currentUser.Groups.Contains(rule.IdentityReference))
+                    {
+                        Console.WriteLine($" {rule.IdentityReference.Value}");
+                        Console.WriteLine($"权限类型: {rule.AccessControlType}");
+                        Console.WriteLine($"具体权限: {rule.FileSystemRights}");
+                        Console.WriteLine($"是否继承: {rule.IsInherited}");
+
+                    }
+                }
+                return "OK";
+            }
+            catch (UnauthorizedAccessException ex)
+            {
+                return $"NG,无权限访问文件夹: {ex.Message}";
+            }
+            catch (DirectoryNotFoundException)
+            {
+                return "NG,文件夹不存在";
+            }
+            catch (Exception ex)
+            {
+                return "NG," + ex.Message;
+            }
+        }
+        public class Log
+        {
+            public string SN { set; get; }
+            public string Result { set; get; }
+            public string TestTime { set; get; }
+            public string Side { set; get; }
+            public List<LogItem> LogItemList { set; get; } = new List<LogItem>();
+        }
+
+        public class LogItem
+        {
+            public string Location { set; get; }
+            public string ReelNo { set; get; }
+            public string FirstType { set; get; }
+            public string SceondType { set; get; }
+            public string Name { set; get; }
+        }
+    }
+}

+ 126 - 0
UAS_MES_HYSX/FunctionCode/Make/Make_ParseLog.resx

@@ -0,0 +1,126 @@
+<?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>
+  <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="openFileDialog2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>224, 17</value>
+  </metadata>
+</root>

+ 9 - 0
UAS_MES_HYSX/UAS_MES_HYSX.csproj

@@ -641,6 +641,12 @@
     <Compile Include="FunctionCode\Make\Make_OutBoxSnCheckPa.Designer.cs">
       <DependentUpon>Make_OutBoxSnCheckPa.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_ParseLog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_ParseLog.Designer.cs">
+      <DependentUpon>Make_ParseLog.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_ReadWriteInfo.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1658,6 +1664,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_OutBoxSnCheckPa.resx">
       <DependentUpon>Make_OutBoxSnCheckPa.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_ParseLog.resx">
+      <DependentUpon>Make_ParseLog.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_ReadWriteInfo.resx">
       <DependentUpon>Make_ReadWriteInfo.cs</DependentUpon>
     </EmbeddedResource>

+ 25 - 0
UAS_MES_HYSX/UAS_MES_HYSX.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.14.36202.13 d17.14
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UAS_MES_HYSX", "UAS_MES_HYSX.csproj", "{9E3D3539-7AA8-489C-BED7-DAA9C22CD7FE}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{9E3D3539-7AA8-489C-BED7-DAA9C22CD7FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9E3D3539-7AA8-489C-BED7-DAA9C22CD7FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9E3D3539-7AA8-489C-BED7-DAA9C22CD7FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9E3D3539-7AA8-489C-BED7-DAA9C22CD7FE}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {8D7ECB27-2603-40AE-B8F3-E0185CCAFD89}
+	EndGlobalSection
+EndGlobal

+ 1309 - 0
UAS_MES_JWS/FunctionCode/Packing/Packing_PackageCollection_T.Designer.cs

@@ -0,0 +1,1309 @@
+namespace UAS_MES_NEW.Packing
+{
+    partial class Packing_PackageCollection_T
+    {
+        /// <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();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Packing_PackageCollection));
+            this.pa_makecode = new System.Windows.Forms.Label();
+            this.label13 = new System.Windows.Forms.Label();
+            this.Cancel = new System.Windows.Forms.CheckBox();
+            this.pa_id = new System.Windows.Forms.Label();
+            this.pr_packrule = new System.Windows.Forms.Label();
+            this.pa_status = new System.Windows.Forms.Label();
+            this.pa_sccode = new System.Windows.Forms.Label();
+            this.pa_checkno = new System.Windows.Forms.Label();
+            this.pa_downstatus = new System.Windows.Forms.Label();
+            this.pa_standardqty = new System.Windows.Forms.Label();
+            this.pr_sendchecktype = new System.Windows.Forms.Label();
+            this.mcd_remainqty_label = new System.Windows.Forms.Label();
+            this.mcd_remainqty = new System.Windows.Forms.Label();
+            this.mcd_inqty_label = new System.Windows.Forms.Label();
+            this.mcd_inqty = new System.Windows.Forms.Label();
+            this.pa_remark_label = new System.Windows.Forms.Label();
+            this.CollecRemark = new System.Windows.Forms.CheckBox();
+            this.Port_label = new System.Windows.Forms.Label();
+            this.IP_label = new System.Windows.Forms.Label();
+            this.AllowRepeat = new System.Windows.Forms.CheckBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.Remark_PreFix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.CloseServer = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.BuildServer = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Port = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.IP = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.pa_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.groupBoxWithBorder2 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
+            this.checkweightlabel = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ob_nowcheckqty = new System.Windows.Forms.Label();
+            this.ob_batchqty = new System.Windows.Forms.Label();
+            this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
+            this.ob_batchqty_label = new System.Windows.Forms.Label();
+            this.ob_checkno = new System.Windows.Forms.Label();
+            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Packing = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.label3 = new System.Windows.Forms.Label();
+            this.AutoPrint = new UAS_MES_NEW.CustomControl.CustomCheckBox.AutoPrintCheckBox();
+            this.PrintList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.Printing = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.PrintList_label = new System.Windows.Forms.Label();
+            this.PrintNum_label = new System.Windows.Forms.Label();
+            this.groupBoxWithBorder1 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.locksalecode = new System.Windows.Forms.CheckBox();
+            this.PreFix_label = new System.Windows.Forms.Label();
+            this.PreFix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.pa_salecode_label = new System.Windows.Forms.Label();
+            this.ma_code_label = new System.Windows.Forms.Label();
+            this.ms_salecode = new System.Windows.Forms.Label();
+            this.OutBoxLength_label = new System.Windows.Forms.Label();
+            this.OutBoxLength = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.pr_outboxinnerqty = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.DeleteAll = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.AutoGenBoxCode = new System.Windows.Forms.CheckBox();
+            this.pa_currentqty_label = new System.Windows.Forms.Label();
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            this.pa_outboxcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.pa_currentqty = new System.Windows.Forms.Label();
+            this.pr_code_label = new System.Windows.Forms.Label();
+            this.pr_detail = new System.Windows.Forms.Label();
+            this.pr_outboxinnerqty_label = new System.Windows.Forms.Label();
+            this.pr_code = new System.Windows.Forms.Label();
+            this.pa_code_label = new System.Windows.Forms.Label();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.PackageDetail = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.pd_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pa_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pa_prodcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pa_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.groupBoxWithBorder2.SuspendLayout();
+            this.groupBoxWithBorder1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // pa_makecode
+            // 
+            this.pa_makecode.AutoSize = true;
+            this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_makecode.Location = new System.Drawing.Point(1662, 854);
+            this.pa_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_makecode.Name = "pa_makecode";
+            this.pa_makecode.Size = new System.Drawing.Size(0, 41);
+            this.pa_makecode.TabIndex = 76;
+            this.pa_makecode.Visible = false;
+            // 
+            // label13
+            // 
+            this.label13.AutoSize = true;
+            this.label13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label13.ForeColor = System.Drawing.Color.Black;
+            this.label13.Location = new System.Drawing.Point(14, 1108);
+            this.label13.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label13.Name = "label13";
+            this.label13.Size = new System.Drawing.Size(114, 41);
+            this.label13.TabIndex = 105;
+            this.label13.Text = "序列号";
+            // 
+            // Cancel
+            // 
+            this.Cancel.AutoSize = true;
+            this.Cancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Cancel.Location = new System.Drawing.Point(558, 1108);
+            this.Cancel.Margin = new System.Windows.Forms.Padding(6);
+            this.Cancel.Name = "Cancel";
+            this.Cancel.Size = new System.Drawing.Size(178, 45);
+            this.Cancel.TabIndex = 129;
+            this.Cancel.Text = "取消装箱";
+            this.Cancel.UseVisualStyleBackColor = true;
+            // 
+            // pa_id
+            // 
+            this.pa_id.AutoSize = true;
+            this.pa_id.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_id.Location = new System.Drawing.Point(1598, 854);
+            this.pa_id.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_id.Name = "pa_id";
+            this.pa_id.Size = new System.Drawing.Size(0, 41);
+            this.pa_id.TabIndex = 153;
+            this.pa_id.Visible = false;
+            // 
+            // pr_packrule
+            // 
+            this.pr_packrule.AutoSize = true;
+            this.pr_packrule.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_packrule.Location = new System.Drawing.Point(1698, 836);
+            this.pr_packrule.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_packrule.Name = "pr_packrule";
+            this.pr_packrule.Size = new System.Drawing.Size(0, 41);
+            this.pr_packrule.TabIndex = 173;
+            this.pr_packrule.Visible = false;
+            // 
+            // pa_status
+            // 
+            this.pa_status.AutoSize = true;
+            this.pa_status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_status.Location = new System.Drawing.Point(1560, 912);
+            this.pa_status.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_status.Name = "pa_status";
+            this.pa_status.Size = new System.Drawing.Size(0, 41);
+            this.pa_status.TabIndex = 174;
+            this.pa_status.Visible = false;
+            // 
+            // pa_sccode
+            // 
+            this.pa_sccode.AutoSize = true;
+            this.pa_sccode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_sccode.Location = new System.Drawing.Point(1662, 912);
+            this.pa_sccode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_sccode.Name = "pa_sccode";
+            this.pa_sccode.Size = new System.Drawing.Size(0, 41);
+            this.pa_sccode.TabIndex = 176;
+            this.pa_sccode.Visible = false;
+            // 
+            // pa_checkno
+            // 
+            this.pa_checkno.AutoSize = true;
+            this.pa_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_checkno.Location = new System.Drawing.Point(1650, 912);
+            this.pa_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_checkno.Name = "pa_checkno";
+            this.pa_checkno.Size = new System.Drawing.Size(0, 41);
+            this.pa_checkno.TabIndex = 177;
+            this.pa_checkno.Visible = false;
+            // 
+            // pa_downstatus
+            // 
+            this.pa_downstatus.AutoSize = true;
+            this.pa_downstatus.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_downstatus.Location = new System.Drawing.Point(1674, 912);
+            this.pa_downstatus.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_downstatus.Name = "pa_downstatus";
+            this.pa_downstatus.Size = new System.Drawing.Size(0, 41);
+            this.pa_downstatus.TabIndex = 178;
+            this.pa_downstatus.Visible = false;
+            // 
+            // pa_standardqty
+            // 
+            this.pa_standardqty.AutoSize = true;
+            this.pa_standardqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_standardqty.Location = new System.Drawing.Point(1698, 940);
+            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_standardqty.Name = "pa_standardqty";
+            this.pa_standardqty.Size = new System.Drawing.Size(0, 41);
+            this.pa_standardqty.TabIndex = 180;
+            this.pa_standardqty.Visible = false;
+            // 
+            // pr_sendchecktype
+            // 
+            this.pr_sendchecktype.AutoSize = true;
+            this.pr_sendchecktype.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_sendchecktype.Location = new System.Drawing.Point(1418, 874);
+            this.pr_sendchecktype.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_sendchecktype.Name = "pr_sendchecktype";
+            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 41);
+            this.pr_sendchecktype.TabIndex = 182;
+            this.pr_sendchecktype.Visible = false;
+            // 
+            // 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(870, 938);
+            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(146, 41);
+            this.mcd_remainqty_label.TabIndex = 196;
+            this.mcd_remainqty_label.Text = "待采集数";
+            // 
+            // 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(1034, 938);
+            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(0, 41);
+            this.mcd_remainqty.TabIndex = 197;
+            // 
+            // mcd_inqty_label
+            // 
+            this.mcd_inqty_label.AutoSize = true;
+            this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty_label.Location = new System.Drawing.Point(870, 874);
+            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_inqty_label.Name = "mcd_inqty_label";
+            this.mcd_inqty_label.Size = new System.Drawing.Size(146, 41);
+            this.mcd_inqty_label.TabIndex = 194;
+            this.mcd_inqty_label.Text = "已采集数";
+            // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty.Location = new System.Drawing.Point(1034, 874);
+            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_inqty.TabIndex = 195;
+            // 
+            // pa_remark_label
+            // 
+            this.pa_remark_label.AutoSize = true;
+            this.pa_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_remark_label.Location = new System.Drawing.Point(874, 1002);
+            this.pa_remark_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_remark_label.Name = "pa_remark_label";
+            this.pa_remark_label.Size = new System.Drawing.Size(82, 41);
+            this.pa_remark_label.TabIndex = 198;
+            this.pa_remark_label.Text = "备注";
+            // 
+            // CollecRemark
+            // 
+            this.CollecRemark.AutoSize = true;
+            this.CollecRemark.Location = new System.Drawing.Point(1048, 1114);
+            this.CollecRemark.Margin = new System.Windows.Forms.Padding(6);
+            this.CollecRemark.Name = "CollecRemark";
+            this.CollecRemark.Size = new System.Drawing.Size(186, 28);
+            this.CollecRemark.TabIndex = 201;
+            this.CollecRemark.Text = "采集备注信息";
+            this.CollecRemark.UseVisualStyleBackColor = true;
+            // 
+            // Port_label
+            // 
+            this.Port_label.AutoSize = true;
+            this.Port_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Port_label.Location = new System.Drawing.Point(1384, 928);
+            this.Port_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.Port_label.Name = "Port_label";
+            this.Port_label.Size = new System.Drawing.Size(82, 41);
+            this.Port_label.TabIndex = 204;
+            this.Port_label.Text = "端口";
+            // 
+            // IP_label
+            // 
+            this.IP_label.AutoSize = true;
+            this.IP_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.IP_label.Location = new System.Drawing.Point(1384, 862);
+            this.IP_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.IP_label.Name = "IP_label";
+            this.IP_label.Size = new System.Drawing.Size(47, 41);
+            this.IP_label.TabIndex = 202;
+            this.IP_label.Text = "IP";
+            // 
+            // AllowRepeat
+            // 
+            this.AllowRepeat.AutoSize = true;
+            this.AllowRepeat.Location = new System.Drawing.Point(1258, 1112);
+            this.AllowRepeat.Margin = new System.Windows.Forms.Padding(6);
+            this.AllowRepeat.Name = "AllowRepeat";
+            this.AllowRepeat.Size = new System.Drawing.Size(186, 28);
+            this.AllowRepeat.TabIndex = 208;
+            this.AllowRepeat.Text = "允许重复备注";
+            this.AllowRepeat.UseVisualStyleBackColor = true;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(874, 1056);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(71, 36);
+            this.label2.TabIndex = 210;
+            this.label2.Text = "前缀";
+            // 
+            // Remark_PreFix
+            // 
+            this.Remark_PreFix.AllPower = null;
+            this.Remark_PreFix.BackColor = System.Drawing.Color.White;
+            this.Remark_PreFix.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.Remark_PreFix.ID = null;
+            this.Remark_PreFix.Location = new System.Drawing.Point(958, 1052);
+            this.Remark_PreFix.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.Remark_PreFix.Name = "Remark_PreFix";
+            this.Remark_PreFix.Power = null;
+            this.Remark_PreFix.Size = new System.Drawing.Size(72, 39);
+            this.Remark_PreFix.Str = null;
+            this.Remark_PreFix.Str1 = null;
+            this.Remark_PreFix.Str2 = null;
+            this.Remark_PreFix.TabIndex = 209;
+            this.Remark_PreFix.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Remark_PreFix_KeyDown);
+            // 
+            // CloseServer
+            // 
+            this.CloseServer.AllPower = null;
+            this.CloseServer.BackColor = System.Drawing.Color.Transparent;
+            this.CloseServer.DownImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.DownImage")));
+            this.CloseServer.Image = null;
+            this.CloseServer.IsShowBorder = true;
+            this.CloseServer.Location = new System.Drawing.Point(1562, 1004);
+            this.CloseServer.Margin = new System.Windows.Forms.Padding(6);
+            this.CloseServer.MoveImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.MoveImage")));
+            this.CloseServer.Name = "CloseServer";
+            this.CloseServer.NormalImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.NormalImage")));
+            this.CloseServer.Power = null;
+            this.CloseServer.Size = new System.Drawing.Size(120, 48);
+            this.CloseServer.TabIndex = 207;
+            this.CloseServer.Text = "关闭服务";
+            this.CloseServer.UseVisualStyleBackColor = true;
+            this.CloseServer.Click += new System.EventHandler(this.CloseServer_Click);
+            // 
+            // BuildServer
+            // 
+            this.BuildServer.AllPower = null;
+            this.BuildServer.BackColor = System.Drawing.Color.Transparent;
+            this.BuildServer.DownImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.DownImage")));
+            this.BuildServer.Image = null;
+            this.BuildServer.IsShowBorder = true;
+            this.BuildServer.Location = new System.Drawing.Point(1400, 1004);
+            this.BuildServer.Margin = new System.Windows.Forms.Padding(6);
+            this.BuildServer.MoveImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.MoveImage")));
+            this.BuildServer.Name = "BuildServer";
+            this.BuildServer.NormalImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.NormalImage")));
+            this.BuildServer.Power = null;
+            this.BuildServer.Size = new System.Drawing.Size(120, 48);
+            this.BuildServer.TabIndex = 206;
+            this.BuildServer.Text = "开启服务";
+            this.BuildServer.UseVisualStyleBackColor = true;
+            this.BuildServer.Click += new System.EventHandler(this.BuildServer_Click);
+            // 
+            // Port
+            // 
+            this.Port.AllPower = null;
+            this.Port.BackColor = System.Drawing.Color.White;
+            this.Port.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Port.ID = null;
+            this.Port.Location = new System.Drawing.Point(1504, 932);
+            this.Port.Margin = new System.Windows.Forms.Padding(6);
+            this.Port.Name = "Port";
+            this.Port.Power = null;
+            this.Port.Size = new System.Drawing.Size(224, 39);
+            this.Port.Str = null;
+            this.Port.Str1 = null;
+            this.Port.Str2 = null;
+            this.Port.TabIndex = 205;
+            // 
+            // IP
+            // 
+            this.IP.AllPower = null;
+            this.IP.BackColor = System.Drawing.Color.White;
+            this.IP.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.IP.ID = null;
+            this.IP.Location = new System.Drawing.Point(1504, 862);
+            this.IP.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.IP.Name = "IP";
+            this.IP.Power = null;
+            this.IP.Size = new System.Drawing.Size(224, 39);
+            this.IP.Str = null;
+            this.IP.Str1 = null;
+            this.IP.Str2 = null;
+            this.IP.TabIndex = 203;
+            // 
+            // pa_remark
+            // 
+            this.pa_remark.AllPower = null;
+            this.pa_remark.BackColor = System.Drawing.Color.White;
+            this.pa_remark.ID = null;
+            this.pa_remark.Location = new System.Drawing.Point(1048, 1004);
+            this.pa_remark.Margin = new System.Windows.Forms.Padding(4);
+            this.pa_remark.Multiline = true;
+            this.pa_remark.Name = "pa_remark";
+            this.pa_remark.Power = null;
+            this.pa_remark.Size = new System.Drawing.Size(292, 88);
+            this.pa_remark.Str = null;
+            this.pa_remark.Str1 = null;
+            this.pa_remark.Str2 = null;
+            this.pa_remark.TabIndex = 200;
+            this.pa_remark.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pa_remark_KeyDown);
+            // 
+            // groupBoxWithBorder2
+            // 
+            this.groupBoxWithBorder2.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder2.Controls.Add(this.PrintNum);
+            this.groupBoxWithBorder2.Controls.Add(this.label1);
+            this.groupBoxWithBorder2.Controls.Add(this.StepCount);
+            this.groupBoxWithBorder2.Controls.Add(this.checkweightlabel);
+            this.groupBoxWithBorder2.Controls.Add(this.ob_nowcheckqty);
+            this.groupBoxWithBorder2.Controls.Add(this.ob_batchqty);
+            this.groupBoxWithBorder2.Controls.Add(this.ob_nowcheckqty_label);
+            this.groupBoxWithBorder2.Controls.Add(this.ob_batchqty_label);
+            this.groupBoxWithBorder2.Controls.Add(this.ob_checkno);
+            this.groupBoxWithBorder2.Controls.Add(this.SendCheck);
+            this.groupBoxWithBorder2.Controls.Add(this.Packing);
+            this.groupBoxWithBorder2.Controls.Add(this.PrintLabel);
+            this.groupBoxWithBorder2.Controls.Add(this.label3);
+            this.groupBoxWithBorder2.Controls.Add(this.AutoPrint);
+            this.groupBoxWithBorder2.Controls.Add(this.PrintList);
+            this.groupBoxWithBorder2.Controls.Add(this.Printing);
+            this.groupBoxWithBorder2.Controls.Add(this.PrintList_label);
+            this.groupBoxWithBorder2.Controls.Add(this.PrintNum_label);
+            this.groupBoxWithBorder2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.groupBoxWithBorder2.Location = new System.Drawing.Point(848, 12);
+            this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(4);
+            this.groupBoxWithBorder2.Name = "groupBoxWithBorder2";
+            this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(4);
+            this.groupBoxWithBorder2.Size = new System.Drawing.Size(892, 336);
+            this.groupBoxWithBorder2.TabIndex = 172;
+            this.groupBoxWithBorder2.TabStop = false;
+            this.groupBoxWithBorder2.Text = "打印";
+            this.groupBoxWithBorder2.TextColor = System.Drawing.Color.Black;
+            // 
+            // PrintNum
+            // 
+            this.PrintNum.AllPower = null;
+            this.PrintNum.BackColor = System.Drawing.Color.White;
+            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(510, 260);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum.Name = "PrintNum";
+            this.PrintNum.Power = null;
+            this.PrintNum.Size = new System.Drawing.Size(58, 39);
+            this.PrintNum.Str = null;
+            this.PrintNum.Str1 = null;
+            this.PrintNum.Str2 = null;
+            this.PrintNum.TabIndex = 181;
+            // 
+            // 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(530, 32);
+            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 = 181;
+            this.label1.Text = "当前批号";
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(244, 36);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(6, 14, 6, 14);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(126, 46);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 193;
+            // 
+            // checkweightlabel
+            // 
+            this.checkweightlabel.AutoSize = true;
+            this.checkweightlabel.CutLength = null;
+            this.checkweightlabel.ForeColor = System.Drawing.Color.Red;
+            this.checkweightlabel.Location = new System.Drawing.Point(56, 48);
+            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";
+            this.checkweightlabel.Size = new System.Drawing.Size(0, 41);
+            this.checkweightlabel.TabIndex = 180;
+            // 
+            // ob_nowcheckqty
+            // 
+            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(692, 176);
+            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);
+            this.ob_nowcheckqty.TabIndex = 178;
+            // 
+            // ob_batchqty
+            // 
+            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(692, 100);
+            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);
+            this.ob_batchqty.TabIndex = 177;
+            // 
+            // ob_nowcheckqty_label
+            // 
+            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(530, 176);
+            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);
+            this.ob_nowcheckqty_label.TabIndex = 176;
+            this.ob_nowcheckqty_label.Text = "当前批数";
+            // 
+            // ob_batchqty_label
+            // 
+            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(530, 104);
+            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);
+            this.ob_batchqty_label.TabIndex = 175;
+            this.ob_batchqty_label.Text = "标准批数";
+            // 
+            // ob_checkno
+            // 
+            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(692, 32);
+            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);
+            this.ob_checkno.TabIndex = 175;
+            this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
+            // 
+            // SendCheck
+            // 
+            this.SendCheck.AllPower = "ifall";
+            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
+            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
+            this.SendCheck.Enabled = false;
+            this.SendCheck.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.SendCheck.Image = null;
+            this.SendCheck.IsShowBorder = true;
+            this.SendCheck.Location = new System.Drawing.Point(740, 260);
+            this.SendCheck.Margin = new System.Windows.Forms.Padding(6);
+            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
+            this.SendCheck.Name = "SendCheck";
+            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
+            this.SendCheck.Power = null;
+            this.SendCheck.Size = new System.Drawing.Size(90, 48);
+            this.SendCheck.TabIndex = 174;
+            this.SendCheck.Tag = "ifread";
+            this.SendCheck.Text = "送检";
+            this.SendCheck.UseVisualStyleBackColor = true;
+            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
+            // 
+            // Packing
+            // 
+            this.Packing.AllPower = null;
+            this.Packing.BackColor = System.Drawing.Color.Transparent;
+            this.Packing.DownImage = ((System.Drawing.Image)(resources.GetObject("Packing.DownImage")));
+            this.Packing.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.Packing.Image = null;
+            this.Packing.IsShowBorder = true;
+            this.Packing.Location = new System.Drawing.Point(30, 260);
+            this.Packing.Margin = new System.Windows.Forms.Padding(6);
+            this.Packing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Packing.MoveImage")));
+            this.Packing.Name = "Packing";
+            this.Packing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Packing.NormalImage")));
+            this.Packing.Power = "ifspecial";
+            this.Packing.Size = new System.Drawing.Size(100, 48);
+            this.Packing.TabIndex = 173;
+            this.Packing.Text = "封箱";
+            this.Packing.UseVisualStyleBackColor = true;
+            this.Packing.Click += new System.EventHandler(this.Packing_Click);
+            // 
+            // PrintLabel
+            // 
+            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintLabel.FormattingEnabled = true;
+            this.PrintLabel.Location = new System.Drawing.Point(244, 174);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintLabel.Name = "PrintLabel";
+            this.PrintLabel.Size = new System.Drawing.Size(268, 39);
+            this.PrintLabel.TabIndex = 159;
+            this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
+            // 
+            // 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(16, 178);
+            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 = 160;
+            this.label3.Text = "打印标签";
+            // 
+            // AutoPrint
+            // 
+            this.AutoPrint.Checked = false;
+            this.AutoPrint.Location = new System.Drawing.Point(166, 262);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8);
+            this.AutoPrint.Name = "AutoPrint";
+            this.AutoPrint.Size = new System.Drawing.Size(180, 46);
+            this.AutoPrint.TabIndex = 166;
+            // 
+            // PrintList
+            // 
+            this.PrintList.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintList.Location = new System.Drawing.Point(244, 100);
+            this.PrintList.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.PrintList.Name = "PrintList";
+            this.PrintList.Size = new System.Drawing.Size(272, 56);
+            this.PrintList.TabIndex = 158;
+            // 
+            // Printing
+            // 
+            this.Printing.AllPower = "ifall";
+            this.Printing.BackColor = System.Drawing.Color.Transparent;
+            this.Printing.DownImage = ((System.Drawing.Image)(resources.GetObject("Printing.DownImage")));
+            this.Printing.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.Printing.Image = null;
+            this.Printing.IsShowBorder = true;
+            this.Printing.Location = new System.Drawing.Point(622, 260);
+            this.Printing.Margin = new System.Windows.Forms.Padding(6);
+            this.Printing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printing.MoveImage")));
+            this.Printing.Name = "Printing";
+            this.Printing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Printing.NormalImage")));
+            this.Printing.Power = null;
+            this.Printing.Size = new System.Drawing.Size(90, 48);
+            this.Printing.TabIndex = 150;
+            this.Printing.Tag = "ifread";
+            this.Printing.Text = "打印";
+            this.Printing.UseVisualStyleBackColor = true;
+            this.Printing.Click += new System.EventHandler(this.Print_Click);
+            // 
+            // PrintList_label
+            // 
+            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(16, 98);
+            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);
+            this.PrintList_label.TabIndex = 116;
+            this.PrintList_label.Text = "打印机列表";
+            // 
+            // PrintNum_label
+            // 
+            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(416, 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);
+            this.PrintNum_label.TabIndex = 124;
+            this.PrintNum_label.Text = "份数";
+            // 
+            // groupBoxWithBorder1
+            // 
+            this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder1.Controls.Add(this.LockMakeCode);
+            this.groupBoxWithBorder1.Controls.Add(this.ma_code);
+            this.groupBoxWithBorder1.Controls.Add(this.locksalecode);
+            this.groupBoxWithBorder1.Controls.Add(this.PreFix_label);
+            this.groupBoxWithBorder1.Controls.Add(this.PreFix);
+            this.groupBoxWithBorder1.Controls.Add(this.pa_salecode_label);
+            this.groupBoxWithBorder1.Controls.Add(this.ma_code_label);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_salecode);
+            this.groupBoxWithBorder1.Controls.Add(this.OutBoxLength_label);
+            this.groupBoxWithBorder1.Controls.Add(this.OutBoxLength);
+            this.groupBoxWithBorder1.Controls.Add(this.pr_outboxinnerqty);
+            this.groupBoxWithBorder1.Controls.Add(this.DeleteAll);
+            this.groupBoxWithBorder1.Controls.Add(this.AutoGenBoxCode);
+            this.groupBoxWithBorder1.Controls.Add(this.pa_currentqty_label);
+            this.groupBoxWithBorder1.Controls.Add(this.pr_detail_label);
+            this.groupBoxWithBorder1.Controls.Add(this.pa_outboxcode);
+            this.groupBoxWithBorder1.Controls.Add(this.pa_currentqty);
+            this.groupBoxWithBorder1.Controls.Add(this.pr_code_label);
+            this.groupBoxWithBorder1.Controls.Add(this.pr_detail);
+            this.groupBoxWithBorder1.Controls.Add(this.pr_outboxinnerqty_label);
+            this.groupBoxWithBorder1.Controls.Add(this.pr_code);
+            this.groupBoxWithBorder1.Controls.Add(this.pa_code_label);
+            this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(8, 12);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4);
+            this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(822, 336);
+            this.groupBoxWithBorder1.TabIndex = 171;
+            this.groupBoxWithBorder1.TabStop = false;
+            this.groupBoxWithBorder1.Text = "装箱信息";
+            this.groupBoxWithBorder1.TextColor = System.Drawing.Color.Black;
+            // 
+            // 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(168, 274);
+            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(185, 42);
+            this.ma_code.TabIndex = 197;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "ma_code";
+            this.ma_code.TextBoxEnable = true;
+            // 
+            // locksalecode
+            // 
+            this.locksalecode.AutoSize = true;
+            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(584, 34);
+            this.locksalecode.Margin = new System.Windows.Forms.Padding(6);
+            this.locksalecode.Name = "locksalecode";
+            this.locksalecode.Size = new System.Drawing.Size(186, 28);
+            this.locksalecode.TabIndex = 196;
+            this.locksalecode.Text = "当前订单锁定";
+            this.locksalecode.UseVisualStyleBackColor = true;
+            // 
+            // PreFix_label
+            // 
+            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(358, 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);
+            this.PreFix_label.TabIndex = 195;
+            this.PreFix_label.Text = "前缀";
+            // 
+            // PreFix
+            // 
+            this.PreFix.AllPower = null;
+            this.PreFix.BackColor = System.Drawing.Color.White;
+            this.PreFix.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PreFix.ID = null;
+            this.PreFix.Location = new System.Drawing.Point(450, 30);
+            this.PreFix.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.PreFix.Name = "PreFix";
+            this.PreFix.Power = null;
+            this.PreFix.Size = new System.Drawing.Size(72, 39);
+            this.PreFix.Str = null;
+            this.PreFix.Str1 = null;
+            this.PreFix.Str2 = null;
+            this.PreFix.TabIndex = 194;
+            this.PreFix.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PreFix_KeyDown);
+            // 
+            // pa_salecode_label
+            // 
+            this.pa_salecode_label.AutoSize = true;
+            this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_salecode_label.Location = new System.Drawing.Point(443, 281);
+            this.pa_salecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_salecode_label.Name = "pa_salecode_label";
+            this.pa_salecode_label.Size = new System.Drawing.Size(146, 41);
+            this.pa_salecode_label.TabIndex = 185;
+            this.pa_salecode_label.Text = "订单编号";
+            // 
+            // ma_code_label
+            // 
+            this.ma_code_label.AutoSize = true;
+            this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_code_label.Location = new System.Drawing.Point(12, 274);
+            this.ma_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_code_label.Name = "ma_code_label";
+            this.ma_code_label.Size = new System.Drawing.Size(114, 41);
+            this.ma_code_label.TabIndex = 186;
+            this.ma_code_label.Text = "工单号";
+            // 
+            // ms_salecode
+            // 
+            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(605, 281);
+            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);
+            this.ms_salecode.TabIndex = 188;
+            // 
+            // OutBoxLength_label
+            // 
+            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(162, 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);
+            this.OutBoxLength_label.TabIndex = 184;
+            this.OutBoxLength_label.Text = "长度";
+            // 
+            // OutBoxLength
+            // 
+            this.OutBoxLength.AllPower = null;
+            this.OutBoxLength.BackColor = System.Drawing.Color.White;
+            this.OutBoxLength.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.OutBoxLength.ID = null;
+            this.OutBoxLength.Location = new System.Drawing.Point(254, 30);
+            this.OutBoxLength.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.OutBoxLength.Name = "OutBoxLength";
+            this.OutBoxLength.Power = null;
+            this.OutBoxLength.Size = new System.Drawing.Size(72, 39);
+            this.OutBoxLength.Str = null;
+            this.OutBoxLength.Str1 = null;
+            this.OutBoxLength.Str2 = null;
+            this.OutBoxLength.TabIndex = 183;
+            this.OutBoxLength.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OutBoxLength_KeyDown);
+            // 
+            // pr_outboxinnerqty
+            // 
+            this.pr_outboxinnerqty.AllPower = null;
+            this.pr_outboxinnerqty.BackColor = System.Drawing.Color.White;
+            this.pr_outboxinnerqty.Enabled = false;
+            this.pr_outboxinnerqty.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_outboxinnerqty.ID = null;
+            this.pr_outboxinnerqty.Location = new System.Drawing.Point(180, 148);
+            this.pr_outboxinnerqty.Margin = new System.Windows.Forms.Padding(6);
+            this.pr_outboxinnerqty.Name = "pr_outboxinnerqty";
+            this.pr_outboxinnerqty.Power = null;
+            this.pr_outboxinnerqty.Size = new System.Drawing.Size(204, 39);
+            this.pr_outboxinnerqty.Str = null;
+            this.pr_outboxinnerqty.Str1 = null;
+            this.pr_outboxinnerqty.Str2 = null;
+            this.pr_outboxinnerqty.TabIndex = 181;
+            // 
+            // DeleteAll
+            // 
+            this.DeleteAll.AllPower = null;
+            this.DeleteAll.BackColor = System.Drawing.Color.Transparent;
+            this.DeleteAll.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteAll.DownImage")));
+            this.DeleteAll.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.DeleteAll.Image = null;
+            this.DeleteAll.IsShowBorder = true;
+            this.DeleteAll.Location = new System.Drawing.Point(710, 84);
+            this.DeleteAll.Margin = new System.Windows.Forms.Padding(6);
+            this.DeleteAll.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteAll.MoveImage")));
+            this.DeleteAll.Name = "DeleteAll";
+            this.DeleteAll.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteAll.NormalImage")));
+            this.DeleteAll.Power = "ifspecial";
+            this.DeleteAll.Size = new System.Drawing.Size(90, 48);
+            this.DeleteAll.TabIndex = 181;
+            this.DeleteAll.Text = "拆箱";
+            this.DeleteAll.UseVisualStyleBackColor = true;
+            this.DeleteAll.Click += new System.EventHandler(this.DeleteAll_Click);
+            // 
+            // AutoGenBoxCode
+            // 
+            this.AutoGenBoxCode.AutoSize = true;
+            this.AutoGenBoxCode.Checked = true;
+            this.AutoGenBoxCode.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(496, 90);
+            this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(4);
+            this.AutoGenBoxCode.Name = "AutoGenBoxCode";
+            this.AutoGenBoxCode.Size = new System.Drawing.Size(178, 45);
+            this.AutoGenBoxCode.TabIndex = 171;
+            this.AutoGenBoxCode.Text = "自动生成";
+            this.AutoGenBoxCode.UseVisualStyleBackColor = true;
+            this.AutoGenBoxCode.CheckedChanged += new System.EventHandler(this.AutoGenBoxCode_CheckedChanged);
+            // 
+            // pa_currentqty_label
+            // 
+            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(424, 154);
+            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);
+            this.pa_currentqty_label.TabIndex = 95;
+            this.pa_currentqty_label.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(420, 210);
+            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 = 80;
+            this.pr_detail_label.Text = "产品名称";
+            // 
+            // pa_outboxcode
+            // 
+            this.pa_outboxcode.AllPower = null;
+            this.pa_outboxcode.BackColor = System.Drawing.Color.White;
+            this.pa_outboxcode.Enabled = false;
+            this.pa_outboxcode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pa_outboxcode.ForeColor = System.Drawing.Color.Black;
+            this.pa_outboxcode.ID = null;
+            this.pa_outboxcode.Location = new System.Drawing.Point(180, 84);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.pa_outboxcode.Name = "pa_outboxcode";
+            this.pa_outboxcode.Power = null;
+            this.pa_outboxcode.Size = new System.Drawing.Size(286, 50);
+            this.pa_outboxcode.Str = null;
+            this.pa_outboxcode.Str1 = null;
+            this.pa_outboxcode.Str2 = null;
+            this.pa_outboxcode.TabIndex = 163;
+            this.pa_outboxcode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pa_code_KeyDown);
+            // 
+            // pa_currentqty
+            // 
+            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(580, 150);
+            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);
+            this.pa_currentqty.TabIndex = 169;
+            // 
+            // 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(12, 210);
+            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 = 81;
+            this.pr_code_label.Text = "产品编号";
+            // 
+            // pr_detail
+            // 
+            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(582, 210);
+            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 = 168;
+            // 
+            // pr_outboxinnerqty_label
+            // 
+            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(12, 148);
+            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);
+            this.pr_outboxinnerqty_label.TabIndex = 97;
+            this.pr_outboxinnerqty_label.Text = "箱内容量";
+            // 
+            // pr_code
+            // 
+            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(184, 210);
+            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";
+            this.pr_code.Size = new System.Drawing.Size(0, 41);
+            this.pr_code.TabIndex = 167;
+            this.pr_code.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
+            // 
+            // pa_code_label
+            // 
+            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(12, 88);
+            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);
+            this.pa_code_label.TabIndex = 113;
+            this.pa_code_label.Text = "箱号";
+            // 
+            // 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(8, 854);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(850, 236);
+            this.OperateResult.TabIndex = 155;
+            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 = null;
+            this.Clean.IsShowBorder = true;
+            this.Clean.Location = new System.Drawing.Point(742, 1106);
+            this.Clean.Margin = new System.Windows.Forms.Padding(6);
+            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, 48);
+            this.Clean.TabIndex = 148;
+            this.Clean.Text = "清除";
+            this.Clean.UseVisualStyleBackColor = true;
+            this.Clean.Click += new System.EventHandler(this.Clean_Click);
+            // 
+            // sn_code
+            // 
+            this.sn_code.AllPower = "ifall";
+            this.sn_code.BackColor = System.Drawing.Color.White;
+            this.sn_code.ID = null;
+            this.sn_code.Location = new System.Drawing.Point(148, 1108);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(6);
+            this.sn_code.Name = "sn_code";
+            this.sn_code.Power = "ifread";
+            this.sn_code.Size = new System.Drawing.Size(342, 35);
+            this.sn_code.Str = null;
+            this.sn_code.Str1 = null;
+            this.sn_code.Str2 = null;
+            this.sn_code.TabIndex = 135;
+            this.sn_code.Tag = "ifread";
+            this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.barcode_KeyDown);
+            // 
+            // PackageDetail
+            // 
+            this.PackageDetail.AllowUserToAddRows = false;
+            this.PackageDetail.AllowUserToDeleteRows = false;
+            this.PackageDetail.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
+            this.PackageDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.PackageDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.pd_barcode,
+            this.pa_outboxcode1,
+            this.pa_prodcode1,
+            this.pd_innerqty,
+            this.pa_indate,
+            this.pd_id});
+            this.PackageDetail.EnableContentClick = true;
+            this.PackageDetail.Location = new System.Drawing.Point(8, 358);
+            this.PackageDetail.Margin = new System.Windows.Forms.Padding(6);
+            this.PackageDetail.Name = "PackageDetail";
+            this.PackageDetail.ReadOnly = true;
+            this.PackageDetail.RowHeadersWidth = 82;
+            this.PackageDetail.RowTemplate.Height = 23;
+            this.PackageDetail.Size = new System.Drawing.Size(1724, 480);
+            this.PackageDetail.TabIndex = 134;
+            // 
+            // pd_barcode
+            // 
+            this.pd_barcode.DataPropertyName = "pd_barcode";
+            this.pd_barcode.HeaderText = "序列号";
+            this.pd_barcode.MinimumWidth = 250;
+            this.pd_barcode.Name = "pd_barcode";
+            this.pd_barcode.ReadOnly = true;
+            this.pd_barcode.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.pd_barcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic;
+            this.pd_barcode.Width = 250;
+            // 
+            // pa_outboxcode1
+            // 
+            this.pa_outboxcode1.DataPropertyName = "pa_outboxcode";
+            this.pa_outboxcode1.HeaderText = "箱号";
+            this.pa_outboxcode1.MinimumWidth = 200;
+            this.pa_outboxcode1.Name = "pa_outboxcode1";
+            this.pa_outboxcode1.ReadOnly = true;
+            this.pa_outboxcode1.Width = 201;
+            // 
+            // pa_prodcode1
+            // 
+            this.pa_prodcode1.DataPropertyName = "pa_prodcode";
+            this.pa_prodcode1.HeaderText = "产品编号";
+            this.pa_prodcode1.MinimumWidth = 10;
+            this.pa_prodcode1.Name = "pa_prodcode1";
+            this.pa_prodcode1.ReadOnly = true;
+            this.pa_prodcode1.Visible = false;
+            this.pa_prodcode1.Width = 200;
+            // 
+            // pd_innerqty
+            // 
+            this.pd_innerqty.DataPropertyName = "pd_innerqty";
+            this.pd_innerqty.HeaderText = "箱内数量";
+            this.pd_innerqty.MinimumWidth = 10;
+            this.pd_innerqty.Name = "pd_innerqty";
+            this.pd_innerqty.ReadOnly = true;
+            this.pd_innerqty.Visible = false;
+            this.pd_innerqty.Width = 80;
+            // 
+            // pa_indate
+            // 
+            this.pa_indate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pa_indate.DataPropertyName = "pa_indate";
+            this.pa_indate.HeaderText = "装箱日期";
+            this.pa_indate.MinimumWidth = 300;
+            this.pa_indate.Name = "pa_indate";
+            this.pa_indate.ReadOnly = true;
+            this.pa_indate.Width = 300;
+            // 
+            // pd_id
+            // 
+            this.pd_id.DataPropertyName = "pd_id";
+            this.pd_id.HeaderText = "ID";
+            this.pd_id.MinimumWidth = 10;
+            this.pd_id.Name = "pd_id";
+            this.pd_id.ReadOnly = true;
+            this.pd_id.Visible = false;
+            this.pd_id.Width = 200;
+            // 
+            // 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(354, 281);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
+            this.LockMakeCode.TabIndex = 198;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
+            // Packing_PackageCollection
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+            this.ClientSize = new System.Drawing.Size(1758, 1168);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.Remark_PreFix);
+            this.Controls.Add(this.AllowRepeat);
+            this.Controls.Add(this.CloseServer);
+            this.Controls.Add(this.BuildServer);
+            this.Controls.Add(this.Port);
+            this.Controls.Add(this.Port_label);
+            this.Controls.Add(this.IP);
+            this.Controls.Add(this.IP_label);
+            this.Controls.Add(this.CollecRemark);
+            this.Controls.Add(this.pa_remark);
+            this.Controls.Add(this.pa_remark_label);
+            this.Controls.Add(this.mcd_remainqty_label);
+            this.Controls.Add(this.mcd_remainqty);
+            this.Controls.Add(this.pr_sendchecktype);
+            this.Controls.Add(this.mcd_inqty_label);
+            this.Controls.Add(this.pa_standardqty);
+            this.Controls.Add(this.mcd_inqty);
+            this.Controls.Add(this.pa_downstatus);
+            this.Controls.Add(this.pa_checkno);
+            this.Controls.Add(this.pa_sccode);
+            this.Controls.Add(this.pa_status);
+            this.Controls.Add(this.pr_packrule);
+            this.Controls.Add(this.groupBoxWithBorder2);
+            this.Controls.Add(this.groupBoxWithBorder1);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.pa_id);
+            this.Controls.Add(this.Clean);
+            this.Controls.Add(this.sn_code);
+            this.Controls.Add(this.PackageDetail);
+            this.Controls.Add(this.Cancel);
+            this.Controls.Add(this.label13);
+            this.Controls.Add(this.pa_makecode);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Name = "Packing_PackageCollection";
+            this.Tag = "Packing!PackageCollection";
+            this.Text = "包装采集";
+            this.Activated += new System.EventHandler(this.PackCollection_Activated);
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PackCollection_FormClosing);
+            this.Load += new System.EventHandler(this.PackCollection_Load);
+            this.SizeChanged += new System.EventHandler(this.PackCollection_SizeChanged);
+            this.groupBoxWithBorder2.ResumeLayout(true);
+            this.groupBoxWithBorder2.PerformLayout();
+            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).EndInit();
+            this.ResumeLayout(true);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Label pr_code_label;
+        private System.Windows.Forms.Label pr_detail_label;
+        private System.Windows.Forms.Label pa_makecode;
+        private System.Windows.Forms.Label pa_currentqty_label;
+        private System.Windows.Forms.Label pr_outboxinnerqty_label;
+        private System.Windows.Forms.Label label13;
+        private System.Windows.Forms.Label pa_code_label;
+        private System.Windows.Forms.Label PrintList_label;
+        private System.Windows.Forms.Label PrintNum_label;
+        private System.Windows.Forms.CheckBox Cancel;
+
+        private CustomControl.DataGrid_View.DataGridViewWithSerialNum PackageDetail;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sn_code;
+        private CustomControl.ButtonUtil.NormalButton Clean;
+        private CustomControl.ButtonUtil.NormalButton Printing;
+        private System.Windows.Forms.Label pa_id;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrintList;
+        private System.Windows.Forms.Label label3;
+        private CustomControl.CustomCheckBox.AutoPrintCheckBox AutoPrint;
+        private System.Windows.Forms.Label pr_code;
+        private System.Windows.Forms.Label pr_detail;
+        private System.Windows.Forms.Label pa_currentqty;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder1;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder2;
+        private CustomControl.ButtonUtil.NormalButton Packing;
+        private System.Windows.Forms.CheckBox AutoGenBoxCode;
+        private System.Windows.Forms.Label pr_packrule;
+        private System.Windows.Forms.Label pa_status;
+        private CustomControl.ButtonUtil.NormalButton SendCheck;
+        private System.Windows.Forms.Label ob_batchqty;
+        private System.Windows.Forms.Label ob_nowcheckqty_label;
+        private System.Windows.Forms.Label ob_batchqty_label;
+        private System.Windows.Forms.Label ob_nowcheckqty;
+        private System.Windows.Forms.Label pa_sccode;
+        private System.Windows.Forms.Label pa_checkno;
+        private System.Windows.Forms.Label pa_downstatus;
+        private System.Windows.Forms.Label pa_standardqty;
+        private CustomControl.ButtonUtil.NormalButton DeleteAll;
+        private CustomControl.ValueLabel.ValueLabel checkweightlabel;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pr_outboxinnerqty;
+        private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum;
+        private UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
+        private System.Windows.Forms.Label OutBoxLength_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox OutBoxLength;
+        private System.Windows.Forms.Label pr_sendchecktype;
+        private System.Windows.Forms.Label pa_salecode_label;
+        private System.Windows.Forms.Label ma_code_label;
+        private System.Windows.Forms.Label ms_salecode;
+        private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private System.Windows.Forms.Label mcd_remainqty_label;
+        private System.Windows.Forms.Label mcd_remainqty;
+        private System.Windows.Forms.Label mcd_inqty_label;
+        private System.Windows.Forms.Label mcd_inqty;
+        private System.Windows.Forms.Label pa_remark_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pa_remark;
+        private System.Windows.Forms.Label PreFix_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox PreFix;
+        private System.Windows.Forms.CheckBox CollecRemark;
+        private System.Windows.Forms.CheckBox locksalecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_barcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pa_outboxcode1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pa_prodcode1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_innerqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pa_indate;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_id;
+        public CustomControl.TextBoxWithIcon.SnCollectionBox pa_outboxcode;
+        public System.Windows.Forms.Label ob_checkno;
+        private CustomControl.ButtonUtil.NormalButton CloseServer;
+        private CustomControl.ButtonUtil.NormalButton BuildServer;
+        private CustomControl.TextBoxWithIcon.EnterTextBox Port;
+        private System.Windows.Forms.Label Port_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox IP;
+        private System.Windows.Forms.Label IP_label;
+        private System.Windows.Forms.CheckBox AllowRepeat;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox Remark_PreFix;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
+    }
+}

+ 1148 - 0
UAS_MES_JWS/FunctionCode/Packing/Packing_PackageCollection_T.cs

@@ -0,0 +1,1148 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+using System.Drawing;
+using System.Threading;
+using UAS_MES_NEW.PublicForm;
+using System.Collections.Generic;
+using System.Diagnostics;
+using Seagull.BarTender.Print;
+
+namespace UAS_MES_NEW.Packing
+{
+    public partial class Packing_PackageCollection_T : Form
+    {
+        DataHelper dh;
+        DataTable dt;
+        LogStringBuilder sql = new LogStringBuilder();
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        Thread thread;
+        Engine engine;
+
+        DataTable Dbfind;
+        string ErrorMessage = "";
+        string oMakeCode = "";
+        string oMsID = "";
+        string oMsStatus = "";
+        string oOutBoxCode = "";
+        decimal StandardQTY = 0;
+        string LastSncode;
+        string PR_CHECKCARTONW = "0";
+
+        ModeBusTCPServer md;
+
+        public Packing_PackageCollection_T()
+        {
+
+            InitializeComponent();
+        }
+
+        //创建打印进程
+        private void NewPrint()
+        {
+            try
+            {
+                engine = new Engine(true);
+            }
+            catch (Exception ex)
+            {
+                OperateResult.AppendText("未正确安装BarTender软件\n" + ex.Message, Color.Red);
+            }
+        }
+
+        private void PackCollection_Load(object sender, EventArgs e)
+        {
+            // 杀死之前全部未关闭的进程
+            Process[] processes = System.Diagnostics.Process.GetProcessesByName("lppa");
+            Process[] processes1 = System.Diagnostics.Process.GetProcessesByName("bartend");
+            for (int i = 0; i < processes1.Length; i++)
+            {
+                processes1[i].Kill();
+            }
+            for (int i = 0; i < processes.Length; i++)
+            {
+                processes[i].Kill();
+            }
+            IP.Text = BaseUtil.GetCacheData("IP").ToString();
+            Port.Text = BaseUtil.GetCacheData("IPPort").ToString();
+            //设置DbFind的必须的数据
+            PrintNum.Text = "1";
+            asc.controllInitializeSize(this);
+            thread = new Thread(NewPrint);
+            SetLoadingWindow stw = new SetLoadingWindow(thread, "初始化打印程序");
+            BaseUtil.SetFormCenter(stw);
+            md = new ModeBusTCPServer();
+            stw.ShowDialog();
+            try
+            {
+                OutBoxLength.Text = BaseUtil.GetCacheData("OutBoxLength").ToString();
+                PreFix.Text = BaseUtil.GetCacheData("PreFix").ToString();
+                Remark_PreFix.Text = BaseUtil.GetCacheData("Remark_PreFix").ToString();
+            }
+            catch (Exception) { }
+
+            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_pocode # 内部订单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_spec # 产品规格,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code", "ma_pocode", "ma_prodcode", "ma_qty", "substr(pr_spec,0,50)pr_spec", "ma_softversion", "ma_salecode", "nvl(pr_sendchecktype,'LineCode')pr_sendchecktype" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+
+            sn_code.Focus();
+            dh = SystemInf.dh;
+            StepCount.StepCode = User.CurrentStepCode;
+            StepCount.Source = User.UserSourceCode;
+            StepCount.LineCode = User.UserLineCode;
+            StepCount.Dh = dh;
+            StepCount.Start();
+        }
+
+        private void PackCollection_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void PackCollection_Activated(object sender, EventArgs e)
+        {
+            pa_outboxcode.Focus();
+        }
+
+        //刷新表单的数据的数据
+        private void LoadData()
+        {
+            //加载表单数据
+            sql.Clear();
+            sql.Append("select pr_code,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,pa_remark,pa_outboxcode,pa_prodcode,pa_salecode,pa_makecode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,pa_status,pr_packrule,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,pr_detail,pa_packageqty,nvl(pa_standardqty,0) pa_standardqty,nvl(pr_outboxinnerqty,0)pr_outboxinnerqty,pa_currentqty from package left join product on pa_prodcode=");
+            sql.Append("pr_code where pa_outboxcode='" + pa_outboxcode.Text + "'");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            if (dt.Rows.Count > 0)
+            {
+                //记录该数据保证在修改不被允许的前提下能偶回复之前的值
+                StandardQTY = decimal.Parse(dt.Rows[0]["pr_outboxinnerqty"].ToString());
+                if (dt.Rows[0]["pa_salecode"].ToString() != "")
+                {
+                    ms_salecode.Text = dt.Rows[0]["pa_salecode"].ToString();
+                }
+                BaseUtil.SetFormValue(this.Controls, dt);
+                if (pa_standardqty.Text != "0")
+                {
+                    pr_outboxinnerqty.Text = pa_standardqty.Text;
+                }
+            }
+            else
+            {
+                pa_makecode.Text = "";
+            }
+            LoadCollectedNum();
+            LoadCheckQTY();
+        }
+
+        private void LoadGridData()
+        {
+            //加载Grid数据
+            dt = (DataTable)dh.ExecuteSql("select pa_outboxcode,pa_prodcode,pd_barcode,pd_innerqty,pd_makecode,pa_indate from packageDetail left join package on pa_id=pd_paid where pa_outboxcode='" + pa_outboxcode.Text + "'", "select");
+            BaseUtil.FillDgvWithDataTable(PackageDetail, dt);
+            if (dt.Rows.Count > 0)
+            {
+                string choose_pd_barcode = dt.Rows[0]["pd_barcode"].ToString();
+                string choose_pd_makecode = dt.Rows[0]["pd_makecode"].ToString();
+                PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code and cr_prodcode = ms_prodcode", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + choose_pd_barcode + "' and ms_makecode='" + choose_pd_makecode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
+            }
+            //更新界面的采集数量
+            pa_currentqty.Text = dh.getFieldDataByCondition("package", "pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString();
+        }
+
+        private void Print_Click(object sender, EventArgs e)
+        {
+            if (PrintLabel.Items.Count != 0)
+            {
+                if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
+                {
+                    dh.ExecuteSql("update package set pa_printcount=pa_printcount+1,pa_remark='" + PrintLabel.Text + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+
+                    if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                    {
+                        OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                    }
+                    if (!AutoGenBoxCode.Checked)
+                    {
+                        pa_outboxcode.SelectAll();
+                        pa_outboxcode.Focus();
+                    }
+                    else
+                    {
+                        sn_code.Focus();
+                        sn_code.SelectAll();
+                    }
+                }
+                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "尚未封箱,请封箱后执行打印\n", Color.Red);
+            }
+            else OperateResult.AppendText(">>产品" + pr_code.Text + "未维护打印标签\n", Color.Red);
+        }
+
+        //加载工单信息和装箱明细信息
+        private void pa_code_KeyDown(object sender, KeyEventArgs e)
+        {
+            //try
+            //{
+            if (e.KeyCode == Keys.Enter)
+            {
+                LoadData();
+                LoadGridData();
+                if (CheckOutBoxLength())
+                {
+                    sn_code.Focus();
+                }
+            }
+            //}
+            //catch (Exception ex)
+            //{
+            //    MessageBox.Show(ex.Message);
+            //}
+        }
+
+        //输入序列号的回车事件
+        private void barcode_KeyDown(object sender, KeyEventArgs e)
+        {
+            //当用户输入回车键的时候
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
+                {
+                    dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + sn_code.Text + "' order by ms_id desc", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        sn_code.Text = dt.Rows[0]["ms_sncode"].ToString();
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + sn_code.Text + "' order by ms_id desc", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            sn_code.Text = dt.Rows[0]["ms_sncode"].ToString();
+                        }
+                        else
+                        {
+                            dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei1='" + sn_code.Text + "' order by mil_id desc", "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                sn_code.Text = dt.Rows[0]["mil_sncode"].ToString();
+                            }
+                            else
+                            {
+                                dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei2='" + sn_code.Text + "' order by mil_id desc", "select");
+                                if (dt.Rows.Count > 0)
+                                {
+                                    sn_code.Text = dt.Rows[0]["mil_sncode"].ToString();
+                                }
+                            }
+                        }
+                    }
+                    dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_nextstepcode,ms_craftcode,ms_prodcode from makeserial where ms_sncode ='" + sn_code.Text + "' order by ms_id desc", "select");
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || (dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))
+                    {
+                        if (oMsID == "" || oMsID == "null" || oMsID == "0")
+                        {
+                            oMsID = dt.Rows[0]["ms_id"].ToString();
+                            oMsStatus = dt.Rows[0]["ms_status"].ToString();
+                            oMakeCode = dt.Rows[0]["ms_makecode"].ToString();
+                        }
+                        //如果是已完工序列号验证装箱工序是否存在于途程中
+                        if (oMsStatus == "2")
+                        {
+                            string prodcode = dt.Rows[0]["ms_prodcode"].ToString();
+                            string craftcode = dt.Rows[0]["ms_craftcode"].ToString();
+                            string craftstepcode = dh.getFieldDataByCondition("craft left join craftdetail on cr_id =cd_crid", "(cd_stepcode)", "cr_prodcode='" + prodcode + "' and cr_code='" + craftcode + "' and cd_stepcode='" + User.CurrentStepCode + "'").ToString();
+                            if (craftstepcode == "")
+                            {
+                                OperateResult.AppendText("工序" + User.CurrentStepCode + "不在途程" + craftcode + "内,不允许采集\n", Color.Red);
+                                return;
+                            }
+                        }
+                        string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
+                        if (nextstepcode != "" && nextstepcode != User.CurrentStepCode)
+                        {
+                            string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
+                            OperateResult.AppendText("<<序列号:" + sn_code.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sn_code);
+                            return;
+                        }
+                        PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code and cr_prodcode = ms_prodcode", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
+                        //获取序列号信息
+                        sql.Clear();
+                        sql.Append("select nvl(ms_iostatus,0) ms_iostatus,pa_salecode,ms_salecode,ms_outno,ms_makecode,ms_prodcode,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,pa_checkno,pr_packrule,");
+                        sql.Append("nvl(pr_outboxinnerqty,0)pr_outboxinnerqty,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype from makeserial left join product on ms_prodcode=pr_code left join packagedetail ");
+                        sql.Append("on pd_barcode=ms_sncode left join package on pa_id =pd_paid where ms_id='" + oMsID + "'");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        string ms_makecode = "";
+                        string ms_prodcode = "";
+                        string ms_iostatus = "";
+                        string ms_outno = "";
+                        string ms_salecode_text = "";
+                        if (dt.Rows.Count > 0)
+                        {
+                            StandardQTY = decimal.Parse(dt.Rows[0]["pr_outboxinnerqty"].ToString());
+                            ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
+                            ms_prodcode = dt.Rows[0]["ms_prodcode"].ToString();
+                            ms_iostatus = dt.Rows[0]["ms_iostatus"].ToString();
+                            ms_outno = dt.Rows[0]["ms_outno"].ToString();
+                            ms_salecode_text = dt.Rows[0]["ms_makecode"].ToString();
+                            if (locksalecode.Checked && ms_salecode.Text != "" && ms_salecode.Text != ms_salecode_text)
+                            {
+                                OperateResult.AppendText(">>序列号" + sn_code.Text + "所属订单号" + ms_salecode_text + "与界面订单号" + ms_salecode.Text + "不同,无法采集\n", Color.Red, sn_code);
+                                if (md.IsOpen)
+                                {
+                                    md.SendOrder("M502_ON");
+                                }
+                                return;
+                            }
+                            BaseUtil.SetFormValue(this.Controls, dt);
+                        }
+                        if (dt.Rows[0]["ms_outno"].ToString() != "")
+                        {
+                            OperateResult.AppendText(">>序列号" + sn_code.Text + "已被出货单" + dt.Rows[0]["ms_outno"].ToString() + "采集,不允许操作\n", Color.Red, sn_code);
+                            if (md.IsOpen)
+                            {
+                                md.SendOrder("M502_ON");
+                            }
+                            return;
+                        }
+                        if (dt.Rows[0]["ms_iostatus"].ToString() != "0")
+                        {
+                            OperateResult.AppendText(">>序列号" + sn_code.Text + "已入库不允许采集\n", Color.Red, sn_code);
+                            if (md.IsOpen)
+                            {
+                                md.SendOrder("M502_ON");
+                            }
+                            return;
+                        }
+                        //保证箱内容量不会被重置
+                        if (pa_standardqty.Text != "0" && pa_standardqty.Text != "")
+                        {
+                            pr_outboxinnerqty.Text = pa_standardqty.Text;
+                        }
+                        if (pa_outboxcode.Text == "")
+                        {
+                            string boxcode = dh.getFieldDataByCondition("makeserial", "ms_outboxcode", "ms_id='" + oMsID + "'").ToString();
+                            //序列号存在箱号的情况下获取所有的装箱数据
+                            if (boxcode != "")
+                            {
+                                pa_outboxcode.Text = boxcode;
+                                pa_makecode.Text = "";
+                                LoadGridData();
+                            }
+                            else
+                            {
+                                //如果勾选了自动生成箱号,在封箱或者首次
+                                if (AutoGenBoxCode.Checked && (pa_status.Text == "1" || pa_status.Text == "" || pa_status.Text == "0"))
+                                {
+                                    pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PACKAGE", ms_makecode, pr_code.Text, User.UserCode);
+                                    if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "'")) {
+                                        OperateResult.AppendText(">>箱号"+ pa_outboxcode.Text + "已生成,不允许重复使用\n", Color.Red, sn_code);
+                                        pa_outboxcode.Text = "";
+                                        return;
+                                    }
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "自动生成", sn_code.Text, PreFix.Text + ":" + OutBoxLength.Text);
+                                }
+                            }
+                        }
+                        if (pa_outboxcode.Text == "")
+                        {
+                            OperateResult.AppendText(">>箱号不能为空\n", Color.Red, sn_code);
+                            return;
+                        }
+                        //判断箱内总数必须大于0
+                        if (pr_outboxinnerqty.Text == "" || pr_outboxinnerqty.Text == "0")
+                        {
+                            OperateResult.AppendText(">>箱内容量必须大于0\n", Color.Red);
+                            return;
+                        }
+                        sql.Clear();
+                        sql.Append("select nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_mothercode,pa_type from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        string MotherBoxCode = "";
+                        if (dt.Rows.Count > 0)
+                        {
+                            if (dt.Rows[0]["pa_mothercode"].ToString() != "")
+                            {
+                                MotherBoxCode = dt.Rows[0]["pa_mothercode"].ToString();
+                            }
+                            if (dt.Rows[0]["pa_outno"].ToString() != "")
+                            {
+                                OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.Red, sn_code);
+                                if (md.IsOpen)
+                                {
+                                    md.SendOrder("M502_ON");
+                                }
+                                return;
+                            }
+                            if (dt.Rows[0]["pa_iostatus"].ToString() != "0")
+                            {
+                                OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.Red, sn_code);
+                                if (md.IsOpen)
+                                {
+                                    md.SendOrder("M502_ON");
+                                }
+                                return;
+                            }
+                        }
+                        //如果未勾选了取消录入
+                        if (!Cancel.Checked)
+                        {
+                            //判断序列号是否已经装箱
+                            string ms_outboxcode = dh.getFieldDataByCondition("makeserial", "ms_outboxcode", "ms_id='" + oMsID + "'").ToString();
+                            if (ms_outboxcode != "")
+                            {
+                                if (ms_outboxcode == pa_outboxcode.Text)
+                                {
+                                    if (md.IsOpen)
+                                    {
+                                        md.SendOrder("M501_ON");
+                                    }
+                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "已在本箱内\n", Color.Red, sn_code);
+                                }
+                                else
+                                {
+                                    if (md.IsOpen)
+                                    {
+                                        md.SendOrder("M502_ON");
+                                    }
+                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "已采集至箱" + ms_outboxcode + "\n", Color.Red, sn_code);
+                                }
+                                LoadData();
+                            }
+                            else
+                            {
+                                //满箱之后采集下一个之前自动清除内容,生成新的箱号
+                                if ((AutoGenBoxCode.Checked && pa_currentqty.Text != "" && pr_outboxinnerqty.Text == pa_currentqty.Text) || (AutoGenBoxCode.Checked && pa_status.Text == "1"))
+                                {
+                                    pa_currentqty.Text = "";
+                                    pa_outboxcode.Text = "";
+                                    pa_status.Text = "0";
+                                    BaseUtil.CleanDGVData(PackageDetail);
+                                    pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PACKAGE", ms_makecode, pr_code.Text, User.UserCode);
+                                    if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "'"))
+                                    {
+                                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已生成,不允许重复使用\n", Color.Red, sn_code);
+                                        pa_outboxcode.Text = "";
+                                        return;
+                                    }
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "自动生成", sn_code.Text, PreFix.Text + ":" + OutBoxLength.Text);
+                                }
+                                if (!CheckOutBoxLength(ms_salecode_text))
+                                {
+                                    return;
+                                }
+                                ////箱号不存在的情况
+                                if (LogicHandler.Packing(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
+                                {
+                                    if (md.IsOpen)
+                                    {
+                                        md.SendOrder("M501_ON");
+                                    }
+                                    //提示正确返回时传递的信息
+                                    if (ErrorMessage.Contains("AFTERSUCCESS"))
+                                        OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                                    LastSncode = sn_code.Text;
+                                    OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "采集成功", sn_code.Text, "");
+                                    //满箱更新状态为1
+                                    LoadData();
+                                    LoadGridData();
+                                    LoadCheckQTY();
+                                    dh.ExecuteSql("update packagedetail set pd_innerqty=(select pa_packageqty from package where pa_outboxcode='" + pa_outboxcode.Text + "') where pd_innerboxcode='" + pa_outboxcode.Text + "'", "update");
+                                    if (MotherBoxCode != "")
+                                    {
+                                        dt = (DataTable)dh.ExecuteSql("select pa_mothercode,pa_type from package where pa_outboxcode='" + MotherBoxCode + "'", "select");
+                                        //如果母箱号不为空,需要更新总数
+                                        if (dt.Rows.Count > 0)
+                                        {
+                                            if (dt.Rows[0]["pa_type"].ToString() == "2")
+                                            {
+                                                string MotherCode2 = dt.Rows[0]["pa_mothercode"].ToString();
+                                                //更新大箱数量
+                                                dh.ExecuteSql("update package set PA_TOTALQTY=(select sum(pd_innerqty) from packagedetail left join package on pa_id=pd_paid where pa_outboxcode='" + MotherBoxCode + "') where pa_outboxcode='" + MotherBoxCode + "'", "update");
+                                                //外层有栈板则更新栈板数量
+                                                if (MotherCode2 != "")
+                                                {
+                                                    dh.ExecuteSql("update packagedetail set pd_innerqty=(select sum(pd_innerqty) from packagedetail where pd_outboxcode='" + MotherBoxCode + "') where pd_innerboxcode='" + MotherBoxCode + "'", "update");
+                                                    dh.ExecuteSql("update package set PA_TOTALQTY=(select sum(pd_innerqty) from packagedetail left join package on pa_id=pd_paid where pa_outboxcode='" + MotherCode2 + "') where pa_outboxcode='" + MotherCode2 + "'", "update");
+                                                }
+                                            }
+                                            if (dt.Rows[0]["pa_type"].ToString() == "3")
+                                            {
+                                                dh.ExecuteSql("update package set PA_TOTALQTY=(select sum(pd_innerqty) from packagedetail left join package on pa_id=pd_paid where pa_outboxcode='" + MotherBoxCode + "') where pa_outboxcode='" + MotherBoxCode + "'", "update");
+                                            }
+                                        }
+                                    }
+                                    //采集完后如果是第一个装的序列号,把序列号的NextStepCode赋值给箱号
+                                    if (pa_currentqty.Text == "1")
+                                    {
+                                        dh.UpdateByCondition("package", "pa_nextstep='" + User.CurrentStepCode + "', PA_CURRENTSTEP = '" + User.CurrentStepCode + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                                    }
+                                    if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == int.Parse(pr_outboxinnerqty.Text))
+                                    {
+                                        dh.UpdateByCondition("package", "pa_status=1,pa_packageqty=pa_currentqty,pa_totalqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱采集完成,封箱成功\n", Color.Green);
+                                        pa_status.Text = "1";
+                                        pa_standardqty.Text = "";
+                                        if (AutoPrint.Checked)
+                                            Print_Click(new object(), new EventArgs());
+                                        if (!CollecRemark.Checked)
+                                        {
+                                            if (!AutoGenBoxCode.Checked)
+                                            {
+                                                pa_outboxcode.SelectAll();
+                                                pa_outboxcode.Focus();
+                                            }
+                                            else
+                                            {
+                                                sn_code.Focus();
+                                                sn_code.SelectAll();
+                                            }
+                                        }
+                                        else
+                                        {
+                                            pa_remark.SelectAll();
+                                            pa_remark.Focus();
+                                        }
+                                        if (PR_CHECKCARTONW != "0")
+                                        {
+                                            OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "满箱处于称重工序,请在卡通箱称重界面进行称重打印\n", Color.Black, sn_code);
+                                            return;
+                                        }
+                                        if (LogicHandler.OutBoxStepPass(pa_outboxcode.Text, ms_makecode, User.UserSourceCode, User.UserCode, "卡通箱:" + pa_outboxcode.Text + "整箱过站", "卡通箱整箱过站", out ErrorMessage))
+                                        {
+                                            dh.UpdateByCondition("package", "pa_nextstep='" + dh.getFieldDataByCondition("packagedetail left join makeserial on ms_sncode=pd_barcode and ms_makecode=pd_makecode", "max(ms_nextstepcode)", "pd_outboxcode='" + pa_outboxcode.Text + "'").ToString() + "', PA_CURRENTSTEP = '' ", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                                        }
+                                        else
+                                        {
+                                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                                        }
+                                        LoadCollectedNum();
+                                        LoadCheckQTY();
+                                    }
+                                    sn_code.Clear();
+                                }
+                                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                            }
+                        }
+                        //勾选了取消箱号先验证箱号存不存在,存在的话移除掉,重新加载一次数据
+                        else
+                        {
+                            if (LogicHandler.Packing(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
+                            {
+                                dh.UpdateByCondition("makeserial", "ms_outboxcode=''", "ms_id='" + oMsID + "'");
+                                dh.ExecuteSql("update packagedetail set pd_innerqty=(select pa_packageqty from package where pa_outboxcode='" + pa_outboxcode.Text + "') where pd_innerboxcode='" + pa_outboxcode.Text + "'", "update");
+                                //如果母箱号不为空,需要更新总数
+                                if (MotherBoxCode != "")
+                                {
+                                    DataTable dt = (DataTable)dh.ExecuteSql("select pa_mothercode,pa_type from package where pa_outboxcode='" + MotherBoxCode + "'", "select");
+                                    if (dt.Rows.Count > 0)
+                                    {
+                                        if (dt.Rows[0]["pa_type"].ToString() == "2")
+                                        {
+                                            string MotherCode2 = dt.Rows[0]["pa_mothercode"].ToString();
+                                            //更新大箱数量
+                                            dh.ExecuteSql("update package set PA_TOTALQTY=(select sum(pd_innerqty) from packagedetail left join package on pa_id=pd_paid where pa_outboxcode='" + MotherBoxCode + "') where pa_outboxcode='" + MotherBoxCode + "'", "update");
+                                            //外层有栈板则更新栈板数量
+                                            if (MotherCode2 != "")
+                                            {
+                                                dh.ExecuteSql("update packagedetail set pd_innerqty=(select sum(pd_innerqty) from packagedetail where pd_outboxcode='" + MotherBoxCode + "') where pd_innerboxcode='" + MotherBoxCode + "'", "update");
+                                                dh.ExecuteSql("update package set PA_TOTALQTY=(select sum(pd_innerqty) from packagedetail left join package on pa_id=pd_paid where pa_outboxcode='" + MotherCode2 + "') where pa_outboxcode='" + MotherCode2 + "'", "update");
+                                            }
+                                        }
+                                        if (dt.Rows[0]["pa_type"].ToString() == "3")
+                                        {
+                                            dh.ExecuteSql("update package set PA_TOTALQTY=(select sum(pd_innerqty) from packagedetail left join package on pa_id=pd_paid where pa_outboxcode='" + MotherBoxCode + "') where pa_outboxcode='" + MotherBoxCode + "'", "update");
+                                        }
+                                    }
+                                }
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "取消采集成功", sn_code.Text, "");
+                                LoadGridData();
+                                pa_status.Text = "0";
+                                OperateResult.AppendText(">>已从该箱中移除序列号" + sn_code.Text + "\n", Color.Green, sn_code);
+                            }
+                            else
+                            {
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                                if (md.IsOpen)
+                                {
+                                    md.SendOrder("M502_ON");
+                                }
+                            }
+                        }
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                        if (md.IsOpen)
+                        {
+                            md.SendOrder("M502_ON");
+                        }
+                    }
+                }
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+            }
+        }
+
+        private void Clean_Click(object sender, EventArgs e)
+        {
+            OperateResult.Clear();
+        }
+        DataTable _dt;
+        private void pr_code_TextChanged(object sender, EventArgs e)
+        {
+            LoadCheckQTY();
+            DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode='" + pr_code.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";
+            }
+        }
+
+        private void PackCollection_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            //BaseUtil.ClosePrint(lbl);
+            dh.Dispose();
+        }
+
+        private void Packing_Click(object sender, EventArgs e)
+        {
+            if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "' and nvl(pa_status,0)=0"))
+            {
+                string Seal = MessageBox.Show(this.ParentForm, "是否确认封箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                if (Seal == "Yes")
+                {
+                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "采集完成,手动封箱成功\n", Color.Green);
+                    dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                    pa_status.Text = "1";
+                    pa_standardqty.Text = "";
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "装箱采集", "卡通箱" + pa_outboxcode.Text + "封箱成功", pa_outboxcode.Text, "");
+                    if (!CollecRemark.Checked)
+                    {
+                        if (!AutoGenBoxCode.Checked)
+                        {
+                            pa_outboxcode.SelectAll();
+                            pa_outboxcode.Focus();
+                        }
+                        else
+                        {
+                            sn_code.Focus();
+                            sn_code.SelectAll();
+                        }
+                    }
+                    else
+                    {
+                        pa_remark.SelectAll();
+                        pa_remark.Focus();
+                    }
+                    if (PR_CHECKCARTONW != "0")
+                    {
+                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于称重工序,请在卡通箱称重界面进行操作\n", Color.Black, sn_code);
+                        return;
+                    }
+                    string ms_makecode = dh.getFieldDataByCondition("packagedetail", "pd_makecode", "pd_outboxcode = '" + pa_outboxcode.Text + "'").ToString();
+                    if (LogicHandler.OutBoxStepPass(pa_outboxcode.Text, ms_makecode, User.UserSourceCode, User.UserCode, "卡通箱:" + pa_outboxcode.Text + "整箱过站", "卡通箱整箱过站", out ErrorMessage))
+                    {
+                        dh.UpdateByCondition("package", "pa_nextstep='" + dh.getFieldDataByCondition("packagedetail left join makeserial on ms_sncode=pd_barcode and ms_makecode=pd_makecode", "max(ms_nextstepcode)", "pd_outboxcode='" + pa_outboxcode.Text + "'").ToString() + "', PA_CURRENTSTEP = '' ", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                    }
+                    LoadCheckQTY();
+                }
+            }
+            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "错误或者已封箱\n", Color.Red);
+        }
+
+        private void SendCheck_Click(object sender, EventArgs e)
+        {
+            if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
+            {
+                DataTable dt = (DataTable)dh.ExecuteSql("select wm_concat(pa_outboxcode) pa_outboxcode from package where pa_checkno='" + ob_checkno.Text + "' and pa_status=0 ", "select");
+                if (dt.Rows[0][0].ToString() != "")
+                {
+                    OperateResult.AppendText(">>批次" + ob_checkno.Text + "存在箱号" + dt.Rows[0][0].ToString() + "未封箱,请先进行封箱\n", Color.Red);
+                    return;
+                }
+                sql.Clear();
+                sql.Append("update oqcbatch set ob_status='UNCHECK',ob_breakingdate=sysdate where ob_checkno ='" + ob_checkno.Text + "'");
+                dh.ExecuteSql(sql.GetString(), "select");
+                ob_nowcheckqty.Text = "";
+                ob_batchqty.Text = "";
+                ob_nowcheckqty.ForeColor = Color.Black;
+                SendCheck.Enabled = false;
+                OperateResult.AppendText(">>批次" + ob_checkno.Text + "送检成功\n", Color.Green);
+                LogicHandler.InsertMakeProcess(LastSncode, oMakeCode, User.UserSourceCode, "手动送检", "手动送检成功", User.UserCode);
+                //记录操作日志
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "手动送检", "手动送检成功", "", ob_checkno.Text);
+                ob_checkno.Text = "";
+            }
+            else OperateResult.AppendText(">>必须封箱才能送检\n", Color.Red);
+        }
+
+        bool AutoCut;
+
+        private void LoadCheckQTY()
+        {
+            sql.Clear();
+            string condition = "";
+            int nowcheckqty = int.Parse(ob_nowcheckqty.Text == "" ? "0" : ob_nowcheckqty.Text);
+            int batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
+            if (nowcheckqty + 1 == batchqty && AutoCut)
+            {
+                condition = "and ob_status='UNCHECK' and ob_checkno='" + ob_checkno.Text + "'";
+            }
+            else
+            {
+                condition = "and ob_status='ENTERING' ";
+            }
+            if (pr_sendchecktype.Text == "SaleCode")
+            {
+                condition += " and ob_salecode='" + ms_salecode.Text + "'";
+            }
+            sql.Append("select ob_batchqty,ob_nowcheckqty,ob_checkno from oqcbatch where ");
+            sql.Append("ob_linecode='" + User.UserLineCode + "' and ob_prodcode='" + pr_code.Text + "' and ");
+            sql.Append("ob_stepcode='" + User.CurrentStepCode + "' " + condition);
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            if (dt.Rows.Count > 0)
+            {
+                ob_batchqty.Text = dt.Rows[0]["ob_batchqty"].ToString();
+                ob_nowcheckqty.Text = dt.Rows[0]["ob_nowcheckqty"].ToString();
+                ob_checkno.Text = dt.Rows[0]["ob_checkno"].ToString();
+                nowcheckqty = int.Parse(ob_nowcheckqty.Text == "" ? "0" : ob_nowcheckqty.Text);
+                batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
+                if (nowcheckqty >= batchqty)
+                {
+                    ob_nowcheckqty.ForeColor = Color.Red;
+                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.Red);
+                    if (AutoCut)
+                    {
+                        OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.Green);
+                    }
+                }
+            }
+            else
+            {
+                ob_batchqty.Text = "";
+                ob_nowcheckqty.Text = "";
+                ob_checkno.Text = "";
+                SendCheck.Enabled = false;
+            }
+            if (ob_batchqty.Text != "" && PR_CHECKCARTONW == "0")
+            {
+                SendCheck.Enabled = true;
+            }
+            else
+            {
+                SendCheck.Enabled = false;
+            }
+        }
+
+        private void ob_checkno_TextChanged(object sender, EventArgs e)
+        {
+            if (ob_checkno.Text != "")
+            {
+                string Cut = dh.getFieldDataByCondition("product left join oqcbatch on ob_prodcode=pr_code", "pr_ifautocutcheckno", "ob_checkno='" + ob_checkno.Text + "'").ToString();
+                if (Cut == "" || Cut == "0")
+                    AutoCut = false;
+                else
+                    AutoCut = true;
+                SendCheck.Enabled = true;
+            }
+        }
+
+        //private void pr_outboxinnerqty_KeyDown(object sender, KeyEventArgs e)
+        //{
+        //    if (e.KeyCode == Keys.Enter)
+        //        ResetPackQTY();
+        //}
+
+        //private void pr_outboxinnerqty_Leave(object sender, EventArgs e)
+        //{
+        //    ResetPackQTY();
+        //}
+
+        //private void ResetPackQTY()
+        //{
+        //    //数据不符合限制的时候保持原有值
+        //    int curretnqty = int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text);
+        //    if (!(int.Parse(pr_outboxinnerqty.Text) >= curretnqty))
+        //    {
+        //        pr_outboxinnerqty.Text = StandardQTY.ToString();
+        //    }
+        //    else
+        //    {
+        //        if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "'"))
+        //        {
+        //            string checknostatus = dh.getFieldDataByCondition("oqcbatch", "ob_status", "ob_checkno='" + pa_checkno.Text + "'").ToString();
+        //            if (checknostatus == "" || checknostatus == "ENTERING")
+        //            {
+        //                if (pa_downstatus.Text == "0")
+        //                {
+        //                    if (dh.CheckExist("source", "sc_code='" + pa_sccode.Text + "' and  sc_stepcode='" + User.CurrentStepCode + "'"))
+        //                    {
+        //                        dh.UpdateByCondition("package", "pa_standardqty='" + pr_outboxinnerqty.Text + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+        //                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "修改箱内容量", "原容量" + StandardQTY + ",修改为" + pr_outboxinnerqty.Text + "'", pa_outboxcode.Text, pa_checkno.Text);
+        //                        return;
+        //                    }
+        //                    else
+        //                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "当前所在工序不是登录岗位资源所在工序,不允许修改数量\n", Color.Red);
+        //                }
+        //                else
+        //                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "处于下地状态,不允许修改标准容量\n", Color.Red);
+        //            }
+        //            else
+        //                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "处于送检中,不允许修改标准容量\n", Color.Red);
+        //        }
+        //        else
+        //            OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "不存在,修改容量无效\n", Color.Red);
+        //        pr_outboxinnerqty.Text = StandardQTY.ToString();
+        //    }
+        //}
+
+        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 DeleteAll_Click(object sender, EventArgs e)
+        {
+            if (pa_outboxcode.Text == "")
+            {
+                OperateResult.AppendText(">>箱号不能为空\n", Color.Red);
+                return;
+            }
+            string Delete = MessageBox.Show(this.ParentForm, "是否确认拆箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+            if (Delete == "Yes")
+            {
+                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_checkno,ob_status,pa_mothercode,nvl(pa_downstatus,0)pa_downstatus from package left join oqcbatch on pa_checkno=ob_checkno where pa_outboxcode='" + pa_outboxcode.Text + "'", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    if (dt.Rows[0]["pa_outno"].ToString() != "")
+                    {
+                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.Red);
+                        return;
+                    }
+                    if (dt.Rows[0]["pa_iostatus"].ToString() != "0")
+                    {
+                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.Red);
+                        return;
+                    }
+                    if (dt.Rows[0]["pa_mothercode"].ToString() == "")
+                    {
+                        if (dt.Rows[0]["pa_downstatus"].ToString() == "0")
+                        {
+                            string ob_status = dt.Rows[0]["ob_status"].ToString();
+                            string pa_checkno = dt.Rows[0]["pa_checkno"].ToString();
+                            //不存在抽检批次或者还未检验可以拆解
+                            if (ob_status == "" || ob_status == "ENTERING" || ob_status == "UNCHECK")
+                            {
+                                sql.Clear();
+                                sql.Append("select pd_makecode,count(1) num from packagedetail left join makeserial  ");
+                                sql.Append("on ms_sncode=pd_barcode and ms_makecode=pd_makecode where pd_outboxcode='" + pa_outboxcode.Text + "' group by pd_makecode");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                List<string> SQLS1 = new List<string>();
+                                for (int i = 0; i < dt.Rows.Count; i++)
+                                {
+                                    string ma_code = dt.Rows[i]["pd_makecode"].ToString();
+                                    string num = dt.Rows[i]["num"].ToString();
+                                    SQLS1.Add("delete from makeprocess where mp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + pa_outboxcode.Text + "' and ms_makecode='" + ma_code + "') and mp_makecode='" + ma_code + "' and mp_stepcode='" + User.CurrentStepCode + "'");
+                                    SQLS1.Add("delete from steppassed where sp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + pa_outboxcode.Text + "' and ms_makecode='" + ma_code + "') and sp_makecode='" + ma_code + "' and sp_stepcode='" + User.CurrentStepCode + "'");
+                                    SQLS1.Add("update makecraftdetail set mcd_inqty=mcd_inqty-" + num + ",mcd_outqty=mcd_outqty-" + num + ",mcd_okqty=mcd_okqty-" + num + " where mcd_macode='" + ma_code + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                                    //扣减已完工数
+                                    SQLS1.Add("update make set ma_endqty=ma_endqty-(select count(1) from makeserial where  ms_outboxcode='" + pa_outboxcode.Text + "' and ms_makecode='" + ma_code + "' and ms_status=2) where ma_code='" + ma_code + "'");
+                                }
+                                if (pa_checkno != "")
+                                {
+                                    SQLS1.Add("update makeserial set ms_checkno='' where ms_outboxcode='" + pa_outboxcode.Text + "'");
+                                    SQLS1.Add("update oqcbatch set ob_nowcheckqty=ob_nowcheckqty-(select count(1) from oqcbatchdetail where obd_outboxcode='" + pa_outboxcode.Text + "') where ob_checkno='" + pa_checkno + "'");
+                                    SQLS1.Add("delete from oqcbatchdetail where obd_outboxcode='" + pa_outboxcode.Text + "'");
+                                }
+                                //更新序列号状态
+                                SQLS1.Add("update makeserial set ms_status=1,ms_outboxcode='',ms_nextstepcode= (case when ms_nextstepcode='" + User.CurrentStepCode + "' then ms_nextstepcode else ms_stepcode end ),ms_paststep=replace(ms_paststep,'," + User.CurrentStepCode + "','') where ms_outboxcode='" + pa_outboxcode.Text + "'");
+                                //抽检批次不为空的时候进行移除
+                                dh.ExecuteSQLTran(SQLS1.ToArray());
+                                string prcode = dh.getFieldDataByCondition("packagedetail", "pd_prodcode", "pd_outboxcode = '" + pa_outboxcode.Text + "'").ToString();
+                                string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + prcode + "'").ToString();
+                                if (standqty != "")
+                                {
+                                    //置空原箱
+                                    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                                }
+                                else
+                                    //置空原箱
+                                    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                                pa_status.Text = "0";
+                                //删除箱的明细
+                                dh.ExecuteSql("delete from labelprintlog where lpl_value='"+pa_outboxcode.Text+"'","delete");
+                                dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", pa_outboxcode.Text, ob_checkno.Text);
+                                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "成功拆解!\n", Color.Green);
+                                LoadGridData();
+                                LoadCheckQTY();
+                            }
+                            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已送检,不允许解除\n", Color.Red);
+                        }
+                        else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已下地,不允许解除\n", Color.Red);
+                    }
+                    else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已装箱" + dt.Rows[0]["pa_mothercode"].ToString() + ",不允许解除\n", Color.Red);
+                }
+                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "不存在\n", Color.Red);
+            }
+        }
+
+        private void OutBoxLength_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                try
+                {
+                    if (OutBoxLength.Text != "")
+                    {
+                        int.Parse(OutBoxLength.Text);
+                    }
+                    BaseUtil.SetCacheData("OutBoxLength", OutBoxLength.Text);
+                    if (!AutoGenBoxCode.Checked)
+                    {
+                        pa_outboxcode.SelectAll();
+                        pa_outboxcode.Focus();
+                    }
+                    else
+                    {
+                        sn_code.Focus();
+                    }
+                }
+                catch (Exception)
+                {
+                    OutBoxLength.Clear();
+                    MessageBox.Show("请输入正确的长度");
+                }
+            }
+        }
+
+        private bool CheckOutBoxLength()
+        {
+            //勾选了检验长度进行校验
+            if (OutBoxLength.Text != "")
+            {
+                try
+                {
+                    int.Parse(OutBoxLength.Text);
+                }
+                catch (Exception)
+                {
+                    MessageBox.Show("请填写正确的箱号长度");
+                    return false;
+                }
+                if (pa_outboxcode.Text.Length != int.Parse(OutBoxLength.Text))
+                {
+                    OperateResult.AppendText(">>箱号长度错误,请重新输入箱号\n", Color.Red);
+                    return false;
+                }
+            }
+            if (PreFix.Text != "")
+            {
+                try
+                {
+                    if (pa_outboxcode.Text.Substring(0, PreFix.Text.Length) != PreFix.Text)
+                    {
+                        OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                        return false;
+                    }
+                }
+                catch (Exception)
+                {
+                    OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        private void LoadCollectedNum()
+        {
+            dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty 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);
+        }
+
+        private void pa_remark_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (Keys.Enter == e.KeyCode)
+            {
+                if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "'"))
+                {
+                    if (Remark_PreFix.Text != "")
+                    {
+                        try
+                        {
+                            if (pa_remark.Text.Substring(0, Remark_PreFix.Text.Length) != Remark_PreFix.Text)
+                            {
+                                OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.Red);
+                                return;
+                            }
+                        }
+                        catch (Exception)
+                        {
+                            OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.Red);
+                            return;
+                        }
+                    }
+                    if (!AllowRepeat.Checked)
+                    {
+                        DataTable dt = (DataTable)dh.ExecuteSql("select pa_outboxcode from package where pa_remark='" + pa_remark.Text.ToUpper() + "'", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            OperateResult.AppendText(">>箱号" + dt.Rows[0][0].ToString() + "已采集关联信息" + pa_remark.Text + "\n", Color.Red);
+                            return;
+                        }
+                    }
+                    dh.UpdateByCondition("package", "pa_remark='" + pa_remark.Text.ToUpper() + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "关联信息" + pa_remark.Text + "采集成功\n", Color.Green);
+                    pa_remark.Text = "";
+                    if (!AutoGenBoxCode.Checked)
+                    {
+                        pa_outboxcode.SelectAll();
+                        pa_outboxcode.Focus();
+                    }
+                    else
+                    {
+                        sn_code.Focus();
+                    }
+                }
+                else OperateResult.AppendText(">>请先采集箱内数据\n", Color.Red);
+            }
+        }
+
+        private void PreFix_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                BaseUtil.SetCacheData("PreFix", PreFix.Text);
+                if (!AutoGenBoxCode.Checked)
+                {
+                    pa_outboxcode.SelectAll();
+                    pa_outboxcode.Focus();
+                }
+                else
+                {
+                    sn_code.Focus();
+                    sn_code.SelectAll();
+                }
+            }
+        }
+
+        private void BuildServer_Click(object sender, EventArgs e)
+        {
+            if (!md.IsOpen)
+            {
+                md.IP = IP.Text;
+                md.Port = Port.Text;
+                if (md.Open())
+                {
+                    BaseUtil.SetCacheData("IP", IP.Text);
+                    BaseUtil.SetCacheData("IPPort", Port.Text);
+                    OperateResult.AppendText(">>服务开启成功\n");
+                }
+            }
+            else
+                OperateResult.AppendText(">>服务已经开启\n");
+        }
+
+        private void CloseServer_Click(object sender, EventArgs e)
+        {
+            if (md.IsOpen)
+            {
+                md.Close();
+                OperateResult.AppendText(">>服务关闭成功\n");
+            }
+            else
+                OperateResult.AppendText(">>服务尚未开启\n");
+        }
+
+        private void Remark_PreFix_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                BaseUtil.SetCacheData("Remark_PreFix", Remark_PreFix.Text);
+                if (CollecRemark.Checked)
+                {
+                    pa_remark.SelectAll();
+                    pa_remark.Focus();
+                }
+            }
+        }
+
+        private bool CheckOutBoxLength(string ms_salecode_text)
+        {
+            if (AutoGenBoxCode.Checked)
+            {
+                if (ms_salecode_text != "")
+                {
+                    DataTable dt = (DataTable)dh.ExecuteSql(" select pn_number,pn_id,pn_caller,pn_numberlength,pn_leadcode  from PACKAGENUMBER where pn_caller='" + pr_code.Text + "'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        string pn_leadcode = dt.Rows[0]["pn_leadcode"].ToString();
+                        int pn_numberlength = int.Parse(dt.Rows[0]["pn_numberlength"].ToString());
+                        if (OutBoxLength.Text != (pn_leadcode.Length + pn_numberlength).ToString())
+                        {
+                            OutBoxLength.Text = (pn_leadcode.Length + pn_numberlength).ToString();
+                            BaseUtil.SetCacheData("OutBoxLength", OutBoxLength.Text);
+                        }
+                        if (PreFix.Text != pn_leadcode)
+                        {
+                            PreFix.Text = pn_leadcode;
+                            BaseUtil.SetCacheData("PreFix", PreFix.Text);
+                        }
+                    }
+                    else
+                    {
+                        //OperateResult.AppendText(">>产品" + pr_code.Text + "未维护箱号规则\n", Color.Black);
+                    }
+                }
+                return true;
+            }
+            return CheckOutBoxLength();
+        }
+
+
+        private void AutoGenBoxCode_CheckedChanged(object sender, EventArgs e)
+        {
+            if (AutoGenBoxCode.Checked)
+            {
+                OutBoxLength.Enabled = false;
+                PreFix.Enabled = false;
+                pa_outboxcode.Enabled = false;
+            }
+            else
+            {
+                OutBoxLength.Enabled = true;
+                PreFix.Enabled = true;
+                pa_outboxcode.Enabled = true;
+            }
+        }
+    }
+}

+ 387 - 0
UAS_MES_JWS/FunctionCode/Packing/Packing_PackageCollection_T.resx

@@ -0,0 +1,387 @@
+<?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="CloseServer.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="CloseServer.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="CloseServer.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="BuildServer.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="BuildServer.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="BuildServer.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="SendCheck.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="SendCheck.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="SendCheck.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="Packing.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Packing.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="Packing.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="Printing.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Printing.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="Printing.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="DeleteAll.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="DeleteAll.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="DeleteAll.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Clean.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="Clean.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
+</root>

+ 9 - 0
UAS_MES_JWS/UAS_MES_JWS.csproj

@@ -907,6 +907,12 @@
     <Compile Include="FunctionCode\Packing\Packing_NewPallet.Designer.cs">
       <DependentUpon>Packing_NewPallet.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Packing\Packing_PackageCollection_T.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Packing\Packing_PackageCollection_T.Designer.cs">
+      <DependentUpon>Packing_PackageCollection_T.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Packing\Packing_PackageCollection1.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1801,6 +1807,9 @@
     <EmbeddedResource Include="FunctionCode\Packing\Packing_NewPallet.resx">
       <DependentUpon>Packing_NewPallet.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Packing\Packing_PackageCollection_T.resx">
+      <DependentUpon>Packing_PackageCollection_T.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Packing\Packing_PackageCollection1.resx">
       <DependentUpon>Packing_PackageCollection1.cs</DependentUpon>
     </EmbeddedResource>