Ver código fonte

镝泰MES项目调整提交

caosy 5 anos atrás
pai
commit
9d8c73f1b8
25 arquivos alterados com 1333 adições e 356 exclusões
  1. 33 0
      UAS_MES_NEW/App.config
  2. 7 0
      UAS_MES_NEW/CustomControl/RichText/RichTextAutoBottom.cs
  3. 275 0
      UAS_MES_NEW/FunctionCode/Make/Make_CollectElec.Designer.cs
  4. 169 0
      UAS_MES_NEW/FunctionCode/Make/Make_CollectElec.cs
  5. 159 0
      UAS_MES_NEW/FunctionCode/Make/Make_CollectElec.resx
  6. 13 13
      UAS_MES_NEW/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs
  7. 4 4
      UAS_MES_NEW/FunctionCode/Make/Make_ColorBoxWeigh.cs
  8. 208 57
      UAS_MES_NEW/FunctionCode/Make/Make_FeedingCollection.Designer.cs
  9. 10 5
      UAS_MES_NEW/FunctionCode/Make/Make_FeedingCollection.cs
  10. 18 0
      UAS_MES_NEW/FunctionCode/Make/Make_FeedingCollection.resx
  11. 122 122
      UAS_MES_NEW/FunctionCode/Make/Make_TestCollection.Designer.cs
  12. 6 6
      UAS_MES_NEW/FunctionCode/Make/Make_TestCollection.cs
  13. 6 6
      UAS_MES_NEW/FunctionCode/Make/Make_TestCollection.resx
  14. 35 12
      UAS_MES_NEW/FunctionCode/Packing/Packing_PackageCollection.cs
  15. 69 51
      UAS_MES_NEW/FunctionCode/Query/Query_ExeProgress.Designer.cs
  16. 3 2
      UAS_MES_NEW/FunctionCode/Query/Query_ExeProgress.cs
  17. 0 27
      UAS_MES_NEW/FunctionCode/Query/Query_ExeProgress.resx
  18. 36 0
      UAS_MES_NEW/Properties/Resources.Designer.cs
  19. 12 0
      UAS_MES_NEW/Properties/Resources.resx
  20. 3 3
      UAS_MES_NEW/Properties/Settings.Designer.cs
  21. 2 2
      UAS_MES_NEW/Properties/Settings.settings
  22. 37 32
      UAS_MES_NEW/PublicMethod/Print.cs
  23. BIN
      UAS_MES_NEW/Resources/Sound/4082.wav
  24. BIN
      UAS_MES_NEW/Tool/Seagull.BarTender.Print.dll
  25. 106 14
      UAS_MES_NEW/UAS_MES_NEW.csproj

+ 33 - 0
UAS_MES_NEW/App.config

@@ -2,10 +2,12 @@
 <configuration>
   <configSections>
     <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+      <section name="UAS_MES_NEW.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
       <section name="UAS_MES.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
     </sectionGroup>
     <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
     <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+      <section name="UAS_MES_NEW.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
       <section name="UAS_MES.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
     </sectionGroup>
   </configSections>
@@ -14,6 +16,32 @@
     <supportedRuntime version="v2.0.50727" />
   </startup>
   <userSettings>
+    <UAS_MES_NEW.Properties.Settings>
+      <setting name="ProjectName" serializeAs="String">
+        <value>优软科技MES</value>
+      </setting>
+      <setting name="LastLoginUser" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="LastLoginSob" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="LastLoginResource" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="DefaultCollectionValue" serializeAs="String">
+        <value>DefaultValue</value>
+      </setting>
+      <setting name="PortName" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="BaudRate" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="FTPAddress" serializeAs="String">
+        <value>\\172.16.66.51\lable</value>
+      </setting>
+    </UAS_MES_NEW.Properties.Settings>
     <UAS_MES.Properties.Settings>
       <setting name="ProjectName" serializeAs="String">
         <value>优软科技MES</value>
@@ -42,6 +70,11 @@
     </UAS_MES.Properties.Settings>
   </userSettings>
   <applicationSettings>
+    <UAS_MES_NEW.Properties.Settings>
+      <setting name="MES" serializeAs="String">
+        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.118)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
+      </setting>
+    </UAS_MES_NEW.Properties.Settings>
     <UAS_MES.Properties.Settings>
       <setting name="MES" serializeAs="String">
         <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=UAS_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.17.158.219)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>

+ 7 - 0
UAS_MES_NEW/CustomControl/RichText/RichTextAutoBottom.cs

@@ -48,6 +48,13 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 thread.Start();
                 thread = new Thread(PlaySound);
             }
+            else if (color == Color.Blue && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\4082.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
             LogManager.DoLog(FindForm().Tag + str);
         }
 

+ 275 - 0
UAS_MES_NEW/FunctionCode/Make/Make_CollectElec.Designer.cs

@@ -0,0 +1,275 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_CollectElec
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_CollectElec));
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            this.sncode_label = 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.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
+            this.Delete = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pr_electricmax = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.pr_electricmin = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.SuspendLayout();
+            // 
+            // 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(452, 22);
+            this.pr_detail_label.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_detail_label.TabIndex = 191;
+            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(14, 422);
+            this.sncode_label.Name = "sncode_label";
+            this.sncode_label.Size = new System.Drawing.Size(58, 21);
+            this.sncode_label.TabIndex = 190;
+            this.sncode_label.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(236, 70);
+            this.mcd_remainqty_label.Name = "mcd_remainqty_label";
+            this.mcd_remainqty_label.Size = new System.Drawing.Size(90, 21);
+            this.mcd_remainqty_label.TabIndex = 187;
+            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(6, 70);
+            this.mcd_okqty_label.Name = "mcd_okqty_label";
+            this.mcd_okqty_label.Size = new System.Drawing.Size(90, 21);
+            this.mcd_okqty_label.TabIndex = 186;
+            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(236, 22);
+            this.pr_code_label.Name = "pr_code_label";
+            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_code_label.TabIndex = 185;
+            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(6, 22);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(74, 21);
+            this.ms_makecode_label.TabIndex = 184;
+            this.ms_makecode_label.Text = "工单编号";
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(456, 70);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(80, 22);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 200;
+            // 
+            // Delete
+            // 
+            this.Delete.AllPower = null;
+            this.Delete.BackColor = System.Drawing.Color.Transparent;
+            this.Delete.DownImage = ((System.Drawing.Image)(resources.GetObject("Delete.DownImage")));
+            this.Delete.Image = null;
+            this.Delete.IsShowBorder = true;
+            this.Delete.Location = new System.Drawing.Point(382, 422);
+            this.Delete.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Delete.MoveImage = ((System.Drawing.Image)(resources.GetObject("Delete.MoveImage")));
+            this.Delete.Name = "Delete";
+            this.Delete.NormalImage = ((System.Drawing.Image)(resources.GetObject("Delete.NormalImage")));
+            this.Delete.Power = null;
+            this.Delete.Size = new System.Drawing.Size(75, 28);
+            this.Delete.TabIndex = 199;
+            this.Delete.Text = "取消";
+            this.Delete.UseVisualStyleBackColor = false;
+            this.Delete.Click += new System.EventHandler(this.deleteButton1_Click);
+            // 
+            // ms_makecode
+            // 
+            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(92, 22);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
+            this.ms_makecode.TabIndex = 198;
+            // 
+            // pr_electricmax
+            // 
+            this.pr_electricmax.AutoSize = true;
+            this.pr_electricmax.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_electricmax.Location = new System.Drawing.Point(332, 70);
+            this.pr_electricmax.Name = "pr_electricmax";
+            this.pr_electricmax.Size = new System.Drawing.Size(19, 21);
+            this.pr_electricmax.TabIndex = 195;
+            this.pr_electricmax.Text = "0";
+            // 
+            // pr_electricmin
+            // 
+            this.pr_electricmin.AutoSize = true;
+            this.pr_electricmin.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_electricmin.Location = new System.Drawing.Point(102, 70);
+            this.pr_electricmin.Name = "pr_electricmin";
+            this.pr_electricmin.Size = new System.Drawing.Size(19, 21);
+            this.pr_electricmin.TabIndex = 194;
+            this.pr_electricmin.Text = "0";
+            // 
+            // ms_prodcode
+            // 
+            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(318, 22);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_prodcode.Name = "ms_prodcode";
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.ms_prodcode.TabIndex = 193;
+            // 
+            // 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(542, 22);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
+            this.pr_detail.TabIndex = 192;
+            // 
+            // 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(98, 424);
+            this.sncode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(196, 21);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 189;
+            this.sncode.Tag = "ifread";
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_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(10, 106);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(553, 306);
+            this.OperateResult.TabIndex = 188;
+            this.OperateResult.Text = "";
+            // 
+            // Make_CollectElec
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(741, 454);
+            this.Controls.Add(this.StepCount);
+            this.Controls.Add(this.Delete);
+            this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.pr_electricmax);
+            this.Controls.Add(this.pr_electricmin);
+            this.Controls.Add(this.ms_prodcode);
+            this.Controls.Add(this.pr_detail);
+            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.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(2);
+            this.Name = "Make_CollectElec";
+            this.Tag = "Make!CollectElec";
+            this.Text = "电量采集";
+            this.Activated += new System.EventHandler(this.Make_CollectNetCode_Activated);
+            this.Load += new System.EventHandler(this.Make_CollectNetCode_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_CollectNetCode_SizeChanged);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private CustomControl.ValueLabel.ValueNumLabel pr_electricmax;
+        private CustomControl.ValueLabel.ValueNumLabel pr_electricmin;
+        private CustomControl.ValueLabel.ValueLabel ms_prodcode;
+        private CustomControl.ValueLabel.ValueLabel pr_detail;
+        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 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.ValueLabel.ValueLabel ms_makecode;
+        private CustomControl.ButtonUtil.NormalButton Delete;
+        private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+    }
+}

+ 169 - 0
UAS_MES_NEW/FunctionCode/Make/Make_CollectElec.cs

