Преглед на файлове

tcp通讯demo修改以及万利达MES修改提交

caosy преди 1 година
родител
ревизия
a431628c21

+ 50 - 2
FileAnalysis/Form1.cs

@@ -3,8 +3,8 @@ using System.Collections.Generic;
 using System.Drawing;
 using System.Security.Cryptography;
 using System.Text;
+using System.Threading;
 using System.Windows.Forms;
-using UMESDLLService;
 
 namespace FileAnalysis
 {
@@ -16,9 +16,14 @@ namespace FileAnalysis
             InitializeComponent();
         }
         TCPClient client;
+        private const int bufferSize = 8000;
         private void Analysis_Click(object sender, EventArgs e)
         {
-            client.Send("A001H10G1111111111111111110111100111111111111111111111111111111111111111111111111111111111111111111111111111 ");
+            //client.Send("A110S001H01B1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111");
+            //client.Send("41 31 31 30 53 30 30 31 48 30 31 42 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 AF E4");
+            //string sss= BinTohex("A110S001H10R1011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111");
+            string sss = BinTohex("B008S001GM");
+            client.Send(sss);
         }
 
         private string GETMD5(string password)
@@ -43,6 +48,46 @@ namespace FileAnalysis
             return sb.ToString();
         }
 
+        public static ushort CalculateCRC(byte[] data)
+        {
+            ushort crc = 0xFFFF;
+
+            foreach (byte b in data)
+            {
+                crc ^= b;
+                for (int i = 0; i < 8; i++)
+                {
+                    if ((crc & 0x0001) != 0)
+                    {
+                        crc >>= 1;
+                        crc ^= 0xA001;
+                    }
+                    else
+                    {
+                        crc >>= 1;
+                    }
+                }
+            }
+
+            // Swap bytes to get the correct Modbus CRC16 format
+            return (ushort)((crc << 8) | (crc >> 8));
+        }
+
+
+        public static string BinTohex(string mBin)
+        {
+            char[] values = mBin.ToCharArray();
+            int tempI;
+            StringBuilder WRSCodeSB = new StringBuilder();
+            foreach (char value in values)
+            {
+                tempI = Convert.ToInt32(value);
+                WRSCodeSB.Append(Convert.ToString(tempI, 16).PadLeft(2, '0'));
+            }
+            return WRSCodeSB.ToString();
+        }
+
+
         public static int[] GetDecimalData(string HexStr, int[] DataSize, int[] NotShow)
         {
             List<int> ReturnData = new List<int>();
@@ -110,6 +155,9 @@ namespace FileAnalysis
             //{
             //    ReturnData.AppendText(nextLine.ToString() + "\n");
             //}
+
         }
+
+       
     }
 }

+ 77 - 4
FileAnalysis/TCPClient.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
 using System.Net;
@@ -139,18 +140,25 @@ namespace FileAnalysis
                     socket.Connect(serverFullAddr);
                     ResetCount = 0;
                 }
-                byte[] arr = Encoding.ASCII.GetBytes(Command);
+                //byte[] arr = Encoding.ASCII.GetBytes(Command);
+                byte[] arr = HexStringToBytes(Command);
                 //Command = Command.Replace(" ", "");
                 //byte[] arr = new byte[Command.Length / 2];
                 //for (int i = 0; i < Command.Length / 2; i++)
                 //{
                 //    arr[i] = (byte)Convert.(Command.Substring(i * 2, 2), 16);
                 //}
+
+                //byte[] data = { 0x01, 0x03, 0x00, 0x00, 0x00, 0x0A }; // 示例数据
+                String crc = CalculateCRC(arr);
+
+                arr = HexStringToBytes(Command+ crc);
+
                 socket.Send(arr);
-                //byte[] receive = new byte[1024 * 10];
+                byte[] receive = new byte[1024 * 10];
 
-                //int length = socket.Receive(receive);
-                //str = ByteToHexadecimalString(receive, length);
+                int length = socket.Receive(receive);
+                str = System.Text.Encoding.UTF8.GetString(receive,0,length);
                 //if (!returnvalue.ContainsKey(socket.RemoteEndPoint.ToString()))
                 //{
                 //    returnvalue.Add(socket.RemoteEndPoint.ToString(), str);
@@ -163,6 +171,71 @@ namespace FileAnalysis
             }
         }
 
+
+        public static String CalculateCRC(byte[] data)
+        {
+            ushort crc = 0xFFFF;
+
+            foreach (byte b in data)
+            {
+                crc ^= b;
+                for (int i = 0; i < 8; i++)
+                {
+                    if ((crc & 0x0001) != 0)
+                    {
+                        crc >>= 1;
+                        crc ^= 0xA001;
+                    }
+                    else
+                    {
+                        crc >>= 1;
+                    }
+                }
+            }
+
+            // Swap bytes to get the correct Modbus CRC16 format
+            return ((ushort)((crc << 8) | (crc >> 8))).ToString("X").PadLeft(4, '0');
+        }
+
+
+        private byte[] HexStringToBytes(string hs)//十六进制字符串转byte
+        {
+            try
+            {
+                string a = hs.Replace(" ", "");
+                int bytelength = 0;
+                if (a.Length % 2 == 0)
+                {
+                    bytelength = a.Length / 2;
+                }
+                else
+                {
+                    bytelength = a.Length / 2 + 1;
+                }
+                byte[] b = new byte[bytelength];
+                //逐个字符变为16进制字节数据
+                for (int i = 0; i < bytelength; i++)
+                {
+                    if (i == bytelength - 1)
+                    {
+                        b[i] = Convert.ToByte(a.Substring(i * 2), 16);
+                    }
+                    else
+                    {
+                        b[i] = Convert.ToByte(a.Substring(i * 2, 2), 16);
+                    }
+                }
+                //按照指定编码将字节数组变为字符串
+                return b;
+            }
+           catch (Exception ex)
+            {
+                Console.WriteLine(ex.Message);
+                return null; 
+             
+            }
+            }
+
         public static string ByteToHexadecimalString(byte[] b, int length)
         {
             string returnStr = "";

+ 193 - 133
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs

@@ -86,6 +86,8 @@
             this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.locksalecode = new System.Windows.Forms.CheckBox();
+            this.checkBox1 = new System.Windows.Forms.CheckBox();
+            this.textBox1 = new System.Windows.Forms.TextBox();
             this.panel4.SuspendLayout();
             this.groupBoxWithBorder2.SuspendLayout();
             this.SuspendLayout();
@@ -94,9 +96,10 @@
             // 
             this.pr_colorboxgw_label.AutoSize = true;
             this.pr_colorboxgw_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_colorboxgw_label.Location = new System.Drawing.Point(16, 217);
+            this.pr_colorboxgw_label.Location = new System.Drawing.Point(24, 326);
+            this.pr_colorboxgw_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_colorboxgw_label.Name = "pr_colorboxgw_label";
-            this.pr_colorboxgw_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_colorboxgw_label.Size = new System.Drawing.Size(137, 39);
             this.pr_colorboxgw_label.TabIndex = 42;
             this.pr_colorboxgw_label.Text = "标准重量";
             // 
@@ -104,9 +107,10 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(16, 307);
+            this.pr_code_label.Location = new System.Drawing.Point(24, 460);
+            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_code_label.Size = new System.Drawing.Size(137, 39);
             this.pr_code_label.TabIndex = 40;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -116,9 +120,10 @@
             this.pr_colorboxunit.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.pr_colorboxunit.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_colorboxunit.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.pr_colorboxunit.Location = new System.Drawing.Point(16, 98);
+            this.pr_colorboxunit.Location = new System.Drawing.Point(24, 147);
+            this.pr_colorboxunit.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_colorboxunit.Name = "pr_colorboxunit";
-            this.pr_colorboxunit.Size = new System.Drawing.Size(31, 25);
+            this.pr_colorboxunit.Size = new System.Drawing.Size(46, 38);
             this.pr_colorboxunit.TabIndex = 42;
             this.pr_colorboxunit.Text = "克";
             this.pr_colorboxunit.Visible = false;
@@ -129,9 +134,10 @@
             this.weight_label.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.weight_label.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.weight_label.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.weight_label.Location = new System.Drawing.Point(16, 52);
+            this.weight_label.Location = new System.Drawing.Point(24, 78);
+            this.weight_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.weight_label.Name = "weight_label";
-            this.weight_label.Size = new System.Drawing.Size(50, 25);
+            this.weight_label.Size = new System.Drawing.Size(75, 38);
             this.weight_label.TabIndex = 20;
             this.weight_label.Text = "重量";
             // 
@@ -140,9 +146,10 @@
             this.weight.AutoSize = true;
             this.weight.Font = new System.Drawing.Font("微软雅黑", 35F);
             this.weight.ForeColor = System.Drawing.Color.Green;
-            this.weight.Location = new System.Drawing.Point(86, 30);
+            this.weight.Location = new System.Drawing.Point(129, 45);
+            this.weight.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.weight.Name = "weight";
-            this.weight.Size = new System.Drawing.Size(0, 60);
+            this.weight.Size = new System.Drawing.Size(0, 90);
             this.weight.TabIndex = 41;
             // 
             // panel4
@@ -151,19 +158,20 @@
             this.panel4.Controls.Add(this.pr_colorboxunit);
             this.panel4.Controls.Add(this.weight_label);
             this.panel4.Controls.Add(this.weight);
-            this.panel4.Location = new System.Drawing.Point(16, 78);
-            this.panel4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.panel4.Location = new System.Drawing.Point(24, 117);
+            this.panel4.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.panel4.Name = "panel4";
-            this.panel4.Size = new System.Drawing.Size(346, 124);
+            this.panel4.Size = new System.Drawing.Size(518, 185);
             this.panel4.TabIndex = 63;
             // 
             // label15
             // 
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 20F);
-            this.label15.Location = new System.Drawing.Point(8, 18);
+            this.label15.Location = new System.Drawing.Point(12, 27);
+            this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label15.Name = "label15";
-            this.label15.Size = new System.Drawing.Size(96, 35);
+            this.label15.Size = new System.Drawing.Size(142, 52);
             this.label15.TabIndex = 56;
             this.label15.Text = "条码号";
             // 
