Explorar o código

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

caosy %!s(int64=6) %!d(string=hai) anos
pai
achega
21137765b1

+ 6 - 0
UAS-出货标签管理(泽天)/App.config

@@ -71,6 +71,12 @@
       <setting name="OPrinter" serializeAs="String">
         <value />
       </setting>
+      <setting name="PortName" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="BaudRate" serializeAs="String">
+        <value />
+      </setting>
     </UAS_LabelMachine.Properties.Settings>
   </userSettings>
 </configuration>

+ 116 - 0
UAS-出货标签管理(泽天)/ComInfoSet.Designer.cs

@@ -0,0 +1,116 @@
+namespace UAS_LabelMachine
+{
+    partial class ComInfoSet
+    {
+        /// <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.label8 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.BaudRate = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.Confirm = new System.Windows.Forms.Button();
+            this.PortName = new UAS_LabelMachine.CustomControl.SerialPortCombox();
+            this.SuspendLayout();
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(51, 35);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(37, 20);
+            this.label8.TabIndex = 107;
+            this.label8.Text = "串口";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(51, 80);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(51, 20);
+            this.label1.TabIndex = 108;
+            this.label1.Text = "波特率";
+            // 
+            // BaudRate
+            // 
+            this.BaudRate.ID = null;
+            this.BaudRate.Location = new System.Drawing.Point(138, 79);
+            this.BaudRate.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.BaudRate.Name = "BaudRate";
+            this.BaudRate.Size = new System.Drawing.Size(109, 21);
+            this.BaudRate.Str = null;
+            this.BaudRate.Str1 = null;
+            this.BaudRate.Str2 = null;
+            this.BaudRate.TabIndex = 109;
+            // 
+            // Confirm
+            // 
+            this.Confirm.Location = new System.Drawing.Point(138, 118);
+            this.Confirm.Name = "Confirm";
+            this.Confirm.Size = new System.Drawing.Size(75, 23);
+            this.Confirm.TabIndex = 111;
+            this.Confirm.Text = "确认";
+            this.Confirm.UseVisualStyleBackColor = true;
+            // 
+            // PortName
+            // 
+            this.PortName.Location = new System.Drawing.Point(138, 35);
+            this.PortName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.PortName.Name = "PortName";
+            this.PortName.SelectedText = "";
+            this.PortName.SelectedValue = null;
+            this.PortName.Size = new System.Drawing.Size(109, 20);
+            this.PortName.TabIndex = 112;
+            // 
+            // ComInfoSet
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(348, 153);
+            this.Controls.Add(this.PortName);
+            this.Controls.Add(this.Confirm);
+            this.Controls.Add(this.BaudRate);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.label8);
+            this.Name = "ComInfoSet";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "ComInfoSet";
+            this.Load += new System.EventHandler(this.ComInfoSet_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.EnterTextBox BaudRate;
+        private System.Windows.Forms.Button Confirm;
+        private CustomControl.SerialPortCombox PortName;
+    }
+}

+ 24 - 0
UAS-出货标签管理(泽天)/ComInfoSet.cs

@@ -0,0 +1,24 @@
+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;
+
+namespace UAS_LabelMachine
+{
+    public partial class ComInfoSet : Form
+    {
+        public ComInfoSet()
+        {
+            InitializeComponent();
+        }
+
+        private void ComInfoSet_Load(object sender, EventArgs e)
+        {
+            BaudRate.Text = Properties.Settings.Default.BaudRate;
+        }
+    }
+}

+ 120 - 0
UAS-出货标签管理(泽天)/ComInfoSet.resx

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

+ 60 - 0
UAS-出货标签管理(泽天)/CustomControl/SerialPortCombox.Designer.cs

@@ -0,0 +1,60 @@
+namespace UAS_LabelMachine.CustomControl
+{
+    partial class SerialPortCombox
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.ComCombox = new System.Windows.Forms.ComboBox();
+            this.SuspendLayout();
+            // 
+            // ComCombox
+            // 
+            this.ComCombox.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.ComCombox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.ComCombox.FormattingEnabled = true;
+            this.ComCombox.Location = new System.Drawing.Point(0, 0);
+            this.ComCombox.Name = "ComCombox";
+            this.ComCombox.Size = new System.Drawing.Size(186, 23);
+            this.ComCombox.TabIndex = 0;
+            // 
+            // SerialPortCombox
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.ComCombox);
+            this.Name = "SerialPortCombox";
+            this.Size = new System.Drawing.Size(186, 25);
+            this.Load += new System.EventHandler(this.SerialPortCombox_Load);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ComboBox ComCombox;
+    }
+}

+ 76 - 0
UAS-出货标签管理(泽天)/CustomControl/SerialPortCombox.cs

@@ -0,0 +1,76 @@
+using System;
+using System.Windows.Forms;
+using System.IO.Ports;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    public partial class SerialPortCombox : UserControl
+    {
+        public SerialPortCombox()
+        {
+            InitializeComponent();
+        }
+
+        public override string Text
+        {
+            get
+            {
+                return ComCombox.Text;
+            }
+
+            set
+            {
+                ComCombox.Text = value;
+            }
+
+        }
+
+        public string SelectedText
+        {
+            get
+            {
+                return ComCombox.SelectedText;
+            }
+
+            set
+            {
+                ComCombox.SelectedText = value;
+            }
+        }
+
+        public object SelectedValue
+        {
+            get
+            {
+                return ComCombox.SelectedValue;
+            }
+
+            set
+            {
+                ComCombox.SelectedValue = value;
+            }
+        }
+
+
+        public object Items
+        {
+            get
+            {
+                return ComCombox.Items;
+            }
+        }
+
+        private void SerialPortCombox_Load(object sender, EventArgs e)
+        {
+            ComCombox.Items.AddRange(SerialPort.GetPortNames());
+            foreach (var item in ComCombox.Items)
+            {
+                if (item.ToString() == Properties.Settings.Default.PortName)
+                {
+                    ComCombox .SelectedIndex= ComCombox.Items.IndexOf(item);
+                    return;
+                }
+            }
+        }
+    }
+}

+ 120 - 0
UAS-出货标签管理(泽天)/CustomControl/SerialPortCombox.resx

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

+ 6 - 0
UAS-出货标签管理(泽天)/Properties/Settings.settings

@@ -35,5 +35,11 @@
     <Setting Name="OPrinter" Type="System.String" Scope="User">
       <Value Profile="(Default)" />
     </Setting>
+    <Setting Name="PortName" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="BaudRate" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
   </Settings>
 </SettingsFile>

+ 24 - 0
UAS-出货标签管理(泽天)/Properties/Settings1.Designer.cs