@@ -0,0 +1,169 @@
+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.Make
+{
+    public partial class Make_CollectElec : Form
+    {
+        DataHelper dh;
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        LogStringBuilder sql = new LogStringBuilder();
+        DataTable dt;
+        //当前序列号记录
+        string sn_code;
+        //制造单号
+        string macode;
+        //采集网标号
+        float net_code;
+        //网标查询条件ms_id
+        string oMsID;
+        //判断是否输入网标
+        Boolean isnetcode = false;
+        //打印计数
+        int printcount = 0;
+        int ma_unlimitin;
+
+        public Make_CollectElec()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_CollectNetCode_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            sncode.Focus();
+            dh = SystemInf.dh;
+            StepCount.StepCode = User.CurrentStepCode;
+            StepCount.Source = User.UserSourceCode;
+            StepCount.LineCode = User.UserLineCode;
+            StepCount.Dh = dh;
+            StepCount.Start();
+        }
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                string ErrorMessage2;
+                string oMakeCode;
+                //采集序列号
+                if (!isnetcode)
+                {
+                    if (sncode.Text == "")
+                    {
+                        OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
+                        return;
+                    }
+                    if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage2))
+                    {
+                        //判断界面工单是否为空时的序列号是否自动归属工单
+                        string oStatus = "";
+                        if (!LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out oStatus, out ErrorMessage2))
+                        {
+                            if (ms_makecode.Text == "")
+                            {
+                                OperateResult.AppendText(">>" + ErrorMessage2 + "\n", Color.Red, sncode);
+                                return;
+                            }
+                        }
+                        OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
+                        // 获取工单归属工单下一工序是否正确
+                        if (LogicHandler.CheckStepSNAndMacode(ms_makecode.Text == "" ? oMakeCode : ms_makecode.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage2))
+                        {
+                            sql.Clear();
+                            sql.Append("select ms_makecode,ms_prodcode,pr_detail,nvl(pr_electricmax,0)pr_electricmax,nvl(pr_electricmin,0)pr_electricmin from makeserial left join product on ");
+                            sql.Append(" ms_prodcode = pr_code where ms_id  = '"+oMsID+"'");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            BaseUtil.SetFormValue(this.Controls, dt);
+                            OperateResult.AppendText(">>请输入电量\n", Color.Black);
+                            sn_code = sncode.Text;
+                            sncode.Text = "";
+                            isnetcode = true;
+                            return;
+                        }
+                        else OperateResult.AppendText(">>" + ErrorMessage2 + "\n", Color.Red, sncode);
+                    }
+                    else OperateResult.AppendText(">>" + ErrorMessage2 + "\n", Color.Red, sncode);
+                }
+                //采集netcode
+                else
+                {
+                    if (sncode.Text == "")
+                    {
+                        OperateResult.AppendText(">>电量信息不能为空\n", Color.Red);
+                        return;
+                    }
+                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
+                    string ErrorMessage = "";
+
+                    try
+                    {
+                        net_code =  float.Parse(sncode.Text);
+                        if (!(net_code <= float.Parse(pr_electricmax.Text) && (net_code >= float.Parse(pr_electricmin.Text))))
+                        {
+                            sncode.Text = "";
+                            OperateResult.AppendText("<<输入值" + sncode.Text + "不符合维护范围,重新输入\n", Color.Red);
+                            return;
+                        }
+                    }
+                    catch (Exception ex)
+                    {
+                        sncode.Text = "";
+                        OperateResult.AppendText("<<输入值" + sncode.Text + "错误,重新输入\n", Color.Red);
+                        return;
+                    }
+
+                        if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code, "电量采集", "电量采集完成", User.UserCode, out ErrorMessage))
+                        {
+                            //提示正确返回时传递的信息
+                            if (ErrorMessage.Contains("AFTERSUCCESS"))
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                            dh.BatchInsert("update  makeserial set MS_ELEC = :netcode where ms_id = :oMsId", new String[] { "netcode", "oMsId" }, new string[] { sncode.Text }, new string[] { oMsID.ToString() });
+                            OperateResult.AppendText(">>电量信息采集完成\n", Color.Green);
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "电量采集", "采集成功", sn_code, "");                        
+                            isnetcode = false;
+                            sncode.Text = "";
+                            sncode.Focus();
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(">>更新错误" + ErrorMessage + "\n", Color.Red);
+                        }
+                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                    
+                }
+            }
+        }
+
+        private void Make_CollectNetCode_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void Make_CollectNetCode_Activated(object sender, EventArgs e)
+        {
+            sncode.Focus();
+        }
+
+
+        private void deleteButton1_Click(object sender, EventArgs e)
+        {
+            if (isnetcode)
+            {
+                BaseUtil.CleanForm(this);
+                OperateResult.AppendText(">>清除完成,清重新输入SN号\n", Color.Green);
+                isnetcode = false;
+                sncode.Focus();
+            }
+        }
+    }
+}

+ 159 - 0
UAS_MES_NEW/FunctionCode/Make/Make_CollectElec.resx

@@ -0,0 +1,159 @@
+<?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="Delete.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="Delete.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="Delete.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>

+ 13 - 13
UAS_MES_NEW/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs

@@ -79,7 +79,7 @@
             this.StartWeight = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.Confirm = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ma_qty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pr_spec = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ma_salecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.normalButton1 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
@@ -176,7 +176,7 @@
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
             this.pr_detail_label.TabIndex = 53;
-            this.pr_detail_label.Text = "产品型号";
+            this.pr_detail_label.Text = "产品规格";
             // 
             // ma_qty_label
             // 
@@ -652,16 +652,16 @@
             this.ma_qty.Size = new System.Drawing.Size(0, 27);
             this.ma_qty.TabIndex = 76;
             // 
-            // pr_detail
+            // pr_spec
             // 
-            this.pr_detail.AutoSize = true;
-            this.pr_detail.CutLength = null;
-            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(128, 402);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 27);
-            this.pr_detail.TabIndex = 75;
+            this.pr_spec.AutoSize = true;
+            this.pr_spec.CutLength = null;
+            this.pr_spec.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_spec.Location = new System.Drawing.Point(128, 402);
+            this.pr_spec.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.Size = new System.Drawing.Size(0, 27);
+            this.pr_spec.TabIndex = 75;
             // 
             // ma_salecode
             // 
@@ -804,7 +804,7 @@
             this.Controls.Add(this.StartWeight);
             this.Controls.Add(this.Confirm);
             this.Controls.Add(this.ma_qty);
-            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.pr_spec);
             this.Controls.Add(this.ma_salecode);
             this.Controls.Add(this.ms_makecode_label);
             this.Controls.Add(this.Clean);
@@ -850,7 +850,7 @@
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private System.Windows.Forms.Label ms_makecode_label;
         private CustomControl.ValueLabel.ValueLabel ma_salecode;
-        private CustomControl.ValueLabel.ValueLabel pr_detail;
+        private CustomControl.ValueLabel.ValueLabel pr_spec;
         private CustomControl.ValueLabel.ValueLabel ma_qty;
         private CustomControl.ValueLabel.ValueLabel pr_code;
         private CustomControl.ValueLabel.ValueLabel pr_colorboxgw;

+ 4 - 4
UAS_MES_NEW/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -69,9 +69,9 @@ namespace UAS_MES_NEW.Make
             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.SelectField = "ma_code # 工单号,pr_code # 产品编号,pr_spec # 产品规格";
             ma_code.FormName = Name;
