瀏覽代碼

电子秤读书调整

callm 2 年之前
父節點
當前提交
0222cfd8aa

+ 423 - 0
UAS_MES_YD/FunctionCode/Make/Make_ColorBoxLoadPrintPT.Designer.cs

@@ -0,0 +1,423 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_ColorBoxLoadPrintPT
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            this.sncode_label = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.mcd_remainqty_label = new System.Windows.Forms.Label();
+            this.mcd_okqty_label = new System.Windows.Forms.Label();
+            this.pr_code_label = new System.Windows.Forms.Label();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.CheckTSN = new System.Windows.Forms.CheckBox();
+            this.CollectRemark = new System.Windows.Forms.CheckBox();
+            this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.mcd_okqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.pr_code = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.SuspendLayout();
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(1450, 288);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(114, 41);
+            this.label2.TabIndex = 180;
+            this.label2.Text = "打印机";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(1450, 390);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(82, 41);
+            this.label1.TabIndex = 179;
+            this.label1.Text = "标签";
+            // 
+            // pr_detail_label
+            // 
+            this.pr_detail_label.AutoSize = true;
+            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail_label.Location = new System.Drawing.Point(1292, 85);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail_label.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
+            this.pr_detail_label.TabIndex = 171;
+            this.pr_detail_label.Text = "产品名称";
+            // 
+            // sncode_label
+            // 
+            this.sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.sncode_label.AutoSize = true;
+            this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sncode_label.Location = new System.Drawing.Point(524, 893);
+            this.sncode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.sncode_label.Name = "sncode_label";
+            this.sncode_label.Size = new System.Drawing.Size(138, 41);
+            this.sncode_label.TabIndex = 170;
+            this.sncode_label.Text = "TSN/SN";
+            // 
+            // 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(1292, 178);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(146, 41);
+            this.label4.TabIndex = 167;
+            this.label4.Text = "打印张数";
+            // 
+            // mcd_remainqty_label
+            // 
+            this.mcd_remainqty_label.AutoSize = true;
+            this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty_label.Location = new System.Drawing.Point(750, 168);
+            this.mcd_remainqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_remainqty_label.Name = "mcd_remainqty_label";
+            this.mcd_remainqty_label.Size = new System.Drawing.Size(114, 41);
+            this.mcd_remainqty_label.TabIndex = 166;
+            this.mcd_remainqty_label.Text = "剩余数";
+            // 
+            // mcd_okqty_label
+            // 
+            this.mcd_okqty_label.AutoSize = true;
+            this.mcd_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_okqty_label.Location = new System.Drawing.Point(24, 168);
+            this.mcd_okqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_okqty_label.Name = "mcd_okqty_label";
+            this.mcd_okqty_label.Size = new System.Drawing.Size(146, 41);
+            this.mcd_okqty_label.TabIndex = 165;
+            this.mcd_okqty_label.Text = "打印计数";
+            // 
+            // pr_code_label
+            // 
+            this.pr_code_label.AutoSize = true;
+            this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_code_label.Location = new System.Drawing.Point(750, 83);
+            this.pr_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_code_label.Name = "pr_code_label";
+            this.pr_code_label.Size = new System.Drawing.Size(146, 41);
+            this.pr_code_label.TabIndex = 164;
+            this.pr_code_label.Text = "产品编号";
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(20, 83);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(146, 41);
+            this.ms_makecode_label.TabIndex = 163;
+            this.ms_makecode_label.Text = "归属工单";
+            // 
+            // CheckTSN
+            // 
+            this.CheckTSN.AutoSize = true;
+            this.CheckTSN.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CheckTSN.Location = new System.Drawing.Point(64, 890);
+            this.CheckTSN.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.CheckTSN.Name = "CheckTSN";
+            this.CheckTSN.Size = new System.Drawing.Size(240, 45);
+            this.CheckTSN.TabIndex = 186;
+            this.CheckTSN.Text = "是否检查TSN";
+            this.CheckTSN.UseVisualStyleBackColor = true;
+            this.CheckTSN.CheckedChanged += new System.EventHandler(this.CheckTSN_CheckedChanged);
+            // 
+            // CollectRemark
+            // 
+            this.CollectRemark.AutoSize = true;
+            this.CollectRemark.Checked = true;
+            this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.CollectRemark.Location = new System.Drawing.Point(1458, 578);
+            this.CollectRemark.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.CollectRemark.Name = "CollectRemark";
+            this.CollectRemark.Size = new System.Drawing.Size(155, 39);
+            this.CollectRemark.TabIndex = 197;
+            this.CollectRemark.Text = "采集备注";
+            this.CollectRemark.UseVisualStyleBackColor = true;
+            // 
+            // Remark
+            // 
+            this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Remark.Location = new System.Drawing.Point(1450, 632);
+            this.Remark.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3);
+            this.Remark.Name = "Remark";
+            this.Remark.Size = new System.Drawing.Size(404, 156);
+            this.Remark.TabIndex = 196;
+            this.Remark.Text = "";
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(1458, 491);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(6);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(159, 45);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 189;
+            // 
+            // LockMakeCode
+            // 
+            this.LockMakeCode.AutoSize = true;
+            this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LockMakeCode.LeaveEvent = false;
+            this.LockMakeCode.Location = new System.Drawing.Point(498, 83);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(6);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
+            this.LockMakeCode.TabIndex = 185;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = null;
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = null;
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(180, 83);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = null;
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(298, 42);
+            this.ma_code.TabIndex = 184;
+            this.ma_code.TableName = null;
+            this.ma_code.TextBoxEnable = true;
+            this.ma_code.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox.OnTextChange(this.ma_code_UserControlTextChanged);
+            // 
+            // PrintLabel
+            // 
+            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel.FormattingEnabled = true;
+            this.PrintLabel.Location = new System.Drawing.Point(1578, 390);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.PrintLabel.Name = "PrintLabel";
+            this.PrintLabel.Size = new System.Drawing.Size(264, 32);
+            this.PrintLabel.TabIndex = 181;
+            this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
+            // 
+            // Printer
+            // 
+            this.Printer.Location = new System.Drawing.Point(1578, 288);
+            this.Printer.Margin = new System.Windows.Forms.Padding(8);
+            this.Printer.Name = "Printer";
+            this.Printer.Size = new System.Drawing.Size(268, 50);
+            this.Printer.TabIndex = 178;
+            // 
+            // mcd_remainqty
+            // 
+            this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty.Location = new System.Drawing.Point(926, 168);
+            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(37, 41);
+            this.mcd_remainqty.TabIndex = 177;
+            this.mcd_remainqty.Text = "0";
+            // 
+            // mcd_okqty
+            // 
+            this.mcd_okqty.AutoSize = true;
+            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_okqty.Location = new System.Drawing.Point(172, 168);
+            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_okqty.Name = "mcd_okqty";
+            this.mcd_okqty.Size = new System.Drawing.Size(37, 41);
+            this.mcd_okqty.TabIndex = 176;
+            this.mcd_okqty.Text = "0";
+            // 
+            // pr_code
+            // 
+            this.pr_code.AutoSize = true;
+            this.pr_code.CutLength = null;
+            this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_code.Location = new System.Drawing.Point(926, 85);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_code.MaximumSize = new System.Drawing.Size(300, 0);
+            this.pr_code.Name = "pr_code";
+            this.pr_code.Size = new System.Drawing.Size(0, 41);
+            this.pr_code.TabIndex = 175;
+            this.pr_code.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.CutLength = null;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail.Location = new System.Drawing.Point(1468, 83);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(300, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.TabIndex = 174;
+            // 
+            // PrintNum
+            // 
+            this.PrintNum.AllPower = null;
+            this.PrintNum.BackColor = System.Drawing.Color.White;
+            this.PrintNum.Enabled = false;
+            this.PrintNum.ID = null;
+            this.PrintNum.Location = new System.Drawing.Point(1468, 178);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum.Name = "PrintNum";
+            this.PrintNum.Negative = false;
+            this.PrintNum.Power = null;
+            this.PrintNum.Size = new System.Drawing.Size(296, 35);
+            this.PrintNum.Str = null;
+            this.PrintNum.Str1 = null;
+            this.PrintNum.Str2 = null;
+            this.PrintNum.TabIndex = 172;
+            this.PrintNum.Text = "1";
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = "ifall";
+            this.sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(702, 894);
+            this.sncode.Margin = new System.Windows.Forms.Padding(6);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(388, 35);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 169;
+            this.sncode.Tag = "ifread";
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(28, 258);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(1408, 606);
+            this.OperateResult.TabIndex = 168;
+            this.OperateResult.Text = "";
+            // 
+            // Make_ColorBoxLabelPrint
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1876, 960);
+            this.Controls.Add(this.CollectRemark);
+            this.Controls.Add(this.Remark);
+            this.Controls.Add(this.StepCount);
+            this.Controls.Add(this.CheckTSN);
+            this.Controls.Add(this.LockMakeCode);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.PrintLabel);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.Printer);
+            this.Controls.Add(this.mcd_remainqty);
+            this.Controls.Add(this.mcd_okqty);
+            this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.PrintNum);
+            this.Controls.Add(this.pr_detail_label);
+            this.Controls.Add(this.sncode_label);
+            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.mcd_remainqty_label);
+            this.Controls.Add(this.mcd_okqty_label);
+            this.Controls.Add(this.pr_code_label);
+            this.Controls.Add(this.ms_makecode_label);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Name = "Make_ColorBoxLabelPrint";
+            this.Tag = "Make!ColorBoxLabelPrint";
+            this.Text = "W";
+            this.Activated += new System.EventHandler(this.Make_ColorBoxLabelPrint_Activated);
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_ColorBoxLabelPrint_FormClosing);
+            this.Load += new System.EventHandler(this.Make_ColorBoxLabelPrint_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_ColorBoxLabelPrint_SizeChanged);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
+        private CustomControl.ValueLabel.ValueNumLabel mcd_remainqty;
+        private CustomControl.ValueLabel.ValueNumLabel mcd_okqty;
+        private CustomControl.ValueLabel.ValueLabel pr_code;
+        private CustomControl.ValueLabel.ValueLabel pr_detail;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum;
+        private System.Windows.Forms.Label pr_detail_label;
+        private System.Windows.Forms.Label sncode_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label mcd_remainqty_label;
+        private System.Windows.Forms.Label mcd_okqty_label;
+        private System.Windows.Forms.Label pr_code_label;
+        private System.Windows.Forms.Label ms_makecode_label;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
+        private System.Windows.Forms.CheckBox CheckTSN;
+        private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private System.Windows.Forms.CheckBox CollectRemark;
+        private CustomControl.RichText.RichTextAutoBottom Remark;
+    }
+}

