Browse Source

站位回退功能添加,取消采集支持SN

callm 1 year ago
parent
commit
6511adac20

+ 1 - 1
UAS_MES_LGDZ/DataOperate/DataHelper.cs

@@ -556,7 +556,7 @@ namespace UAS_MES_NEW.DataOperate
                     catch (Exception)
                     {
                         connection = new OracleConnection(DBConnectionString);
-                        connection.Open();
+                        connection.Open();  
                         command = new OracleCommand(SQL, connection);
                         ad = new OracleDataAdapter();
                         ad.SelectCommand = command;

+ 126 - 320
UAS_MES_LGDZ/FunctionCode/Query/Query_SN.Designer.cs

@@ -28,407 +28,213 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Query_SN));
             this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.label5 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
-            this.label5 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
+            this.PrintNum = new System.Windows.Forms.NumericUpDown();
             this.label4 = new System.Windows.Forms.Label();
-            this.date = new System.Windows.Forms.DateTimePicker();
-            this.label6 = new System.Windows.Forms.Label();
-            this.label7 = new System.Windows.Forms.Label();
-            this.label8 = new System.Windows.Forms.Label();
-            this.label9 = new System.Windows.Forms.Label();
-            this.label10 = new System.Windows.Forms.Label();
-            this.label11 = new System.Windows.Forms.Label();
-            this.currentSerial = new System.Windows.Forms.NumericUpDown();
-            this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
-            this.Print = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.BeginMac = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.num = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.status = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.seriallength = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.color = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.factory = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            ((System.ComponentModel.ISupportInitialize)(this.currentSerial)).BeginInit();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.PrintFuseLabel = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).BeginInit();
             this.SuspendLayout();
             // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(120, 112);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(146, 41);
+            this.label5.TabIndex = 11;
+            this.label5.Text = "产品代码";
+            // 
             // label1
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(106, 313);
+            this.label1.Location = new System.Drawing.Point(120, 39);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(146, 41);
-            this.label1.TabIndex = 1;
-            this.label1.Text = "工厂代码";
+            this.label1.TabIndex = 216;
+            this.label1.Text = "工单编号";
             // 
             // label2
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(106, 181);
+            this.label2.Location = new System.Drawing.Point(152, 187);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(146, 41);
-            this.label2.TabIndex = 2;
-            this.label2.Text = "颜色代码";
-            // 
-            // label5
-            // 
-            this.label5.AutoSize = true;
-            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(106, 112);
-            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(146, 41);
-            this.label5.TabIndex = 11;
-            this.label5.Text = "产品代码";
+            this.label2.Size = new System.Drawing.Size(114, 41);
+            this.label2.TabIndex = 220;
+            this.label2.Text = "打印机";
             // 
             // label3
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(106, 456);
+            this.label3.Location = new System.Drawing.Point(184, 271);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(146, 41);
-            this.label3.TabIndex = 13;
-            this.label3.Text = "流水长度";
+            this.label3.Size = new System.Drawing.Size(82, 41);
+            this.label3.TabIndex = 219;
+            this.label3.Text = "标签";
+            // 
+            // PrintNum
+            // 
+            this.PrintNum.Location = new System.Drawing.Point(305, 365);
+            this.PrintNum.Name = "PrintNum";
+            this.PrintNum.Size = new System.Drawing.Size(120, 35);
+            this.PrintNum.TabIndex = 222;
             // 
             // label4
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(106, 383);
+            this.label4.Location = new System.Drawing.Point(120, 359);
             this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(146, 41);