@@ -154,5 +154,29 @@ namespace UAS_LabelMachine.Properties {
                 this["OPrinter"] = value;
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string PortName {
+            get {
+                return ((string)(this["PortName"]));
+            }
+            set {
+                this["PortName"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string BaudRate {
+            get {
+                return ((string)(this["BaudRate"]));
+            }
+            set {
+                this["BaudRate"] = value;
+            }
+        }
     }
 }

+ 18 - 0
UAS-出货标签管理(泽天)/UAS-出货标签管理(泽天).csproj

@@ -139,6 +139,12 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="ComInfoSet.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="ComInfoSet.Designer.cs">
+      <DependentUpon>ComInfoSet.cs</DependentUpon>
+    </Compile>
     <Compile Include="CustomControl\BlurSearch.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -217,6 +223,12 @@
     <Compile Include="CustomControl\SearchTextBox.Designer.cs">
       <DependentUpon>SearchTextBox.cs</DependentUpon>
     </Compile>
+    <Compile Include="CustomControl\SerialPortCombox.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="CustomControl\SerialPortCombox.Designer.cs">
+      <DependentUpon>SerialPortCombox.cs</DependentUpon>
+    </Compile>
     <Compile Include="DbFind.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -301,6 +313,9 @@
     <Compile Include="附件内容打印.Designer.cs">
       <DependentUpon>附件内容打印.cs</DependentUpon>
     </Compile>
+    <EmbeddedResource Include="ComInfoSet.resx">
+      <DependentUpon>ComInfoSet.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="CustomControl\BlurSearch.resx">
       <DependentUpon>BlurSearch.cs</DependentUpon>
     </EmbeddedResource>
@@ -328,6 +343,9 @@
     <EmbeddedResource Include="CustomControl\SearchTextBox.resx">
       <DependentUpon>SearchTextBox.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="CustomControl\SerialPortCombox.resx">
+      <DependentUpon>SerialPortCombox.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="DbFind.resx">
       <DependentUpon>DbFind.cs</DependentUpon>
     </EmbeddedResource>

+ 145 - 63
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs

@@ -90,6 +90,13 @@
             this.label9 = new System.Windows.Forms.Label();
             this.ProcessCount = new System.Windows.Forms.Label();
             this.CombindetailTwo = new System.Windows.Forms.CheckBox();
+            this.Reset = new System.Windows.Forms.Button();
+            this.GetPDdata = new System.Windows.Forms.Button();
+            this.Com = new System.IO.Ports.SerialPort(this.components);
+            this.groupBoxWithBorder2 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.ConnectCom = new System.Windows.Forms.Button();
+            this.ButtonWeigh = new System.Windows.Forms.Button();
+            this.Weight = new System.Windows.Forms.Label();
             this.DCCheck = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.GridPrcode = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
             this.pd_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -139,6 +146,8 @@
             this.pib_custoutboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_pocode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_boxweight = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_totalweight = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
@@ -170,10 +179,9 @@
             this.OutboxCapacity = new System.Windows.Forms.NumericUpDown();
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
-            this.Reset = new System.Windows.Forms.Button();
-            this.GetPDdata = new System.Windows.Forms.Button();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+            this.groupBoxWithBorder2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).BeginInit();
@@ -473,7 +481,7 @@
             // ChooseAll
             // 
             this.ChooseAll.Location = new System.Drawing.Point(0, 379);
-            this.ChooseAll.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ChooseAll.Margin = new System.Windows.Forms.Padding(2);
             this.ChooseAll.Name = "ChooseAll";
             this.ChooseAll.Size = new System.Drawing.Size(38, 22);
             this.ChooseAll.TabIndex = 84;
@@ -662,7 +670,7 @@
             this.Combindetail.AutoSize = true;
             this.Combindetail.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.Combindetail.Location = new System.Drawing.Point(296, 102);
-            this.Combindetail.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Combindetail.Margin = new System.Windows.Forms.Padding(2);
             this.Combindetail.Name = "Combindetail";
             this.Combindetail.Size = new System.Drawing.Size(82, 21);
             this.Combindetail.TabIndex = 104;
@@ -694,7 +702,7 @@
             // 
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(232, 200);
+            this.label9.Location = new System.Drawing.Point(237, 200);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(85, 20);
             this.label9.TabIndex = 107;
@@ -704,7 +712,7 @@
             // 
             this.ProcessCount.AutoSize = true;
             this.ProcessCount.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ProcessCount.Location = new System.Drawing.Point(332, 200);
+            this.ProcessCount.Location = new System.Drawing.Point(339, 200);
             this.ProcessCount.Name = "ProcessCount";
             this.ProcessCount.Size = new System.Drawing.Size(0, 20);
             this.ProcessCount.TabIndex = 108;
@@ -714,7 +722,7 @@
             this.CombindetailTwo.AutoSize = true;
             this.CombindetailTwo.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.CombindetailTwo.Location = new System.Drawing.Point(296, 130);
-            this.CombindetailTwo.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.CombindetailTwo.Margin = new System.Windows.Forms.Padding(2);
             this.CombindetailTwo.Name = "CombindetailTwo";
             this.CombindetailTwo.Size = new System.Drawing.Size(119, 21);
             this.CombindetailTwo.TabIndex = 109;
@@ -722,6 +730,78 @@
             this.CombindetailTwo.UseVisualStyleBackColor = true;
             this.CombindetailTwo.CheckedChanged += new System.EventHandler(this.CombindetailTwo_CheckedChanged);
             // 
+            // Reset
+            // 
+            this.Reset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Reset.Location = new System.Drawing.Point(388, 72);
+            this.Reset.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Reset.Name = "Reset";
+            this.Reset.Size = new System.Drawing.Size(64, 26);
+            this.Reset.TabIndex = 110;
+            this.Reset.Text = "重置单据";
+            this.Reset.UseVisualStyleBackColor = true;
+            this.Reset.Click += new System.EventHandler(this.Reset_Click);
+            // 
+            // GetPDdata
+            // 
+            this.GetPDdata.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.GetPDdata.Location = new System.Drawing.Point(475, 72);
+            this.GetPDdata.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.GetPDdata.Name = "GetPDdata";
+            this.GetPDdata.Size = new System.Drawing.Size(93, 26);
+            this.GetPDdata.TabIndex = 111;
+            this.GetPDdata.Text = "同步出货数据";
+            this.GetPDdata.UseVisualStyleBackColor = true;
+            this.GetPDdata.Click += new System.EventHandler(this.GetPDdata_Click);
+            // 
+            // groupBoxWithBorder2
+            // 
+            this.groupBoxWithBorder2.Controls.Add(this.ConnectCom);
+            this.groupBoxWithBorder2.Controls.Add(this.ButtonWeigh);
+            this.groupBoxWithBorder2.Controls.Add(this.Weight);
+            this.groupBoxWithBorder2.Location = new System.Drawing.Point(1135, 222);
+            this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBoxWithBorder2.Name = "groupBoxWithBorder2";
+            this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(2);
+            this.groupBoxWithBorder2.Size = new System.Drawing.Size(112, 155);
+            this.groupBoxWithBorder2.TabIndex = 113;
+            this.groupBoxWithBorder2.TabStop = false;
+            this.groupBoxWithBorder2.Text = "称重";
+            // 
+            // ConnectCom
+            // 
+            this.ConnectCom.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ConnectCom.Location = new System.Drawing.Point(27, 93);
+            this.ConnectCom.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ConnectCom.Name = "ConnectCom";
+            this.ConnectCom.Size = new System.Drawing.Size(80, 26);
+            this.ConnectCom.TabIndex = 114;
+            this.ConnectCom.Text = "连接电子秤";
+            this.ConnectCom.UseVisualStyleBackColor = true;
+            this.ConnectCom.Click += new System.EventHandler(this.ConnectCom_Click);
+            // 
+            // ButtonWeigh
+            // 
+            this.ButtonWeigh.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ButtonWeigh.Location = new System.Drawing.Point(27, 123);
+            this.ButtonWeigh.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ButtonWeigh.Name = "ButtonWeigh";
+            this.ButtonWeigh.Size = new System.Drawing.Size(81, 26);
+            this.ButtonWeigh.TabIndex = 97;
+            this.ButtonWeigh.Text = "称量毛重";
+            this.ButtonWeigh.UseVisualStyleBackColor = true;
+            this.ButtonWeigh.Click += new System.EventHandler(this.ButtonWeigh_Click);
+            // 
+            // Weight
+            // 
+            this.Weight.AutoSize = true;
+            this.Weight.Font = new System.Drawing.Font("微软雅黑", 30F);
+            this.Weight.ForeColor = System.Drawing.Color.Red;
+            this.Weight.Location = new System.Drawing.Point(17, 29);
+            this.Weight.Name = "Weight";
+            this.Weight.Size = new System.Drawing.Size(0, 52);
+            this.Weight.TabIndex = 113;
+            // 
             // DCCheck
             // 
             this.DCCheck.ID = null;
@@ -770,7 +850,7 @@
             this.GridPrcode.MultiSelect = false;
             this.GridPrcode.Name = "GridPrcode";
             this.GridPrcode.RowTemplate.Height = 23;
-            this.GridPrcode.Size = new System.Drawing.Size(1250, 158);
+            this.GridPrcode.Size = new System.Drawing.Size(1134, 158);
             this.GridPrcode.TabIndex = 88;
             this.GridPrcode.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.GridPrcode_CellClick);
             this.GridPrcode.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.GridPrcode_CellEndEdit);