+ 377 - 0
UAS_MES_YD/FunctionCode/Make/Make_ColorBoxLoadPrintPT.cs

@@ -0,0 +1,377 @@
+using System;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.PublicMethod;
+using UAS_MES_NEW.Entity;
+using LabelManager2;
+using System.Threading;
+using UAS_MES_NEW.PublicForm;
+using System.Web.UI.WebControls;
+using Seagull.BarTender.Print;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_ColorBoxLoadPrintPT : Form
+    {
+        DataHelper dh;
+        DataTable dt;
+        LogStringBuilder sql = new LogStringBuilder();
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        //保存StepProduct查询出来的数据
+        DataTable ListA = new DataTable();
+        //制造单号
+        string macode;
+        //当前提示的索引
+        //保存TSN编号
+        string ms_id = null;
+
+        string PR_CHECKCARTONW = "0";
+
+        bool pr_change = false;
+
+        Thread InitPrint;
+        ApplicationClass lbl;
+
+        Engine engine;
+
+        DataTable Dbfind;
+
+        public Make_ColorBoxLoadPrintPT()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_ColorBoxLabelPrint_Load(object sender, EventArgs e)
+        {
+            sncode.Focus();
+            asc.controllInitializeSize(this);
+            InitPrint = new Thread(InPrint);
+            SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
+            BaseUtil.SetFormCenter(stw);
+            stw.ShowDialog();
+            //设置锁定工单
+            LockMakeCode.GetMakeCodeCtl(ma_code);
+            ma_code.SetLockCheckBox(LockMakeCode);
+            //工单号放大镜配置
+            ma_code.TableName = "make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单号,pr_code # 产品编号,pr_detail # 产品名称";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code", "pr_code", "pr_detail" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += Ma_code_DbChange;
+            OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+            dh = SystemInf.dh;
+            StepCount.StepCode = User.CurrentStepCode;
+            StepCount.Source = User.UserSourceCode;
+            StepCount.LineCode = User.UserLineCode;
+            StepCount.Dh = dh;
+            StepCount.Start();
+        }
+
+        private void Ma_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+            //获取工单的其他信息
+            sql.Clear();
+            sql.Append("select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode as pr_code ,pr_detail,");
+            sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
+            sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            if (dt.Rows.Count > 0)
+            {
+                BaseUtil.SetFormValue(this.Controls, dt);
+            }
+        }
+
+        private void InPrint()
+        {
+            try
+            {
+                engine = new Engine(true);
+            }
+            catch (Exception)
+            {
+                OperateResult.AppendText("未正确安装CodeSoft软件\n", Color.Red);
+            }
+        }
+
+        private void sn_code_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (CheckTSN.Checked == true && ms_id == null)
+                {
+                    if (sncode.Text == "")
+                    {
+                        OperateResult.AppendText(">>TSN不能为空\n", Color.Red);
+                        OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                        return;
+                    }
+                    OperateResult.AppendText(">>" + sncode.Text + "\n", Color.Black);
+                    sql.Clear();
+                    sql.Append("select max(ms_id) ms_id from makeserial where ms_beforesn = '" + sncode.Text + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (dt.Rows[0][0].ToString() != "")
+                    {
+                        ms_id = dt.Rows[0][0].ToString();
+                        sncode.Focus();
+                        OperateResult.AppendText(">>请输入SN\n", Color.Black, sncode);
+                        return;
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>TSN" + sncode.Text + "错误,不存在\n", Color.Red, sncode);
+                        OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                        return;
+                    }
+                }
+                if (sncode.Text == "")
+                {
+                    OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
+                    return;
+                }
+                OperateResult.AppendText(">>" + sncode.Text + "\n", Color.Black);
+                if (CheckTSN.Checked == true && ms_id != null)
+                {
+                    sql.Clear();
+                    sql.Append("select ms_id from makeserial where ms_id='" + ms_id + "' and ms_sncode = '" + sncode.Text + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        OperateResult.AppendText(">>TSN和SN一致\n", Color.Green);
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>TSN和SN不一致\n", Color.Red, sncode);
+                        OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                        ms_id = null;
+                        return;
+                    }
+                }
+                string oMsID;
+                string ErrorMessage;
+                string oMakeCode;
+                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
+                {
+                    //判断界面工单是否为空时的序列号是否自动归属工单
+                    // 获取工单归属工单下一工序是否正确
+                    string status = "";
+                    LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out ErrorMessage);
+                    if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
+                    {
+                        //获取工单的其他信息
+                        sql.Clear();
+                        sql.Append("select ma_code,nvl(ma_unlimitin,0)ma_unlimitin,pr_code,pr_detail,pr_spec from  ");
+                        sql.Append("make left join product on pr_code=ma_prodcode where ma_code='" + oMakeCode + "'");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code and cr_prodcode = ms_prodcode", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sncode.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
+                            if (PR_CHECKCARTONW != "0")
+                            {
+                                OperateResult.AppendText(">>彩盒" + sncode.Text + "当前处于称重工序,无法在此界面采集,需去彩盒称重界面进行采集\n", Color.Black, sncode);
+                                return;
+                            }
+                            BaseUtil.SetFormValue(this.Controls, dt);
+                            LockMakeCode.Checked = true;
+                            //提示用户“<<工单号:取ma_makecode”
+                            OperateResult.AppendText("<<工单号:" + ma_code.Text + "\n", Color.Black);
+                            //提示用户“<< 序列号:XXXX”
+                            OperateResult.AppendText("<<序列号:" + sncode.Text + "\n", Color.Black);
+                            if (pr_change)
+                            {
+                                String dialog = MessageBox.Show("是否使用当前标签模板", "提示", MessageBoxButtons.OKCancel).ToString();
+                                if (dialog != "OK")
+                                {
+                                    OperateResult.AppendText(">>请重新选择标签模板\n", Color.Green);
+                                    return;
+                                }
+                                else pr_change = false;
+                            }
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(">>无序列号" + sncode.Text + "对应工单信息\n", Color.Red, sncode);
+                            sncode.Focus();
+                            return;
+                        }
+                        if (int.Parse(mcd_remainqty.Text) <= 0 && dt.Rows[0]["ma_unlimitin"].ToString() == "0")
+                        {
+                            macode = ma_code.Text;
+                            ErrorMessage = "工单" + macode + "打印结束\n>请输入SN";
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                            sncode.Focus();
+                        }
+                        else
+                        {
+                            //所选标签不为空
+                            if (PrintLabel.SelectedValue != null)
+                            {
+                                //如果打印张数为空,返回
+                                if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
+                                {
+                                    OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red, sncode);
+                                    //清空输入框的值,聚焦
+                                    sncode.Focus();
+                                    //提示用户“>>请输入SN”
+                                    OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                    return;
+                                }
+                                //更新至下一步工序
+                                if (LogicHandler.SetStepResult(oMakeCode, User.UserSourceCode, sncode.Text, "彩盒打印", "彩盒打印成功", User.UserCode, out ErrorMessage))
+                                {
+                                    //提示正确返回时传递的信息
+                                    if (ErrorMessage.Contains("AFTERSUCCESS"))
+                                        OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                                    // doc = lbl.Documents.Open(PrintLabel.Text);
+
+                                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "皮套标", "0", out ErrorMessage))
+                                        {
+                                            //提示用户打印成功
+                                            OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
+                                        }
+                                        else
+                                        {
+                                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                                        }
+                                    if (CollectRemark.Checked && Remark.Text != "")
+                                    {
+                                        LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, pr_code.Text, Remark.Text);
+                                    }
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "皮套打印", "皮套打印成功", sncode.Text, "");
+                                    //刷新打印数量和剩余数量
+                                    dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,mcd_okqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
+                                    BaseUtil.SetFormValue(Controls, dt);
+                                    sncode.Text = "";
+                                    ms_id = null;
+                                    sncode.Focus();
+                                }
+                                else
+                                {
+                                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sncode);
+                                    ms_id = null;
+                                    sncode.Focus();
+                                }
+                            }
+                            else
+                            {
+                                OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护皮套标签\n", Color.Red, sncode);
+                                return;
+                            }
+                            if (CheckTSN.Checked == true)
+                            {
+                                OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                                ms_id = null;
+                            }
+                            else
+                                OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                        }
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(ErrorMessage + "\n", Color.Red, sncode);
+                        if (CheckTSN.Checked == true)
+                        {
+                            OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                            ms_id = null;
+                        }
+                        else
+                            OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                    }
+                }
+                else
+                {
+                    OperateResult.AppendText(ErrorMessage + "\n", Color.Red, sncode);
+                    if (CheckTSN.Checked == true)
+                    {
+                        OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                        ms_id = null;
+                    }
+                    else
+                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                }
+            }
+        }
+        DataTable _dt;
+        //根据产品编号获取打印模板
+        private void pr_code_TextChanged(object sender, EventArgs e)
+        {
+            _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='皮套标' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            if (_dt.Rows.Count == 0)
+            {
+                _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault from label where la_prodcode is null and la_templatetype='皮套标' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            }
+            PrintLabel.DataSource = _dt;
+            PrintLabel.DisplayMember = "la_url";
+            PrintLabel.ValueMember = "la_id";
+            pr_change = true;
+        }
+
+        private void Make_ColorBoxLabelPrint_Activated(object sender, EventArgs e)
+        {
+            sncode.Focus();
+        }
+
+        private void Make_ColorBoxLabelPrint_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            BaseUtil.ClosePrint(lbl);
+        }
+
+        private void Make_ColorBoxLabelPrint_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void ma_code_UserControlTextChanged(object sender, EventArgs e)
+        {
+            if (ma_code.Text.Length > 4)
+            {
+                //获取工单的其他信息
+                sql.Clear();
+                sql.Append("select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode as pr_code ,pr_detail,");
+                sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
+                sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                if (dt.Rows.Count > 0)
+                {
+                    BaseUtil.SetFormValue(this.Controls, dt);
+                }
+                else
+                {
+                    sncode.Text = "";
+                }
+            }
+        }
+
+        private void CheckTSN_CheckedChanged(object sender, EventArgs e)
+        {
+            if (CheckTSN.Checked == true)
+            {
+                ms_id = null;
+                OperateResult.AppendText(">>切换至检查TSN\n", Color.Green);
+                OperateResult.AppendText(">>请输入TSN\n", Color.Black, sncode);
+                sncode.Focus();
+            }
+            else
+            {
+                ms_id = null;
+                OperateResult.AppendText(">>切换至不检查TSN\n", Color.Green);
+                OperateResult.AppendText(">>请输入SN\n", Color.Black, sncode);
+                sncode.Focus();
+            }
+        }
+
+        private void PrintLabel_SelectedValueChanged(object sender, EventArgs e)
+        {
+            if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
+            {
+                string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
+                PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            }
+        }
+    }
+}