-            this.label4.TabIndex = 15;
-            this.label4.Text = "组装状态";
-            // 
-            // date
-            // 
-            this.date.Location = new System.Drawing.Point(305, 249);
-            this.date.Name = "date";
-            this.date.Size = new System.Drawing.Size(388, 35);
-            this.date.TabIndex = 17;
-            this.date.Value = new System.DateTime(2020, 9, 7, 0, 0, 0, 0);
-            // 
-            // label6
-            // 
-            this.label6.AutoSize = true;
-            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(106, 247);
-            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(82, 41);
-            this.label6.TabIndex = 18;
-            this.label6.Text = "日期";
-            // 
-            // label7
-            // 
-            this.label7.AutoSize = true;
-            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(106, 526);
-            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(126, 41);
-            this.label7.TabIndex = 19;
-            this.label7.Text = "SN数量";
-            // 
-            // label8
-            // 
-            this.label8.AutoSize = true;
-            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label8.Location = new System.Drawing.Point(106, 599);
-            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(157, 41);
-            this.label8.TabIndex = 21;
-            this.label8.Text = "起始MAC";
-            // 
-            // label9
-            // 
-            this.label9.AutoSize = true;
-            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(106, 44);
-            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(114, 41);
-            this.label9.TabIndex = 23;
-            this.label9.Text = "工单号";
-            // 
-            // label10
-            // 
-            this.label10.AutoSize = true;
-            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(106, 669);
-            this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(146, 41);
-            this.label10.TabIndex = 25;
-            this.label10.Text = "当前流水";
-            // 
-            // label11
-            // 
-            this.label11.AutoSize = true;
-            this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label11.Location = new System.Drawing.Point(836, 44);
-            this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label11.Name = "label11";
-            this.label11.Size = new System.Drawing.Size(178, 41);
-            this.label11.TabIndex = 29;
-            this.label11.Text = "打印机列表";
-            // 
-            // currentSerial
-            // 
-            this.currentSerial.Location = new System.Drawing.Point(305, 675);
-            this.currentSerial.Name = "currentSerial";
-            this.currentSerial.Size = new System.Drawing.Size(388, 35);
-            this.currentSerial.TabIndex = 30;
-            // 
-            // Printer
-            // 
-            this.Printer.Location = new System.Drawing.Point(1030, 47);
-            this.Printer.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
-            this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(378, 45);
-            this.Printer.TabIndex = 28;
-            // 
-            // Print
-            // 
-            this.Print.AllPower = null;
-            this.Print.BackColor = System.Drawing.Color.Transparent;
-            this.Print.DownImage = ((System.Drawing.Image)(resources.GetObject("Print.DownImage")));
-            this.Print.Image = null;
-            this.Print.IsShowBorder = true;
-            this.Print.Location = new System.Drawing.Point(519, 742);
-            this.Print.Margin = new System.Windows.Forms.Padding(6);
-            this.Print.MoveImage = ((System.Drawing.Image)(resources.GetObject("Print.MoveImage")));
-            this.Print.Name = "Print";
-            this.Print.NormalImage = ((System.Drawing.Image)(resources.GetObject("Print.NormalImage")));
-            this.Print.Power = null;
-            this.Print.Size = new System.Drawing.Size(150, 56);
-            this.Print.TabIndex = 27;
-            this.Print.Text = "打印";
-            this.Print.UseVisualStyleBackColor = false;
-            this.Print.Click += new System.EventHandler(this.Print_Click);
-            // 
-            // ma_code
-            // 
-            this.ma_code.AllPower = null;
-            this.ma_code.BackColor = System.Drawing.Color.White;
-            this.ma_code.ID = null;
-            this.ma_code.Location = new System.Drawing.Point(305, 47);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
-            this.ma_code.Name = "ma_code";
-            this.ma_code.Power = null;
-            this.ma_code.Size = new System.Drawing.Size(388, 35);
-            this.ma_code.Str = null;
-            this.ma_code.Str1 = null;
-            this.ma_code.Str2 = null;
-            this.ma_code.TabIndex = 24;
-            // 
-            // BeginMac
-            // 
-            this.BeginMac.AllPower = null;
-            this.BeginMac.BackColor = System.Drawing.Color.White;
-            this.BeginMac.ID = null;
-            this.BeginMac.Location = new System.Drawing.Point(305, 601);
-            this.BeginMac.Margin = new System.Windows.Forms.Padding(6);
-            this.BeginMac.Name = "BeginMac";
-            this.BeginMac.Power = null;
-            this.BeginMac.Size = new System.Drawing.Size(388, 35);
-            this.BeginMac.Str = null;
-            this.BeginMac.Str1 = null;
-            this.BeginMac.Str2 = null;
-            this.BeginMac.TabIndex = 22;
-            // 
-            // num
-            // 
-            this.num.AllPower = null;
-            this.num.BackColor = System.Drawing.Color.White;
-            this.num.ID = null;
-            this.num.Location = new System.Drawing.Point(305, 527);
-            this.num.Margin = new System.Windows.Forms.Padding(6);
-            this.num.Name = "num";
-            this.num.Power = null;
-            this.num.Size = new System.Drawing.Size(388, 35);
-            this.num.Str = null;
-            this.num.Str1 = null;
-            this.num.Str2 = null;
-            this.num.TabIndex = 20;
-            // 
-            // status
-            // 
-            this.status.AllPower = null;
-            this.status.BackColor = System.Drawing.Color.White;
-            this.status.ID = null;
-            this.status.Location = new System.Drawing.Point(305, 386);
-            this.status.Margin = new System.Windows.Forms.Padding(6);
-            this.status.Name = "status";
-            this.status.Power = null;
-            this.status.Size = new System.Drawing.Size(388, 35);
-            this.status.Str = null;
-            this.status.Str1 = null;
-            this.status.Str2 = null;
-            this.status.TabIndex = 16;
-            // 
-            // seriallength
-            // 
-            this.seriallength.AllPower = null;
-            this.seriallength.BackColor = System.Drawing.Color.White;
-            this.seriallength.ID = null;
-            this.seriallength.Location = new System.Drawing.Point(305, 457);
-            this.seriallength.Margin = new System.Windows.Forms.Padding(6);
-            this.seriallength.Name = "seriallength";
-            this.seriallength.Power = null;
-            this.seriallength.Size = new System.Drawing.Size(388, 35);
-            this.seriallength.Str = null;
-            this.seriallength.Str1 = null;
-            this.seriallength.Str2 = null;
-            this.seriallength.TabIndex = 14;
-            this.seriallength.Text = "4";
+            this.label4.TabIndex = 223;
+            this.label4.Text = "打印数量";
             // 
             // pr_code
             // 
             this.pr_code.AllPower = null;
             this.pr_code.BackColor = System.Drawing.Color.White;
             this.pr_code.ID = null;
-            this.pr_code.Location = new System.Drawing.Point(305, 118);
-            this.pr_code.Margin = new System.Windows.Forms.Padding(6);
+            this.pr_code.Location = new System.Drawing.Point(305, 121);
             this.pr_code.Name = "pr_code";
             this.pr_code.Power = null;
             this.pr_code.Size = new System.Drawing.Size(388, 35);
             this.pr_code.Str = null;
             this.pr_code.Str1 = null;
             this.pr_code.Str2 = null;
-            this.pr_code.TabIndex = 12;
+            this.pr_code.TabIndex = 225;
+            this.pr_code.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
             // 