-            ma_code.SetValueField = new string[] { "ma_code", "pr_code", "pr_detail" };
+            ma_code.SetValueField = new string[] { "ma_code", "pr_code", "pr_spec" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
             StartWeight.PerformClick();
@@ -89,7 +89,7 @@ namespace UAS_MES_NEW.Make
             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("select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode as pr_code ,pr_spec,");
             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");
@@ -129,7 +129,7 @@ namespace UAS_MES_NEW.Make
                       //    return;
                       //}
                     sql.Clear();
-                    sql.Append("select ms_makecode ma_code,ma_qty,ma_salecode,pr_detail,pr_colorboxunit,pr_code,pr_colorboxgw,");
+                    sql.Append("select ms_makecode ma_code,ma_qty,ma_salecode,pr_spec,pr_colorboxunit,pr_code,pr_colorboxgw,");
                     sql.Append("pr_colorboxunit,pr_colorboxmaxw,pr_colorboxminw,nvl(PR_CHECKCOLORBOXW,'0') PR_CHECKCOLORBOXW,nvl(pr_sendchecktype,'LineCode')");
                     sql.Append("pr_sendchecktype from makeserial left join make on ms_makecode=ma_code left join product on ");
                     sql.Append("ms_prodcode=pr_code where ms_sncode='" + sncode.Text + "' order by ms_id desc");

+ 208 - 57
UAS_MES_NEW/FunctionCode/Make/Make_FeedingCollection.Designer.cs

@@ -47,6 +47,16 @@
             this.ma_bomversion = new System.Windows.Forms.Label();
             this.ma_bomversion_label = new System.Windows.Forms.Label();
             this.ma_craftcode = new System.Windows.Forms.Label();
+            this.sir_remark_label = new System.Windows.Forms.CheckBox();
+            this.NoteForChange = new System.Windows.Forms.CheckBox();
+            this.LabelDataGridView = new System.Windows.Forms.DataGridView();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sir_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
@@ -62,10 +72,14 @@
             this.Confirm = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.sir_remark_label = new System.Windows.Forms.CheckBox();
-            this.sir_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.NoteForChange = new System.Windows.Forms.CheckBox();
+            this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail_ = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
             // 
             // mcd_restqty_label
@@ -116,7 +130,7 @@
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 50;
-            this.pr_detail_label.Text = "产品名称";
+            this.pr_detail_label.Text = "产品规格";
             // 
             // ma_prodcode_label
             // 
@@ -134,7 +148,7 @@
             this.Loading.Checked = true;
             this.Loading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Loading.ForeColor = System.Drawing.Color.Blue;
-            this.Loading.Location = new System.Drawing.Point(18, 402);
+            this.Loading.Location = new System.Drawing.Point(18, 360);
             this.Loading.Name = "Loading";
             this.Loading.Size = new System.Drawing.Size(60, 25);
             this.Loading.TabIndex = 62;
@@ -147,7 +161,7 @@
             this.UnLoading.AutoSize = true;
             this.UnLoading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.UnLoading.ForeColor = System.Drawing.Color.Blue;
-            this.UnLoading.Location = new System.Drawing.Point(98, 402);
+            this.UnLoading.Location = new System.Drawing.Point(98, 360);
             this.UnLoading.Name = "UnLoading";
             this.UnLoading.Size = new System.Drawing.Size(60, 25);
             this.UnLoading.TabIndex = 63;
@@ -158,7 +172,7 @@
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(14, 440);
+            this.sn_code_label.Location = new System.Drawing.Point(14, 398);
             this.sn_code_label.Name = "sn_code_label";
             this.sn_code_label.Size = new System.Drawing.Size(58, 21);
             this.sn_code_label.TabIndex = 64;
@@ -168,7 +182,7 @@
             // 
             this.code_label.AutoSize = true;
             this.code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.code_label.Location = new System.Drawing.Point(14, 484);
+            this.code_label.Location = new System.Drawing.Point(14, 442);
             this.code_label.Name = "code_label";
             this.code_label.Size = new System.Drawing.Size(58, 21);
             this.code_label.TabIndex = 66;
@@ -179,7 +193,7 @@
             this.iflastsn.AutoSize = true;
             this.iflastsn.Enabled = false;
             this.iflastsn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.iflastsn.Location = new System.Drawing.Point(289, 440);
+            this.iflastsn.Location = new System.Drawing.Point(289, 398);
             this.iflastsn.Name = "iflastsn";
             this.iflastsn.Size = new System.Drawing.Size(115, 25);
             this.iflastsn.TabIndex = 72;
@@ -216,7 +230,7 @@
             // 
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.ClearSn_code.Location = new System.Drawing.Point(263, 443);
+            this.ClearSn_code.Location = new System.Drawing.Point(263, 401);
             this.ClearSn_code.Name = "ClearSn_code";
             this.ClearSn_code.Size = new System.Drawing.Size(16, 16);
             this.ClearSn_code.TabIndex = 138;
@@ -262,11 +276,125 @@
             this.ma_craftcode.TabIndex = 145;
             this.ma_craftcode.Visible = false;
             // 
+            // sir_remark_label
+            // 
+            this.sir_remark_label.AutoSize = true;
+            this.sir_remark_label.Checked = true;
+            this.sir_remark_label.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.sir_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sir_remark_label.Location = new System.Drawing.Point(680, 232);
+            this.sir_remark_label.Name = "sir_remark_label";
+            this.sir_remark_label.Size = new System.Drawing.Size(93, 25);
+            this.sir_remark_label.TabIndex = 190;
+            this.sir_remark_label.Text = "备注信息";
+            this.sir_remark_label.UseVisualStyleBackColor = true;
+            // 
+            // NoteForChange
+            // 
+            this.NoteForChange.AutoSize = true;
+            this.NoteForChange.Checked = true;
+            this.NoteForChange.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.NoteForChange.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.NoteForChange.Location = new System.Drawing.Point(11, 39);
+            this.NoteForChange.Margin = new System.Windows.Forms.Padding(2);
+            this.NoteForChange.Name = "NoteForChange";
+            this.NoteForChange.Size = new System.Drawing.Size(99, 21);
+            this.NoteForChange.TabIndex = 192;
+            this.NoteForChange.Text = "切换工单提示";
+            this.NoteForChange.UseVisualStyleBackColor = true;
+            // 
+            // LabelDataGridView
+            // 
+            this.LabelDataGridView.AllowUserToAddRows = false;
+            this.LabelDataGridView.AllowUserToResizeRows = false;
+            this.LabelDataGridView.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
+            this.LabelDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.序号,
+            this.cm_makecode,
+            this.pr_detail_,
+            this.cm_soncode,
+            this.cm_barcode,
+            this.BarCode});
+            this.LabelDataGridView.Location = new System.Drawing.Point(18, 108);
+            this.LabelDataGridView.Name = "LabelDataGridView";
+            this.LabelDataGridView.RowHeadersVisible = false;
+            this.LabelDataGridView.RowTemplate.Height = 23;
+            this.LabelDataGridView.Size = new System.Drawing.Size(641, 227);
+            this.LabelDataGridView.TabIndex = 193;
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn1.HeaderText = "上料料号";
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.ReadOnly = true;
+            this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn1.Width = 50;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "pr_detail";
+            this.dataGridViewTextBoxColumn2.HeaderText = "上料名称";
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "cm_soncode";
+            this.dataGridViewTextBoxColumn3.HeaderText = "前缀";
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.ReadOnly = true;
+            this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn3.Width = 130;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "cm_barcode";
+            this.dataGridViewTextBoxColumn4.HeaderText = "长度";
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.ReadOnly = true;
+            this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn4.Width = 80;
+            // 
+            // dataGridViewTextBoxColumn5
+            // 
+            this.dataGridViewTextBoxColumn5.DataPropertyName = "sp_length";
+            this.dataGridViewTextBoxColumn5.HeaderText = "条码号";
+            this.dataGridViewTextBoxColumn5.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.ReadOnly = true;
+            this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn5.Width = 300;
+            // 
+            // dataGridViewTextBoxColumn6
+            // 
+            this.dataGridViewTextBoxColumn6.HeaderText = "条码号";
+            this.dataGridViewTextBoxColumn6.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn6.Width = 300;
+            // 
+            // sir_remark
+            // 
+            this.sir_remark.AllPower = null;
+            this.sir_remark.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.sir_remark.BackColor = System.Drawing.Color.White;
+            this.sir_remark.ID = null;
+            this.sir_remark.Location = new System.Drawing.Point(680, 267);
+            this.sir_remark.Multiline = true;
+            this.sir_remark.Name = "sir_remark";
+            this.sir_remark.Power = null;
+            this.sir_remark.Size = new System.Drawing.Size(198, 68);
+            this.sir_remark.Str = null;
+            this.sir_remark.Str1 = null;
+            this.sir_remark.Str2 = null;
+            this.sir_remark.TabIndex = 191;
+            // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(680, 357);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Location = new System.Drawing.Point(460, 344);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2);
             this.StepCount.Name = "StepCount";
             this.StepCount.Size = new System.Drawing.Size(80, 22);
             this.StepCount.Source = null;
@@ -366,9 +494,9 @@
             // 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(13, 98);
+            this.OperateResult.Location = new System.Drawing.Point(545, 344);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(643, 290);
+            this.OperateResult.Size = new System.Drawing.Size(350, 121);
             this.OperateResult.TabIndex = 94;
             this.OperateResult.Text = "";
             // 
@@ -379,7 +507,7 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(592, 403);
+            this.Clean.Location = new System.Drawing.Point(460, 439);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -429,7 +557,7 @@
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(289, 482);
+            this.Confirm.Location = new System.Drawing.Point(289, 440);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
@@ -446,7 +574,7 @@
             this.code.AllPower = "ifall";
             this.code.BackColor = System.Drawing.Color.White;
             this.code.ID = null;
-            this.code.Location = new System.Drawing.Point(98, 484);
+            this.code.Location = new System.Drawing.Point(98, 442);
             this.code.Name = "code";
             this.code.Power = null;
             this.code.Size = new System.Drawing.Size(160, 21);
@@ -463,7 +591,7 @@
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.Enabled = false;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(98, 440);
+            this.sn_code.Location = new System.Drawing.Point(98, 398);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
             this.sn_code.Size = new System.Drawing.Size(160, 21);
@@ -472,55 +600,64 @@
             this.sn_code.Str2 = null;
             this.sn_code.TabIndex = 65;
             // 
-            // sir_remark_label
+            // 序号
             // 
-            this.sir_remark_label.AutoSize = true;
-            this.sir_remark_label.Checked = true;
-            this.sir_remark_label.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.sir_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sir_remark_label.Location = new System.Drawing.Point(680, 232);
-            this.sir_remark_label.Name = "sir_remark_label";
-            this.sir_remark_label.Size = new System.Drawing.Size(93, 25);
-            this.sir_remark_label.TabIndex = 190;
-            this.sir_remark_label.Text = "备注信息";
-            this.sir_remark_label.UseVisualStyleBackColor = true;
+            this.序号.DataPropertyName = "sp_detno";
+            this.序号.HeaderText = "序号";
+            this.序号.Name = "序号";
+            this.序号.ReadOnly = true;
+            this.序号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.序号.Width = 50;
             // 
-            // sir_remark
+            // cm_makecode
             // 
-            this.sir_remark.AllPower = null;
-            this.sir_remark.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.sir_remark.BackColor = System.Drawing.Color.White;
-            this.sir_remark.ID = null;
-            this.sir_remark.Location = new System.Drawing.Point(680, 267);
-            this.sir_remark.Multiline = true;
-            this.sir_remark.Name = "sir_remark";
-            this.sir_remark.Power = null;
-            this.sir_remark.Size = new System.Drawing.Size(198, 68);
-            this.sir_remark.Str = null;
-            this.sir_remark.Str1 = null;
-            this.sir_remark.Str2 = null;
-            this.sir_remark.TabIndex = 191;
+            this.cm_makecode.DataPropertyName = "sp_fsoncode";
+            this.cm_makecode.HeaderText = "上料料号";
+            this.cm_makecode.Name = "cm_makecode";
+            this.cm_makecode.ReadOnly = true;
+            this.cm_makecode.Width = 80;
             // 
-            // NoteForChange
+            // pr_detail_
             // 
-            this.NoteForChange.AutoSize = true;
-            this.NoteForChange.Checked = true;
-            this.NoteForChange.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.NoteForChange.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.NoteForChange.Location = new System.Drawing.Point(11, 39);
-            this.NoteForChange.Margin = new System.Windows.Forms.Padding(2);
-            this.NoteForChange.Name = "NoteForChange";
-            this.NoteForChange.Size = new System.Drawing.Size(99, 21);
-            this.NoteForChange.TabIndex = 192;
-            this.NoteForChange.Text = "切换工单提示";
-            this.NoteForChange.UseVisualStyleBackColor = true;
+            this.pr_detail_.DataPropertyName = "pr_detail";
+            this.pr_detail_.HeaderText = "上料名称";
+            this.pr_detail_.Name = "pr_detail_";
+            this.pr_detail_.ReadOnly = true;
+            this.pr_detail_.Width = 130;
+            // 
+            // cm_soncode
+            // 
+            this.cm_soncode.DataPropertyName = "sp_prefix";
+            this.cm_soncode.HeaderText = "前缀";
+            this.cm_soncode.Name = "cm_soncode";
+            this.cm_soncode.ReadOnly = true;
+            this.cm_soncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.cm_soncode.Width = 60;
+            // 
+            // cm_barcode
+            // 
+            this.cm_barcode.DataPropertyName = "sp_length";
+            this.cm_barcode.HeaderText = "长度";
+            this.cm_barcode.Name = "cm_barcode";
+            this.cm_barcode.ReadOnly = true;
+            this.cm_barcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.cm_barcode.Width = 60;
+            // 
+            // BarCode
+            // 
+            this.BarCode.HeaderText = "条码号";
+            this.BarCode.MinimumWidth = 300;
+            this.BarCode.Name = "BarCode";
+            this.BarCode.ReadOnly = true;
+            this.BarCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.BarCode.Width = 300;
             // 
             // Make_FeedingCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(898, 520);
+            this.ClientSize = new System.Drawing.Size(898, 487);
+            this.Controls.Add(this.LabelDataGridView);
             this.Controls.Add(this.NoteForChange);
             this.Controls.Add(this.sir_remark);
             this.Controls.Add(this.sir_remark_label);
@@ -564,6 +701,7 @@
             this.Load += new System.EventHandler(this.Make_FeedingCollection_Load);
             this.SizeChanged += new System.EventHandler(this.Make_FeedingCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -606,5 +744,18 @@
         private System.Windows.Forms.CheckBox sir_remark_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox sir_remark;
         private System.Windows.Forms.CheckBox NoteForChange;
+        private System.Windows.Forms.DataGridView LabelDataGridView;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 序号;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_makecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail_;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_soncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_barcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn BarCode;
     }
 }