@@ -171,9 +179,10 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(16, 402);
+            this.pr_detail_label.Location = new System.Drawing.Point(24, 603);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(137, 39);
             this.pr_detail_label.TabIndex = 53;
             this.pr_detail_label.Text = "产品型号";
             // 
@@ -181,9 +190,10 @@
             // 
             this.ma_qty_label.AutoSize = true;
             this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty_label.Location = new System.Drawing.Point(16, 447);
+            this.ma_qty_label.Location = new System.Drawing.Point(24, 670);
+            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_qty_label.Name = "ma_qty_label";
-            this.ma_qty_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_qty_label.Size = new System.Drawing.Size(137, 39);
             this.ma_qty_label.TabIndex = 55;
             this.ma_qty_label.Text = "工单数量";
             // 
@@ -191,9 +201,10 @@
             // 
             this.ma_salecode_label.AutoSize = true;
             this.ma_salecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_salecode_label.Location = new System.Drawing.Point(16, 355);
+            this.ma_salecode_label.Location = new System.Drawing.Point(24, 532);
+            this.ma_salecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_salecode_label.Name = "ma_salecode_label";
-            this.ma_salecode_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_salecode_label.Size = new System.Drawing.Size(137, 39);
             this.ma_salecode_label.TabIndex = 54;
             this.ma_salecode_label.Text = "订单编号";
             // 
@@ -201,9 +212,10 @@
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(16, 261);
+            this.ms_makecode_label.Location = new System.Drawing.Point(24, 392);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_makecode_label.Size = new System.Drawing.Size(137, 39);
             this.ms_makecode_label.TabIndex = 72;
             this.ms_makecode_label.Text = "制造单号";
             // 
@@ -211,10 +223,10 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(878, 118);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.PrintLabel.Location = new System.Drawing.Point(1317, 177);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(120, 20);
+            this.PrintLabel.Size = new System.Drawing.Size(178, 26);
             this.PrintLabel.TabIndex = 159;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -222,9 +234,10 @@
             // 
             this.Printer_label.AutoSize = true;
             this.Printer_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Printer_label.Location = new System.Drawing.Point(770, 86);
+            this.Printer_label.Location = new System.Drawing.Point(1155, 129);
+            this.Printer_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Printer_label.Name = "Printer_label";
-            this.Printer_label.Size = new System.Drawing.Size(84, 20);
+            this.Printer_label.Size = new System.Drawing.Size(123, 30);
             this.Printer_label.TabIndex = 162;
             this.Printer_label.Text = "打印机列表";
             // 
@@ -232,9 +245,10 @@
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(770, 118);
+            this.PrintLabel_label.Location = new System.Drawing.Point(1155, 177);
+            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrintLabel_label.Name = "PrintLabel_label";
-            this.PrintLabel_label.Size = new System.Drawing.Size(69, 20);
+            this.PrintLabel_label.Size = new System.Drawing.Size(101, 30);
             this.PrintLabel_label.TabIndex = 163;
             this.PrintLabel_label.Text = "打印标签";
             // 
@@ -242,9 +256,10 @@
             // 
             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(770, 58);
+            this.label1.Location = new System.Drawing.Point(1155, 87);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(69, 20);
+            this.label1.Size = new System.Drawing.Size(101, 30);
             this.label1.TabIndex = 170;
             this.label1.Text = "打印张数";
             // 
@@ -252,9 +267,10 @@
             // 
             this.BaudRate.AutoSize = true;
             this.BaudRate.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BaudRate.Location = new System.Drawing.Point(884, 32);
+            this.BaudRate.Location = new System.Drawing.Point(1326, 48);
+            this.BaudRate.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.BaudRate.Name = "BaudRate";
-            this.BaudRate.Size = new System.Drawing.Size(78, 20);
+            this.BaudRate.Size = new System.Drawing.Size(113, 30);
             this.BaudRate.TabIndex = 171;
             this.BaudRate.Text = "BaudRate";
             this.BaudRate.Visible = false;
@@ -263,9 +279,10 @@
             // 
             this.ComList.AutoSize = true;
             this.ComList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ComList.Location = new System.Drawing.Point(884, 6);
+            this.ComList.Location = new System.Drawing.Point(1326, 9);
+            this.ComList.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ComList.Name = "ComList";
-            this.ComList.Size = new System.Drawing.Size(68, 20);
+            this.ComList.Size = new System.Drawing.Size(98, 30);
             this.ComList.TabIndex = 172;
             this.ComList.Text = "ComList";
             this.ComList.Visible = false;
@@ -278,10 +295,11 @@
             this.columnHeader3,
             this.columnHeader4});
             this.WeighRecord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.WeighRecord.Location = new System.Drawing.Point(377, 218);
-            this.WeighRecord.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.WeighRecord.HideSelection = false;
+            this.WeighRecord.Location = new System.Drawing.Point(574, 365);
+            this.WeighRecord.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.WeighRecord.Name = "WeighRecord";
-            this.WeighRecord.Size = new System.Drawing.Size(381, 334);
+            this.WeighRecord.Size = new System.Drawing.Size(570, 499);
             this.WeighRecord.TabIndex = 173;
             this.WeighRecord.UseCompatibleStateImageBehavior = false;
             this.WeighRecord.View = System.Windows.Forms.View.Details;
@@ -309,9 +327,10 @@
             // pr_sendchecktype
             // 
             this.pr_sendchecktype.AutoSize = true;
-            this.pr_sendchecktype.Location = new System.Drawing.Point(506, 562);
+            this.pr_sendchecktype.Location = new System.Drawing.Point(759, 843);
+            this.pr_sendchecktype.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_sendchecktype.Name = "pr_sendchecktype";
-            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 12);
+            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 18);
             this.pr_sendchecktype.TabIndex = 188;
             this.pr_sendchecktype.Visible = false;
             // 
@@ -319,9 +338,10 @@
             // 
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty_label.Location = new System.Drawing.Point(16, 493);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(24, 740);
+            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
-            this.mcd_inqty_label.Size = new System.Drawing.Size(92, 27);
+            this.mcd_inqty_label.Size = new System.Drawing.Size(137, 39);
             this.mcd_inqty_label.TabIndex = 190;
             this.mcd_inqty_label.Text = "已采集数";
             // 
@@ -329,9 +349,10 @@
             // 
             this.mcd_remainqty_label.AutoSize = true;
             this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty_label.Location = new System.Drawing.Point(16, 536);
+            this.mcd_remainqty_label.Location = new System.Drawing.Point(24, 804);
+            this.mcd_remainqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_remainqty_label.Name = "mcd_remainqty_label";
-            this.mcd_remainqty_label.Size = new System.Drawing.Size(92, 27);
+            this.mcd_remainqty_label.Size = new System.Drawing.Size(137, 39);
             this.mcd_remainqty_label.TabIndex = 192;
             this.mcd_remainqty_label.Text = "待采集数";
             // 
@@ -341,9 +362,10 @@
             this.CollectRemark.Checked = true;
             this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.CollectRemark.Location = new System.Drawing.Point(772, 174);
+            this.CollectRemark.Location = new System.Drawing.Point(1158, 261);
+            this.CollectRemark.Margin = new System.Windows.Forms.Padding(4);
             this.CollectRemark.Name = "CollectRemark";
-            this.CollectRemark.Size = new System.Drawing.Size(84, 24);
+            this.CollectRemark.Size = new System.Drawing.Size(118, 31);
             this.CollectRemark.TabIndex = 195;
             this.CollectRemark.Text = "采集备注";
             this.CollectRemark.UseVisualStyleBackColor = true;
@@ -351,10 +373,10 @@
             // Remark
             // 
             this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Remark.Location = new System.Drawing.Point(768, 202);
-            this.Remark.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Remark.Location = new System.Drawing.Point(1152, 303);
+            this.Remark.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Remark.Name = "Remark";
-            this.Remark.Size = new System.Drawing.Size(240, 80);
+            this.Remark.Size = new System.Drawing.Size(358, 118);
             this.Remark.TabIndex = 194;
             this.Remark.Text = "";
             // 
@@ -363,10 +385,11 @@
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.CutLength = null;
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(129, 536);
-            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.mcd_remainqty.Location = new System.Drawing.Point(194, 804);
+            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(225, 0);
             this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 27);
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 39);
             this.mcd_remainqty.TabIndex = 193;
             // 
             // mcd_inqty