@@ -923,9 +1003,9 @@
             this.groupBoxWithBorder1.Controls.Add(this.label12);
             this.groupBoxWithBorder1.Controls.Add(this.label7);
             this.groupBoxWithBorder1.Location = new System.Drawing.Point(575, 6);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder1.Size = new System.Drawing.Size(140, 211);
             this.groupBoxWithBorder1.TabIndex = 81;
             this.groupBoxWithBorder1.TabStop = false;
@@ -947,7 +1027,7 @@
             // 
             this.label18.AutoSize = true;
             this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label18.Location = new System.Drawing.Point(64, 122);
+            this.label18.Location = new System.Drawing.Point(63, 121);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(13, 17);
             this.label18.TabIndex = 90;
@@ -981,7 +1061,7 @@
             // 
             this.label16.AutoSize = true;
             this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label16.Location = new System.Drawing.Point(62, 58);
+            this.label16.Location = new System.Drawing.Point(61, 57);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(13, 17);
             this.label16.TabIndex = 87;
@@ -1015,7 +1095,7 @@
             // 
             this.label12.AutoSize = true;
             this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label12.Location = new System.Drawing.Point(6, 88);
+            this.label12.Location = new System.Drawing.Point(5, 87);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(56, 17);
             this.label12.TabIndex = 77;
@@ -1025,7 +1105,7 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(4, 26);
+            this.label7.Location = new System.Drawing.Point(3, 25);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(56, 17);
             this.label7.TabIndex = 76;
@@ -1072,6 +1152,8 @@
             this.pib_custoutboxcode,
             this.pd_pocode,
             this.pr_spec,
+            this.pib_boxweight,
+            this.pib_totalweight,
             this.pib_outboxcode1,
             this.pib_outboxcode2});
             this.LabelInf.Location = new System.Drawing.Point(0, 381);
@@ -1247,6 +1329,20 @@
             this.pr_spec.Visible = false;
             this.pr_spec.Width = 54;
             // 
+            // pib_boxweight
+            // 
+            this.pib_boxweight.DataPropertyName = "pib_boxweight";
+            this.pib_boxweight.HeaderText = "箱重";
+            this.pib_boxweight.Name = "pib_boxweight";
+            this.pib_boxweight.Width = 54;
+            // 
+            // pib_totalweight
+            // 
+            this.pib_totalweight.DataPropertyName = "pib_totalweight";
+            this.pib_totalweight.HeaderText = "总重";
+            this.pib_totalweight.Name = "pib_totalweight";
+            this.pib_totalweight.Width = 54;
+            // 
             // pib_outboxcode1
             // 
             this.pib_outboxcode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
@@ -1288,7 +1384,7 @@
             this.SingleLabel.Location = new System.Drawing.Point(718, 6);
             this.SingleLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabel.Name = "SingleLabel";
-            this.SingleLabel.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.SingleLabel.Padding = new System.Windows.Forms.Padding(2);
             this.SingleLabel.Size = new System.Drawing.Size(170, 211);
             this.SingleLabel.TabIndex = 77;
             this.SingleLabel.TabStop = false;
@@ -1307,7 +1403,7 @@
             // 
             this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrint.Location = new System.Drawing.Point(120, 178);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(91, 177);
             this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
             this.SingleLabelPrint.Size = new System.Drawing.Size(68, 26);
@@ -1322,7 +1418,7 @@
             this.SingleLabelAutoPrint.Checked = true;
             this.SingleLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.SingleLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(10, 94);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(9, 93);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1356,7 +1452,7 @@
             this.MidLabel.Location = new System.Drawing.Point(890, 6);
             this.MidLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabel.Name = "MidLabel";
-            this.MidLabel.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MidLabel.Padding = new System.Windows.Forms.Padding(2);
             this.MidLabel.Size = new System.Drawing.Size(172, 211);
             this.MidLabel.TabIndex = 78;
             this.MidLabel.TabStop = false;
@@ -1380,7 +1476,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(6, 122);
+            this.label2.Location = new System.Drawing.Point(5, 121);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(32, 17);
             this.label2.TabIndex = 92;
@@ -1403,7 +1499,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(6, 154);
+            this.label5.Location = new System.Drawing.Point(5, 153);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(32, 17);
             this.label5.TabIndex = 50;
@@ -1436,7 +1532,7 @@
             this.MidLabelAutoPrint.Checked = true;
             this.MidLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.MidLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelAutoPrint.Location = new System.Drawing.Point(10, 94);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(9, 93);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1473,9 +1569,9 @@
             this.OutBoxLabel.Controls.Add(this.OutBoxCombox);
             this.OutBoxLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxLabel.Location = new System.Drawing.Point(1067, 6);
-            this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(2);
             this.OutBoxLabel.Name = "OutBoxLabel";
-            this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(2);
             this.OutBoxLabel.Size = new System.Drawing.Size(183, 211);
             this.OutBoxLabel.TabIndex = 79;
             this.OutBoxLabel.TabStop = false;
@@ -1485,7 +1581,7 @@
             // 
             this.DiffLotNo.AutoSize = true;
             this.DiffLotNo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.DiffLotNo.Location = new System.Drawing.Point(113, 150);
+            this.DiffLotNo.Location = new System.Drawing.Point(112, 149);
             this.DiffLotNo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.DiffLotNo.Name = "DiffLotNo";
             this.DiffLotNo.Size = new System.Drawing.Size(67, 21);
@@ -1497,7 +1593,7 @@
             // 
             this.DiffDC.AutoSize = true;
             this.DiffDC.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.DiffDC.Location = new System.Drawing.Point(113, 120);
+            this.DiffDC.Location = new System.Drawing.Point(112, 119);
             this.DiffDC.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.DiffDC.Name = "DiffDC";
             this.DiffDC.Size = new System.Drawing.Size(68, 21);
@@ -1509,7 +1605,7 @@
             // 
             this.OnlyOneRow.AutoSize = true;
             this.OnlyOneRow.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OnlyOneRow.Location = new System.Drawing.Point(113, 94);
+            this.OnlyOneRow.Location = new System.Drawing.Point(112, 93);
             this.OnlyOneRow.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OnlyOneRow.Name = "OnlyOneRow";
             this.OnlyOneRow.Size = new System.Drawing.Size(63, 21);
@@ -1521,7 +1617,7 @@
             // 
             this.AllLabel.AutoSize = true;
             this.AllLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AllLabel.Location = new System.Drawing.Point(8, 94);
+            this.AllLabel.Location = new System.Drawing.Point(7, 93);
             this.AllLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AllLabel.Name = "AllLabel";
             this.AllLabel.Size = new System.Drawing.Size(99, 21);
@@ -1544,7 +1640,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(100, 6);
+            this.LogingOut.Location = new System.Drawing.Point(99, 5);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(42, 21);
             this.LogingOut.TabIndex = 77;
@@ -1571,7 +1667,7 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(8, 156);
+            this.label10.Location = new System.Drawing.Point(7, 155);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(32, 17);
             this.label10.TabIndex = 90;
@@ -1581,7 +1677,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(8, 122);
+            this.label6.Location = new System.Drawing.Point(7, 121);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(32, 17);
             this.label6.TabIndex = 87;
@@ -1635,36 +1731,13 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
-            // Reset
-            // 
-            this.Reset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Reset.Location = new System.Drawing.Point(388, 72);
-            this.Reset.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.Reset.Name = "Reset";
-            this.Reset.Size = new System.Drawing.Size(64, 26);
-            this.Reset.TabIndex = 110;
-            this.Reset.Text = "重置单据";
-            this.Reset.UseVisualStyleBackColor = true;
-            this.Reset.Click += new System.EventHandler(this.Reset_Click);
-            // 
-            // GetPDdata
-            // 
-            this.GetPDdata.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.GetPDdata.Location = new System.Drawing.Point(475, 72);
-            this.GetPDdata.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.GetPDdata.Name = "GetPDdata";
-            this.GetPDdata.Size = new System.Drawing.Size(93, 26);
-            this.GetPDdata.TabIndex = 111;
-            this.GetPDdata.Text = "同步出货数据";
-            this.GetPDdata.UseVisualStyleBackColor = true;
-            this.GetPDdata.Click += new System.EventHandler(this.GetPDdata_Click);
-            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
-            this.ClientSize = new System.Drawing.Size(1255, 530);
+            this.ClientSize = new System.Drawing.Size(1255, 732);
+            this.Controls.Add(this.groupBoxWithBorder2);
             this.Controls.Add(this.GetPDdata);
             this.Controls.Add(this.Reset);
             this.Controls.Add(this.CombindetailTwo);