+ 10 - 5
UAS_MES_NEW/FunctionCode/Make/Make_FeedingCollection.cs

@@ -70,10 +70,10 @@ namespace UAS_MES_NEW.Make
             ma_code.SetLockCheckBox(LockMakeCode);
             //工单号放大镜配置
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
-            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,ma_craftcode # 途程编号,pr_detail # 产品名称,ma_bomversion # Bom版本,ma_softversion # 软件版本,ma_ecncode # ECN号";
+            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,ma_craftcode # 途程编号,pr_spec # 产品名称,ma_bomversion # Bom版本,ma_softversion # 软件版本,ma_ecncode # ECN号";
             ma_code.FormName = Name;
             ma_code.DBTitle = "工单查询";
-            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_detail", "ma_craftcode", "ma_bomversion", "ma_softversion", "ma_ecncode" };
+            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_spec", "ma_craftcode", "ma_bomversion", "ma_softversion", "ma_ecncode" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DBChange;
             code.Focus();
@@ -129,11 +129,13 @@ namespace UAS_MES_NEW.Make
                         if (code.Text != "" && ma_code.Text != "" && sn_code.Text == "")
                         {
                             GetCollectItem();
+                            BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt1);
                         }
                         //输入框有值但未选择工单号
                         else if (code.Text != "" && ma_code.Text == "" && sn_code.Text == "")
                         {
                             GetCollectItem();
+                            BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt1);
                         }
                         else if (sn_code.Text != "")
                         {
@@ -263,7 +265,7 @@ namespace UAS_MES_NEW.Make
                 //将录入框的值给序列号
                 sn_code.Text = code.Text;
                 sql.Clear();
-                sql.Append("select ma_prodcode,ma_ecncode,ma_softversion,ms_firstsn,ma_bomversion,ma_qty,ma_code,pr_detail,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
+                sql.Append("select ma_prodcode,ma_ecncode,ma_softversion,ms_firstsn,ma_bomversion,ma_qty,ma_code,pr_spec,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
                 sql.Append(",ms_prodcode,ms_makecode,ms_code,ms_stepname  from makeserial left join make on ma_code=ms_makecode ");
                 sql.Append("left join product on ms_prodcode=pr_code where ms_sncode='" + code.Text + "' order by ms_id desc");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -339,7 +341,7 @@ namespace UAS_MES_NEW.Make
                         ms_status = dt.Rows[0]["ms_status"].ToString();
                         sn_code.Text = code.Text;
                         sql.Clear();
-                        sql.Append("select ma_code,ma_softversion,ma_ecncode,ma_prodcode,pr_detail,ma_qty from makeserial left join product ");
+                        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 on mcd_macode=ms_makecode where ms_id='" + oMsid + "'");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -418,7 +420,7 @@ namespace UAS_MES_NEW.Make
         {
             CollectDataSonCode.Add(sp_soncode);
             //采集成功提示
-            RemainIndex = RemainIndex + 1;
+         
             CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
             if (!CheckBarcode.ContainsKey(sp_fsoncode))
             {
@@ -426,9 +428,11 @@ namespace UAS_MES_NEW.Make
             }
             SPID.Add(sp_id);
             OperateResult.AppendText(">>物料" + sp_soncode + "采集成功,条码" + code.Text + "\n", Color.Green);
+            LabelDataGridView.Rows[RemainIndex].Cells["BarCode"].Value = code.Text;
             if (code.Text.Length > 80)
                 OperateResult.AppendText(">>采集条码" + code.Text + "程度超过长度限制80,内容截取前80位进行采集\n", Color.Red);
             code.Clear();
+            RemainIndex = RemainIndex + 1;
             //如果+1后不小于B序列的长度,则已采集完成,不需要进行提示了
             if (RemainIndex < RemainList.Length)
             {
@@ -508,6 +512,7 @@ namespace UAS_MES_NEW.Make
             if (dt1 != null)
                 BaseUtil.CleanDataTableData(dt1);
             RemainIndex = 0;
+            BaseUtil.CleanDGVData(LabelDataGridView);
             OperateResult.AppendText(">>请采集序列号\n", Color.Black);
         }
 

+ 18 - 0
UAS_MES_NEW/FunctionCode/Make/Make_FeedingCollection.resx

@@ -117,6 +117,24 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_detail_.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_soncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="BarCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 122 - 122
UAS_MES_NEW/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -59,16 +59,10 @@
             this.mcd_inqty_label = new System.Windows.Forms.Label();
             this.mc_restqty_label = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
-            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.label7 = new System.Windows.Forms.Label();
             this.ob_checkno = new System.Windows.Forms.Label();
-            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
-            this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
-            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.ma_softversion_label = new System.Windows.Forms.Label();
             this.BadInfSource = new System.Windows.Forms.BindingSource(this.components);
@@ -77,13 +71,20 @@
             this.Lock_label = new System.Windows.Forms.Label();
             this.ma_salecode = new System.Windows.Forms.Label();
             this.pr_sendchecktype = new System.Windows.Forms.Label();
+            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.Filter = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.ma_softversion = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.Save = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.bc_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
-            this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pr_spec = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ma_qty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ma_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
@@ -93,7 +94,6 @@
             this.bc_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.bc_groupcode = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.ms_sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
-            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
             this.SuspendLayout();
@@ -303,7 +303,7 @@
             this.AutoBadCode.AutoSize = true;
             this.AutoBadCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoBadCode.Location = new System.Drawing.Point(720, 151);
-            this.AutoBadCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.AutoBadCode.Margin = new System.Windows.Forms.Padding(2);
             this.AutoBadCode.Name = "AutoBadCode";
             this.AutoBadCode.Size = new System.Drawing.Size(123, 21);
             this.AutoBadCode.TabIndex = 69;
@@ -377,24 +377,11 @@
             this.panel1.Controls.Add(this.mcd_inqty);
             this.panel1.Controls.Add(this.mcd_inqty_label);
             this.panel1.Location = new System.Drawing.Point(537, 14);
-            this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panel1.Margin = new System.Windows.Forms.Padding(2);
             this.panel1.Name = "panel1";
             this.panel1.Size = new System.Drawing.Size(315, 127);
             this.panel1.TabIndex = 71;
             // 
-            // ob_sendqty
-            // 
-            this.ob_sendqty.AutoSize = true;
-            this.ob_sendqty.CutLength = null;
-            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_sendqty.Location = new System.Drawing.Point(109, 91);
-            this.ob_sendqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_sendqty.Name = "ob_sendqty";
-            this.ob_sendqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_sendqty.TabIndex = 78;
-            this.ob_sendqty.Tag = "ob_batchqty";
-            // 
             // label7
             // 
             this.label7.AutoSize = true;
@@ -419,39 +406,6 @@
             this.ob_checkno.Visible = false;
             this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
             // 
-            // SendCheck
-            // 
-            this.SendCheck.AllPower = null;
-            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
-            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
-            this.SendCheck.Enabled = false;
-            this.SendCheck.Image = null;
-            this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(229, 90);
-            this.SendCheck.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
-            this.SendCheck.Name = "SendCheck";
-            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
-            this.SendCheck.Power = null;
-            this.SendCheck.Size = new System.Drawing.Size(65, 26);
-            this.SendCheck.TabIndex = 72;
-            this.SendCheck.Text = "送检";
-            this.SendCheck.UseVisualStyleBackColor = false;
-            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
-            // 
-            // ob_batchqty
-            // 
-            this.ob_batchqty.AutoSize = true;
-            this.ob_batchqty.CutLength = null;
-            this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_batchqty.Location = new System.Drawing.Point(109, 51);
-            this.ob_batchqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_batchqty.Name = "ob_batchqty";
-            this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_batchqty.TabIndex = 75;
-            this.ob_batchqty.Tag = "ob_batchqty";
-            // 
             // ob_batchqty_label
             // 
             this.ob_batchqty_label.AutoSize = true;
@@ -463,19 +417,6 @@
             this.ob_batchqty_label.TabIndex = 74;
             this.ob_batchqty_label.Text = "抽检批数";
             // 
-            // ob_nowcheckqty
-            // 
-            this.ob_nowcheckqty.AutoSize = true;
-            this.ob_nowcheckqty.CutLength = null;
-            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(248, 51);
-            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_nowcheckqty.TabIndex = 73;
-            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
-            // 
             // ob_nowcheckqty_label
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
@@ -487,30 +428,6 @@
             this.ob_nowcheckqty_label.TabIndex = 72;
             this.ob_nowcheckqty_label.Text = "当前批数";
             // 
-            // mcd_remainqty
-            // 
-            this.mcd_remainqty.AutoSize = true;
-            this.mcd_remainqty.CutLength = null;
-            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(109, 12);
-            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
-            this.mcd_remainqty.TabIndex = 57;
-            this.mcd_remainqty.Tag = "mcd_remainqty";
-            // 
-            // mcd_inqty
-            // 
-            this.mcd_inqty.AutoSize = true;
-            this.mcd_inqty.CutLength = null;
-            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(248, 12);
-            this.mcd_inqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
-            this.mcd_inqty.TabIndex = 54;
-            this.mcd_inqty.Tag = "mcd_inqty";
-            // 
             // pr_detail_label
             // 
             this.pr_detail_label.AutoSize = true;
@@ -519,7 +436,7 @@
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 6;
-            this.pr_detail_label.Text = "产品名称";
+            this.pr_detail_label.Text = "产品规格";
             // 
             // ma_softversion_label
             // 
@@ -538,7 +455,7 @@
             this.NoteForChange.CheckState = System.Windows.Forms.CheckState.Checked;
             this.NoteForChange.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.NoteForChange.Location = new System.Drawing.Point(290, 112);
-            this.NoteForChange.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.NoteForChange.Margin = new System.Windows.Forms.Padding(2);
             this.NoteForChange.Name = "NoteForChange";
             this.NoteForChange.Size = new System.Drawing.Size(99, 21);
             this.NoteForChange.TabIndex = 75;
@@ -575,12 +492,23 @@
             this.pr_sendchecktype.TabIndex = 79;
             this.pr_sendchecktype.Visible = false;
             // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(291, 146);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 7, 4, 7);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(64, 22);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 194;
+            // 
             // Filter
             // 
             this.Filter.BackColor = System.Drawing.Color.Transparent;
             this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
             this.Filter.Location = new System.Drawing.Point(93, 257);
-            this.Filter.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Filter.Margin = new System.Windows.Forms.Padding(2);
             this.Filter.Name = "Filter";
             this.Filter.PlaceHolder = "不良名称搜索";
             this.Filter.Size = new System.Drawing.Size(176, 22);
@@ -598,6 +526,89 @@
             this.ma_softversion.Size = new System.Drawing.Size(0, 21);
             this.ma_softversion.TabIndex = 73;
             // 
+            // ob_sendqty
+            // 
+            this.ob_sendqty.AutoSize = true;
+            this.ob_sendqty.CutLength = null;
+            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_sendqty.Location = new System.Drawing.Point(109, 91);
+            this.ob_sendqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_sendqty.Name = "ob_sendqty";
+            this.ob_sendqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_sendqty.TabIndex = 78;
+            this.ob_sendqty.Tag = "ob_batchqty";
+            // 
+            // SendCheck
+            // 
+            this.SendCheck.AllPower = null;
+            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
+            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
+            this.SendCheck.Enabled = false;
+            this.SendCheck.Image = null;
+            this.SendCheck.IsShowBorder = true;
+            this.SendCheck.Location = new System.Drawing.Point(229, 90);
+            this.SendCheck.Margin = new System.Windows.Forms.Padding(2);
+            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
+            this.SendCheck.Name = "SendCheck";
+            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
+            this.SendCheck.Power = null;
+            this.SendCheck.Size = new System.Drawing.Size(65, 26);
+            this.SendCheck.TabIndex = 72;
+            this.SendCheck.Text = "送检";
+            this.SendCheck.UseVisualStyleBackColor = false;
+            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
+            // 
+            // ob_batchqty
+            // 
+            this.ob_batchqty.AutoSize = true;
+            this.ob_batchqty.CutLength = null;
+            this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_batchqty.Location = new System.Drawing.Point(109, 51);
+            this.ob_batchqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_batchqty.Name = "ob_batchqty";
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_batchqty.TabIndex = 75;
+            this.ob_batchqty.Tag = "ob_batchqty";
+            // 
+            // ob_nowcheckqty
+            // 
+            this.ob_nowcheckqty.AutoSize = true;
+            this.ob_nowcheckqty.CutLength = null;
+            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(248, 51);
+            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_nowcheckqty.TabIndex = 73;
+            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
+            // 
+            // mcd_remainqty
+            // 
+            this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.CutLength = null;
+            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(109, 12);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
+            this.mcd_remainqty.TabIndex = 57;
+            this.mcd_remainqty.Tag = "mcd_remainqty";
+            // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.CutLength = null;
+            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty.Location = new System.Drawing.Point(248, 12);
+            this.mcd_inqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
+            this.mcd_inqty.TabIndex = 54;
+            this.mcd_inqty.Tag = "mcd_inqty";
+            // 
             // Save
             // 
             this.Save.AllPower = null;
@@ -606,7 +617,7 @@
             this.Save.Image = null;
             this.Save.IsShowBorder = true;
             this.Save.Location = new System.Drawing.Point(477, 497);
-            this.Save.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Save.Margin = new System.Windows.Forms.Padding(2);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
@@ -659,23 +670,23 @@
             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(224, 15);
-            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(2);
             this.LockMakeCode.Name = "LockMakeCode";
             this.LockMakeCode.Size = new System.Drawing.Size(51, 21);
             this.LockMakeCode.TabIndex = 66;
             this.LockMakeCode.Text = "锁定";
             this.LockMakeCode.UseVisualStyleBackColor = true;
             // 
-            // pr_detail
+            // pr_spec
             // 
-            this.pr_detail.AutoSize = true;
-            this.pr_detail.CutLength = "qweqwe";
-            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(380, 64);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 21);
-            this.pr_detail.TabIndex = 56;
+            this.pr_spec.AutoSize = true;
+            this.pr_spec.CutLength = "qweqwe";
+            this.pr_spec.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_spec.Location = new System.Drawing.Point(380, 64);
+            this.pr_spec.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.Size = new System.Drawing.Size(0, 21);
+            this.pr_spec.TabIndex = 56;
             // 
             // ma_qty
             // 
@@ -789,17 +800,6 @@
             this.ms_sncode.Tag = "IfRead";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown);
             // 
-            // StepCount
-            // 
-            this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(291, 146);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 7, 4, 7);
-            this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(64, 22);
-            this.StepCount.Source = null;
-            this.StepCount.StepCode = null;
-            this.StepCount.TabIndex = 194;
-            // 
             // Make_TestCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -821,7 +821,7 @@
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.label2);
-            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.pr_spec);
             this.Controls.Add(this.ma_qty);
             this.Controls.Add(this.ma_prodcode);
             this.Controls.Add(this.OperateResult);