@@ -374,19 +397,19 @@
             this.mcd_inqty.AutoSize = true;
             this.mcd_inqty.CutLength = null;
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(129, 493);
-            this.mcd_inqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.mcd_inqty.Location = new System.Drawing.Point(194, 740);
+            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_inqty.MaximumSize = new System.Drawing.Size(225, 0);
             this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 27);
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 39);
             this.mcd_inqty.TabIndex = 191;
             // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(773, 146);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Location = new System.Drawing.Point(1160, 219);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(80, 22);
+            this.StepCount.Size = new System.Drawing.Size(120, 33);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 189;
@@ -398,13 +421,13 @@
             this.RefreshWeigh.DownImage = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.DownImage")));
             this.RefreshWeigh.Image = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.Image")));
             this.RefreshWeigh.IsShowBorder = true;
-            this.RefreshWeigh.Location = new System.Drawing.Point(308, 221);
-            this.RefreshWeigh.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.RefreshWeigh.Location = new System.Drawing.Point(462, 332);
+            this.RefreshWeigh.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.RefreshWeigh.MoveImage = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.MoveImage")));
             this.RefreshWeigh.Name = "RefreshWeigh";
             this.RefreshWeigh.NormalImage = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.NormalImage")));
             this.RefreshWeigh.Power = null;
-            this.RefreshWeigh.Size = new System.Drawing.Size(54, 24);
+            this.RefreshWeigh.Size = new System.Drawing.Size(81, 36);
             this.RefreshWeigh.TabIndex = 177;
             this.RefreshWeigh.Text = "刷新重量";
             this.RefreshWeigh.UseVisualStyleBackColor = true;
@@ -416,11 +439,11 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(878, 58);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.PrintNum.Location = new System.Drawing.Point(1317, 87);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(78, 21);
+            this.PrintNum.Size = new System.Drawing.Size(115, 28);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -437,11 +460,9 @@
             this.groupBoxWithBorder2.Controls.Add(this.ob_batchqty_label);
             this.groupBoxWithBorder2.Controls.Add(this.SendCheck);
             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(377, 78);
-            this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBoxWithBorder2.Location = new System.Drawing.Point(566, 117);
             this.groupBoxWithBorder2.Name = "groupBoxWithBorder2";
-            this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.groupBoxWithBorder2.Size = new System.Drawing.Size(380, 122);
+            this.groupBoxWithBorder2.Size = new System.Drawing.Size(570, 183);
             this.groupBoxWithBorder2.TabIndex = 175;
             this.groupBoxWithBorder2.TabStop = false;
             this.groupBoxWithBorder2.Text = "送检信息";
@@ -451,9 +472,10 @@
             // 
             this.ob_checkno_label.AutoSize = true;
             this.ob_checkno_label.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_checkno_label.Location = new System.Drawing.Point(21, 74);
+            this.ob_checkno_label.Location = new System.Drawing.Point(32, 111);
+            this.ob_checkno_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_checkno_label.Name = "ob_checkno_label";
-            this.ob_checkno_label.Size = new System.Drawing.Size(82, 24);
+            this.ob_checkno_label.Size = new System.Drawing.Size(119, 35);
             this.ob_checkno_label.TabIndex = 180;
             this.ob_checkno_label.Text = "当前批号";
             // 
@@ -461,9 +483,10 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_checkno.Location = new System.Drawing.Point(115, 74);
+            this.ob_checkno.Location = new System.Drawing.Point(172, 111);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_checkno.Name = "ob_checkno";
-            this.ob_checkno.Size = new System.Drawing.Size(0, 24);
+            this.ob_checkno.Size = new System.Drawing.Size(0, 35);
             this.ob_checkno.TabIndex = 179;
             this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
             // 
@@ -471,27 +494,30 @@
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(290, 28);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(435, 42);
+            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 24);
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 35);
             this.ob_nowcheckqty.TabIndex = 178;
             // 
             // ob_batchqty
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_batchqty.Location = new System.Drawing.Point(115, 28);
+            this.ob_batchqty.Location = new System.Drawing.Point(172, 42);
+            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_batchqty.Name = "ob_batchqty";
-            this.ob_batchqty.Size = new System.Drawing.Size(0, 24);
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 35);
             this.ob_batchqty.TabIndex = 177;
             // 
             // ob_nowcheckqty_label
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(196, 28);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(294, 42);
+            this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
-            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(82, 24);
+            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(119, 35);
             this.ob_nowcheckqty_label.TabIndex = 176;
             this.ob_nowcheckqty_label.Text = "当前批数";
             // 
@@ -499,9 +525,10 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_batchqty_label.Location = new System.Drawing.Point(21, 28);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(32, 42);
+            this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
-            this.ob_batchqty_label.Size = new System.Drawing.Size(82, 24);
+            this.ob_batchqty_label.Size = new System.Drawing.Size(119, 35);
             this.ob_batchqty_label.TabIndex = 175;
             this.ob_batchqty_label.Text = "标准批数";
             // 
@@ -514,13 +541,13 @@
             this.SendCheck.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.SendCheck.Image = null;
             this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(290, 86);
-            this.SendCheck.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.SendCheck.Location = new System.Drawing.Point(435, 129);
+            this.SendCheck.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             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(45, 24);
+            this.SendCheck.Size = new System.Drawing.Size(68, 36);
             this.SendCheck.TabIndex = 174;
             this.SendCheck.Tag = "ifread";
             this.SendCheck.Text = "送检";
@@ -532,20 +559,21 @@
             this.pr_colorboxgw.AutoSize = true;
             this.pr_colorboxgw.CutLength = null;
             this.pr_colorboxgw.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_colorboxgw.Location = new System.Drawing.Point(129, 217);
-            this.pr_colorboxgw.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_colorboxgw.Location = new System.Drawing.Point(194, 326);
+            this.pr_colorboxgw.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_colorboxgw.MaximumSize = new System.Drawing.Size(225, 0);
             this.pr_colorboxgw.Name = "pr_colorboxgw";
-            this.pr_colorboxgw.Size = new System.Drawing.Size(0, 27);
+            this.pr_colorboxgw.Size = new System.Drawing.Size(0, 39);
             this.pr_colorboxgw.TabIndex = 80;
             this.pr_colorboxgw.Tag = "1";
             // 
             // AutoPrint
             // 
             this.AutoPrint.Checked = false;
-            this.AutoPrint.Location = new System.Drawing.Point(774, 22);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.AutoPrint.Location = new System.Drawing.Point(1161, 33);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(105, 22);
+            this.AutoPrint.Size = new System.Drawing.Size(158, 33);
             this.AutoPrint.TabIndex = 174;
             // 
             // pr_code
@@ -553,20 +581,21 @@
             this.pr_code.AutoSize = true;
             this.pr_code.CutLength = null;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(128, 307);
-            this.pr_code.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_code.Location = new System.Drawing.Point(192, 460);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code.MaximumSize = new System.Drawing.Size(225, 0);
             this.pr_code.Name = "pr_code";
-            this.pr_code.Size = new System.Drawing.Size(0, 27);
+            this.pr_code.Size = new System.Drawing.Size(0, 39);
             this.pr_code.TabIndex = 79;
             this.pr_code.Tag = "1";
             this.pr_code.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(878, 86);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrinterList.Location = new System.Drawing.Point(1317, 129);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(6);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(118, 20);
+            this.PrinterList.Size = new System.Drawing.Size(177, 30);
             this.PrinterList.TabIndex = 160;
             // 
             // StopWeight
@@ -576,13 +605,13 @@
             this.StopWeight.DownImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.DownImage")));
             this.StopWeight.Image = ((System.Drawing.Image)(resources.GetObject("StopWeight.Image")));
             this.StopWeight.IsShowBorder = true;
-            this.StopWeight.Location = new System.Drawing.Point(681, 24);
-            this.StopWeight.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.StopWeight.Location = new System.Drawing.Point(1022, 36);
+            this.StopWeight.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.StopWeight.MoveImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.MoveImage")));
             this.StopWeight.Name = "StopWeight";
             this.StopWeight.NormalImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.NormalImage")));
             this.StopWeight.Power = null;
-            this.StopWeight.Size = new System.Drawing.Size(54, 24);
+            this.StopWeight.Size = new System.Drawing.Size(81, 36);
             this.StopWeight.TabIndex = 158;
             this.StopWeight.Text = "停止称量";
             this.StopWeight.UseVisualStyleBackColor = true;
@@ -595,13 +624,13 @@
             this.StartWeight.DownImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.DownImage")));
             this.StartWeight.Image = ((System.Drawing.Image)(resources.GetObject("StartWeight.Image")));
             this.StartWeight.IsShowBorder = true;
-            this.StartWeight.Location = new System.Drawing.Point(602, 24);
-            this.StartWeight.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.StartWeight.Location = new System.Drawing.Point(903, 36);
+            this.StartWeight.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.StartWeight.MoveImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.MoveImage")));
             this.StartWeight.Name = "StartWeight";
             this.StartWeight.NormalImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.NormalImage")));
             this.StartWeight.Power = null;