+ 120 - 0
UAS_MES_YD/FunctionCode/Make/Make_ColorBoxLoadPrintPT.resx

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

+ 23 - 10
UAS_MES_YD/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs

@@ -35,7 +35,7 @@
             this.pr_colorboxunit = new System.Windows.Forms.Label();
             this.weight_label = new System.Windows.Forms.Label();
             this.panel4 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
-            this.weight = new System.Windows.Forms.TextBox();
+            this.weight = new System.Windows.Forms.Label();
             this.label15 = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.ma_qty_label = new System.Windows.Forms.Label();
@@ -87,6 +87,7 @@
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.richTextAutoBottom1 = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.panel4.SuspendLayout();
             this.groupBoxWithBorder2.SuspendLayout();
             this.SuspendLayout();
@@ -349,8 +350,6 @@
             // CollectRemark
             // 
             this.CollectRemark.AutoSize = true;
-            this.CollectRemark.Checked = true;
-            this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.CollectRemark.Location = new System.Drawing.Point(1544, 348);
             this.CollectRemark.Margin = new System.Windows.Forms.Padding(6);
@@ -417,6 +416,7 @@
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 189;
+            this.StepCount.Load += new System.EventHandler(this.StepCount_Load);
             // 
             // RefreshWeigh
             // 