-            // color
+            // OperateResult
             // 
-            this.color.AllPower = null;
-            this.color.BackColor = System.Drawing.Color.White;
-            this.color.ID = null;
-            this.color.Location = new System.Drawing.Point(305, 186);
-            this.color.Margin = new System.Windows.Forms.Padding(6);
-            this.color.Name = "color";
-            this.color.Power = null;
-            this.color.Size = new System.Drawing.Size(388, 35);
-            this.color.Str = null;
-            this.color.Str1 = null;
-            this.color.Str2 = null;
-            this.color.TabIndex = 6;
-            this.color.Text = "5";
+            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(785, 39);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(666, 986);
+            this.OperateResult.TabIndex = 224;
+            this.OperateResult.Text = "";
             // 
-            // factory
+            // PrintLabel
             // 
-            this.factory.AllPower = null;
-            this.factory.BackColor = System.Drawing.Color.White;
-            this.factory.ID = null;
-            this.factory.Location = new System.Drawing.Point(305, 315);
-            this.factory.Margin = new System.Windows.Forms.Padding(6);
-            this.factory.Name = "factory";
-            this.factory.Power = null;
-            this.factory.Size = new System.Drawing.Size(388, 35);
-            this.factory.Str = null;
-            this.factory.Str1 = null;
-            this.factory.Str2 = null;
-            this.factory.TabIndex = 5;
-            this.factory.Text = "D";
+            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel.FormattingEnabled = true;
+            this.PrintLabel.Location = new System.Drawing.Point(305, 280);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.PrintLabel.Name = "PrintLabel";
+            this.PrintLabel.Size = new System.Drawing.Size(388, 32);
+            this.PrintLabel.TabIndex = 221;
             // 
-            // Export
+            // PrinterList
             // 
-            this.Export.AllPower = null;
-            this.Export.BackColor = System.Drawing.Color.Transparent;
-            this.Export.DownImage = ((System.Drawing.Image)(resources.GetObject("Export.DownImage")));
-            this.Export.Image = null;
-            this.Export.IsShowBorder = true;
-            this.Export.Location = new System.Drawing.Point(305, 742);
-            this.Export.Margin = new System.Windows.Forms.Padding(6);
-            this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
-            this.Export.Name = "Export";
-            this.Export.NormalImage = ((System.Drawing.Image)(resources.GetObject("Export.NormalImage")));
-            this.Export.Power = null;
-            this.Export.Size = new System.Drawing.Size(150, 56);
-            this.Export.TabIndex = 0;
-            this.Export.Text = "导出";
-            this.Export.UseVisualStyleBackColor = false;
-            this.Export.Click += new System.EventHandler(this.Export_Click);
+            this.PrinterList.Location = new System.Drawing.Point(305, 197);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(8);
+            this.PrinterList.Name = "PrinterList";
+            this.PrinterList.Size = new System.Drawing.Size(388, 50);
+            this.PrinterList.TabIndex = 218;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = "IFALL";
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = "";
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(305, 39);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = "";
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(409, 46);
+            this.ma_code.TabIndex = 217;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "makecode";
+            this.ma_code.TextBoxEnable = true;
+            this.ma_code.DbChange += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox.DBSourceChange(this.pr_code_DbChange);
+            // 
+            // PrintFuseLabel
+            // 
+            this.PrintFuseLabel.AccessibleRole = System.Windows.Forms.AccessibleRole.PageTabList;
+            this.PrintFuseLabel.AllPower = null;
+            this.PrintFuseLabel.BackColor = System.Drawing.Color.Transparent;
+            this.PrintFuseLabel.DownImage = ((System.Drawing.Image)(resources.GetObject("PrintFuseLabel.DownImage")));
+            this.PrintFuseLabel.Image = null;
+            this.PrintFuseLabel.IsShowBorder = true;
+            this.PrintFuseLabel.Location = new System.Drawing.Point(519, 742);
+            this.PrintFuseLabel.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintFuseLabel.MoveImage = ((System.Drawing.Image)(resources.GetObject("PrintFuseLabel.MoveImage")));
+            this.PrintFuseLabel.Name = "PrintFuseLabel";
+            this.PrintFuseLabel.NormalImage = ((System.Drawing.Image)(resources.GetObject("PrintFuseLabel.NormalImage")));
+            this.PrintFuseLabel.Power = null;
+            this.PrintFuseLabel.Size = new System.Drawing.Size(150, 56);
+            this.PrintFuseLabel.TabIndex = 27;
+            this.PrintFuseLabel.Text = "打印";
+            this.PrintFuseLabel.UseVisualStyleBackColor = false;
+            this.PrintFuseLabel.Click += new System.EventHandler(this.Print_Click);
             // 
             // Query_SN
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1494, 1075);
-            this.Controls.Add(this.currentSerial);
-            this.Controls.Add(this.label11);
-            this.Controls.Add(this.Printer);
-            this.Controls.Add(this.Print);
-            this.Controls.Add(this.label10);
-            this.Controls.Add(this.ma_code);
-            this.Controls.Add(this.label9);
-            this.Controls.Add(this.BeginMac);
-            this.Controls.Add(this.label8);
-            this.Controls.Add(this.num);
-            this.Controls.Add(this.label7);
-            this.Controls.Add(this.label6);
-            this.Controls.Add(this.date);
-            this.Controls.Add(this.status);
-            this.Controls.Add(this.label4);
-            this.Controls.Add(this.seriallength);
-            this.Controls.Add(this.label3);
             this.Controls.Add(this.pr_code);