@@ -1717,6 +1790,8 @@
             this.SizeChanged += new System.EventHandler(this.贴标机条码打印_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+            this.groupBoxWithBorder2.ResumeLayout(true);
+            this.groupBoxWithBorder2.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).EndInit();
             this.groupBoxWithBorder1.ResumeLayout(true);
             this.groupBoxWithBorder1.PerformLayout();
@@ -1847,6 +1922,19 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_brand;
         private System.Windows.Forms.DataGridViewTextBoxColumn pjd_zxbzs_user;
+        private System.Windows.Forms.Button Reset;
+        private System.Windows.Forms.Button AddNewOutBox;
+        private System.Windows.Forms.Button GetPDdata;
+        private System.Windows.Forms.CheckBox AllLabel;
+        private System.Windows.Forms.CheckBox OnlyOneRow;
+        private System.Windows.Forms.Button ResetHBXH;
+        private System.Windows.Forms.CheckBox DiffLotNo;
+        private System.Windows.Forms.CheckBox DiffDC;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder2;
+        private System.Windows.Forms.Label Weight;
+        private System.Windows.Forms.Button ButtonWeigh;
+        private System.IO.Ports.SerialPort Com;
+        private System.Windows.Forms.Button ConnectCom;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
         private System.Windows.Forms.DataGridViewCheckBoxColumn pib_ifprint;
         private System.Windows.Forms.DataGridViewCheckBoxColumn pib_midifprint;
@@ -1866,15 +1954,9 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_custoutboxcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_pocode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pib_boxweight;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pib_totalweight;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
-        private System.Windows.Forms.Button Reset;
-        private System.Windows.Forms.Button AddNewOutBox;
-        private System.Windows.Forms.Button GetPDdata;
-        private System.Windows.Forms.CheckBox AllLabel;
-        private System.Windows.Forms.CheckBox OnlyOneRow;
-        private System.Windows.Forms.Button ResetHBXH;
-        private System.Windows.Forms.CheckBox DiffLotNo;
-        private System.Windows.Forms.CheckBox DiffDC;
     }
 }

+ 74 - 4
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -12,6 +12,8 @@ using UAS_LabelMachine.PublicForm;
 using System.Threading;
 using FastReport;
 using System.Linq;
+using System.Reflection;
+using UAS_LabelMachine.CustomControl;
 
 namespace UAS_LabelMachine
 {
@@ -100,7 +102,13 @@ namespace UAS_LabelMachine
 
         public UAS_出货标签打印(string Master)
         {
+            this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
+            this.UpdateStyles();
             InitializeComponent();
+            //利用反射设置DataGridView的双缓冲
+            Type dgvType = this.LabelInf.GetType();
+            PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
+            pi.SetValue(this.LabelInf, true, null);
             (new EnvironmentSettings()).ReportSettings.ShowProgress = false;
             Text = Text + "-" + Master;
         }
@@ -114,6 +122,21 @@ namespace UAS_LabelMachine
             }
         }
 
+        delegate void BindDataSource(DataGridView dgv, DataTable dt);//定义委托
+
+        void bindingsource(DataGridView dgv, DataTable dt)
+        {
+            if (dgv.InvokeRequired)
+            {
+                dgv.Invoke(new BindDataSource(bindingsource), new object[] { dgv, dt });
+            }
+            else
+            {
+                dgv.AutoGenerateColumns = false;
+                dgv.DataSource = dt;
+            }
+        }
+
         private void 贴标机条码打印_Load(object sender, EventArgs e)
         {
             //用计时器重置数据库链接
@@ -1156,6 +1179,12 @@ namespace UAS_LabelMachine
             if (OutBoxCombox.Text != "")
             {
                 Pack_Click(sender, e);
+                //记录整箱的重量
+                sql.Clear();
+                sql.Append("update prodiobarcode set pib_totalweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
+                sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "'");
+                dh.ExecuteSql(sql.ToString(), "update");
+                LoadGridData(sender, e);
                 thread = new Thread(OutBoxPrint);
                 stw = new SetLoadingWindow(thread, "正在打印外箱");
                 BaseUtil.SetFormCenter(stw);
@@ -1176,7 +1205,7 @@ namespace UAS_LabelMachine
         {
             AllChecked = false;
             sql.Clear();
-            sql.Append("select pd_custprodcode,pd_custprodspec,nvl(pib_midifprint,0)pib_midifprint,pib_custmidboxcode,pd_pocode,pjd_orispeccode,pib_madein,pib_custbarcode,pib_custoutboxcode,pib_id,pib_datecode1,pib_pdid,pib_piid,");
+            sql.Append("select pib_boxweight,pib_totalweight,pd_custprodcode,pd_custprodspec,nvl(pib_midifprint,0)pib_midifprint,pib_custmidboxcode,pd_pocode,pjd_orispeccode,pib_madein,pib_custbarcode,pib_custoutboxcode,pib_id,pib_datecode1,pib_pdid,pib_piid,");
             sql.Append("pib_pdno,pib_prodcode,pib_brand,pr_vendprodcode,pib_lotno,pib_datecode,week_to_date(pib_datecode) datecode1,pib_qty,pr_spec,");
             sql.Append("pr_zxbzs,pr_unit,pib_barcode,pib_outboxcode1,pib_outboxcode2,nvl(pib_ifprint,0)pib_ifprint from prodiobarcode left join ");
             sql.Append("prodiodetail on pib_piid=pd_piid and pd_pdno=pib_pdno and pd_prodcode=pib_prodcode left join product on pr_code=pib_prodcode  ");
@@ -1187,17 +1216,15 @@ namespace UAS_LabelMachine
             }
             sql.Append(" order by to_number(pib_outboxcode2),pib_id,pd_prodcode");
             LabelInfDataTable = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
-            BaseUtil.FillDgvWithDataTable(LabelInf, LabelInfDataTable);
+            bindingsource(LabelInf, LabelInfDataTable);
             if (LabelInf.Rows.Count > 0)
             {
                 LabelInf.FirstDisplayedScrollingRowIndex = LabelInf.Rows.Count - 1;
             }
-
             sql.Clear();
             sql.Append("select pib_pdno,pib_prodcode,sum(pib_qty) pib_qty from  prodiodetail left join prodiobarcode on pd_id=pib_pdid and pd_pdno=pib_pdno ");
             sql.Append("where pib_inoutno='" + pi_inoutno.Text + "' group by pib_prodcode,pib_pdno order by pib_pdno ");
             SumQty = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
-
         }
 
         private void Refresh_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
@@ -1995,5 +2022,48 @@ namespace UAS_LabelMachine
             dh.ExecuteSql("update prodiodetail set PD_HBXH_USER=pd_pdno where pd_inoutno='" + pi_inoutno.Text + "'", "update");
             MessageBox.Show("重置序号成功", "提示");
         }