@@ -478,7 +478,7 @@
             // 
             this.ob_checkno_label.AutoSize = true;
             this.ob_checkno_label.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_checkno_label.Location = new System.Drawing.Point(48, 154);
+            this.ob_checkno_label.Location = new System.Drawing.Point(51, 157);
             this.ob_checkno_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_checkno_label.Name = "ob_checkno_label";
             this.ob_checkno_label.Size = new System.Drawing.Size(160, 46);
@@ -489,7 +489,7 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_checkno.Location = new System.Drawing.Point(236, 154);
+            this.ob_checkno.Location = new System.Drawing.Point(239, 157);
             this.ob_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 46);
@@ -500,7 +500,7 @@
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(586, 62);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(589, 65);
             this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 46);
@@ -510,7 +510,7 @@
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_batchqty.Location = new System.Drawing.Point(236, 62);
+            this.ob_batchqty.Location = new System.Drawing.Point(239, 65);
             this.ob_batchqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 46);
@@ -520,7 +520,7 @@
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(398, 62);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(401, 65);
             this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
             this.ob_nowcheckqty_label.Size = new System.Drawing.Size(160, 46);
@@ -531,7 +531,7 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_batchqty_label.Location = new System.Drawing.Point(48, 62);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(51, 65);
             this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(160, 46);