-            this.Controls.Add(this.label5);
-            this.Controls.Add(this.color);
-            this.Controls.Add(this.factory);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.PrintNum);
+            this.Controls.Add(this.PrintLabel);
             this.Controls.Add(this.label2);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.PrinterList);
+            this.Controls.Add(this.ma_code);
             this.Controls.Add(this.label1);
-            this.Controls.Add(this.Export);
+            this.Controls.Add(this.PrintFuseLabel);
+            this.Controls.Add(this.label5);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "Query_SN";
             this.Tag = "Query!SpecialReport";
             this.Text = "Query_SpecialReport";
             this.Load += new System.EventHandler(this.Query_SpecialReport_Load);
-            ((System.ComponentModel.ISupportInitialize)(this.currentSerial)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
         }
 
         #endregion
-
-        private CustomControl.ButtonUtil.NormalButton Export;
         private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private System.Windows.Forms.Label label5;
+        private CustomControl.ButtonUtil.NormalButton PrintFuseLabel;
+        private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
         private System.Windows.Forms.Label label1;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
         private System.Windows.Forms.Label label2;
-        private CustomControl.TextBoxWithIcon.EnterTextBox factory;
-        private CustomControl.TextBoxWithIcon.EnterTextBox color;
-        private CustomControl.TextBoxWithIcon.EnterTextBox pr_code;
-        private System.Windows.Forms.Label label5;
-        private CustomControl.TextBoxWithIcon.EnterTextBox seriallength;
         private System.Windows.Forms.Label label3;
-        private CustomControl.TextBoxWithIcon.EnterTextBox status;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrinterList;
+        private System.Windows.Forms.NumericUpDown PrintNum;
         private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.DateTimePicker date;
-        private System.Windows.Forms.Label label6;
-        private CustomControl.TextBoxWithIcon.EnterTextBox num;
-        private System.Windows.Forms.Label label7;
-        private CustomControl.TextBoxWithIcon.EnterTextBox BeginMac;
-        private System.Windows.Forms.Label label8;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ma_code;
-        private System.Windows.Forms.Label label9;
-        private System.Windows.Forms.Label label10;
-        private CustomControl.ButtonUtil.NormalButton Print;
-        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
-        private System.Windows.Forms.Label label11;
-        private System.Windows.Forms.NumericUpDown currentSerial;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pr_code;
     }
 }

+ 59 - 310
UAS_MES_LGDZ/FunctionCode/Query/Query_SN.cs

@@ -1,6 +1,10 @@
-using LabelManager2;
+using DevExpress.Printing.Core.PdfExport.Metafile;
+using HslCommunication;
+using LabelManager2;
+using Seagull.BarTender.Print;
 using System;
 using System.Data;
+using System.Drawing;
 using System.Security.Cryptography;
 using System.Text;
 using System.Threading;
@@ -17,85 +21,52 @@ namespace UAS_MES_NEW.Query
 
         DataHelper dh = SystemInf.dh;
 
-        ApplicationClass lbl;
+        Engine engine;
 
         Thread InitPrint;
 
+        DataTable Dbfind;
+
         Document doc;
 
+        DataTable _dt;
+
         public Query_SN()
         {
             InitializeComponent();
         }
 
-        private void Export_Click(object sender, EventArgs e)
-        {
-            ExcelExport("");
-        }
-
-        //选择导出Excel时是选择导出数据的还是模板
-        private void ExcelExport(string DataOrTemplet)
-        {
-            //Data表示导出数据
-            //Templet表示导出模板
-            MD5 md5 = MD5.Create();
-            folderBrowserDialog1.Description = "选择导出的路径";
-            DialogResult result = folderBrowserDialog1.ShowDialog();
-            if (result == DialogResult.OK)
-            {
-                string FolderPath = folderBrowserDialog1.SelectedPath;
-                ExcelHandler eh = new ExcelHandler();
-                DataTable dt = new DataTable();
-                dt.Columns.Add("工单号");
-                dt.Columns.Add("序列号");
-                dt.Columns.Add("MAC");
-                dt.Columns.Add("BT");
-                dt.Columns.Add("拓展栏位1");
-                dt.Columns.Add("拓展栏位2");
-                dt.Columns.Add("拓展栏位3");
-                dt.Columns.Add("备注");
-                string prefix = BeginMac.Text.Substring(0, 8);
-                string suffix = BeginMac.Text.Substring(8, 4);
-                int Number = Int32.Parse(suffix, System.Globalization.NumberStyles.HexNumber);
-                for (decimal i = currentSerial.Value; i < currentSerial.Value + int.Parse(num.Text); i++)
-                {
-                    DataRow dr = dt.NewRow();
-
-                    dr["工单号"] = ma_code.Text;
-                    dr["MAC"] = prefix + Number.ToString("X");
-                    Number = Number + 1;
-                    dr["BT"] = prefix + Number.ToString("X");
-                    Number = Number + 1;
-
-                    string serial = pr_code.Text
-                        + color.Text
-                        + GetDate(date.Value.ToString("yyyy"), date.Value.ToString("MM"), date.Value.ToString("dd"))
-                        + factory.Text
-                        + status.Text
-                        + lpad(int.Parse(seriallength.Text), (i + 1).ToString());
-                    string encode = MD5Encoding(serial + ")G$d");
-                    dr["序列号"] = serial + encode.Substring(encode.Length - 2);
-                    dt.Rows.Add(dr);
-                }
-                eh.ExportExcel(dt, FolderPath);
-            }
-        }
-
         private void Query_SpecialReport_Load(object sender, EventArgs e)
         {
             InitPrint = new Thread(InPrint);
             SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
-            doc = lbl.Documents.Open(System.Windows.Forms.Application.StartupPath + @"\SN.lab");
+
+            ma_code.TableName = " make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单编号,pr_code # 产品编号,pr_spec # 型号";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += pr_code_DbChange;
+        }
+
+        private void pr_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+            DataTable dt = (DataTable)dh.ExecuteSql("select ma_prodcode from make where ma_code='" + ma_code.Text + "'", "select");
+            if (dt.Rows.Count > 0)
+            {
+                pr_code.Text = dt.Rows[0]["ma_prodcode"].ToString();
+            }
         }
 
         private void InPrint()
         {
             try
             {
-                lbl = new ApplicationClass();
-                BaseUtil.WriteLbl();
+                engine = new Engine(true);
             }
             catch (Exception)
             {
@@ -103,269 +74,47 @@ namespace UAS_MES_NEW.Query
             }
         }
 