+
+        private void ButtonWeigh_Click(object sender, EventArgs e)
+        {
+            sql.Clear();
+            sql.Append("update prodiobarcode set pib_boxweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
+            sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "'");
+            dh.ExecuteSql(sql.ToString(), "update");
+            LoadGridData(sender, e);
+        }
+        Regex reg = new Regex(@"\d+.\d+");
+        ComInfoSet cis;
+        private void ConnectCom_Click(object sender, EventArgs e)
+        {
+            cis = new ComInfoSet();
+            (cis.Controls["PortName"] as SerialPortCombox).SelectedValue = Properties.Settings.Default.PortName;
+            cis.Controls["BaudRate"].Text = Properties.Settings.Default.BaudRate;
+            cis.Controls["Confirm"].Click += UAS_出货标签打印_Click;
+            cis.ShowDialog();
+        }
+
+        private void UAS_出货标签打印_Click(object sender, EventArgs e)
+        {
+            int BaudRate = 0;
+            Com.PortName = cis.Controls["PortName"].Text;
+            if (int.TryParse(cis.Controls["BaudRate"].Text, out BaudRate))
+            {
+                Com.BaudRate = BaudRate;
+            }
+            Properties.Settings.Default.BaudRate = BaudRate.ToString();
+            Properties.Settings.Default.PortName = cis.Controls["PortName"].Text;
+            Properties.Settings.Default.Save();
+            Com.DataReceived += Com_DataReceived;
+            Com.Open();
+            cis.Close();
+        }
+
+        private void Com_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
+        {
+            int len = Com.BytesToRead;
+            byte[] readBuffer = new byte[len];
+            Com.Read(readBuffer, 0, len); //将数据读入缓存
+            Weight.Text = reg.Match(Encoding.ASCII.GetString(readBuffer, 0, len)).Value; //获取出入库产品编号
+        }
     }
 }

+ 9 - 0
UAS-出货标签管理(泽天)/UAS_出货标签管理.resx

@@ -126,6 +126,9 @@
   <metadata name="ExportFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>294, 17</value>
   </metadata>
+  <metadata name="Com.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>442, 17</value>
+  </metadata>
   <metadata name="pd_pdno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -192,6 +195,12 @@
   <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pib_boxweight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pib_totalweight.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="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 21 - 21
UAS-出货标签管理(贸易版)/PublicMethod/DataHelper.cs

@@ -11,30 +11,30 @@ namespace UAS_LabelMachine
     public class DataHelper
     {
 
-        ////海创外网地址
-        //private readonly string ConnectionStrings = "Data Source=cmityj.gicp.net/orcl;User ID=HC_TEST;PassWord=select!#%*(";
-        ////海创ERP地址
-        //public static readonly string ERPAddesss = "http://cmityj.gicp.net:8099/ERP/";
-        ////海创FTP
-        //public static readonly string FTPAddress = "ftp://cmityj.gicp.net|HCFTP|Admin1@#";
+        //海创外网地址
+        private readonly string ConnectionStrings = "Data Source=cmityj.gicp.net/orcl;User ID=HC_TEST;PassWord=select!#%*(";
+        //海创ERP地址
+        public static readonly string ERPAddesss = "http://cmityj.gicp.net:8099/ERP/";
+        //海创FTP
+        public static readonly string FTPAddress = "ftp://cmityj.gicp.net|HCFTP|Admin1@#";
 
-        //public static readonly string InnerFTPAddress = "ftp://192.168.1.8|HCFTP|Admin1@#";
-        ////Oracle端口
-        //public static readonly string OraclePort = "1521";
-        ////需要显示的账套
-        //public static readonly string Masters = "HC_TEST";
-
-        //凯而高地址
-        private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=KRG_TEST;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=112.25.154.186)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
-        //凯而高ERP地址
-        public static readonly string ERPAddesss = "http://112.25.154.186:8099/ERP/";
-        //凯而高FTP
-        public static readonly string FTPAddress = "ftp://112.25.154.186:21|KEGFTP|Admin1@#";
-        public static readonly string InnerFTPAddress = "ftp://112.25.154.186:21|HCFTP|Admin1@#";
+        public static readonly string InnerFTPAddress = "ftp://192.168.1.8|HCFTP|Admin1@#";
         //Oracle端口
         public static readonly string OraclePort = "1521";
         //需要显示的账套
-        public static readonly string Masters = "GOLDEN";
+        public static readonly string Masters = "HC_TEST";
+
+        ////凯而高地址
+        //private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=KRG_TEST;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=112.25.154.186)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        ////凯而高ERP地址
+        //public static readonly string ERPAddesss = "http://112.25.154.186:8099/ERP/";
+        ////凯而高FTP
+        //public static readonly string FTPAddress = "ftp://112.25.154.186:21|KEGFTP|Admin1@#";
+        //public static readonly string InnerFTPAddress = "ftp://112.25.154.186:21|HCFTP|Admin1@#";
+        ////Oracle端口
+        //public static readonly string OraclePort = "1521";
+        ////需要显示的账套
+        //public static readonly string Masters = "GOLDEN";
 
         ////凯而高
         //private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=KRG_TEST;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.12)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
@@ -1133,7 +1133,7 @@ namespace UAS_LabelMachine
             command.CommandText = ProcedureName;
             command.CommandType = CommandType.StoredProcedure;
             for (int i = 0; i < param.Length; i++)
-                command.Parameters.Add(new OracleParameter(param[i].ToString(), OracleDbType.Varchar2, 200, param[i], ParameterDirection.InputOutput));
+                command.Parameters.Add(new OracleParameter(param[i].ToString(), OracleDbType.Varchar2, 1000, param[i], ParameterDirection.InputOutput));
             try
             {
                 command.ExecuteNonQuery();

+ 8 - 0
UAS-出货标签管理(贸易版)/PublicMethod/LogicHandler.cs

@@ -33,5 +33,13 @@ namespace UAS_LabelMachine.PublicMethod
             oDay = param[4];
             oDate = param[5];
         }
+
+        public static void CustBarCode(string iInoutno,out string oSQL)
+        {
+            oSQL = "";
+            string[] param = new string[] { iInoutno, oSQL };
+            dh.CallProcedure("SP_CUSTBARCODE", ref param);
+            oSQL = param[1];
+        }
     }
 }

+ 2 - 2
UAS-出货标签管理(贸易版)/PublicMethod/SqliteDBHelper.cs

@@ -230,7 +230,7 @@ namespace UAS_LabelMachine
             sb.Append("update  " + tableName + " set  ");
             for (int i = 0; i < dt.Columns.Count; i++)
             {
-                if (dt.Columns[i].ColumnName.ToUpper() != "PIB_ID")
+                if (dt.Columns[i].ColumnName.ToUpper() != "PIB_ID" && dt.Columns[i].ColumnName.ToUpper() != "PIB_DATECODE" && dt.Columns[i].ColumnName.ToUpper() != "PIB_LOTNO")
                 {
                     if (i != dt.Columns.Count - 1)
                     {
@@ -240,7 +240,7 @@ namespace UAS_LabelMachine
                     {
                         sb.Append(dt.Columns[i].ColumnName + "=?");
                     }
-                }              
+                }
             }
             sb.Append("where pib_id=?");
             SQLiteTransaction tx = this._odcConnection.BeginTransaction();

+ 249 - 234
UAS-出货标签管理(贸易版)/UAS_出货标签管理.Designer.cs

@@ -102,6 +102,7 @@
             this.客户合并规则ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.ImportExcel = new System.Windows.Forms.OpenFileDialog();
             this.pi_class = new System.Windows.Forms.Label();
+            this.CustBarCode = new System.Windows.Forms.Button();
             this.cu_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
             this.groupBoxWithBorder1 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.label18 = new System.Windows.Forms.Label();
@@ -131,6 +132,32 @@
             this.sg_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
             this.MessageLog = new UAS_LabelMachine.CustomControl.RichText.RichTextAutoBottom();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_id1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_orispeccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_madein = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_zxbzs = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_year = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_month = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_day = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_custbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_custoutboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_pocode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_custprodspec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pi_inoutno = new UAS_LabelMachine.CustomControl.BlurSearch();
             this.SingleLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.label8 = new System.Windows.Forms.Label();
@@ -169,32 +196,6 @@
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
-            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_id1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_orispeccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_madein = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_zxbzs = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_year = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_month = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_day = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_custbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_custoutboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_pocode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_custprodspec = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             this.Menu.SuspendLayout();
@@ -840,6 +841,18 @@
             this.pi_class.TabIndex = 90;
             this.pi_class.Visible = false;
             // 
+            // CustBarCode
+            // 
+            this.CustBarCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CustBarCode.Location = new System.Drawing.Point(522, 178);
+            this.CustBarCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.CustBarCode.Name = "CustBarCode";
+            this.CustBarCode.Size = new System.Drawing.Size(68, 26);
+            this.CustBarCode.TabIndex = 91;
+            this.CustBarCode.Text = "特殊条码";
+            this.CustBarCode.UseVisualStyleBackColor = true;
+            this.CustBarCode.Click += new System.EventHandler(this.CustBarCode_Click);
+            // 
             // cu_code
             // 
             this.cu_code.AllPower = null;