@@ -804,11 +804,23 @@
             this.ma_code.TableName = null;
             this.ma_code.TextBoxEnable = true;
             // 
+            // richTextAutoBottom1
+            // 
+            this.richTextAutoBottom1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.richTextAutoBottom1.Location = new System.Drawing.Point(410, 586);
+            this.richTextAutoBottom1.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.richTextAutoBottom1.Name = "richTextAutoBottom1";
+            this.richTextAutoBottom1.Size = new System.Drawing.Size(476, 156);
+            this.richTextAutoBottom1.TabIndex = 207;
+            this.richTextAutoBottom1.Text = "";
+            this.richTextAutoBottom1.Visible = false;
+            // 
             // Make_ColorBoxWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(2026, 1168);
+            this.Controls.Add(this.richTextAutoBottom1);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.locksalecode);
@@ -926,6 +938,7 @@
         public System.Windows.Forms.Label ob_checkno;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
-        private System.Windows.Forms.TextBox weight;
+        private System.Windows.Forms.Label weight;
+        private CustomControl.RichText.RichTextAutoBottom richTextAutoBottom1;
     }
 }

+ 32 - 84
UAS_MES_YD/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -14,7 +14,7 @@ using UAS_MES_NEW.PublicForm;
 using System.Net.Sockets;
 using System.Collections.Generic;
 using System.Net;