-            this.StartWeight.Size = new System.Drawing.Size(54, 24);
+            this.StartWeight.Size = new System.Drawing.Size(81, 36);
             this.StartWeight.TabIndex = 157;
             this.StartWeight.Text = "开始称量";
             this.StartWeight.UseVisualStyleBackColor = true;
@@ -614,13 +643,13 @@
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(878, 146);
-            this.Confirm.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Confirm.Location = new System.Drawing.Point(1317, 219);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.Power = null;
-            this.Confirm.Size = new System.Drawing.Size(50, 24);
+            this.Confirm.Size = new System.Drawing.Size(75, 36);
             this.Confirm.TabIndex = 152;
             this.Confirm.Text = "打印";
             this.Confirm.UseVisualStyleBackColor = true;
@@ -631,10 +660,11 @@
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.CutLength = null;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(129, 261);
-            this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_makecode.Location = new System.Drawing.Point(194, 392);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(225, 0);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 39);
             this.ms_makecode.TabIndex = 77;
             this.ms_makecode.Tag = "1";
             // 
@@ -643,10 +673,11 @@
             this.ma_qty.AutoSize = true;
             this.ma_qty.CutLength = null;
             this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty.Location = new System.Drawing.Point(128, 447);
-            this.ma_qty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ma_qty.Location = new System.Drawing.Point(192, 670);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty.MaximumSize = new System.Drawing.Size(225, 0);
             this.ma_qty.Name = "ma_qty";
-            this.ma_qty.Size = new System.Drawing.Size(0, 27);
+            this.ma_qty.Size = new System.Drawing.Size(0, 39);
             this.ma_qty.TabIndex = 76;
             // 
             // pr_machinetype
@@ -654,10 +685,11 @@
             this.pr_machinetype.AutoSize = true;
             this.pr_machinetype.CutLength = null;
             this.pr_machinetype.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_machinetype.Location = new System.Drawing.Point(128, 402);
-            this.pr_machinetype.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_machinetype.Location = new System.Drawing.Point(192, 603);
+            this.pr_machinetype.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_machinetype.MaximumSize = new System.Drawing.Size(225, 0);
             this.pr_machinetype.Name = "pr_machinetype";
-            this.pr_machinetype.Size = new System.Drawing.Size(0, 27);
+            this.pr_machinetype.Size = new System.Drawing.Size(0, 39);
             this.pr_machinetype.TabIndex = 75;
             // 
             // ma_salecode
@@ -665,10 +697,11 @@
             this.ma_salecode.AutoSize = true;
             this.ma_salecode.CutLength = null;
             this.ma_salecode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_salecode.Location = new System.Drawing.Point(128, 355);
-            this.ma_salecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ma_salecode.Location = new System.Drawing.Point(192, 532);
+            this.ma_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_salecode.MaximumSize = new System.Drawing.Size(225, 0);
             this.ma_salecode.Name = "ma_salecode";
-            this.ma_salecode.Size = new System.Drawing.Size(0, 27);
+            this.ma_salecode.Size = new System.Drawing.Size(0, 39);
             this.ma_salecode.TabIndex = 73;
             // 
             // Clean
@@ -678,13 +711,13 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(858, 558);
-            this.Clean.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Clean.Location = new System.Drawing.Point(1287, 837);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             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(60, 24);
+            this.Clean.Size = new System.Drawing.Size(90, 36);
             this.Clean.TabIndex = 60;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -697,8 +730,8 @@
             this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
             this.normalButton1.Image = ((System.Drawing.Image)(resources.GetObject("normalButton1.Image")));
             this.normalButton1.IsShowBorder = true;
-            this.normalButton1.Location = new System.Drawing.Point(21, 54);
-            this.normalButton1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.normalButton1.Location = new System.Drawing.Point(32, 81);
+            this.normalButton1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
             this.normalButton1.Name = "normalButton1";
             this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
@@ -714,11 +747,11 @@
             this.sncode.BackColor = System.Drawing.Color.White;
             this.sncode.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.sncode.ID = null;
-            this.sncode.Location = new System.Drawing.Point(110, 18);
-            this.sncode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.sncode.Location = new System.Drawing.Point(165, 27);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.sncode.Name = "sncode";
             this.sncode.Power = "";
-            this.sncode.Size = new System.Drawing.Size(469, 39);
+            this.sncode.Size = new System.Drawing.Size(702, 55);
             this.sncode.Str = null;
             this.sncode.Str1 = null;
             this.sncode.Str2 = null;
@@ -728,10 +761,10 @@
             // 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(768, 289);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.OperateResult.Location = new System.Drawing.Point(1152, 434);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(240, 261);
+            this.OperateResult.Size = new System.Drawing.Size(358, 390);
             this.OperateResult.TabIndex = 58;
             this.OperateResult.Text = "";
             // 
@@ -742,18 +775,43 @@
             this.locksalecode.CheckState = System.Windows.Forms.CheckState.Checked;
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.ForeColor = System.Drawing.Color.Red;
-            this.locksalecode.Location = new System.Drawing.Point(273, 266);
+            this.locksalecode.Location = new System.Drawing.Point(410, 399);
+            this.locksalecode.Margin = new System.Windows.Forms.Padding(4);
             this.locksalecode.Name = "locksalecode";
-            this.locksalecode.Size = new System.Drawing.Size(96, 16);
+            this.locksalecode.Size = new System.Drawing.Size(142, 22);
             this.locksalecode.TabIndex = 204;
             this.locksalecode.Text = "当前订单锁定";
             this.locksalecode.UseVisualStyleBackColor = true;
             // 
+            // checkBox1
+            // 
+            this.checkBox1.AutoSize = true;
+            this.checkBox1.Enabled = false;
+            this.checkBox1.Location = new System.Drawing.Point(574, 326);
+            this.checkBox1.Name = "checkBox1";
+            this.checkBox1.Size = new System.Drawing.Size(160, 22);
+            this.checkBox1.TabIndex = 205;
+            this.checkBox1.Text = "不控制重量范围";
+            this.checkBox1.UseVisualStyleBackColor = true;
+            this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
+            // 
+            // textBox1
+            // 
+            this.textBox1.Location = new System.Drawing.Point(762, 324);
+            this.textBox1.Name = "textBox1";
+            this.textBox1.PasswordChar = '*';
+            this.textBox1.Size = new System.Drawing.Size(325, 28);
+            this.textBox1.TabIndex = 206;
+            this.textBox1.UseSystemPasswordChar = true;
+            this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown);
+            // 
             // Make_ColorBoxWeigh
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1013, 584);
+            this.ClientSize = new System.Drawing.Size(1520, 876);
+            this.Controls.Add(this.textBox1);
+            this.Controls.Add(this.checkBox1);
             this.Controls.Add(this.locksalecode);
             this.Controls.Add(this.CollectRemark);
             this.Controls.Add(this.Remark);
@@ -797,7 +855,7 @@
             this.Controls.Add(this.ma_salecode_label);
             this.Controls.Add(this.OperateResult);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Name = "Make_ColorBoxWeigh";
             this.Tag = "Make!ColorBoxWeigh";
             this.Text = "彩盒称重";
@@ -870,5 +928,7 @@
         private System.Windows.Forms.CheckBox CollectRemark;
         private System.Windows.Forms.CheckBox locksalecode;
         public System.Windows.Forms.Label ob_checkno;
+        private System.Windows.Forms.CheckBox checkBox1;
+        private System.Windows.Forms.TextBox textBox1;
     }
 }

+ 32 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -13,6 +13,7 @@ using UAS_MES.PublicMethod;
 using System.Drawing;
 using LabelManager2;
 using UAS_MES.PublicForm;
+using DevComponents.DotNetBar.Controls;
 
 namespace UAS_MES.Make
 {
@@ -153,7 +154,7 @@ namespace UAS_MES.Make
                             //}
                             //重量信息若需要检测则必须符合检测要求才更新
                             double ActualWeight = double.Parse(weight.Text == "" ? "0" : weight.Text.Replace("kg", "").Trim());
-                            if (PR_CHECKCOLORBOXW != "0")
+                            if (PR_CHECKCOLORBOXW != "0"&&!checkBox1.Checked)
                             {
                                 if (MinWeight == 0 || MaxWeight == 0)
                                 {
@@ -187,6 +188,10 @@ namespace UAS_MES.Make
                             lsi.SubItems.Add(System.DateTime.Now.ToString());
                             WeighRecord.Items.Add(lsi);
                             OperateResult.AppendText(">>彩盒" + sncode.Text + "称重完成\n", Color.Green);
+                            if (checkBox1.Checked)
+                            {
+                                checkBox1.Checked = false;
+                            }
                             //显示最近的三个称量记录
                             if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sncode.Text, "彩盒称量", "称量合格", User.UserCode, out ErrorMessage))
                             {
@@ -463,5 +468,31 @@ namespace UAS_MES.Make
             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='" + ms_makecode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
             BaseUtil.SetFormValue(Controls, dt);
         }
+
+        private void checkBox1_CheckedChanged(object sender, EventArgs e)
+        {
+            if (checkBox1.Checked)
+                checkBox1.Enabled = true;
+            else checkBox1.Enabled = false;
+        }
+
+        private void textBox1_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                string password = dh.getFieldDataByCondition("employee", "em_password", "em_code = 'FD001'").ToString();
+                if (textBox1.Text.Equals(password))
+                {
+                    checkBox1.Checked = true;
+                    textBox1.Clear();
+                    sncode.Focus();
+
+                }
+                else
+                {
+                    OperateResult.AppendText(">>密码错误\n", Color.Red,textBox1);
+                }
+            }
+        }
     }
 }