@@ -855,10 +855,10 @@
             this.Load += new System.EventHandler(this.TestCollection_Load);
             this.SizeChanged += new System.EventHandler(this.测试采集_SizeChanged);
             this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Make_TestCollection_KeyDown);
-            this.panel1.ResumeLayout(true);
+            this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -895,7 +895,7 @@
         private CustomControl.ValueLabel.ValueLabel ma_prodcode;
         private CustomControl.ValueLabel.ValueLabel mcd_inqty;
         private CustomControl.ValueLabel.ValueLabel ma_qty;
-        private CustomControl.ValueLabel.ValueLabel pr_detail;
+        private CustomControl.ValueLabel.ValueLabel pr_spec;
         private CustomControl.ValueLabel.ValueLabel mcd_remainqty;
         private System.Windows.Forms.ColumnHeader columnHeader3;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;

+ 6 - 6
UAS_MES_NEW/FunctionCode/Make/Make_TestCollection.cs

@@ -66,9 +66,9 @@ namespace UAS_MES_NEW.Make
 
             //工单号放大镜配置
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
-            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_detail # 产品名称,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式";
+            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_spec # 产品规格,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式";
             ma_code.FormName = Name;
-            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_detail", "ma_softversion", "ma_salecode", "nvl(pr_sendchecktype,'LineCode')pr_sendchecktype" };
+            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_spec", "ma_softversion", "ma_salecode", "nvl(pr_sendchecktype,'LineCode')pr_sendchecktype" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
             dh = SystemInf.dh;
@@ -199,7 +199,7 @@ namespace UAS_MES_NEW.Make
                         }
                         if (ma_code.Text != oMakeCode && oMakeCode != null)
                         {
-                            dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,ma_softversion,ma_salecode,pr_detail,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,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,ma_softversion,ma_salecode,pr_spec,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
                             if (dt.Rows.Count > 0)
                             {
                                 BaseUtil.SetFormValue(this.Controls, dt);
@@ -437,7 +437,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,ma_softversion,pr_detail,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,ma_softversion,pr_spec,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
                         if (dt.Rows.Count > 0)
                         {
                             BaseUtil.SetFormValue(this.Controls, dt);
@@ -630,7 +630,7 @@ namespace UAS_MES_NEW.Make
                     OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.Red);
                     if (AutoCut)
                     {
-                        OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.Green);
+                        OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.Blue);
                     }
                 }
             }
@@ -681,7 +681,7 @@ namespace UAS_MES_NEW.Make
             ob_batchqty.Text = "";
             ob_nowcheckqty.ForeColor = Color.Black;
             SendCheck.Enabled = false;
-            OperateResult.AppendText(">>批次" + ob_checkno.Text + "送检成功\n", Color.Green);
+            OperateResult.AppendText(">>批次" + ob_checkno.Text + "送检成功\n", Color.Blue);
             ms_sncode.Focus();
             LogicHandler.InsertMakeProcess(LastSncode, ma_code.Text, User.UserSourceCode, "手动送检", "手动送检成功", User.UserCode);
             //记录操作日志

+ 6 - 6
UAS_MES_NEW/FunctionCode/Make/Make_TestCollection.resx

@@ -117,6 +117,12 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="BadInfSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="ControlLockTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>172, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="SendCheck.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
@@ -156,12 +162,6 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="BadInfSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
-  <metadata name="ControlLockTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>172, 17</value>
-  </metadata>
   <data name="Save.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 35 - 12
UAS_MES_NEW/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -9,11 +9,13 @@ using System.Drawing;
 using System.Threading;
 using UAS_MES_NEW.PublicForm;
 using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace UAS_MES_NEW.Packing
 {
     public partial class Packing_PackageCollection : Form
     {
+        public BarTender.Application engine;
         DataHelper dh;
         DataTable dt;
         LogStringBuilder sql = new LogStringBuilder();
@@ -44,17 +46,29 @@ namespace UAS_MES_NEW.Packing
         {
             try
             {
-                lbl = new ApplicationClass();
-                BaseUtil.WriteLbl();
+                engine = new BarTender.Application();
+              //  lbl = new ApplicationClass();
+             //   BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
-                OperateResult.AppendText("未正确安装CodeSoft软件\n", Color.Red);
+                OperateResult.AppendText("未正确安装CodeSoft软件\n" + ex.Message, Color.Red);
             }
         }
 
         private void PackCollection_Load(object sender, EventArgs e)
         {
+           // 杀死之前全部未关闭的进程
+            Process[] processes = System.Diagnostics.Process.GetProcessesByName("lppa");
+            Process[] processes1 = System.Diagnostics.Process.GetProcessesByName("bartend");
+            for (int i = 0; i < processes1.Length; i++)
+            {
+                processes1[i].Kill();
+            }
+            for (int i = 0; i < processes.Length; i++)
+            {
+                processes[i].Kill();
+            }
             IP.Text = BaseUtil.GetCacheData("IP").ToString();
             Port.Text = BaseUtil.GetCacheData("IPPort").ToString();
             //设置DbFind的必须的数据
@@ -144,7 +158,7 @@ namespace UAS_MES_NEW.Packing
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                     //doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                    if (Print.SinglePrint(Tag.ToString(),  engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                     {
                         OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
                     }
@@ -171,15 +185,22 @@ namespace UAS_MES_NEW.Packing
         //加载工单信息和装箱明细信息
         private void pa_code_KeyDown(object sender, KeyEventArgs e)
         {
-            if (e.KeyCode == Keys.Enter)
+            try
             {
-                LoadData();
-                LoadGridData();
-                if (CheckOutBoxLength())
+                if (e.KeyCode == Keys.Enter)
                 {
-                    sn_code.Focus();
+                    LoadData();
+                    LoadGridData();
+                    if (CheckOutBoxLength())
+                    {
+                        sn_code.Focus();
+                    }
                 }
             }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+            }
         }
 
         //输入序列号的回车事件
@@ -545,7 +566,9 @@ namespace UAS_MES_NEW.Packing
 
         private void PackCollection_FormClosing(object sender, FormClosingEventArgs e)
         {
-            BaseUtil.ClosePrint(lbl);
+            //  BaseUtil.ClosePrint(lbl);
+            if (engine != null)
+                engine.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);
             dh.Dispose();
         }
 