-
+using System.Text;
 
 namespace UAS_MES_NEW.Make
 {
@@ -244,7 +244,15 @@ namespace UAS_MES_NEW.Make
                         {
                             try
                             {
-                                weight.Text = re.Match(serialPort1.ReadLine().Trim()).Groups[0].Value;
+                                int len = serialPort1.BytesToRead;
+                                Byte[] readBuffer = new Byte[len];
+                                serialPort1.Read(readBuffer, 0, len); //将数据读入缓存
+                                string weigh = Encoding.Default.GetString(readBuffer);
+                                Remark.AppendText(weigh + "\n");
+                                if (weigh != "")
+                                {
+                                    weight.Text = weigh;
+                                }
                             }
                             catch (Exception)
                             {
@@ -316,100 +324,35 @@ namespace UAS_MES_NEW.Make
 
         private void StartWeight_Click(object sender, EventArgs e)
         {
+            thread = new Thread(getSerialData);
             try
             {
-                //定义一个套接字用于监听客户端发来的信息  包含3个参数(IP4寻址协议,流式连接,TCP协议)
-                socketWatch = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-                //服务端发送信息 需要1个IP地址和端口号
-                IPAddress ipaddress = IPAddress.Parse("192.168.1.4");
-                //将IP地址和端口号绑定到网络节点endpoint上 
-                IPEndPoint endpoint = new IPEndPoint(ipaddress, int.Parse("2000"));
-                //监听绑定的网络节点
-                socketWatch.Bind(endpoint);
-                //将套接字的监听队列长度限制为20
-                socketWatch.Listen(20);
-                //创建一个监听线程 
-                threadWatch = new Thread(WatchConnecting);
-                //将窗体线程设置为与后台同步
-                threadWatch.IsBackground = true;
-                //启动线程
-                threadWatch.Start();
+                serialPort1.PortName = ComList.Text;
+                serialPort1.BaudRate = int.Parse(BaudRate.Text);
+                serialPort1.Open();
+                GetData = true;
+                thread.Start();
             }
-            catch (Exception ex)
+            catch (Exception mes)
             {
-                MessageBox.Show(ex.Message);
+                if (BaudRate.Text == "" || ComList.Text == "")
+                    OperateResult.AppendText(">>请先在电子秤调试界面维护波特率和串口\n", Color.Red);
+                else
+                    OperateResult.AppendText(">>" + mes.Message + "\n", Color.Red);
             }
         }
 
-        private void WatchConnecting()
+        private void StopWeight_Click(object sender, EventArgs e)
         {
-            socConnection = socketWatch.Accept();
-            while (socConnection.Connected)  //持续不断监听客户端发来的请求
+            if (serialPort1.IsOpen)
             {
-                try
-                {
-                    Thread.Sleep(100);
-                    byte[] data = new byte[1024];
-                    socConnection.Receive(data);
-                    List<byte> arr = new List<byte>();
-                    byte[] byteTemp = new byte[4];
-                    byteTemp[3] = Convert.ToByte("00", 16);
-                    byteTemp[2] = Convert.ToByte("00", 16);
-                    byteTemp[1] = Convert.ToByte("00", 16);
-                    byteTemp[0] = Convert.ToByte("00", 16);
-                    for (int i = 0; i < 10; i++)
-                    {
-                        if (i >= 4) {
-                            if (data[i].ToString() == "0")
-                                continue;
-                            arr.Add(data[i]);
-                        }
-                    }
-                    for (int i = 0; i < arr.Count; i++)
-                    {
-                        switch (i)
-                        {
-                            case 0:
-                                byteTemp[3] = arr.ToArray()[0];
-                                break;
-                            case 1:
-                                byteTemp[2] = arr.ToArray()[1];
-                                break;
-                            case 2:
-                                byteTemp[1] = arr.ToArray()[2];
-                                break;
-                            case 3:
-                                byteTemp[0] = arr.ToArray()[3];
-                                break;
-                            default:
-                                break;
-                        }
-                    }
-                    float fTemp = BitConverter.ToSingle(byteTemp, 0);
-                    if (fTemp.ToString().Length > 5)
-                        weight.Text = fTemp.ToString().Substring(0, 5);
-                    else
-                        weight.Text = fTemp.ToString();
-                }
-                catch (Exception)
-                {
-
-                }
+                GetData = false;
+                serialPort1.Close();
+                SystemInf.OpenPort.Remove(serialPort1.PortName);
+                thread.Abort();
             }
         }
 
-        private void StopWeight_Click(object sender, EventArgs e)
-        {
-            socketWatch.Close();
-            //if (serialPort1.IsOpen)
-            //{
-            //    GetData = false;
-            //    serialPort1.Close();
-            //    SystemInf.OpenPort.Remove(serialPort1.PortName);
-            //    thread.Abort();
-            //}
-        }
-
         private void pr_code_TextChanged(object sender, EventArgs e)
         {
             LoadCheckQTY();
@@ -540,5 +483,10 @@ namespace UAS_MES_NEW.Make
             dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty from make left join makecraftdetail_view on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
             BaseUtil.SetFormValue(Controls, dt);
         }
+
+        private void StepCount_Load(object sender, EventArgs e)
+        {
+
+        }
     }
 }

+ 1 - 1
UAS_MES_YD/FunctionCode/Make/Make_FeedingCollection.cs

@@ -349,7 +349,7 @@ namespace UAS_MES_NEW.Make
                         sql.Clear();
                         sql.Append("select ma_code,ma_softversion,ma_ecncode,ma_prodcode,pr_spec,ma_qty from makeserial left join product ");
                         sql.Append(" on ms_prodcode=pr_code left join make on ms_makecode=ma_code left join ");
-                        sql.Append("makecraftdetail_view on mcd_macode=ms_makecode where ms_id='" + oMsid + "'");
+                        sql.Append("makecraftdetail_view on mcd_macode=ms_makecode where ms_id='" + oMsid + "' and mcd_stepcode='"+User.CurrentStepCode+"'");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         BaseUtil.SetFormValue(this.Controls, dt);
                         OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);