+ 6 - 6
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.resx

@@ -177,7 +177,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -346,7 +346,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -477,7 +477,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -608,7 +608,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -739,7 +739,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -870,7 +870,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B

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

@@ -984,6 +984,7 @@ namespace UAS_MES.Make
                 if (pa_outboxcode.Text.Length != int.Parse(OutBoxLength.Text))
                 {
                     OperateResult.AppendText(">>箱号长度错误,请重新输入箱号\n", Color.Red);
+                    pa_outboxcode.SelectAll();
                     return false;
                 }
             }
@@ -994,12 +995,14 @@ namespace UAS_MES.Make
                     if (pa_outboxcode.Text.Substring(0, PreFix.Text.Length) != PreFix.Text)
                     {
                         OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                        pa_outboxcode.SelectAll();
                         return false;
                     }
                 }
                 catch (Exception)
                 {
                     OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                    pa_outboxcode.SelectAll();
                     return false;
                 }
             }

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

@@ -974,6 +974,7 @@ namespace UAS_MES.Make
                 if (pa_outboxcode.Text.Length != int.Parse(OutBoxLength.Text))
                 {
                     OperateResult.AppendText(">>箱号长度错误,请重新输入箱号\n", Color.Red);
+                    pa_outboxcode.SelectAll();
                     return false;
                 }
             }
@@ -984,12 +985,14 @@ namespace UAS_MES.Make
                     if (pa_outboxcode.Text.Substring(0, PreFix.Text.Length) != PreFix.Text)
                     {
                         OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                        pa_outboxcode.SelectAll();
                         return false;
                     }
                 }
                 catch (Exception)
                 {
                     OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                    pa_outboxcode.SelectAll();
                     return false;
                 }
             }

+ 407 - 0
UAS-MES/FunctionCode/Special/Special_Reset.Designer.cs