-        private static string MD5Encoding(string rawPass)
+        private void Print_Click(object sender, EventArgs e)
         {
-            // 创建MD5类的默认实例:MD5CryptoServiceProvider
-            MD5 md5 = MD5.Create();
-            byte[] bs = Encoding.UTF8.GetBytes(rawPass);
-            byte[] hs = md5.ComputeHash(bs);
-            StringBuilder stb = new StringBuilder();
-            foreach (byte b in hs)
+            DataTable dt = new DataTable();
+            string ErrorMessage = "";
+            dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_makecode='" + ma_code.Text + "' and nvl(mil_printstatus,0)=0 order by mil_sncode", "select");
+            if (dt.Rows.Count < PrintNum.Value)
             {
-                // 以十六进制格式格式化
-                stb.Append(b.ToString("x2"));
+                OperateResult.AppendText("未打印数量不足,剩余" + dt.Rows.Count + "未打印\n");
+                return;
             }
-            return stb.ToString().ToUpper();
-        }
-
-        private static string lpad(int length, string number)
-        {
-            while (number.Length < length)
+            for (int i = 0; i < PrintNum.Value; i++)
             {
-                number = "0" + number;
+                string mil_sncode = dt.Rows[i]["mil_sncode"].ToString();
+                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, mil_sncode, int.Parse("1"), ma_code.Text, pr_code.Text, "机身标", "0", out ErrorMessage))
+                {
+                    //提示用户打印成功
+                    dh.ExecuteSql("update makeimeilist set mil_printstatus=-1 where mil_sncode='" + mil_sncode + "'", "update");
+                    OperateResult.AppendText(">>序列号:" + mil_sncode + "打印结束\n", Color.Green);
+                }
+                else
+                {
+                    dh.ExecuteSql("update makeimeilist set mil_printstatus=-1 where mil_sncode='" + mil_sncode + "'", "update");
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                }
             }
-            number = number.Substring(number.Length - length, length);
-            return number;
         }
 