@@ -1234,6 +1247,214 @@
             this.LabelInf.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelInf_CellValueChanged);
             this.LabelInf.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelInf_DataError);
             // 
+            // Choose
+            // 
+            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Choose.HeaderText = "勾选";
+            this.Choose.Name = "Choose";
+            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.Choose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.Choose.Width = 55;
+            // 
+            // pib_ifpick
+            // 
+            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifpick.DataPropertyName = "pib_ifpick";
+            this.pib_ifpick.HeaderText = "已采集";
+            this.pib_ifpick.Name = "pib_ifpick";
+            this.pib_ifpick.Width = 60;
+            // 
+            // pib_ifprint
+            // 
+            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifprint.DataPropertyName = "pib_ifprint";
+            this.pib_ifprint.HeaderText = "已打印";
+            this.pib_ifprint.Name = "pib_ifprint";
+            this.pib_ifprint.Width = 60;
+            // 
+            // pib_id1
+            // 
+            this.pib_id1.DataPropertyName = "pib_id";
+            this.pib_id1.HeaderText = "pib_id";
+            this.pib_id1.Name = "pib_id1";
+            this.pib_id1.Visible = false;
+            this.pib_id1.Width = 66;
+            // 
+            // pib_pdno
+            // 
+            this.pib_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.pib_pdno.DataPropertyName = "pib_pdno";
+            this.pib_pdno.HeaderText = "明细序号";
+            this.pib_pdno.Name = "pib_pdno";
+            this.pib_pdno.ReadOnly = true;
+            this.pib_pdno.Width = 78;
+            // 
+            // pib_prodcode
+            // 
+            this.pib_prodcode.DataPropertyName = "pib_prodcode";
+            this.pib_prodcode.HeaderText = "物料编号";
+            this.pib_prodcode.Name = "pib_prodcode";
+            this.pib_prodcode.ReadOnly = true;
+            this.pib_prodcode.Width = 78;
+            // 
+            // pr_orispeccode
+            // 
+            this.pr_orispeccode.DataPropertyName = "pr_orispeccode";
+            this.pr_orispeccode.HeaderText = "MPN";
+            this.pr_orispeccode.Name = "pr_orispeccode";
+            this.pr_orispeccode.ReadOnly = true;
+            this.pr_orispeccode.Width = 48;
+            // 
+            // pr_brand
+            // 
+            this.pr_brand.DataPropertyName = "pr_brand";
+            this.pr_brand.HeaderText = "品牌";
+            this.pr_brand.Name = "pr_brand";
+            this.pr_brand.ReadOnly = true;
+            this.pr_brand.Width = 54;
+            // 
+            // pib_madein
+            // 
+            this.pib_madein.DataPropertyName = "pib_madein";
+            this.pib_madein.HeaderText = "产地";
+            this.pib_madein.Name = "pib_madein";
+            this.pib_madein.Width = 54;
+            // 
+            // pr_zxbzs
+            // 
+            this.pr_zxbzs.DataPropertyName = "pr_zxbzs";
+            this.pr_zxbzs.HeaderText = "最小包装数";
+            this.pr_zxbzs.Name = "pr_zxbzs";
+            this.pr_zxbzs.Visible = false;
+            this.pr_zxbzs.Width = 90;
+            // 
+            // pr_unit
+            // 
+            this.pr_unit.DataPropertyName = "pr_unit";
+            this.pr_unit.HeaderText = "单位";
+            this.pr_unit.Name = "pr_unit";
+            this.pr_unit.Visible = false;
+            this.pr_unit.Width = 54;
+            // 
+            // pib_lotno
+            // 
+            this.pib_lotno.DataPropertyName = "pib_lotno";
+            this.pib_lotno.HeaderText = "LotNo";
+            this.pib_lotno.Name = "pib_lotno";
+            this.pib_lotno.Width = 60;
+            // 
+            // pib_datecode
+            // 
+            this.pib_datecode.DataPropertyName = "pib_datecode";
+            this.pib_datecode.HeaderText = "DateCode";
+            this.pib_datecode.Name = "pib_datecode";
+            this.pib_datecode.Width = 78;
+            // 
+            // pib_year
+            // 
+            this.pib_year.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.pib_year.DataPropertyName = "pib_year";
+            this.pib_year.HeaderText = "年";
+            this.pib_year.Name = "pib_year";
+            this.pib_year.Width = 42;
+            // 
+            // pib_month
+            // 
+            this.pib_month.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_month.DataPropertyName = "pib_month";
+            this.pib_month.HeaderText = "月";
+            this.pib_month.Name = "pib_month";
+            this.pib_month.Width = 42;
+            // 
+            // pib_day
+            // 
+            this.pib_day.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_day.DataPropertyName = "pib_day";
+            this.pib_day.HeaderText = "日";
+            this.pib_day.Name = "pib_day";
+            this.pib_day.Width = 42;
+            // 
+            // pib_qty
+            // 
+            this.pib_qty.DataPropertyName = "pib_qty";
+            this.pib_qty.HeaderText = "数量";
+            this.pib_qty.Name = "pib_qty";
+            this.pib_qty.ReadOnly = true;
+            this.pib_qty.Width = 54;
+            // 
+            // pib_barcode
+            // 
+            this.pib_barcode.DataPropertyName = "pib_barcode";
+            this.pib_barcode.HeaderText = "唯一条码";
+            this.pib_barcode.Name = "pib_barcode";
+            this.pib_barcode.ReadOnly = true;
+            this.pib_barcode.Visible = false;
+            this.pib_barcode.Width = 78;
+            // 
+            // pib_custbarcode
+            // 
+            this.pib_custbarcode.DataPropertyName = "pib_custbarcode";
+            this.pib_custbarcode.HeaderText = "料盘条码";
+            this.pib_custbarcode.Name = "pib_custbarcode";
+            this.pib_custbarcode.ReadOnly = true;
+            this.pib_custbarcode.Width = 78;
+            // 
+            // pib_custoutboxcode
+            // 
+            this.pib_custoutboxcode.DataPropertyName = "pib_custoutboxcode";
+            this.pib_custoutboxcode.HeaderText = "外箱条码";
+            this.pib_custoutboxcode.Name = "pib_custoutboxcode";
+            this.pib_custoutboxcode.Width = 78;
+            // 
+            // pd_pocode
+            // 
+            this.pd_pocode.DataPropertyName = "pd_pocode";
+            this.pd_pocode.HeaderText = "客户PO";
+            this.pd_pocode.Name = "pd_pocode";
+            this.pd_pocode.ReadOnly = true;
+            this.pd_pocode.Width = 66;
+            // 
+            // pd_custprodcode
+            // 
+            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
+            this.pd_custprodcode.HeaderText = "客户料号";
+            this.pd_custprodcode.Name = "pd_custprodcode";
+            this.pd_custprodcode.ReadOnly = true;
+            this.pd_custprodcode.Width = 78;
+            // 
+            // pd_custprodspec
+            // 
+            this.pd_custprodspec.DataPropertyName = "pd_custprodspec";
+            this.pd_custprodspec.HeaderText = "客户型号";
+            this.pd_custprodspec.Name = "pd_custprodspec";
+            this.pd_custprodspec.ReadOnly = true;
+            this.pd_custprodspec.Visible = false;
+            this.pd_custprodspec.Width = 78;
+            // 
+            // pr_spec
+            // 
+            this.pr_spec.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.pr_spec.DataPropertyName = "pr_spec";
+            this.pr_spec.HeaderText = "规格";
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.Width = 54;
+            // 
+            // pib_outboxcode1
+            // 
+            this.pib_outboxcode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_outboxcode1.DataPropertyName = "pib_outboxcode1";
+            this.pib_outboxcode1.HeaderText = "中盒号";
+            this.pib_outboxcode1.Name = "pib_outboxcode1";
+            this.pib_outboxcode1.Width = 90;
+            // 
+            // pib_outboxcode2
+            // 
+            this.pib_outboxcode2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_outboxcode2.DataPropertyName = "pib_outboxcode2";
+            this.pib_outboxcode2.HeaderText = "外箱号";
+            this.pib_outboxcode2.Name = "pib_outboxcode2";
+            this.pib_outboxcode2.Width = 90;
+            // 
             // pi_inoutno
             // 
             this.pi_inoutno.Condition = null;