@@ -0,0 +1,407 @@
+namespace UAS_MES.Special
+{
+    partial class Special_Reset
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Special_Reset));
+            this.Pallet_label = new System.Windows.Forms.Label();
+            this.bigboxBtn = new System.Windows.Forms.RadioButton();
+            this.serBtn = new System.Windows.Forms.RadioButton();
+            this.st_rstepcode_label = new System.Windows.Forms.Label();
+            this.ma_craftcode_label = new System.Windows.Forms.Label();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.ms_prodcode_label = new System.Windows.Forms.Label();
+            this.WeighRecord = new System.Windows.Forms.ListView();
+            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.cd_stepno = new System.Windows.Forms.Label();
+            this.checkBox1 = new System.Windows.Forms.CheckBox();
+            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+            this.oqcBtn = new System.Windows.Forms.RadioButton();
+            this.excelim = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.数据清空 = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.ms_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.ms_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.cd_stepcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.cr_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperatResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
+            this.input = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Split = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.SuspendLayout();
+            // 
+            // Pallet_label
+            // 
+            this.Pallet_label.AutoSize = true;
+            this.Pallet_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Pallet_label.Location = new System.Drawing.Point(10, 62);
+            this.Pallet_label.Name = "Pallet_label";
+            this.Pallet_label.Size = new System.Drawing.Size(86, 31);
+            this.Pallet_label.TabIndex = 1;
+            this.Pallet_label.Text = "录入框";
+            // 
+            // bigboxBtn
+            // 
+            this.bigboxBtn.AutoSize = true;
+            this.bigboxBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bigboxBtn.Location = new System.Drawing.Point(16, 3);
+            this.bigboxBtn.Name = "bigboxBtn";
+            this.bigboxBtn.Size = new System.Drawing.Size(87, 35);
+            this.bigboxBtn.TabIndex = 234;
+            this.bigboxBtn.Text = "箱号";
+            this.bigboxBtn.UseVisualStyleBackColor = true;
+            this.bigboxBtn.Click += new System.EventHandler(this.bigboxBtn_Click);
+            // 
+            // serBtn
+            // 
+            this.serBtn.AutoSize = true;
+            this.serBtn.Checked = true;
+            this.serBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.serBtn.Location = new System.Drawing.Point(120, 3);
+            this.serBtn.Name = "serBtn";
+            this.serBtn.Size = new System.Drawing.Size(159, 35);
+            this.serBtn.TabIndex = 233;
+            this.serBtn.TabStop = true;
+            this.serBtn.Text = "单台序列号";
+            this.serBtn.UseVisualStyleBackColor = true;
+            this.serBtn.Click += new System.EventHandler(this.bigboxBtn_Click);
+            // 
+            // st_rstepcode_label
+            // 
+            this.st_rstepcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.st_rstepcode_label.AutoSize = true;
+            this.st_rstepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.st_rstepcode_label.Location = new System.Drawing.Point(759, 14);
+            this.st_rstepcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.st_rstepcode_label.Name = "st_rstepcode_label";
+            this.st_rstepcode_label.Size = new System.Drawing.Size(110, 31);
+            this.st_rstepcode_label.TabIndex = 235;
+            this.st_rstepcode_label.Text = "回流工序";
+            // 
+            // ma_craftcode_label
+            // 
+            this.ma_craftcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ma_craftcode_label.AutoSize = true;
+            this.ma_craftcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_craftcode_label.Location = new System.Drawing.Point(489, 6);
+            this.ma_craftcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_craftcode_label.Name = "ma_craftcode_label";
+            this.ma_craftcode_label.Size = new System.Drawing.Size(110, 31);
+            this.ma_craftcode_label.TabIndex = 236;
+            this.ma_craftcode_label.Text = "回流途程";
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(10, 122);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(86, 31);
+            this.ms_makecode_label.TabIndex = 240;
+            this.ms_makecode_label.Text = "工单号";
+            // 
+            // ms_prodcode_label
+            // 
+            this.ms_prodcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_prodcode_label.AutoSize = true;
+            this.ms_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_prodcode_label.Location = new System.Drawing.Point(489, 122);
+            this.ms_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_prodcode_label.Name = "ms_prodcode_label";
+            this.ms_prodcode_label.Size = new System.Drawing.Size(110, 31);
+            this.ms_prodcode_label.TabIndex = 241;
+            this.ms_prodcode_label.Text = "产品编号";
+            // 
+            // WeighRecord
+            // 
+            this.WeighRecord.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader3});
+            this.WeighRecord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.WeighRecord.Location = new System.Drawing.Point(16, 162);
+            this.WeighRecord.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.WeighRecord.Name = "WeighRecord";
+            this.WeighRecord.Size = new System.Drawing.Size(630, 480);
+            this.WeighRecord.TabIndex = 243;
+            this.WeighRecord.UseCompatibleStateImageBehavior = false;
+            this.WeighRecord.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader3
+            // 
+            this.columnHeader3.Text = "录入项";
+            this.columnHeader3.Width = 300;
+            // 
+            // cd_stepno
+            // 
+            this.cd_stepno.AutoSize = true;
+            this.cd_stepno.Location = new System.Drawing.Point(1056, 62);
+            this.cd_stepno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.cd_stepno.Name = "cd_stepno";
+            this.cd_stepno.Size = new System.Drawing.Size(0, 18);
+            this.cd_stepno.TabIndex = 244;
+            // 
+            // checkBox1
+            // 
+            this.checkBox1.AutoSize = true;
+            this.checkBox1.Location = new System.Drawing.Point(710, 224);
+            this.checkBox1.Margin = new System.Windows.Forms.Padding(4);
+            this.checkBox1.Name = "checkBox1";
+            this.checkBox1.Size = new System.Drawing.Size(178, 22);
+            this.checkBox1.TabIndex = 246;
+            this.checkBox1.Text = "清空机器写入信息";
+            this.checkBox1.UseVisualStyleBackColor = true;
+            this.checkBox1.Visible = false;
+            // 
+            // openFileDialog1
+            // 
+            this.openFileDialog1.FileName = "openFileDialog1";
+            // 
+            // oqcBtn
+            // 
+            this.oqcBtn.AutoSize = true;
+            this.oqcBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.oqcBtn.Location = new System.Drawing.Point(285, 4);
+            this.oqcBtn.Name = "oqcBtn";
+            this.oqcBtn.Size = new System.Drawing.Size(111, 35);
+            this.oqcBtn.TabIndex = 248;
+            this.oqcBtn.Text = "抽检批";
+            this.oqcBtn.UseVisualStyleBackColor = true;
+            this.oqcBtn.Click += new System.EventHandler(this.bigboxBtn_Click);
+            // 
+            // excelim
+            // 
+            this.excelim.AllPower = null;
+            this.excelim.BackColor = System.Drawing.Color.Transparent;
+            this.excelim.DownImage = ((System.Drawing.Image)(resources.GetObject("excelim.DownImage")));
+            this.excelim.Image = null;
+            this.excelim.IsShowBorder = true;
+            this.excelim.Location = new System.Drawing.Point(710, 526);
+            this.excelim.Margin = new System.Windows.Forms.Padding(4);
+            this.excelim.MoveImage = ((System.Drawing.Image)(resources.GetObject("excelim.MoveImage")));
+            this.excelim.Name = "excelim";
+            this.excelim.NormalImage = ((System.Drawing.Image)(resources.GetObject("excelim.NormalImage")));
+            this.excelim.Power = null;
+            this.excelim.Size = new System.Drawing.Size(112, 42);
+            this.excelim.TabIndex = 247;
+            this.excelim.Text = "表格导入";
+            this.excelim.UseVisualStyleBackColor = false;
+            this.excelim.Click += new System.EventHandler(this.excelim_Click);
+            // 
+            // 数据清空
+            // 
+            this.数据清空.AllPower = null;
+            this.数据清空.BackColor = System.Drawing.Color.Transparent;
+            this.数据清空.DownImage = ((System.Drawing.Image)(resources.GetObject("数据清空.DownImage")));
+            this.数据清空.Image = null;
+            this.数据清空.IsShowBorder = true;
+            this.数据清空.Location = new System.Drawing.Point(710, 600);
+            this.数据清空.Margin = new System.Windows.Forms.Padding(4);
+            this.数据清空.MoveImage = ((System.Drawing.Image)(resources.GetObject("数据清空.MoveImage")));
+            this.数据清空.Name = "数据清空";
+            this.数据清空.NormalImage = ((System.Drawing.Image)(resources.GetObject("数据清空.NormalImage")));
+            this.数据清空.Power = null;
+            this.数据清空.Size = new System.Drawing.Size(84, 42);
+            this.数据清空.TabIndex = 245;
+            this.数据清空.Text = "数据清空";
+            this.数据清空.UseVisualStyleBackColor = false;
+            this.数据清空.Click += new System.EventHandler(this.数据清空_Click);
+            // 
+            // ms_prodcode
+            // 
+            this.ms_prodcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_prodcode.AutoSize = true;
+            this.ms_prodcode.CutLength = null;
+            this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_prodcode.Location = new System.Drawing.Point(633, 122);
+            this.ms_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ms_prodcode.Name = "ms_prodcode";
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 31);
+            this.ms_prodcode.TabIndex = 239;
+            // 
+            // ms_makecode
+            // 
+            this.ms_makecode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_makecode.AutoSize = true;
+            this.ms_makecode.CutLength = null;
+            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode.Location = new System.Drawing.Point(130, 122);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(375, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 31);
+            this.ms_makecode.TabIndex = 242;
+            // 
+            // cd_stepcode
+            // 
+            this.cd_stepcode.AllPower = "ifall";
+            this.cd_stepcode.Caller = null;
+            this.cd_stepcode.Condition = null;
+            this.cd_stepcode.DBTitle = "回流工序";
+            this.cd_stepcode.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cd_stepcode.FormName = null;
+            this.cd_stepcode.Location = new System.Drawing.Point(710, 62);
+            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(4);
+            this.cd_stepcode.Name = "cd_stepcode";
+            this.cd_stepcode.Power = "ifspecial";
+            this.cd_stepcode.ReturnData = null;
+            this.cd_stepcode.SelectField = null;
+            this.cd_stepcode.SetValueField = null;
+            this.cd_stepcode.Size = new System.Drawing.Size(225, 33);
+            this.cd_stepcode.TabIndex = 238;
+            this.cd_stepcode.TableName = null;
+            this.cd_stepcode.Tag = "";
+            this.cd_stepcode.TextBoxEnable = false;
+            // 
+            // cr_code
+            // 
+            this.cr_code.AllPower = "ifall";
+            this.cr_code.BackColor = System.Drawing.Color.White;
+            this.cr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cr_code.ID = null;
+            this.cr_code.Location = new System.Drawing.Point(423, 60);
+            this.cr_code.Margin = new System.Windows.Forms.Padding(4);
+            this.cr_code.Name = "cr_code";
+            this.cr_code.Power = "ifspecial";
+            this.cr_code.ReadOnly = true;
+            this.cr_code.Size = new System.Drawing.Size(223, 31);
+            this.cr_code.Str = null;
+            this.cr_code.Str1 = null;
+            this.cr_code.Str2 = null;
+            this.cr_code.TabIndex = 237;
+            this.cr_code.Tag = "ma_craftcode";
+            this.cr_code.TextChanged += new System.EventHandler(this.cr_code_TextChanged);
+            // 
+            // OperatResult
+            // 
+            this.OperatResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperatResult.Location = new System.Drawing.Point(16, 650);
+            this.OperatResult.Name = "OperatResult";
+            this.OperatResult.Size = new System.Drawing.Size(1164, 169);
+            this.OperatResult.TabIndex = 3;
+            this.OperatResult.Text = "";
+            // 
+            // input
+            // 
+            this.input.AllPower = null;
+            this.input.BackColor = System.Drawing.Color.White;
+            this.input.ID = null;
+            this.input.Location = new System.Drawing.Point(120, 64);
+            this.input.Name = "input";
+            this.input.Power = null;
+            this.input.Size = new System.Drawing.Size(220, 28);
+            this.input.Str = null;
+            this.input.Str1 = null;
+            this.input.Str2 = null;
+            this.input.TabIndex = 2;
+            this.input.KeyDown += new System.Windows.Forms.KeyEventHandler(this.input_KeyDown);
+            // 
+            // Split
+            // 
+            this.Split.AllPower = null;
+            this.Split.BackColor = System.Drawing.Color.Transparent;
+            this.Split.DownImage = ((System.Drawing.Image)(resources.GetObject("Split.DownImage")));
+            this.Split.Image = null;
+            this.Split.IsShowBorder = true;
+            this.Split.Location = new System.Drawing.Point(710, 162);
+            this.Split.MoveImage = ((System.Drawing.Image)(resources.GetObject("Split.MoveImage")));
+            this.Split.Name = "Split";
+            this.Split.NormalImage = ((System.Drawing.Image)(resources.GetObject("Split.NormalImage")));
+            this.Split.Power = null;
+            this.Split.Size = new System.Drawing.Size(84, 33);
+            this.Split.TabIndex = 0;
+            this.Split.Text = "站点重置";
+            this.Split.UseVisualStyleBackColor = false;
+            this.Split.Click += new System.EventHandler(this.Split_Click);
+            // 
+            // Special_Reset
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1208, 870);
+            this.Controls.Add(this.oqcBtn);
+            this.Controls.Add(this.excelim);
+            this.Controls.Add(this.checkBox1);
+            this.Controls.Add(this.数据清空);
+            this.Controls.Add(this.cd_stepno);
+            this.Controls.Add(this.WeighRecord);
+            this.Controls.Add(this.ms_makecode_label);
+            this.Controls.Add(this.ms_prodcode_label);
+            this.Controls.Add(this.ms_prodcode);
+            this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.cd_stepcode);
+            this.Controls.Add(this.st_rstepcode_label);
+            this.Controls.Add(this.ma_craftcode_label);
+            this.Controls.Add(this.cr_code);
+            this.Controls.Add(this.bigboxBtn);
+            this.Controls.Add(this.serBtn);
+            this.Controls.Add(this.OperatResult);
+            this.Controls.Add(this.input);
+            this.Controls.Add(this.Pallet_label);
+            this.Controls.Add(this.Split);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Special_Reset";
+            this.Tag = "Special!Reset";
+            this.Text = "重置站点";
+            this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.ButtonUtil.NormalButton Split;
+        private System.Windows.Forms.Label Pallet_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox input;
+        private CustomControl.RichText.RichTextAutoBottom OperatResult;
+        private System.Windows.Forms.RadioButton bigboxBtn;
+        private System.Windows.Forms.RadioButton serBtn;
+        private CustomControl.TextBoxWithIcon.SearchTextBox cd_stepcode;
+        private System.Windows.Forms.Label st_rstepcode_label;
+        private System.Windows.Forms.Label ma_craftcode_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox cr_code;
+        private System.Windows.Forms.Label ms_makecode_label;
+        private System.Windows.Forms.Label ms_prodcode_label;
+        private CustomControl.ValueLabel.ValueLabel ms_prodcode;
+        private CustomControl.ValueLabel.ValueLabel ms_makecode;
+        private System.Windows.Forms.ListView WeighRecord;
+        private System.Windows.Forms.ColumnHeader columnHeader3;
+        private System.Windows.Forms.Label cd_stepno;
+        private CustomControl.ButtonUtil.NormalButton 数据清空;
+        private System.Windows.Forms.CheckBox checkBox1;
+        private CustomControl.ButtonUtil.NormalButton excelim;
+        private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.RadioButton oqcBtn;
+    }
+}

+ 315 - 0
UAS-MES/FunctionCode/Special/Special_Reset.cs