-        private string GetDate(string year, string month, string day)
+        private void pr_code_TextChanged(object sender, EventArgs e)
         {
-            string returndate = "";
-            switch (year)
-            {
-                case "2020":
-                    returndate = "C";
-                    break;
-                case "2021":
-                    returndate = "D";
-                    break;
-                case "2022":
-                    returndate = "E";
-                    break;
-                case "2023":
-                    returndate = "F";
-                    break;
-                case "2024":
-                    returndate = "G";
-                    break;
-                case "2025":
-                    returndate = "H";
-                    break;
-                case "2026":
-                    returndate = "I";
-                    break;
-                case "2027":
-                    returndate = "J";
-                    break;
-                case "2028":
-                    returndate = "K";
-                    break;
-                case "2029":
-                    returndate = "L";
-                    break;
-                case "2030":
-                    returndate = "M";
-                    break;
-                case "2031":
-                    returndate = "N";
-                    break;
-                case "2032":
-                    returndate = "O";
-                    break;
-                case "2033":
-                    returndate = "P";
-                    break;
-                case "2034":
-                    returndate = "Q";
-                    break;
-                default:
-                    break;
-            }
-            switch (month)
+            _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='机身标' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            if (_dt.Rows.Count == 0)
             {
-                case "01":
-                    returndate += "1";
-                    break;
-                case "02":
-                    returndate += "2";
-                    break;
-                case "03":
-                    returndate += "3";
-                    break;
-                case "04":
-                    returndate += "4";
-                    break;
-                case "05":
-                    returndate += "5";
-                    break;
-                case "06":
-                    returndate += "6";
-                    break;
-                case "07":
-                    returndate += "7";
-                    break;
-                case "08":
-                    returndate += "8";
-                    break;
-                case "09":
-                    returndate += "9";
-                    break;
-                case "10":
-                    returndate += "A";
-                    break;
-                case "11":
-                    returndate += "B";
-                    break;
-                case "12":
-                    returndate += "C";
-                    break;
-                default:
-                    break;
+                _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode is null and la_templatetype='机身标' and la_statuscode='AUDITED' order by la_isdefault", "select");
             }
-            switch (day)
+            if (_dt.Rows.Count > 0)
             {
-                case "01":
-                    returndate += "1";
-                    break;
-                case "02":
-                    returndate += "2";
-                    break;
-                case "03":
-                    returndate += "3";
-                    break;
-                case "04":
-                    returndate += "4";
-                    break;
-                case "05":
-                    returndate += "5";
-                    break;
-                case "06":
-                    returndate += "6";
-                    break;
-                case "07":
-                    returndate += "7";
-                    break;
-                case "08":
-                    returndate += "8";
-                    break;
-                case "09":
-                    returndate += "9";
-                    break;
-                case "10":
-                    returndate += "A";
-                    break;
-                case "11":
-                    returndate += "B";
-                    break;
-                case "12":
-                    returndate += "C";
-                    break;
-                case "13":
-                    returndate += "D";
-                    break;
-                case "14":
-                    returndate += "E";
-                    break;
-                case "15":
-                    returndate += "F";
-                    break;
-                case "16":
-                    returndate += "G";
-                    break;
-                case "17":
-                    returndate += "H";
-                    break;
-                case "18":
-                    returndate += "I";
-                    break;
-                case "19":
-                    returndate += "J";
-                    break;
-                case "20":
-                    returndate += "K";
-                    break;
-                case "21":
-                    returndate += "L";
-                    break;
-                case "22":
-                    returndate += "M";
-                    break;
-                case "23":
-                    returndate += "N";
-                    break;
-                case "24":
-                    returndate += "O";
-                    break;
-                case "25":
-                    returndate += "P";
-                    break;
-                case "26":
-                    returndate += "Q";
-                    break;
-                case "27":
-                    returndate += "R";
-                    break;
-                case "28":
-                    returndate += "S";
-                    break;
-                case "29":
-                    returndate += "T";
-                    break;
-                case "30":
-                    returndate += "U";
-                    break;
-                case "31":
-                    returndate += "V";
-                    break;
-                default:
-                    break;
-            }
-            return returndate;
-        }
-
-        private void Print_Click(object sender, EventArgs e)
-        {
-
-            DataTable dt = new DataTable();
-            dt.Columns.Add("工单号");
-            dt.Columns.Add("序列号");
-            dt.Columns.Add("MAC");
-            dt.Columns.Add("BT");
-            dt.Columns.Add("拓展栏位1");
-            dt.Columns.Add("拓展栏位2");
-            dt.Columns.Add("拓展栏位3");
-            dt.Columns.Add("备注");
-            string prefix = BeginMac.Text.Substring(0, 8);
-            string suffix = BeginMac.Text.Substring(8, 4);
-            int Number = Int32.Parse(suffix, System.Globalization.NumberStyles.HexNumber);
-            for (decimal i = currentSerial.Value; i < currentSerial.Value + int.Parse(num.Text); i++)
-            {
-                DataRow dr = dt.NewRow();
-
-                dr["工单号"] = ma_code.Text;
-                dr["MAC"] = prefix + Number.ToString("X");
-                Number = Number + 1;
-                dr["BT"] = prefix + Number.ToString("X");
-                Number = Number + 1;
-
-                string serial = pr_code.Text
-                    + color.Text
-                    + GetDate(date.Value.ToString("yyyy"), date.Value.ToString("MM"), date.Value.ToString("dd"))
-                    + factory.Text
-                    + status.Text
-                    + lpad(int.Parse(seriallength.Text), (i + 1).ToString());
-                string encode = MD5Encoding(serial + ")G$d");
-                dr["序列号"] = serial + encode.Substring(encode.Length - 2);
-                dt.Rows.Add(dr);
-                for (int j = 0; j < doc.Variables.FormVariables.Count; j++)
-                {
-                    if (doc.Variables.FormVariables.Item(j + 1).Name.ToUpper() == "SN")
-                    {
-                        doc.Variables.FormVariables.Item(j + 1).Value = (serial + encode.Substring(encode.Length - 2));
-                    }
-                }
-                doc.Printer.SwitchTo(Printer.Text);
-                doc.PrintDocument(1);
+                string la_id = _dt.Rows[0]["la_id"].ToString();
+                _dt = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id from FILEPATH where fp_id in (select *  from table(select parsestring(LA_SOFTTYPE,';') from label where la_templatetype='机身标' and la_id='" + la_id + "') where COLUMN_VALUE is not null)", "select");
+                PrintLabel.DataSource = _dt;
+                PrintLabel.DisplayMember = "la_url";
+                PrintLabel.ValueMember = "la_id";
             }
         }
     }

+ 3 - 41
UAS_MES_LGDZ/FunctionCode/Query/Query_SN.resx

@@ -121,7 +121,7 @@
     <value>17, 17</value>
   </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="Print.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="PrintFuseLabel.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -133,7 +133,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Print.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="PrintFuseLabel.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -146,45 +146,7 @@
         gg==
 </value>
   </data>
-  <data name="Print.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="Export.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="Export.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="Export.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="PrintFuseLabel.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE

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