@@ -1025,7 +1048,7 @@ namespace UAS_MES_NEW.Packing
             {
                 if (ms_salecode_text != "")
                 {
-                    DataTable dt = (DataTable)dh.ExecuteSql(" select pn_number,pn_id,pn_caller,pn_numberlength,pn_leadcode  from PACKAGENUMBER where pn_caller='" + ms_salecode_text + "'", "select");
+                    DataTable dt = (DataTable)dh.ExecuteSql(" select pn_number,pn_id,pn_caller,pn_numberlength,pn_leadcode  from PACKAGENUMBER where pn_caller='" + pr_code.Text + "'", "select");
                     if (dt.Rows.Count > 0)
                     {
                         string pn_leadcode = dt.Rows[0]["pn_leadcode"].ToString();
@@ -1043,7 +1066,7 @@ namespace UAS_MES_NEW.Packing
                     }
                     else
                     {
-                        OperateResult.AppendText(">>订单号" + ms_salecode_text + "未维护箱号规则\n", Color.Black);
+                        OperateResult.AppendText(">>产品" + pr_code.Text + "未维护箱号规则\n", Color.Black);
                     }
                 }
                 return true;

+ 69 - 51
UAS_MES_NEW/FunctionCode/Query/Query_ExeProgress.Designer.cs

@@ -52,6 +52,8 @@
             this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.ma_code_label = new System.Windows.Forms.Label();
             this.ma_code = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.ms_checkno = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
@@ -64,10 +66,9 @@
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(13, 16);
-            this.sn_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sn_code_label.Location = new System.Drawing.Point(10, 13);
             this.sn_code_label.Name = "sn_code_label";
-            this.sn_code_label.Size = new System.Drawing.Size(72, 27);
+            this.sn_code_label.Size = new System.Drawing.Size(58, 21);
             this.sn_code_label.TabIndex = 183;
             this.sn_code_label.Text = "序列号";
             // 
@@ -77,10 +78,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.SerialPanel.AutoScroll = true;
             this.SerialPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.SerialPanel.Location = new System.Drawing.Point(19, 133);
-            this.SerialPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.SerialPanel.Location = new System.Drawing.Point(14, 106);
+            this.SerialPanel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.SerialPanel.Name = "SerialPanel";
-            this.SerialPanel.Size = new System.Drawing.Size(1265, 316);
+            this.SerialPanel.Size = new System.Drawing.Size(950, 254);
             this.SerialPanel.TabIndex = 194;
             this.SerialPanel.Scroll += new System.Windows.Forms.ScrollEventHandler(this.SerialPanel_Scroll);
             this.SerialPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.SerialPanel_Paint);
@@ -101,11 +102,11 @@
             this.mp_inman,
             this.em_name});
             this.CraftInfDgv.EnableContentClick = true;
-            this.CraftInfDgv.Location = new System.Drawing.Point(0, 485);
-            this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.CraftInfDgv.Location = new System.Drawing.Point(0, 388);
+            this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.CraftInfDgv.Name = "CraftInfDgv";
             this.CraftInfDgv.RowTemplate.Height = 27;
-            this.CraftInfDgv.Size = new System.Drawing.Size(1300, 237);
+            this.CraftInfDgv.Size = new System.Drawing.Size(975, 190);
             this.CraftInfDgv.TabIndex = 193;
             // 
             // mp_sncode
@@ -183,11 +184,11 @@
             this.groupBoxWithBorder1.Controls.Add(this.label2);
             this.groupBoxWithBorder1.Controls.Add(this.label3);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(16, 50);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(12, 40);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1271, 50);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(953, 40);
             this.groupBoxWithBorder1.TabIndex = 192;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "颜色说明";
@@ -197,30 +198,29 @@
             // 
             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(1132, 18);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(850, 14);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 193;
             this.label1.Text = "尚未执行";
             // 
             // pictureBox4
             // 
             this.pictureBox4.BackColor = System.Drawing.Color.White;
-            this.pictureBox4.Location = new System.Drawing.Point(1035, 15);
-            this.pictureBox4.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.pictureBox4.Location = new System.Drawing.Point(776, 12);
+            this.pictureBox4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.pictureBox4.Name = "pictureBox4";
-            this.pictureBox4.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox4.Size = new System.Drawing.Size(60, 20);
             this.pictureBox4.TabIndex = 192;
             this.pictureBox4.TabStop = false;
             // 
             // pictureBox2
             // 
             this.pictureBox2.BackColor = System.Drawing.Color.Green;
-            this.pictureBox2.Location = new System.Drawing.Point(132, 15);
-            this.pictureBox2.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.pictureBox2.Location = new System.Drawing.Point(99, 12);
+            this.pictureBox2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.pictureBox2.Name = "pictureBox2";
-            this.pictureBox2.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox2.Size = new System.Drawing.Size(60, 20);
             this.pictureBox2.TabIndex = 187;
             this.pictureBox2.TabStop = false;
             // 
@@ -228,30 +228,29 @@
             // 
             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(872, 18);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Location = new System.Drawing.Point(655, 14);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(72, 27);
+            this.label4.Size = new System.Drawing.Size(58, 21);
             this.label4.TabIndex = 191;
             this.label4.Text = "已报废";
             // 
             // pictureBox1
             // 
             this.pictureBox1.BackColor = System.Drawing.Color.Red;
-            this.pictureBox1.Location = new System.Drawing.Point(451, 15);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.pictureBox1.Location = new System.Drawing.Point(338, 12);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox1.Size = new System.Drawing.Size(60, 20);
             this.pictureBox1.TabIndex = 186;
             this.pictureBox1.TabStop = false;
             // 
             // pictureBox3
             // 
             this.pictureBox3.BackColor = System.Drawing.Color.Black;
-            this.pictureBox3.Location = new System.Drawing.Point(775, 15);
-            this.pictureBox3.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.pictureBox3.Location = new System.Drawing.Point(581, 12);
+            this.pictureBox3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.pictureBox3.Name = "pictureBox3";
-            this.pictureBox3.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox3.Size = new System.Drawing.Size(60, 20);
             this.pictureBox3.TabIndex = 190;
             this.pictureBox3.TabStop = false;
             // 
@@ -259,10 +258,9 @@
             // 
             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(228, 18);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(172, 14);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(152, 27);
+            this.label2.Size = new System.Drawing.Size(122, 21);
             this.label2.TabIndex = 188;
             this.label2.Text = "已执行且为良品";
             // 
@@ -270,10 +268,9 @@
             // 
             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(548, 18);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(412, 14);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(172, 27);
+            this.label3.Size = new System.Drawing.Size(138, 21);
             this.label3.TabIndex = 189;
             this.label3.Text = "已执行且为不良品";
             // 
@@ -282,11 +279,11 @@
             this.sn_code.AllPower = null;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(123, 17);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.sn_code.Location = new System.Drawing.Point(92, 14);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(192, 25);
+            this.sn_code.Size = new System.Drawing.Size(145, 21);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -298,10 +295,9 @@
             // 
             this.ma_code_label.AutoSize = true;
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(343, 15);
-            this.ma_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_code_label.Location = new System.Drawing.Point(257, 12);
             this.ma_code_label.Name = "ma_code_label";
-            this.ma_code_label.Size = new System.Drawing.Size(72, 27);
+            this.ma_code_label.Size = new System.Drawing.Size(58, 21);
             this.ma_code_label.TabIndex = 195;
             this.ma_code_label.Text = "工单号";
             // 
@@ -309,17 +305,37 @@
             // 
             this.ma_code.AutoSize = true;
             this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code.Location = new System.Drawing.Point(442, 16);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_code.Location = new System.Drawing.Point(332, 13);
             this.ma_code.Name = "ma_code";
-            this.ma_code.Size = new System.Drawing.Size(0, 27);
+            this.ma_code.Size = new System.Drawing.Size(0, 21);
             this.ma_code.TabIndex = 196;
             // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label5.Location = new System.Drawing.Point(472, 13);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(74, 21);
+            this.label5.TabIndex = 197;
+            this.label5.Text = "抽检批号";
+            // 
+            // ms_checkno
+            // 
+            this.ms_checkno.AutoSize = true;
+            this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ms_checkno.Location = new System.Drawing.Point(562, 13);
+            this.ms_checkno.Name = "ms_checkno";
+            this.ms_checkno.Size = new System.Drawing.Size(0, 21);
+            this.ms_checkno.TabIndex = 198;
+            // 
             // Query_ExeProgress
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1300, 722);
+            this.ClientSize = new System.Drawing.Size(975, 578);
+            this.Controls.Add(this.ms_checkno);
+            this.Controls.Add(this.label5);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.ma_code_label);
             this.Controls.Add(this.SerialPanel);
@@ -328,20 +344,20 @@
             this.Controls.Add(this.sn_code);
             this.Controls.Add(this.sn_code_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Name = "Query_ExeProgress";
             this.Tag = "Query!ExeProgress";
             this.Text = "工单执行进度";
             this.Load += new System.EventHandler(this.Query_ExeProgress_Load);
             this.SizeChanged += new System.EventHandler(this.Query_ExeProgress_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).EndInit();
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -371,5 +387,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn em_name;
         private System.Windows.Forms.Label ma_code_label;
         private System.Windows.Forms.Label ma_code;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label ms_checkno;
     }
 }

+ 3 - 2
UAS_MES_NEW/FunctionCode/Query/Query_ExeProgress.cs