@@ -0,0 +1,315 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES.DataOperate;
+using UAS_MES.Entity;
+using UAS_MES.PublicMethod;
+
+namespace UAS_MES.Special
+{
+    public partial class Special_Reset : Form
+    {
+        DataHelper dh;
+
+        LogStringBuilder sql = new LogStringBuilder();
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        DataTable Dbfind;
+        DataTable dt;
+        ExcelHandler eh;
+
+        List<String> sb = new List<string>();
+
+        public Special_Reset()
+        {
+            InitializeComponent();
+        }
+
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+            eh = new ExcelHandler();
+            dh = SystemInf.dh;
+            asc.controllInitializeSize(this);
+            cd_stepcode.FormName = Name;
+            cd_stepcode.TableName = "craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id";
+            cd_stepcode.SetValueField = new string[] { "cd_stepcode", "cd_stepno" };
+            cd_stepcode.SelectField = "cd_stepname # 工序名称 ,cd_stepcode # 工序编号,cd_stepno # 执行顺序";
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+            cd_stepcode.DBTitle = "回流工序";
+            cd_stepcode.DbChange += Cd_stepcode_DbChange;
+        }
+
+        private void Cd_stepcode_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = cd_stepcode.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
+        private void ReSN(string sncode, string stepcode)
+        {   
+            string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + stepcode +  "'").ToString();
+            dh.ExecuteSql("update makeserial set MS_STEPCODE = '',MS_CHECKNO = '', ms_status=1,ms_outboxcode='',ms_nextstepcode= '"+ stepcode + "' where ms_sncode='" + sncode + "' and ms_nextmacode is null", "update");
+            //if (checkBox1.Checked)
+            //{
+            //    dh.ExecuteSql("update makeserial set ms_bs = '',ms_key='',ms_keyid='',MS_HARDWREID='',MS_KEYSTATEID='',MS_BIOS='',ms_ec='',ms_uuid='',MS_KEYPARTNUMBER='',ms_bt='',ms_mac='',ms_imei='' where ms_sncode = '" + sncode + "' and ms_makecode = '" + ms_makecode.Text + "'", "update");
+            //}
+            dh.ExecuteSql("delete makebad where mb_sncode = '" + sncode + "' and mb_status = 0", "delete");
+            dh.ExecuteSql("delete from LABELPRINTLOG where lpl_value = '" + sncode + "'", "delete");
+            sql.Clear();
+            sql.Append("update craftmaterial set cm_status=-1,cm_lastdeco=-1,cm_dropman='" + User.UserCode + "',");
+            sql.Append("cm_dropdate =sysdate,CM_REMARK = '重置站点拆解',cm_dropstep='" + User.CurrentStepCode + "',");
+            sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_sncode = '" + sncode + "' and cm_stepcode in (select cd_stepcode from craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id where ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_detno >=" + cd_stepno.Text + " )");
+            dh.ExecuteSql(sql.GetString(), "update");
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname,  sncode, "");
+        }
+
+
+
+        private void Split_Click(object sender, EventArgs e)
+        {
+            if (sb.Count == 0|| cd_stepcode.Text == "")
+            {
+                OperatResult.AppendText(">>采集数与回流工位不能为空\n", Color.Red);
+                return;
+            }
+            string Delete = MessageBox.Show(this.ParentForm, "是否确认重置站点?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+            if (Delete == "Yes")
+            {
+                if (serBtn.Checked)
+                {
+                    for (int i = 0; i < sb.Count; i++)
+                    {
+                     ReSN(sb[i].ToString(), cd_stepcode.Text);
+                     OperatResult.AppendText("SN:" + sb[i].ToString()+ "回流至"+ cd_stepcode.Text + "完成\n", Color.Green);
+                    }
+                    WeighRecord.Items.Clear();
+                    sb.Clear();
+                }
+                else if(bigboxBtn.Checked)
+                {
+                    string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + cd_stepcode.Text + "'").ToString();
+                    for (int i = 0; i < sb.Count; i++)
+                    {
+                        DataTable dt2 = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_outboxcode = '" + sb[i].ToString() + "'", "select");
+                        for (int k = 0; k < dt2.Rows.Count; k++)
+                        {
+                            ReSN(dt2.Rows[k]["ms_sncode"].ToString(), cd_stepcode.Text);
+                        }
+                       dh.ExecuteSql("insert into PACKAGEBACKUP select * from package where pa_outboxcode='" + sb[i].ToString() + "'", "insert");
+                       dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "insert");
+                       dh.ExecuteSql("delete from package where pa_outboxcode = '" + sb[i].ToString() + "'", "delete");
+                       dh.ExecuteSql("delete from LABELPRINTLOG where lpl_value = '" + sb[i].ToString() + "'", "delete");
+                        //删除箱的明细
+                        dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "delete");
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname, sb[i].ToString(), "");
+                        OperatResult.AppendText("卡通箱:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
+                    }
+                    WeighRecord.Items.Clear();
+                    sb.Clear();
+                }
+                else if (oqcBtn.Checked)
+                { 
+                    string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + cd_stepcode.Text + "'").ToString();
+                    for (int i = 0; i < sb.Count; i++)
+                    {
+                        DataTable dt2 = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_checkno = '" + sb[i].ToString() + "' and ms_status  = 1", "select");
+                        for (int k = 0; k < dt2.Rows.Count; k++)
+                        {
+                            ReSN(dt2.Rows[k]["ms_sncode"].ToString(), cd_stepcode.Text);
+                        }
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname, sb[i].ToString(), "");
+                        OperatResult.AppendText("抽检批:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
+                    }
+                    WeighRecord.Items.Clear();
+                    sb.Clear();
+                }
+                sql.Clear();
+                sql.Append("MERGE INTO makecraftdetail USING (select mcd_macode,mcd_detno,mcd_stepcode,mcd_stepname,nvl(count(distinct A.ms_sncode),0) n,nvl(count(distinct B.ms_sncode),0) bn,(select nvl(count(distinct sp_sncode),0) from STEPPASSED where SP_MAKECODE = mcd_macode AND SP_STEPCODE = mcd_stepcode) inqty from MAKECRAFTdetail");
+                sql.Append(" left join makeserial A on mcd_macode = A.ms_makecode and mcd_stepcode = A.ms_nextstepcode AND A.MS_STATUS = 1 LEFT JOIN MAKESERIAL B ON mcd_macode = B.ms_makecode AND MCD_STEPCODE = B.MS_STEPCODE AND B.MS_STATUS = 3 where mcd_macode = '"+ ms_makecode.Text + "'  group by mcd_macode,mcd_detno, mcd_stepcode, mcd_stepname order by mcd_detno asc) A");
+                sql.Append(" ON (makecraftdetail.MCD_MACODE = A.MCD_MACODE and makecraftdetail.mcd_stepcode = A.mcd_stepcode)  ");
+                sql.Append(" WHEN MATCHED THEN UPDATE SET makecraftdetail.mcd_inqty = A.inqty,makecraftdetail.mcd_outqty = A.inqty,makecraftdetail.mcd_okqty = A.inqty ");
+                dh.ExecuteSql(sql.GetString(), "update");
+
+            }
+
+
+        }
+
+        private void bigboxBtn_Click(object sender, EventArgs e)
+        {
+            if (((RadioButton)sender).Checked == true)
+            {
+                if (WeighRecord.Items.Count > 0)
+                {
+                    //string logout_confirm = MessageBox.Show(this.ParentForm, "是否更换采集项(已录入信息会清空)?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                    //if (logout_confirm == "Yes")
+                    //{
+                        WeighRecord.Items.Clear();
+                        sb.Clear();
+                        ms_makecode.Text = "";
+                        ms_prodcode.Text = "";
+                        cr_code.Text = "";
+                        cd_stepcode.Text = "";
+                    //}
+                    //else
+                    //{
+                    //    serBtn.Checked = bigboxBtn.Checked;
+                    //    bigboxBtn.Checked = !serBtn.Checked;
+                    //}
+                }
+                if (((RadioButton)sender).Name == "serBtn")
+                {
+                    input.Focus();
+                    OperatResult.AppendText("请输入序列号进行采集\n", Color.Black, input);
+                }
+                else if (((RadioButton)sender).Name == "bigboxBtn")
+                {
+                    input.Focus();
+                    OperatResult.AppendText("请输入箱号进行采集\n", Color.Black, input);
+                }
+                else if (((RadioButton)sender).Name == "oqcBtn")
+                {
+                    input.Focus();
+                    OperatResult.AppendText("请输入返工抽检批号进行采集\n", Color.Black, input);
+                }
+            }
+        }
+
+        private void cr_code_TextChanged(object sender, EventArgs e)
+        {
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+        }
+
+        private void input_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (serBtn.Checked)
+                {
+                    dt = (DataTable)dh.ExecuteSql("select ms_makecode,ms_prodcode,ms_sncode,ms_craftcode cr_code,ms_status,ms_outboxcode from makeserial where ms_sncode = '" + input.Text + "' ORDER BY MS_ID DESC", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "所属工单" + dt.Rows[0]["ms_makecode"].ToString() + "与当前工单" + ms_makecode.Text + "不一致\n", Color.Red, input);
+                            return;
+                        }
+                        if (dt.Rows[0]["ms_status"].ToString() == "3")
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "为不良品,不允许采集\n", Color.Red, input);
+                            return;
+                        }
+                        if (dt.Rows[0]["ms_outboxcode"].ToString() != "")
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "已装箱" + dt.Rows[0]["ms_outboxcode"].ToString() + ",不允许采集\n", Color.Red, input);
+                            return;
+                        }
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        if (sb.Contains(dt.Rows[0]["ms_sncode"].ToString()))
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "已采集\n", Color.Red, input);
+                            return;
+                        }
+                        WeighRecord.Items.Add(dt.Rows[0]["ms_sncode"].ToString());
+                        sb.Add(dt.Rows[0]["ms_sncode"].ToString());
+                        OperatResult.AppendText("SN:" + input.Text + "采集\n", Color.Green, input);
+                        cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+                    }
+                    else
+                    {
+                        OperatResult.AppendText("SN:" + input.Text + "不存在\n", Color.Red, input);
+                        return;
+                    }
+                }
+                else if (bigboxBtn.Checked)
+                {
+                    dt = (DataTable)dh.ExecuteSql("select pa_makecode ms_makecode,pa_prodcode ms_prodcode,pa_outboxcode,pa_mothercode,ma_craftcode cr_code from package left join make on pa_makecode = ma_code where pa_outboxcode = '"+input.Text+"' and pa_type = '1'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "所属工单" + dt.Rows[0]["ms_makecode"].ToString() + "与当前工单" + ms_makecode.Text + "不一致\n", Color.Red, input);
+                            return;
+                        }
+                        if (dt.Rows[0]["pa_mothercode"].ToString() != "")
+                        {
+                            OperatResult.AppendText("卡通箱:" + input.Text + "已装栈板" + dt.Rows[0]["pa_mothercode"].ToString() + ",不允许采集\n", Color.Red, input);
+                            return;
+                        }
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        if (sb.Contains(dt.Rows[0]["pa_outboxcode"].ToString()))
+                        {
+                            OperatResult.AppendText("卡通箱:" + input.Text + "已采集\n", Color.Red, input);
+                            return;
+                        }
+                        WeighRecord.Items.Add(dt.Rows[0]["pa_outboxcode"].ToString());
+                        sb.Add(dt.Rows[0]["pa_outboxcode"].ToString());
+                        OperatResult.AppendText("卡通箱:" + input.Text + "采集\n", Color.Green, input);
+                        cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+                    }
+                    else
+                    {
+                        OperatResult.AppendText("卡通箱:" + input.Text + "不存在\n", Color.Red, input);
+                        return;
+                    }
+                }
+                else if (oqcBtn.Checked)
+                {
+                    dt = (DataTable)dh.ExecuteSql("select ob_makecode ms_makecode,ob_prodcode ms_prodcode,ob_checkno,ma_craftcode cr_code from oqcbatch left join make on ob_makecode = ma_code where (ob_checkno = '" + input.Text + "' or ms_sncode = '" + input.Text + "') and ob_status IN( 'NG','FNG') ", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
+                        {
+                            OperatResult.AppendText("抽检批:" + input.Text + "所属工单" + dt.Rows[0]["ms_makecode"].ToString() + "与当前工单" + ms_makecode.Text + "不一致\n", Color.Red, input);
+                            return;
+                        }
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        if (sb.Contains(dt.Rows[0]["ob_checkno"].ToString()))
+                        {
+                            OperatResult.AppendText("抽检批:" + input.Text + "已采集\n", Color.Red, input);
+                            return;
+                        }
+                        WeighRecord.Items.Add(dt.Rows[0]["ob_checkno"].ToString());
+                        sb.Add(dt.Rows[0]["ob_checkno"].ToString());
+                        OperatResult.AppendText("抽检批:" + input.Text + "采集\n", Color.Green, input);
+                        cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+                    }
+                    else
+                    {
+                        OperatResult.AppendText("抽检批:" + input.Text + "不存在或不是批退状态\n", Color.Red, input);
+                        return;
+                    }
+                }
+            }
+        }
+
+        private void 数据清空_Click(object sender, EventArgs e)
+        {
+            BaseUtil.CleanControls(this.Controls);
+            WeighRecord.Items.Clear();
+            sb.Clear();
+        }
+
+        private void excelim_Click(object sender, EventArgs e)
+        {
+            DialogResult result = openFileDialog1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                DataTable ddtt;
+                ddtt = eh.ImportExcel(openFileDialog1.FileName, "test");
+                if (ddtt.Rows.Count > 0)
+                {
+                    for (int i = 0; i < ddtt.Rows.Count; i++)
+                    {
+                        input.Text = ddtt.Rows[i][0].ToString();
+                        input_KeyDown(sender, new KeyEventArgs(Keys.Enter));
+                    }
+                }
+            }
+        }
+    }
+}