@@ -24,7 +24,7 @@ namespace UAS_MES_NEW.Special
         private void Confirm_Click(object sender, EventArgs e)
         {
             //获取序列号的途程
-            DataTable dt = (DataTable)dh.ExecuteSql("select ms_firstsn,ms_id,ms_nextstepcode,ms_currentstepcode,ms_makecode,ms_status,ms_checkno,ms_craftcode,ms_prodcode,ms_stepcode from makeserial where ms_sncode='" + sn_code.Text + "' and ms_makecode='" + ms_makecode.Text + "' order by ms_id desc", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_firstsn,ms_id,ms_nextstepcode,ms_currentstepcode,ms_makecode,ms_status,ms_checkno,ms_craftcode,ms_prodcode,ms_stepcode from makeserial where (ms_sncode='" + sn_code.Text + "'  or ms_imei1='" + sn_code.Text + "' and ms_imei2='" + sn_code.Text + "')and ms_makecode='" + ms_makecode.Text + "' order by ms_id desc", "select");
             if (dt.Rows.Count > 0)
             {
                 string pr_code = dt.Rows[0]["ms_prodcode"].ToString();
@@ -37,6 +37,7 @@ namespace UAS_MES_NEW.Special
                 string ms_currentstepcode = dt.Rows[0]["ms_currentstepcode"].ToString();
                 string ms_id = dt.Rows[0]["ms_id"].ToString();
                 string ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
+                sn_code.Text = dt.Rows[0]["ms_sncode"].ToString();
                 sql.Clear();
                 sql.Append("select cd_stepcode from craft left join craftdetail on cr_id=cd_crid where ");
                 sql.Append("cr_prodcode='" + pr_code + "' and cr_code='" + cr_code + "' order by cd_detno ");

+ 359 - 0
UAS_MES_LGDZ/FunctionCode/Special/Special_Reset.Designer.cs

@@ -0,0 +1,359 @@
+namespace UAS_MES_NEW.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.数据清空 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.cd_stepcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.cr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperatResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.input = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Split = new UAS_MES_NEW.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(13, 83);
+            this.Pallet_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.Pallet_label.Name = "Pallet_label";
+            this.Pallet_label.Size = new System.Drawing.Size(114, 41);
+            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(21, 4);
+            this.bigboxBtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.bigboxBtn.Name = "bigboxBtn";
+            this.bigboxBtn.Size = new System.Drawing.Size(113, 45);
+            this.bigboxBtn.TabIndex = 234;
+            this.bigboxBtn.Text = "箱号";
+            this.bigboxBtn.UseVisualStyleBackColor = true;
+            this.bigboxBtn.Visible = false;
+            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(160, 4);
+            this.serBtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.serBtn.Name = "serBtn";
+            this.serBtn.Size = new System.Drawing.Size(209, 45);
+            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(1012, 19);
+            this.st_rstepcode_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+            this.st_rstepcode_label.Name = "st_rstepcode_label";
+            this.st_rstepcode_label.Size = new System.Drawing.Size(146, 41);
+            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(652, 8);
+            this.ma_craftcode_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+            this.ma_craftcode_label.Name = "ma_craftcode_label";
+            this.ma_craftcode_label.Size = new System.Drawing.Size(146, 41);
+            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(13, 163);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(114, 41);
+            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(652, 163);
+            this.ms_prodcode_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+            this.ms_prodcode_label.Name = "ms_prodcode_label";
+            this.ms_prodcode_label.Size = new System.Drawing.Size(146, 41);
+            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.HideSelection = false;
+            this.WeighRecord.Location = new System.Drawing.Point(21, 216);
+            this.WeighRecord.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
+            this.WeighRecord.Name = "WeighRecord";
+            this.WeighRecord.Size = new System.Drawing.Size(839, 639);
+            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(1408, 83);
+            this.cd_stepno.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+            this.cd_stepno.Name = "cd_stepno";
+            this.cd_stepno.Size = new System.Drawing.Size(0, 24);
+            this.cd_stepno.TabIndex = 244;
+            // 
+            // 数据清空
+            // 
+            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(947, 800);
+            this.数据清空.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            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(112, 56);
+            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(844, 163);
+            this.ms_prodcode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ms_prodcode.Name = "ms_prodcode";
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 41);
+            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(173, 163);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(500, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 41);
+            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(947, 83);
+            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            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(300, 44);
+            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(564, 80);
+            this.cr_code.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.cr_code.Name = "cr_code";
+            this.cr_code.Power = "ifspecial";
+            this.cr_code.ReadOnly = true;
+            this.cr_code.Size = new System.Drawing.Size(296, 39);
+            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(21, 867);
+            this.OperatResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperatResult.Name = "OperatResult";
+            this.OperatResult.Size = new System.Drawing.Size(1551, 241);
+            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(160, 85);
+            this.input.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.input.Name = "input";
+            this.input.Power = null;
+            this.input.Size = new System.Drawing.Size(292, 35);
+            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(947, 216);
+            this.Split.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            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(112, 44);
+            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(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1611, 1131);
+            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.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Name = "Special_Reset";
+            this.Tag = "Special!Reset";
+            this.Text = "重置站点";
+            this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            this.SizeChanged += new System.EventHandler(this.Special_Reset_SizeChanged);
+            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 数据清空;
+    }
+}

+ 256 - 0
UAS_MES_LGDZ/FunctionCode/Special/Special_Reset.cs