@@ -67,12 +67,12 @@ namespace UAS_MES_NEW.Query
                 if (ms_id.Rows.Count > 0)
                 {
                     //说明有过转号
-                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode from makeserial where ms_sncode='" + ms_id.Rows[0]["beforesn"].ToString() + "' or ms_sncode='" + ms_id.Rows[0]["sn"].ToString() + "' order by ms_id", "select");
+                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_checkno from makeserial where ms_sncode='" + ms_id.Rows[0]["beforesn"].ToString() + "' or ms_sncode='" + ms_id.Rows[0]["sn"].ToString() + "' order by ms_id", "select");
                 }
                 else
                 {
                     //没有过转号
-                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode from makeserial where ms_sncode='" + sn_code.Text + "' order by ms_id", "select");
+                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_checkno from makeserial where ms_sncode='" + sn_code.Text + "' order by ms_id", "select");
                 }
                 if (ms_id.Rows.Count == 0)
                 {
@@ -83,6 +83,7 @@ namespace UAS_MES_NEW.Query
                 StringBuilder ms_ids = new StringBuilder();//存所有的ms_id
                 //设置界面工单号
                 ma_code.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_makecode"].ToString();
+                ms_checkno.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_checkno"].ToString();
                 int idCount = ms_id.Rows.Count;
                 for (int i = 0; i < idCount; i++)
                 {

+ 0 - 27
UAS_MES_NEW/FunctionCode/Query/Query_ExeProgress.resx

@@ -144,31 +144,4 @@
   <metadata name="em_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mp_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mp_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ma_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mp_sourcecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mp_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ma_craftcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="sc_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mp_inman.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="em_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>

+ 36 - 0
UAS_MES_NEW/Properties/Resources.Designer.cs

@@ -120,6 +120,24 @@ namespace UAS_MES_NEW.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找类似于 System.IO.MemoryStream 的 System.IO.UnmanagedMemoryStream 类型的本地化资源。
+        /// </summary>
+        internal static System.IO.UnmanagedMemoryStream _3291 {
+            get {
+                return ResourceManager.GetStream("_3291", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似于 System.IO.MemoryStream 的 System.IO.UnmanagedMemoryStream 类型的本地化资源。
+        /// </summary>
+        internal static System.IO.UnmanagedMemoryStream _4082 {
+            get {
+                return ResourceManager.GetStream("_4082", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>
@@ -130,6 +148,15 @@ namespace UAS_MES_NEW.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找类似于 System.IO.MemoryStream 的 System.IO.UnmanagedMemoryStream 类型的本地化资源。
+        /// </summary>
+        internal static System.IO.UnmanagedMemoryStream _5185 {
+            get {
+                return ResourceManager.GetStream("_5185", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>
@@ -150,6 +177,15 @@ namespace UAS_MES_NEW.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找类似于 System.IO.MemoryStream 的 System.IO.UnmanagedMemoryStream 类型的本地化资源。
+        /// </summary>
+        internal static System.IO.UnmanagedMemoryStream _8378 {
+            get {
+                return ResourceManager.GetStream("_8378", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 12 - 0
UAS_MES_NEW/Properties/Resources.resx

@@ -418,4 +418,16 @@
   <data name="close" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="_3291" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Sound\3291.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="_4082" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Sound\4082.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="_5185" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Sound\5185.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="_8378" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Sound\8378.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
 </root>

+ 3 - 3
UAS_MES_NEW/Properties/Settings.Designer.cs

@@ -121,9 +121,9 @@ namespace UAS_MES_NEW.Properties {
         
         [global::System.Configuration.ApplicationScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=UAS_MES;Pooling=f" +
-            "alse;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.17." +
-            "158.219)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
+        [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false" +
+            ";Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.1" +
+            "18)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
         public string MES {
             get {
                 return ((string)(this["MES"]));

+ 2 - 2
UAS_MES_NEW/Properties/Settings.settings

@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="UAS_MES.Properties" GeneratedClassName="Settings">
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="UAS_MES_NEW.Properties" GeneratedClassName="Settings">
   <Profiles />
   <Settings>
     <Setting Name="ProjectName" Type="System.String" Scope="User">
@@ -27,7 +27,7 @@
       <Value Profile="(Default)">\\172.16.66.51\lable</Value>
     </Setting>
     <Setting Name="MES" Type="System.String" Scope="Application">
-      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=UAS_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.17.158.219)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
+      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.118)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
     </Setting>
   </Settings>
 </SettingsFile>

+ 37 - 32
UAS_MES_NEW/PublicMethod/Print.cs

@@ -6,7 +6,6 @@ using System.IO;
 using UAS_MES_NEW.Entity;
 using System.Text.RegularExpressions;
 using System.Windows.Forms;
-using Seagull.BarTender.Print;
 
 namespace UAS_MES_NEW.PublicMethod
 {
@@ -15,7 +14,7 @@ namespace UAS_MES_NEW.PublicMethod
         static DataHelper dh = SystemInf.dh;
         //CodeSoft打印的驱动和文件
         static Document doc;
-        static LabelFormatDocument doc2;
+        static BarTender.Format doc2;
         ////CodeSoft的打印机
         //string CodeSpft_Printer;
         static FileInfo info;
@@ -212,7 +211,7 @@ namespace UAS_MES_NEW.PublicMethod
 
 
 
-        public static bool SinglePrint(string iCaller, ref Engine lbl, string LabelName, string LaID, string PrinterName, string SnCode, int PrintNum, string MakeCode, string ProdCode, string LabelType, string IfRePrint, out string ErrorMessage)
+        public static bool SinglePrint(string iCaller,  BarTender.Application lbl, string LabelName, string LaID, string PrinterName, string SnCode, int PrintNum, string MakeCode, string ProdCode, string LabelType, string IfRePrint, out string ErrorMessage)
         {
             ErrorMessage = "";
             DataTable dt = new DataTable();
@@ -233,28 +232,28 @@ namespace UAS_MES_NEW.PublicMethod
                 //    return false;
                 //}
             }
-            string filelastwritetime = dh.getFieldDataByCondition("label", "la_lastwritetime", "la_id = '" + LaID + "'").ToString();
-            FileInfo PrintFile = new FileInfo(LabelName);
+          //  string filelastwritetime = dh.getFieldDataByCondition("label", "la_lastwritetime", "la_id = '" + LaID + "'").ToString();
+           // FileInfo PrintFile = new FileInfo(LabelName);
             //打开模板路径
             //查询模板对应的取值SQL和参数名称
             dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql from label left join LABELPARAMETER on la_id=lp_laid where la_id='" + LaID + "'", "select");
-            StringBuilder sb = new StringBuilder();
-            if (!PrintFile.Exists)
-            {
-                MessageBox.Show("打印文件不存在");
-                return false;
-            }
-            string filechangetime = PrintFile.LastWriteTime.ToString();
-            if (filechangetime != filelastwritetime)
-            {
-                lbl.Dispose();
-                lbl = new Engine(true);
-              //  BaseUtil.WriteLbl();
-                filechangetime = PrintFile.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
-                string update = "la_lastwritetime = to_date((regexp_substr('" + filechangetime + "','\\d+.+\\d+')),'yyyy-mm-dd hh24:mi:ss')";
-                dh.UpdateByCondition("label", update, "la_id = '" + LaID + "'");
-            }
-            doc2 = lbl.Documents.Open(LabelName);
+            //StringBuilder sb = new StringBuilder();
+            //if (!PrintFile.Exists)
+            //{
+            //    MessageBox.Show("打印文件不存在");
+            //    return false;
+            //}
+            //string filechangetime = PrintFile.LastWriteTime.ToString();
+            //if (filechangetime != filelastwritetime)
+            //{
+            //    lbl.Dispose();
+            //    lbl = new Engine();
+            //  //  BaseUtil.WriteLbl();
+            //    filechangetime = PrintFile.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
+            //    string update = "la_lastwritetime = to_date((regexp_substr('" + filechangetime + "','\\d+.+\\d+')),'yyyy-mm-dd hh24:mi:ss')";
+            //    dh.UpdateByCondition("label", update, "la_id = '" + LaID + "'");
+            //}
+            doc2 = lbl.Formats.Open(LabelName);
             if (doc2 == null)
             {
                 MessageBox.Show("标签文件打开失败");
@@ -281,16 +280,16 @@ namespace UAS_MES_NEW.PublicMethod
                         int LoopTime = Param.Rows.Count > 100 ? 100 : Param.Rows.Count;
                         for (int j = 0; j < LoopTime; j++)
                         {
-                            for (int k = 0; k < doc2.SubStrings.Count; k++)
+                            for (int k = 0; k < doc2.NamedSubStrings.Count; k++)
                             {
-                                if (j == 0 & doc2.SubStrings[k].Name.ToUpper() == dt.Rows[i]["lp_name"].ToString().ToUpper())
+                                if (j == 0 & doc2.NamedSubStrings.Item(k+1).Name.ToUpper() == dt.Rows[i]["lp_name"].ToString().ToUpper())
                                 {
-                                    doc2.SubStrings[k].Value = Param.Rows[0][0].ToString();
+                                    doc2.SetNamedSubStringValue(doc2.NamedSubStrings.Item(k + 1).Name, Param.Rows[0][0].ToString());
                                 }
                                 //使用SN开头的参数赋值SN1,SN2,SN3等参数
-                                if (doc2.SubStrings[k].Name.ToUpper() == dt.Rows[i]["lp_name"].ToString().ToUpper() + (j + 1))
+                                if ( j!=0 & doc2.NamedSubStrings.Item(k + 1).Name.ToUpper() == dt.Rows[i]["lp_name"].ToString().ToUpper() + (j))
                                 {
-                                    doc2.SubStrings[k].Value = Param.Rows[j][0].ToString();
+                                    doc2.SetNamedSubStringValue(doc2.NamedSubStrings.Item(k + 1).Name, Param.Rows[j][0].ToString());
                                 }
                             }
                         }
@@ -301,15 +300,21 @@ namespace UAS_MES_NEW.PublicMethod
                     MessageBox.Show("SQL维护不正确"+ex.Message);
                 }
             }
-            LogManager.DoLog(sb.ToString());
+          //  LogManager.DoLog(sb.ToString());
             //保存本次赋值进行打印
            // doc2.Printer.SwitchTo(PrinterName);
-            doc2.PrintSetup.PrinterName = PrinterName;
-            doc2.PrintSetup.IdenticalCopiesOfLabel = 1;
-            doc2.Print();
-            doc2.Close(SaveOptions.DoNotSaveChanges);
+           
+            // 同样标签的份数 
+            doc2.PrintSetup.IdenticalCopiesOfLabel = PrintNum;
+            // 序列标签数 
+            doc2.PrintSetup.NumberSerializedLabels = 1;
+            doc2.PrintSetup.Printer = PrinterName;
+            doc2.PrintOut(false, false);
+            doc2.Close(BarTender.BtSaveOptions.btDoNotSaveChanges);
             LogicHandler.DoCommandLog(iCaller, User.UserCode, "", User.UserLineCode, User.UserSourceCode, "打印", "成功打印", SnCode, "");
             LogicHandler.doLabelPrintLog(SnCode, LabelType, MakeCode, ProdCode, User.UserSourceCode, User.CurrentStepCode, IfRePrint, User.UserCode);
+            //打印完毕 
+            lbl.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);
             return true;
         }
 

BIN
UAS_MES_NEW/Resources/Sound/4082.wav


BIN
UAS_MES_NEW/Tool/Seagull.BarTender.Print.dll


+ 106 - 14
UAS_MES_NEW/UAS_MES_NEW.csproj

@@ -33,7 +33,7 @@
     <BootstrapperEnabled>true</BootstrapperEnabled>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
+    <PlatformTarget>x86</PlatformTarget>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
@@ -67,7 +67,7 @@
     <GenerateManifests>true</GenerateManifests>
   </PropertyGroup>
   <PropertyGroup>
-    <SignManifests>true</SignManifests>
+    <SignManifests>false</SignManifests>
   </PropertyGroup>
   <PropertyGroup>
     <StartupObject>UAS_MES_NEW.Program</StartupObject>
@@ -81,23 +81,46 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>Tool\DevExpress.BonusSkins.v15.2.dll</HintPath>
     </Reference>
+    <Reference Include="DevExpress.Charts.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
     <Reference Include="DevExpress.Data.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.DataAccess.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.Map.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.PivotGrid.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.Printing.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.Sparkline.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.SpellChecker.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
     <Reference Include="DevExpress.Utils.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>Tool\DevExpress.Utils.v15.2.dll</HintPath>
     </Reference>
+    <Reference Include="DevExpress.Xpo.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
     <Reference Include="DevExpress.XtraBars.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>Tool\DevExpress.XtraBars.v15.2.dll</HintPath>
     </Reference>
+    <Reference Include="DevExpress.XtraCharts.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.XtraCharts.v15.2.UI, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
+    <Reference Include="DevExpress.XtraCharts.v15.2.Wizard, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
     <Reference Include="DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>Tool\DevExpress.XtraEditors.v15.2.dll</HintPath>
     </Reference>
+    <Reference Include="DevExpress.XtraGauges.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.XtraGauges.v15.2.Win, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
+    <Reference Include="DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
+    <Reference Include="DevExpress.XtraLayout.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.XtraMap.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
     <Reference Include="DevExpress.XtraNavBar.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>Tool\DevExpress.XtraNavBar.v15.2.dll</HintPath>
     </Reference>
+    <Reference Include="DevExpress.XtraPivotGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
+    <Reference Include="DevExpress.XtraPrinting.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.XtraScheduler.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.XtraScheduler.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.XtraScheduler.v15.2.Extensions, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
+    <Reference Include="DevExpress.XtraSpellChecker.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.XtraTreeList.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
     <Reference Include="ExcelHelper, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>Tool\ExcelHelper.dll</HintPath>
@@ -116,7 +139,13 @@
       <HintPath>Tool\Oracle.ManagedDataAccess.dll</HintPath>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Configuration" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Management" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.ServiceModel" />
+    <Reference Include="System.Web" />
+    <Reference Include="System.Web.Services" />
     <Reference Include="System.Windows.Forms.DataVisualization" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
@@ -491,6 +520,18 @@
     <Compile Include="FunctionCode\Employee\Employee_PowerSarch.Designer.cs">
       <DependentUpon>Employee_PowerSarch.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_CollectElec.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_CollectElec.Designer.cs">
+      <DependentUpon>Make_CollectElec.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_SmtTestCollection.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_SmtTestCollection.Designer.cs">
+      <DependentUpon>Make_SmtTestCollection.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Packing\Packing_BigBoxCollection.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -851,6 +892,12 @@
     <Compile Include="FunctionCode\Special\Special_CancelCollection.Designer.cs">
       <DependentUpon>Special_CancelCollection.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Special\Special_CancelProdinout.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_CancelProdinout.Designer.cs">
+      <DependentUpon>Special_CancelProdinout.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Special\Special_MendLabel.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -908,31 +955,31 @@
     <Compile Include="FunctionCode\SystemSetting\SystemSetting_LabelMaintain.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="FunctionCode\SystemSetting\SystemSetting_LabelMaintain.Designer.cs">
+    <Compile Include="FunctionCode\SystemSetting\SystemSetting_LabelMaintain.designer.cs">
       <DependentUpon>SystemSetting_LabelMaintain.cs</DependentUpon>
     </Compile>
     <Compile Include="FunctionCode\SystemSetting\SystemSetting_PrinterTest.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="FunctionCode\SystemSetting\SystemSetting_PrinterTest.Designer.cs">
+    <Compile Include="FunctionCode\SystemSetting\SystemSetting_PrinterTest.designer.cs">
       <DependentUpon>SystemSetting_PrinterTest.cs</DependentUpon>
     </Compile>
     <Compile Include="FunctionCode\SystemSetting\SystemSetting_ScaleTest.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="FunctionCode\SystemSetting\SystemSetting_ScaleTest.Designer.cs">
+    <Compile Include="FunctionCode\SystemSetting\SystemSetting_ScaleTest.designer.cs">
       <DependentUpon>SystemSetting_ScaleTest.cs</DependentUpon>
     </Compile>
     <Compile Include="FunctionCode\SystemSetting\SystemSetting_SysNav.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="FunctionCode\SystemSetting\SystemSetting_SysNav.Designer.cs">
+    <Compile Include="FunctionCode\SystemSetting\SystemSetting_SysNav.designer.cs">
       <DependentUpon>SystemSetting_SysNav.cs</DependentUpon>
     </Compile>
     <Compile Include="FunctionCode\SystemSetting\标签模板维护.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="FunctionCode\SystemSetting\标签模板维护.Designer.cs">
+    <Compile Include="FunctionCode\SystemSetting\标签模板维护.designer.cs">
       <DependentUpon>标签模板维护.cs</DependentUpon>
     </Compile>
     <Compile Include="FunctionCode\Warehouse\Warehouse_FinishedProductIn.cs">
@@ -996,6 +1043,11 @@
       <DesignTime>True</DesignTime>
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+      <DependentUpon>Settings.settings</DependentUpon>
+    </Compile>
     <Compile Include="PublicForm\ChangePwd.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1029,6 +1081,7 @@
     <Compile Include="PublicMethod\ModeBusTCPServer.cs" />
     <Compile Include="PublicMethod\Print.cs" />
     <Compile Include="PublicMethod\ReadDataFromSerialPort.cs" />
+    <Compile Include="PublicMethod\SystemInfo.cs" />
     <EmbeddedResource Include="CustomControl\AccordionMenu\AccordionMenu.resx">
       <DependentUpon>AccordionMenu.cs</DependentUpon>
     </EmbeddedResource>
@@ -1164,6 +1217,12 @@
     <EmbeddedResource Include="FunctionCode\Employee\Employee_PowerSarch.resx">
       <DependentUpon>Employee_PowerSarch.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_CollectElec.resx">
+      <DependentUpon>Make_CollectElec.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_SmtTestCollection.resx">
+      <DependentUpon>Make_SmtTestCollection.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Packing\Packing_BigBoxCollection.resx">
       <DependentUpon>Packing_BigBoxCollection.cs</DependentUpon>
     </EmbeddedResource>
@@ -1344,6 +1403,9 @@
     <EmbeddedResource Include="FunctionCode\Special\Special_CancelCollection.resx">
       <DependentUpon>Special_CancelCollection.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_CancelProdinout.resx">
+      <DependentUpon>Special_CancelProdinout.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_MendLabel.resx">
       <DependentUpon>Special_MendLabel.cs</DependentUpon>
     </EmbeddedResource>
@@ -1418,17 +1480,13 @@
     <EmbeddedResource Include="PublicForm\SetLoadingWindow.resx">
       <DependentUpon>SetLoadingWindow.cs</DependentUpon>
     </EmbeddedResource>
-    <None Include="App.config" />
+    <None Include="App.config">
+      <SubType>Designer</SubType>
+    </None>
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
     </None>
-    <Compile Include="Properties\Settings.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Settings.settings</DependentUpon>
-      <DesignTimeSharedInput>True</DesignTimeSharedInput>
-    </Compile>
-    <None Include="UAS_MES_NEW_TemporaryKey.pfx" />
   </ItemGroup>
   <ItemGroup>
     <Content Include="Resources\07.gif" />
@@ -1470,6 +1528,28 @@
     <Content Include="Resources\Button\normal.png" />
     <Content Include="Resources\Button\White-side.png" />
     <Content Include="Resources\change_password.png" />
+    <None Include="Resources\Sound\4082.wav" />
+    <Content Include="Tool\DevComponents.DotNetBar2.dll" />
+    <Content Include="Tool\DevExpress.BonusSkins.v15.2.dll" />
+    <Content Include="Tool\DevExpress.Data.v15.2.dll" />
+    <Content Include="Tool\DevExpress.Printing.v15.2.Core.dll" />
+    <Content Include="Tool\DevExpress.RichEdit.v15.2.Core.dll" />
+    <Content Include="Tool\DevExpress.Sparkline.v15.2.Core.dll" />
+    <Content Include="Tool\DevExpress.Utils.v15.2.dll" />
+    <Content Include="Tool\DevExpress.XtraBars.v15.2.dll" />
+    <Content Include="Tool\DevExpress.XtraEditors.v15.2.dll" />
+    <Content Include="Tool\DevExpress.XtraNavBar.v15.2.dll" />
+    <Content Include="Tool\DevExpress.XtraRichEdit.v15.2.dll" />
+    <Content Include="Tool\DevExpress.XtraScheduler.v15.2.Core.dll" />
+    <Content Include="Tool\ExcelHelper.dll" />
+    <Content Include="Tool\ICSharpCode.SharpZipLib.dll" />
+    <Content Include="Tool\Interop.SpeechLib.dll" />
+    <Content Include="Tool\log4net.dll" />
+    <Content Include="Tool\Microsoft.Office.Interop.Excel.dll" />
+    <Content Include="Tool\NPOI.dll" />
+    <Content Include="Tool\Oracle.DataAccess%2811g%29.dll" />
+    <Content Include="Tool\Oracle.ManagedDataAccess.dll" />
+    <Content Include="Tool\System.Data.OracleClient.dll" />
     <None Include="Resources\close.png" />
     <Content Include="Resources\close_16px_558195_easyicon.net.png" />
     <Content Include="Resources\CLOSE_24px_1115282_easyicon.net.png" />
@@ -1542,6 +1622,15 @@
     <Content Include="Resources\zxing_android_code_48px_1107946_easyicon.net.png" />
   </ItemGroup>
   <ItemGroup>
+    <COMReference Include="BarTender">
+      <Guid>{D58562C1-E51B-11CF-8941-00A024A9083F}</Guid>
+      <VersionMajor>9</VersionMajor>
+      <VersionMinor>40</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>tlbimp</WrapperTool>
+      <Isolated>False</Isolated>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
+    </COMReference>
     <COMReference Include="LabelManager2">
       <Guid>{3624B9C2-9E5D-11D3-A896-00C04F324E22}</Guid>
       <VersionMajor>6</VersionMajor>
@@ -1598,6 +1687,9 @@
       <FileType>File</FileType>
     </PublishFile>
   </ItemGroup>
+  <ItemGroup>
+    <WCFMetadata Include="Service References\" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
     <PostBuildEvent>xcopy  $(ProjectDir)Resources $(ProjectDir)$(OutDir)Resources  /s /e /k /i /y</PostBuildEvent>