@@ -1705,220 +1926,13 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
-            // Choose
-            // 
-            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.Choose.HeaderText = "勾选";
-            this.Choose.Name = "Choose";
-            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.Choose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.Choose.Width = 55;
-            // 
-            // pib_ifpick
-            // 
-            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifpick.DataPropertyName = "pib_ifpick";
-            this.pib_ifpick.HeaderText = "已采集";
-            this.pib_ifpick.Name = "pib_ifpick";
-            this.pib_ifpick.Width = 60;
-            // 
-            // pib_ifprint
-            // 
-            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifprint.DataPropertyName = "pib_ifprint";
-            this.pib_ifprint.HeaderText = "已打印";
-            this.pib_ifprint.Name = "pib_ifprint";
-            this.pib_ifprint.Width = 60;
-            // 
-            // pib_id1
-            // 
-            this.pib_id1.DataPropertyName = "pib_id";
-            this.pib_id1.HeaderText = "pib_id";
-            this.pib_id1.Name = "pib_id1";
-            this.pib_id1.Visible = false;
-            this.pib_id1.Width = 66;
-            // 
-            // pib_pdno
-            // 
-            this.pib_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.pib_pdno.DataPropertyName = "pib_pdno";
-            this.pib_pdno.HeaderText = "明细序号";
-            this.pib_pdno.Name = "pib_pdno";
-            this.pib_pdno.ReadOnly = true;
-            this.pib_pdno.Width = 78;
-            // 
-            // pib_prodcode
-            // 
-            this.pib_prodcode.DataPropertyName = "pib_prodcode";
-            this.pib_prodcode.HeaderText = "物料编号";
-            this.pib_prodcode.Name = "pib_prodcode";
-            this.pib_prodcode.ReadOnly = true;
-            this.pib_prodcode.Width = 78;
-            // 
-            // pr_orispeccode
-            // 
-            this.pr_orispeccode.DataPropertyName = "pr_orispeccode";
-            this.pr_orispeccode.HeaderText = "MPN";
-            this.pr_orispeccode.Name = "pr_orispeccode";
-            this.pr_orispeccode.ReadOnly = true;
-            this.pr_orispeccode.Width = 48;
-            // 
-            // pr_brand
-            // 
-            this.pr_brand.DataPropertyName = "pr_brand";
-            this.pr_brand.HeaderText = "品牌";
-            this.pr_brand.Name = "pr_brand";
-            this.pr_brand.ReadOnly = true;
-            this.pr_brand.Width = 54;
-            // 
-            // pib_madein
-            // 
-            this.pib_madein.DataPropertyName = "pib_madein";
-            this.pib_madein.HeaderText = "产地";
-            this.pib_madein.Name = "pib_madein";
-            this.pib_madein.Width = 54;
-            // 
-            // pr_zxbzs
-            // 
-            this.pr_zxbzs.DataPropertyName = "pr_zxbzs";
-            this.pr_zxbzs.HeaderText = "最小包装数";
-            this.pr_zxbzs.Name = "pr_zxbzs";
-            this.pr_zxbzs.Visible = false;
-            this.pr_zxbzs.Width = 90;
-            // 
-            // pr_unit
-            // 
-            this.pr_unit.DataPropertyName = "pr_unit";
-            this.pr_unit.HeaderText = "单位";
-            this.pr_unit.Name = "pr_unit";
-            this.pr_unit.Visible = false;
-            this.pr_unit.Width = 54;
-            // 
-            // pib_lotno
-            // 
-            this.pib_lotno.DataPropertyName = "pib_lotno";
-            this.pib_lotno.HeaderText = "LotNo";
-            this.pib_lotno.Name = "pib_lotno";
-            this.pib_lotno.Width = 60;
-            // 
-            // pib_datecode
-            // 
-            this.pib_datecode.DataPropertyName = "pib_datecode";
-            this.pib_datecode.HeaderText = "DateCode";
-            this.pib_datecode.Name = "pib_datecode";
-            this.pib_datecode.Width = 78;
-            // 
-            // pib_year
-            // 
-            this.pib_year.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
-            this.pib_year.DataPropertyName = "pib_year";
-            this.pib_year.HeaderText = "年";
-            this.pib_year.Name = "pib_year";
-            this.pib_year.Width = 42;
-            // 
-            // pib_month
-            // 
-            this.pib_month.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_month.DataPropertyName = "pib_month";
-            this.pib_month.HeaderText = "月";
-            this.pib_month.Name = "pib_month";
-            this.pib_month.Width = 42;
-            // 
-            // pib_day
-            // 
-            this.pib_day.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_day.DataPropertyName = "pib_day";
-            this.pib_day.HeaderText = "日";
-            this.pib_day.Name = "pib_day";
-            this.pib_day.Width = 42;
-            // 
-            // pib_qty
-            // 
-            this.pib_qty.DataPropertyName = "pib_qty";
-            this.pib_qty.HeaderText = "数量";
-            this.pib_qty.Name = "pib_qty";
-            this.pib_qty.ReadOnly = true;
-            this.pib_qty.Width = 54;
-            // 
-            // pib_barcode
-            // 
-            this.pib_barcode.DataPropertyName = "pib_barcode";
-            this.pib_barcode.HeaderText = "唯一条码";
-            this.pib_barcode.Name = "pib_barcode";
-            this.pib_barcode.ReadOnly = true;
-            this.pib_barcode.Visible = false;
-            this.pib_barcode.Width = 78;
-            // 
-            // pib_custbarcode
-            // 
-            this.pib_custbarcode.DataPropertyName = "pib_custbarcode";
-            this.pib_custbarcode.HeaderText = "料盘条码";
-            this.pib_custbarcode.Name = "pib_custbarcode";
-            this.pib_custbarcode.ReadOnly = true;
-            this.pib_custbarcode.Width = 78;
-            // 
-            // pib_custoutboxcode
-            // 
-            this.pib_custoutboxcode.DataPropertyName = "pib_custoutboxcode";
-            this.pib_custoutboxcode.HeaderText = "外箱条码";
-            this.pib_custoutboxcode.Name = "pib_custoutboxcode";
-            this.pib_custoutboxcode.Width = 78;
-            // 
-            // pd_pocode
-            // 
-            this.pd_pocode.DataPropertyName = "pd_pocode";
-            this.pd_pocode.HeaderText = "客户PO";
-            this.pd_pocode.Name = "pd_pocode";
-            this.pd_pocode.ReadOnly = true;
-            this.pd_pocode.Width = 66;
-            // 
-            // pd_custprodcode
-            // 
-            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
-            this.pd_custprodcode.HeaderText = "客户料号";
-            this.pd_custprodcode.Name = "pd_custprodcode";
-            this.pd_custprodcode.ReadOnly = true;
-            this.pd_custprodcode.Width = 78;
-            // 
-            // pd_custprodspec
-            // 
-            this.pd_custprodspec.DataPropertyName = "pd_custprodspec";
-            this.pd_custprodspec.HeaderText = "客户型号";
-            this.pd_custprodspec.Name = "pd_custprodspec";
-            this.pd_custprodspec.ReadOnly = true;
-            this.pd_custprodspec.Visible = false;
-            this.pd_custprodspec.Width = 78;
-            // 
-            // pr_spec
-            // 
-            this.pr_spec.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
-            this.pr_spec.DataPropertyName = "pr_spec";
-            this.pr_spec.HeaderText = "规格";
-            this.pr_spec.Name = "pr_spec";
-            this.pr_spec.Width = 54;
-            // 
-            // pib_outboxcode1
-            // 
-            this.pib_outboxcode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_outboxcode1.DataPropertyName = "pib_outboxcode1";
-            this.pib_outboxcode1.HeaderText = "中盒号";
-            this.pib_outboxcode1.Name = "pib_outboxcode1";
-            this.pib_outboxcode1.Width = 90;
-            // 
-            // pib_outboxcode2
-            // 
-            this.pib_outboxcode2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_outboxcode2.DataPropertyName = "pib_outboxcode2";
-            this.pib_outboxcode2.HeaderText = "外箱号";
-            this.pib_outboxcode2.Name = "pib_outboxcode2";
-            this.pib_outboxcode2.Width = 90;
-            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
             this.ClientSize = new System.Drawing.Size(1258, 715);