@@ -0,0 +1,256 @@
+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_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Special
+{
+    public partial class Special_Reset : Form
+    {
+        DataHelper dh;
+
+        LogStringBuilder sql = new LogStringBuilder();
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        DataTable Dbfind;
+        DataTable dt;
+
+        List<String> sb = new List<string>();
+
+        public Special_Reset()
+        {
+            InitializeComponent();
+        }
+
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+
+            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 bool ReSN(string sncode, string stepcode)
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_paststep from makeserial where ms_sncode ='" + sncode + "' order by ms_id desc", "select");
+            if (!dt.Rows[0]["ms_paststep"].ToString().Contains(cd_stepcode.Text))
+            {
+                OperatResult.AppendText(">>序列号"+ sncode + "不允许回流到未执行工序\n", Color.Red);
+                return false;
+            }
+            string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + stepcode + "'").ToString();
+            dh.ExecuteSql("update makeserial set ms_status=1,ms_outboxcode='',ms_printcount = 0, ms_nextstepcode= '" + stepcode + "' where ms_sncode='" + sncode + "'", "update");
+            dh.ExecuteSql("delete makebad where mb_sncode = '" + sncode + "' and mb_status = 0", "delete");
+            dh.ExecuteSql("delete 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, "");
+            return true;
+        }
+
+
+
+        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++)
+                    {
+                        if (ReSN(sb[i].ToString(), cd_stepcode.Text))
+                            OperatResult.AppendText("SN:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
+                    }
+                    WeighRecord.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 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.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);
+                }
+            }
+        }
+
+        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 + "' or ms_imei1='" + input.Text + "' or ms_imei2='" + input.Text + "' order by ms_id desc", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        input.Text = dt.Rows[0]["ms_sncode"].ToString();
+                        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;
+                    }
+                }
+            }
+        }
+
+        private void 数据清空_Click(object sender, EventArgs e)
+        {
+            BaseUtil.CleanControls(this.Controls);
+            WeighRecord.Items.Clear();
+            sb.Clear();
+        }
+
+        private void Special_Reset_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+    }
+}

+ 197 - 0
UAS_MES_LGDZ/FunctionCode/Special/Special_Reset.resx

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

+ 11 - 1
UAS_MES_LGDZ/PublicMethod/LogicHandler.cs

@@ -279,7 +279,8 @@ namespace UAS_MES_NEW.PublicMethod
             {
                 oMakeCode = dt.Rows[0]["ms_makecode"].ToString();
                 oStatus = dt.Rows[0]["ms_status"].ToString();
-                if (oStatus == "2") {
+                if (oStatus == "2")
+                {
                     oMakeCode = "";
                     return false;
                 }
@@ -1421,6 +1422,15 @@ namespace UAS_MES_NEW.PublicMethod
             dh.ExecuteSql(sql.ToString(), "insert", printValue, printType, MakeCode, prodCode, sourceCode, stepcode, ifRePrint, userCode);
         }
 
+        public static void doLabelPrintLog(string printValue, string printType, string MakeCode, string prodCode, string sourceCode, string stepcode, string ifRePrint, string userCode, string filename)
+        {
+            sql.Clear();
+            sql.Append("insert into labelprintlog(LPL_ID,LPL_VALUE,LPL_TYPE,LPL_MAKECODE,LPL_PRODCODE,LPL_SOURCECODE,LPL_STEPCODE,LPL_IFREPRINT,LPL_INDATE,LPL_INMAN,lpl_file) ");
+            sql.Append("values( labelprintlog_seq.nextval,:lpl_value,:lpl_type,:makecode,:prodcode,");
+            sql.Append(":SourceCode,:stepcode,:ifreprint,sysdate,:inman,'" + filename + "')");
+            dh.ExecuteSql(sql.ToString(), "insert", printValue, printType, MakeCode, prodCode, sourceCode, stepcode, ifRePrint, userCode);
+        }
+
 
         public static bool GetMobileAllInfo(string iSN, out Dictionary<string, string> oInfo, out string oErrMessage)
         {

+ 3 - 3
UAS_MES_LGDZ/PublicMethod/Print.cs

@@ -220,7 +220,7 @@ namespace UAS_MES_NEW.PublicMethod
             {
                 if (LabelType == "卡通箱标" || LabelType == "大箱标" || LabelType == "栈板标" || LabelType == "彩盒标")
                 {
-                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
+                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "' and lpl_file='" + LabelName + "'", "select");
                 }
                 else
                 {
@@ -356,7 +356,7 @@ namespace UAS_MES_NEW.PublicMethod
                 }
             }
             LogManager.DoLog(sb.ToString());
-            //保存本次赋值进行打印
+            //保存本次赋值进行打印a
             format.PrintSetup.PrinterName = PrinterName;
             format.PrintSetup.IdenticalCopiesOfLabel = PrintNum;
             format.Print();
@@ -372,7 +372,7 @@ namespace UAS_MES_NEW.PublicMethod
             {
                 LogManager.DoLog(ex.Message + ex.StackTrace);
             }
-            LogicHandler.doLabelPrintLog(SnCode, LabelType, MakeCode, ProdCode, User.UserSourceCode, User.CurrentStepCode, IfRePrint, User.UserCode);
+            LogicHandler.doLabelPrintLog(SnCode, LabelType, MakeCode, ProdCode, User.UserSourceCode, User.CurrentStepCode, IfRePrint, User.UserCode, PrintFile.Name);
             return true;
         }
     }

+ 9 - 0
UAS_MES_LGDZ/UAS_MES_LGDZ.csproj

@@ -1109,6 +1109,12 @@
     <Compile Include="FunctionCode\Special\Special_QCForce.Designer.cs">
       <DependentUpon>Special_QCForce.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\Special\Special_SeqTransform.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1708,6 +1714,9 @@
     <EmbeddedResource Include="FunctionCode\Special\Special_QCForce.resx">
       <DependentUpon>Special_QCForce.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_Reset.resx">
+      <DependentUpon>Special_Reset.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_SeqTransform.resx">
       <DependentUpon>Special_SeqTransform.cs</DependentUpon>
     </EmbeddedResource>