+ 1 - 1
UAS_MES_YD/FunctionCode/Make/Make_TestCollection.cs

@@ -470,7 +470,7 @@ namespace UAS_MES_NEW.Make
                     }
                     if (LogicHandler.CheckStepSNAndMacode(ma_code.Text == "" ? oMakeCode : ma_code.Text, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
                     {
-                        dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,nvl(ma_softversion,ms_softversion)ma_softversion,substr(pr_spec,0,50)pr_spec,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
+                        dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,nvl(ma_softversion,ms_softversion)ma_softversion,substr(pr_spec,0,50)pr_spec,ma_qty from makeserial left join make on ms_makecode=ma_code left join product on ma_prodcode=pr_code where ms_id='" + oMSID + "'", "select");
                         if (dt.Rows.Count > 0)
                         {
                             BaseUtil.SetFormValue(this.Controls, dt);

+ 4 - 4
UAS_MES_YD/FunctionCode/Special/Special_CancelImei.cs

@@ -35,7 +35,7 @@ namespace UAS_MES_NEW.Special
                 MessageBox.Show("必须填写原因");
                 return;
             }
-            DataTable dt = (DataTable)dh.ExecuteSql("select si_sn,si_imei1 from sninfo where si_imei1 ='" + IMEI.Text + "'", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_imei1 from makeserial where ms_imei1 ='" + IMEI.Text + "'", "select");
             if (dt.Rows.Count > 0)
             {
                 dt = (DataTable)dh.ExecuteSql("select ms_sncode,substr(pr_detail,0,15)pr_detail from makeserial left join product on pr_code=ms_prodcode where ms_imei1='" + IMEI.Text + "'", "select");
@@ -43,7 +43,7 @@ namespace UAS_MES_NEW.Special
                 {
                     string sn = dt.Rows[0]["ms_sncode"].ToString();
                     string pr_detail = dt.Rows[0]["pr_detail"].ToString();
-                    dh.ExecuteSql("update makeserial set ms_imei='" + Reason.Text + "' where ms_imei1='" + IMEI.Text + "'", "update");
+                    dh.ExecuteSql("update makeserial set ms_imei='" + Reason.Text + "',ms_imei1='' where ms_imei1='" + IMEI.Text + "'", "update");
                     dh.ExecuteSql("update sninfo set si_imei1='' where si_imei1='" + IMEI.Text + "'", "update");
                     LogicHandler.DoCommandLog("CancelImei", User.UserCode, "", User.UserLineCode, User.UserSourceCode, sn+" "+Reason.Text, "取消成功", IMEI.Text, "");
                     OperateResult.AppendText("SN:" + sn + ",IMEI:" + IMEI.Text + ",机型:" + pr_detail + "取消成功\n", System.Drawing.Color.Black);
@@ -55,7 +55,7 @@ namespace UAS_MES_NEW.Special
             }
             else
             {
-                dt = (DataTable)dh.ExecuteSql("select si_sn,si_imei2 from sninfo where si_imei2 ='" + IMEI.Text + "'", "select");
+                dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_imei1 from makeserial where ms_imei2 ='" + IMEI.Text + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
                     dt = (DataTable)dh.ExecuteSql("select ms_sncode,substr(pr_detail,0,15)pr_detail from makeserial left join product on pr_code=ms_prodcode where ms_imei2='" + IMEI.Text + "'", "select");
@@ -63,7 +63,7 @@ namespace UAS_MES_NEW.Special
                     {
                         string sn = dt.Rows[0]["ms_sncode"].ToString();
                         string pr_detail = dt.Rows[0]["pr_detail"].ToString();
-                        dh.ExecuteSql("update makeserial set ms_imei='" + Reason.Text + "' where ms_imei2='" + IMEI.Text + "'", "update");
+                        dh.ExecuteSql("update makeserial set ms_imei='" + Reason.Text + "',ms_imei2='' where ms_imei2='" + IMEI.Text + "'", "update");
                         dh.ExecuteSql("update sninfo set si_imei2='' where si_imei2='" + IMEI.Text + "'", "update");
                         LogicHandler.DoCommandLog("CancelImei", User.UserCode, "", User.UserLineCode, User.UserSourceCode, sn+" "+Reason.Text, "取消成功", IMEI.Text, "");
                         OperateResult.AppendText("SN:" + sn + ",IMEI:" + IMEI.Text + ",机型:" + pr_detail + "取消成功\n", System.Drawing.Color.Black);