+ 238 - 0
UAS-MES/FunctionCode/Special/Special_Reset.resx

@@ -0,0 +1,238 @@
+<?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>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="excelim.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="excelim.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="excelim.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="数据清空.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="数据清空.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="数据清空.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Split.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Split.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Split.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 3 - 3
UAS-MES/PublicMethod/LogicHandler.cs

@@ -251,7 +251,7 @@ namespace UAS_MES.PublicMethod
             oMakeCode = "";
             oErrorMessage = "";
             oStatus = "";
-            DataTable dt = dh.getFieldsDataByCondition("MakeSerial", new string[] { "ms_makecode", "ms_status" }, "ms_id=(select max(ms_id) from makeserial where ms_sncode='" + iSnCode + "')");
+            DataTable dt = dh.getFieldsDataByCondition("MakeSerial", new string[] { "ms_makecode", "ms_status" }, "ms_id=(select max(ms_id) from makeserial where ms_sncode='" + iSnCode + "' and ms_status in (1,3))");
             if (dt.Rows.Count > 0)
             {
                 oMakeCode = dt.Rows[0]["ms_makecode"].ToString();
@@ -636,7 +636,7 @@ namespace UAS_MES.PublicMethod
             {
                 if (iMakeCode != oMakeCode && oMakeCode != "" && iMakeCode != "" && oStatus != "2")
                 {
-                    string ChangeMakeCode = System.Windows.Forms.MessageBox.Show("序列号" + iSN + "所属工单不同,是否切换?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                    string ChangeMakeCode = System.Windows.Forms.MessageBox.Show("序列号" + iSN + "所属工单不同,是否切换?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question,MessageBoxDefaultButton.Button2).ToString();
                     //如果选择不切换赋值当前界面工单
                     if (ChangeMakeCode != "Yes")
                     {
@@ -677,7 +677,7 @@ namespace UAS_MES.PublicMethod
             {
                 if (iSNMakecode != ctl.Text && ctl.Text != "")
                 {
-                    string ChangeMakeCode = System.Windows.Forms.MessageBox.Show("序列号" + iSN + "所属工单不同,是否切换?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                    string ChangeMakeCode = System.Windows.Forms.MessageBox.Show("序列号" + iSN + "所属工单不同,是否切换?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2).ToString();
                     //如果选择不切换赋值当前界面工单
                     if (ChangeMakeCode == "Yes")
                     {

+ 17 - 11
UAS-MES/UAS-MES.csproj

@@ -121,8 +121,14 @@
     <Reference Include="ExcelHelper">
       <HintPath>Tool\ExcelHelper.dll</HintPath>
     </Reference>
-    <Reference Include="ICSharpCode.SharpZipLib">
-      <HintPath>Tool\ICSharpCode.SharpZipLib.dll</HintPath>
+    <Reference Include="ICSharpCode.SharpZipLib, Version=0.85.0.0, Culture=neutral, PublicKeyToken=ad1060f781377a81, processorArchitecture=AMD64">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\UAS_MES_HY\Tool\ICSharpCode.SharpZipLib.dll</HintPath>
+    </Reference>
+    <Reference Include="Interop.LabelManager2, Version=6.0.0.0, Culture=neutral, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <EmbedInteropTypes>False</EmbedInteropTypes>
+      <HintPath>bin\Debug\Interop.LabelManager2.dll</HintPath>
     </Reference>
     <Reference Include="Interop.SpeechLib">
       <HintPath>Tool\Interop.SpeechLib.dll</HintPath>
@@ -745,6 +751,12 @@
     <Compile Include="FunctionCode\Special\Special_MendLabel.Designer.cs">
       <DependentUpon>Special_MendLabel.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Special\Special_Reset.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_Reset.Designer.cs">
+      <DependentUpon>Special_Reset.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Warehouse\Warehouse_NewPiInOut.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1353,6 +1365,9 @@
     <EmbeddedResource Include="FunctionCode\Special\Special_MendLabel.resx">
       <DependentUpon>Special_MendLabel.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_Reset.resx">
+      <DependentUpon>Special_Reset.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Warehouse\Warehouse_NewPiInOut.resx">
       <DependentUpon>Warehouse_NewPiInOut.cs</DependentUpon>
     </EmbeddedResource>
@@ -1808,15 +1823,6 @@
     </Content>
   </ItemGroup>
   <ItemGroup>
-    <COMReference Include="LabelManager2">
-      <Guid>{3624B9C2-9E5D-11D3-A896-00C04F324E22}</Guid>
-      <VersionMajor>6</VersionMajor>
-      <VersionMinor>0</VersionMinor>
-      <Lcid>0</Lcid>
-      <WrapperTool>tlbimp</WrapperTool>
-      <Isolated>False</Isolated>
-      <EmbedInteropTypes>False</EmbedInteropTypes>
-    </COMReference>
     <COMReference Include="stdole">
       <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
       <VersionMajor>2</VersionMajor>