+            this.Controls.Add(this.CustBarCode);
             this.Controls.Add(this.pi_class);
             this.Controls.Add(this.MenuSetting);
             this.Controls.Add(this.cu_code);
@@ -2157,5 +2171,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
+        private System.Windows.Forms.Button CustBarCode;
     }
 }

+ 13 - 1
UAS-出货标签管理(贸易版)/UAS_出货标签管理.cs

@@ -1604,7 +1604,7 @@ namespace UAS_LabelMachine
             {
                 //检验查询的字段和本地数据库字段是否匹配
                 sdh.AddColumFromDataTable(LabelInfDataTable, "prodiobarcode");
-                //sdh.BatchInsert("prodiobarcode", LabelInfDataTable);
+                sdh.BatchInsert("prodiobarcode", LabelInfDataTable);
             }
             sql.Clear();
             sql.Append("select * from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' order by pib_id ");
@@ -2783,5 +2783,17 @@ namespace UAS_LabelMachine
             }
             setvalueandprint.FindForm().Close();
         }
+
+        /// <summary>
+        /// 特殊业务逻辑
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void CustBarCode_Click(object sender, EventArgs e)
+        {
+            string SQL = "";
+            LogicHandler.CustBarCode(pi_inoutno.Text, out SQL);
+            sdh.ExecuteSql(SQL, "update");
+        }
     }
 }

+ 33 - 26
UAS-出货标签管理(贸易版)/生成条码.cs

@@ -493,40 +493,15 @@ namespace UAS_LabelMachine
             CustCode = dh.getFieldDataByCondition("ProdInOut", "pi_cardcode", "pi_inoutno='" + pi_inoutno.Text + "'").ToString();
             //用于存放每一项的明细的数据
             dt = (DataTable)dh.ExecuteSql("select pi_class,pi_id from prodinout where pi_inoutno='" + pi_inoutno.Text + "'", "select");
-            DataTable custrule = (DataTable)dh.ExecuteSql("select CU_PRINT_MIDSPEC,CU_PRINT_MIDPO,cu_print_midprod from customer where cu_code='" + CustCode + "'", "select");
             if (dt.Rows.Count > 0)
             {
                 pi_id = dt.Rows[0]["pi_id"].ToString();
                 BaseUtil.SetFormValue(this.Controls, dt);
-                string condition = "";
-                if (custrule.Rows.Count > 0)
-                {
-                    string cu_print_midspec = custrule.Rows[0]["cu_print_midspec"].ToString();
-                    string cu_print_midpo = custrule.Rows[0]["cu_print_midpo"].ToString();
-                    string cu_print_midprod = custrule.Rows[0]["cu_print_midprod"].ToString();
-                    if (cu_print_midspec == "-1")
-                    {
-                        condition += ",pd_vespec_user";
-                    }
-                    if (cu_print_midpo == "-1")
-                    {
-                        condition += ",pd_pocode";
-                    }
-                    if (cu_print_midprod == "-1")
-                    {
-                        condition += ",pd_custprodcode";
-                    }
-                }
                 switch (pi_class.Text)
                 {
                     case "出货单":
                         sql.Clear();
-                        sql.Append("select pd_piid,pd_id,pr_id,pr_brand,pr_orispeccode,pr_madein,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty pd_totalqty,pd_pocode,pd_ordercode,pd_orderdetno,pd_pdno,pd_prodcode,pd_custprodcode,");
-                        sql.Append("pd_piclass,pd_qty from (select pd_piid,pd_id,pr_id,pr_brand,nvl(pd_vespec_user,pr_orispeccode)pr_orispeccode,pr_madein,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty,pd_pocode,pd_ordercode,pd_orderdetno,pd_pdno,");
-                        sql.Append("pd_prodcode,pd_custprodcode,pd_piclass,outqty-nvl((select sum(nvl(pib_qty,0)) from PRODIOBARCODE where PIB_PIID=pd_piid and pib_pdno=pd_pdno ),0)pd_qty ");
-                        sql.Append("from (select pd_piid,min(pd_id)pd_id,max(nvl(pd_vespecprint_user,pd_vespec_user))pd_vespec_user,sum(pd_outqty)outqty,min(pd_pocode)pd_pocode,min(pd_ordercode)pd_ordercode,min(pd_orderdetno)pd_orderdetno,min(pd_pdno)pd_pdno,max(pd_custprodcode)pd_custprodcode,max(pd_prodcode)pd_prodcode,max(pd_piclass)pd_piclass ");
-                        sql.Append("from prodiodetail group by pd_piid" + condition + ")T left join product ");
-                        sql.Append("on pr_code=pd_prodcode)  where  pd_piid='" + pi_id + "' order by pd_pdno");
+                        sql.Append(CustomerBarCode());
                         break;
                     case "完工入库单":
                         sql.Clear();
@@ -569,5 +544,37 @@ namespace UAS_LabelMachine
                 pi_inoutno.Text = "";
             }
         }
+
+        private string CustomerBarCode()
+        {
+            DataTable custrule = (DataTable)dh.ExecuteSql("select CU_PRINT_MIDSPEC,CU_PRINT_MIDPO,cu_print_midprod from customer where cu_code='" + CustCode + "'", "select");
+            string condition = "";
+            if (custrule.Rows.Count > 0)
+            {
+                string cu_print_midspec = custrule.Rows[0]["cu_print_midspec"].ToString();
+                string cu_print_midpo = custrule.Rows[0]["cu_print_midpo"].ToString();
+                string cu_print_midprod = custrule.Rows[0]["cu_print_midprod"].ToString();
+                if (cu_print_midspec == "-1")
+                {
+                    condition += ",pd_vespec_user";
+                }
+                if (cu_print_midpo == "-1")
+                {
+                    condition += ",pd_pocode";
+                }
+                if (cu_print_midprod == "-1")
+                {
+                    condition += ",pd_custprodcode";
+                }
+            }
+            sql.Clear();
+            sql.Append("select pd_piid,pd_id,pr_id,pr_brand,pr_orispeccode,pr_madein,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty pd_totalqty,pd_pocode,pd_ordercode,pd_orderdetno,pd_pdno,pd_prodcode,pd_custprodcode,");
+            sql.Append("pd_piclass,pd_qty from (select pd_piid,pd_id,pr_id,pr_brand,nvl(pd_vespec_user,pr_orispeccode)pr_orispeccode,pr_madein,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty,pd_pocode,pd_ordercode,pd_orderdetno,pd_pdno,");
+            sql.Append("pd_prodcode,pd_custprodcode,pd_piclass,outqty-nvl((select sum(nvl(pib_qty,0)) from PRODIOBARCODE where PIB_PIID=pd_piid and pib_pdno=pd_pdno ),0)pd_qty ");
+            sql.Append("from (select pd_piid,min(pd_id)pd_id,max(nvl(pd_vespecprint_user,pd_vespec_user))pd_vespec_user,sum(pd_outqty)outqty,min(pd_pocode)pd_pocode,min(pd_ordercode)pd_ordercode,min(pd_orderdetno)pd_orderdetno,min(pd_pdno)pd_pdno,max(pd_custprodcode)pd_custprodcode,max(pd_prodcode)pd_prodcode,max(pd_piclass)pd_piclass ");
+            sql.Append("from prodiodetail group by pd_piid" + condition + ")T left join product ");
+            sql.Append("on pr_code=pd_prodcode)  where  pd_piid='" + pi_id + "' order by pd_pdno");
+            return sql.ToString();
+        }
     }
 }