Эх сурвалжийг харах

彩盒标打印增加工单归属放大镜

Hcsy 8 жил өмнө
parent
commit
205b92c007

+ 6 - 0
MES_Interface/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
+    </startup>
+</configuration>

+ 87 - 0
MES_Interface/MES_Interface.csproj

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{7B7322F9-F0F3-4AC8-B7D2-C2120E9AEA8C}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>MES_Interface</RootNamespace>
+    <AssemblyName>MES_Interface</AssemblyName>
+    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 22 - 0
MES_Interface/Program.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace MES_Interface
+{
+    static class Program
+    {
+        /// <summary>
+        /// 应用程序的主入口点。
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new Form1());
+        }
+    }
+}

+ 36 - 0
MES_Interface/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("MES_Interface")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MES_Interface")]
+[assembly: AssemblyCopyright("Copyright ©  2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//将 ComVisible 设置为 false 将使此程序集中的类型
+//对 COM 组件不可见。  如果需要从 COM 访问此程序集中的类型,
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("7b7322f9-f0f3-4ac8-b7d2-c2120e9aea8c")]
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
+// 方法是按如下所示使用“*”: :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
MES_Interface/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本: 4.0.30319.42000
+//
+//     对此文件的更改可能导致不正确的行为,如果
+//     重新生成代码,则所做更改将丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace MES_Interface.Properties
+{
+
+
+    /// <summary>
+    ///   强类型资源类,用于查找本地化字符串等。
+    /// </summary>
+    // 此类是由 StronglyTypedResourceBuilder
+    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    // (以 /str 作为命令选项),或重新生成 VS 项目。
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+        /// <summary>
+        ///   返回此类使用的缓存 ResourceManager 实例。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MES_Interface.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   覆盖当前线程的 CurrentUICulture 属性
+        ///   使用此强类型的资源类的资源查找。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}

+ 117 - 0
MES_Interface/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?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.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: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" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </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" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 30 - 0
MES_Interface/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace MES_Interface.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
MES_Interface/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 83 - 0
TestProject/AutoSizeControl.cs

@@ -0,0 +1,83 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace TestProject
+{
+    class AutoSizeControl
+    {
+        /// <summary>
+        /// 记录所有控件
+        /// </summary>
+        List<Control> ctl = new List<Control>();
+        /// <summary>
+        /// 记录控件的初始化位置
+        /// </summary>
+        Dictionary<string, Point> CtlPoint = new Dictionary<string, Point>();
+        /// <summary>
+        /// 初始化的窗体宽度
+        /// </summary>
+        int InitFormWidth = 0;
+        /// <summary>
+        /// 初始化的窗体高度
+        /// </summary>
+        int InitFormHeight = 0;
+        /// <summary>
+        /// 窗体调整时的宽度
+        /// </summary>
+        int AutoSizeFormWidth = 0;
+        /// <summary>
+        /// 窗体调整时的高度
+        /// </summary>
+        int AutoSizeFormHeight = 0;
+        /// <summary>
+        /// 自适应宽度比例
+        /// </summary>
+        float AutoSizeWidthRate;
+        /// <summary>
+        /// 
+        /// </summary>
+        float AutoSizeHeigthRate;
+
+        public void InitControl(Control control)
+        {
+            InitFormWidth = control.Width;
+            InitFormHeight = control.Height;
+            foreach (Control item in control.Controls)
+            {
+                ctl.Add(item);
+                CtlPoint.Add(item.Name, item.Location);
+                if (item.Controls.Count > 0)
+                {
+                    AddControl(item);
+                }
+            }
+        }
+
+        public void AddControl(Control control)
+        {
+            foreach (Control item in control.Controls)
+            {
+                ctl.Add(item);
+                CtlPoint.Add(item.Name, item.Location);
+                if (item.Controls.Count > 0)
+                {
+                    AddControl(item);
+                }
+            }
+        }
+
+        public void AutoSize(Control control)
+        {
+            AutoSizeFormHeight = control.Height;
+            AutoSizeFormWidth = control.Width;
+            AutoSizeWidthRate = (float)(AutoSizeFormWidth * 1.0 / InitFormWidth);
+            AutoSizeHeigthRate = (float)(AutoSizeFormHeight * 1.0 / InitFormHeight);
+            for (int i = 0; i < ctl.Count; i++)
+            {
+                ctl[i].Location = new Point((int)(CtlPoint[ctl[i].Name].X * AutoSizeWidthRate), (int)(CtlPoint[ctl[i].Name].Y * AutoSizeHeigthRate));
+            }
+        }
+    }
+}

+ 2 - 2
UAS-MES/App.config

@@ -37,14 +37,14 @@
         <value />
       </setting>
       <setting name="FTPAddress" serializeAs="String">
-        <value>ftp://172.16.11.99/print/|uasmes|Administrator1@#</value>
+        <value>ftp://192.168.253.9/MESSetting/print/|mesconfig|Administrator1@#</value>
       </setting>
     </UAS_MES.Properties.Settings>
   </userSettings>
   <applicationSettings>
     <UAS_MES.Properties.Settings>
       <setting name="MES" serializeAs="String">
-        <value>Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
+        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
       </setting>
     </UAS_MES.Properties.Settings>
   </applicationSettings>

+ 88 - 118
UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs

@@ -48,9 +48,9 @@
             this.label3 = new System.Windows.Forms.Label();
             this.pr_id = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
+            this.PrintNum = new System.Windows.Forms.NumericUpDown();
             this.pa_code = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxGeneratePaCode();
             this.PrintList = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
-            this.PrintNum = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.ma_code = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.Printing = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -68,6 +68,7 @@
             this.pa_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.panel2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
             this.SuspendLayout();
             // 
@@ -76,10 +77,9 @@
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Enabled = false;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(700, 66);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code_label.Location = new System.Drawing.Point(525, 53);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
             this.pr_code_label.TabIndex = 81;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -87,10 +87,9 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(27, 128);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(20, 102);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 80;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -98,10 +97,9 @@
             // 
             this.ma_code_label.AutoSize = true;
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(377, 68);
-            this.ma_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_code_label.Location = new System.Drawing.Point(283, 54);
             this.ma_code_label.Name = "ma_code_label";
-            this.ma_code_label.Size = new System.Drawing.Size(72, 27);
+            this.ma_code_label.Size = new System.Drawing.Size(58, 21);
             this.ma_code_label.TabIndex = 76;
             this.ma_code_label.Text = "工单号";
             // 
@@ -111,9 +109,8 @@
             this.panel2.Controls.Add(this.label1);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(0, 0);
-            this.panel2.Margin = new System.Windows.Forms.Padding(4);
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(1359, 36);
+            this.panel2.Size = new System.Drawing.Size(1019, 29);
             this.panel2.TabIndex = 88;
             this.panel2.Tag = "NoAuto";
             // 
@@ -122,10 +119,9 @@
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.label1.Location = new System.Drawing.Point(16, 5);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(12, 4);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 0;
             this.label1.Text = "工单信息";
             // 
@@ -133,10 +129,9 @@
             // 
             this.pa_packageqty_label.AutoSize = true;
             this.pa_packageqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_packageqty_label.Location = new System.Drawing.Point(357, 128);
-            this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_packageqty_label.Location = new System.Drawing.Point(268, 102);
             this.pa_packageqty_label.Name = "pa_packageqty_label";
-            this.pa_packageqty_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_packageqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_packageqty_label.TabIndex = 95;
             this.pa_packageqty_label.Text = "已装数量";
             // 
@@ -144,10 +139,9 @@
             // 
             this.pa_totalqty_label.AutoSize = true;
             this.pa_totalqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_totalqty_label.Location = new System.Drawing.Point(359, 186);
-            this.pa_totalqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_totalqty_label.Location = new System.Drawing.Point(269, 149);
             this.pa_totalqty_label.Name = "pa_totalqty_label";
-            this.pa_totalqty_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_totalqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_totalqty_label.TabIndex = 97;
             this.pa_totalqty_label.Text = "箱内容量";
             // 
@@ -156,10 +150,9 @@
             this.label13.AutoSize = true;
             this.label13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label13.ForeColor = System.Drawing.Color.Black;
-            this.label13.Location = new System.Drawing.Point(27, 715);
-            this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label13.Location = new System.Drawing.Point(20, 572);
             this.label13.Name = "label13";
-            this.label13.Size = new System.Drawing.Size(72, 27);
+            this.label13.Size = new System.Drawing.Size(58, 21);
             this.label13.TabIndex = 105;
             this.label13.Text = "序列号";
             // 
@@ -167,10 +160,9 @@
             // 
             this.pa_code_label.AutoSize = true;
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_code_label.Location = new System.Drawing.Point(69, 66);
-            this.pa_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_code_label.Location = new System.Drawing.Point(52, 53);
             this.pa_code_label.Name = "pa_code_label";
-            this.pa_code_label.Size = new System.Drawing.Size(52, 27);
+            this.pa_code_label.Size = new System.Drawing.Size(42, 21);
             this.pa_code_label.TabIndex = 113;
             this.pa_code_label.Text = "箱号";
             // 
@@ -178,10 +170,9 @@
             // 
             this.PrintList_label.AutoSize = true;
             this.PrintList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintList_label.Location = new System.Drawing.Point(9, 186);
-            this.PrintList_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrintList_label.Location = new System.Drawing.Point(7, 149);
             this.PrintList_label.Name = "PrintList_label";
-            this.PrintList_label.Size = new System.Drawing.Size(112, 27);
+            this.PrintList_label.Size = new System.Drawing.Size(90, 21);
             this.PrintList_label.TabIndex = 116;
             this.PrintList_label.Text = "打印机列表";
             // 
@@ -189,10 +180,9 @@
             // 
             this.PrintNum_label.AutoSize = true;
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintNum_label.Location = new System.Drawing.Point(1043, 186);
-            this.PrintNum_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrintNum_label.Location = new System.Drawing.Point(782, 149);
             this.PrintNum_label.Name = "PrintNum_label";
-            this.PrintNum_label.Size = new System.Drawing.Size(52, 27);
+            this.PrintNum_label.Size = new System.Drawing.Size(42, 21);
             this.PrintNum_label.TabIndex = 124;
             this.PrintNum_label.Text = "份数";
             // 
@@ -200,10 +190,9 @@
             // 
             this.pa_restqty_label.AutoSize = true;
             this.pa_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_restqty_label.Location = new System.Drawing.Point(700, 128);
-            this.pa_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_restqty_label.Location = new System.Drawing.Point(525, 102);
             this.pa_restqty_label.Name = "pa_restqty_label";
-            this.pa_restqty_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_restqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_restqty_label.TabIndex = 126;
             this.pa_restqty_label.Text = "剩余容量";
             // 
@@ -211,10 +200,9 @@
             // 
             this.AutoPrint.AutoSize = true;
             this.AutoPrint.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoPrint.Location = new System.Drawing.Point(1048, 128);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4);
+            this.AutoPrint.Location = new System.Drawing.Point(786, 102);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(154, 31);
+            this.AutoPrint.Size = new System.Drawing.Size(125, 25);
             this.AutoPrint.TabIndex = 128;
             this.AutoPrint.Text = "满箱自动打印";
             this.AutoPrint.UseVisualStyleBackColor = true;
@@ -223,10 +211,9 @@
             // 
             this.Cancel.AutoSize = true;
             this.Cancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Cancel.Location = new System.Drawing.Point(429, 715);
-            this.Cancel.Margin = new System.Windows.Forms.Padding(4);
+            this.Cancel.Location = new System.Drawing.Point(322, 572);
             this.Cancel.Name = "Cancel";
-            this.Cancel.Size = new System.Drawing.Size(114, 31);
+            this.Cancel.Size = new System.Drawing.Size(93, 25);
             this.Cancel.TabIndex = 129;
             this.Cancel.Text = "取消采集";
             this.Cancel.UseVisualStyleBackColor = true;
@@ -235,10 +222,9 @@
             // 
             this.pa_id.AutoSize = true;
             this.pa_id.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_id.Location = new System.Drawing.Point(1285, 58);
-            this.pa_id.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_id.Location = new System.Drawing.Point(964, 46);
             this.pa_id.Name = "pa_id";
-            this.pa_id.Size = new System.Drawing.Size(63, 27);
+            this.pa_id.Size = new System.Drawing.Size(50, 21);
             this.pa_id.TabIndex = 153;
             this.pa_id.Text = "pa_id";
             this.pa_id.Visible = false;
@@ -247,20 +233,19 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(815, 186);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.PrintLabel.Location = new System.Drawing.Point(611, 149);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(199, 23);
+            this.PrintLabel.Size = new System.Drawing.Size(150, 20);
             this.PrintLabel.TabIndex = 159;
             // 
             // label3
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(700, 186);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(525, 149);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(92, 27);
+            this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 160;
             this.label3.Text = "打印标签";
             // 
@@ -268,10 +253,9 @@
             // 
             this.pr_id.AutoSize = true;
             this.pr_id.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_id.Location = new System.Drawing.Point(1285, 89);
-            this.pr_id.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_id.Location = new System.Drawing.Point(964, 71);
             this.pr_id.Name = "pr_id";
-            this.pr_id.Size = new System.Drawing.Size(60, 27);
+            this.pr_id.Size = new System.Drawing.Size(47, 21);
             this.pr_id.TabIndex = 161;
             this.pr_id.Tag = "pr_id";
             this.pr_id.Text = "pr_id";
@@ -283,54 +267,49 @@
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Black;
-            this.label2.Location = new System.Drawing.Point(16, 237);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(12, 190);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(92, 27);
+            this.label2.Size = new System.Drawing.Size(74, 22);
             this.label2.TabIndex = 162;
             this.label2.Text = "采集信息";
             // 
+            // PrintNum
+            // 
+            this.PrintNum.Location = new System.Drawing.Point(828, 151);
+            this.PrintNum.Name = "PrintNum";
+            this.PrintNum.Size = new System.Drawing.Size(50, 21);
+            this.PrintNum.TabIndex = 164;
+            this.PrintNum.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            // 
             // pa_code
             // 
             this.pa_code.ErrorMsg = null;
-            this.pa_code.Location = new System.Drawing.Point(144, 68);
-            this.pa_code.Margin = new System.Windows.Forms.Padding(5);
+            this.pa_code.Location = new System.Drawing.Point(108, 54);
+            this.pa_code.Margin = new System.Windows.Forms.Padding(4);
             this.pa_code.Name = "pa_code";
             this.pa_code.Pr_id = null;
-            this.pa_code.Size = new System.Drawing.Size(199, 26);
+            this.pa_code.Size = new System.Drawing.Size(149, 21);
             this.pa_code.TabIndex = 163;
+            this.pa_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pa_code_KeyDown);
             // 
             // PrintList
             // 
-            this.PrintList.Location = new System.Drawing.Point(144, 186);
-            this.PrintList.Margin = new System.Windows.Forms.Padding(5);
+            this.PrintList.Location = new System.Drawing.Point(108, 149);
+            this.PrintList.Margin = new System.Windows.Forms.Padding(4);
             this.PrintList.Name = "PrintList";
-            this.PrintList.Size = new System.Drawing.Size(200, 31);
+            this.PrintList.Size = new System.Drawing.Size(150, 25);
             this.PrintList.TabIndex = 158;
             // 
-            // PrintNum
-            // 
-            this.PrintNum.AllPower = null;
-            this.PrintNum.BackColor = System.Drawing.Color.White;
-            this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(1105, 186);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
-            this.PrintNum.Name = "PrintNum";
-            this.PrintNum.Negative = false;
-            this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(52, 25);
-            this.PrintNum.Str = null;
-            this.PrintNum.Str1 = null;
-            this.PrintNum.Str2 = null;
-            this.PrintNum.TabIndex = 156;
-            // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(1036, 268);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(777, 214);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(291, 429);
+            this.OperateResult.Size = new System.Drawing.Size(219, 344);
             this.OperateResult.TabIndex = 155;
             this.OperateResult.Text = "";
             // 
@@ -342,18 +321,18 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = "工单查询";
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(468, 68);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_code.Location = new System.Drawing.Point(352, 54);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
+            this.ma_code.ReturnData = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(200, 26);
+            this.ma_code.Size = new System.Drawing.Size(149, 21);
             this.ma_code.TabIndex = 152;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "ma_code";
             this.ma_code.TextBoxEnable = true;
-            this.ma_code.TextKeyDown += new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextKeyDown(this.ma_code_TextKeyDown);
+            this.ma_code.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextChange(this.ma_code_UserControlTextChanged);
             // 
             // Printing
             // 
@@ -362,13 +341,12 @@
             this.Printing.DownImage = ((System.Drawing.Image)(resources.GetObject("Printing.DownImage")));
             this.Printing.Image = ((System.Drawing.Image)(resources.GetObject("Printing.Image")));
             this.Printing.IsShowBorder = true;
-            this.Printing.Location = new System.Drawing.Point(1183, 186);
-            this.Printing.Margin = new System.Windows.Forms.Padding(4);
+            this.Printing.Location = new System.Drawing.Point(887, 149);
             this.Printing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printing.MoveImage")));
             this.Printing.Name = "Printing";
             this.Printing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Printing.NormalImage")));
             this.Printing.Power = null;
-            this.Printing.Size = new System.Drawing.Size(80, 30);
+            this.Printing.Size = new System.Drawing.Size(60, 24);
             this.Printing.TabIndex = 150;
             this.Printing.Tag = "ifread";
             this.Printing.Text = "打印";
@@ -382,13 +360,12 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1141, 714);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4);
+            this.Clean.Location = new System.Drawing.Point(856, 571);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(80, 30);
+            this.Clean.Size = new System.Drawing.Size(60, 24);
             this.Clean.TabIndex = 148;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -400,11 +377,10 @@
             this.pa_packageqty.BackColor = System.Drawing.Color.White;
             this.pa_packageqty.Enabled = false;
             this.pa_packageqty.ID = null;
-            this.pa_packageqty.Location = new System.Drawing.Point(468, 128);
-            this.pa_packageqty.Margin = new System.Windows.Forms.Padding(4);
+            this.pa_packageqty.Location = new System.Drawing.Point(351, 102);
             this.pa_packageqty.Name = "pa_packageqty";
             this.pa_packageqty.Power = null;
-            this.pa_packageqty.Size = new System.Drawing.Size(199, 25);
+            this.pa_packageqty.Size = new System.Drawing.Size(150, 21);
             this.pa_packageqty.Str = null;
             this.pa_packageqty.Str1 = null;
             this.pa_packageqty.Str2 = null;
@@ -418,11 +394,10 @@
             this.ma_prodcode.BackColor = System.Drawing.Color.White;
             this.ma_prodcode.Enabled = false;
             this.ma_prodcode.ID = null;
-            this.ma_prodcode.Location = new System.Drawing.Point(817, 69);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_prodcode.Location = new System.Drawing.Point(611, 55);
             this.ma_prodcode.Name = "ma_prodcode";
             this.ma_prodcode.Power = null;
-            this.ma_prodcode.Size = new System.Drawing.Size(199, 25);
+            this.ma_prodcode.Size = new System.Drawing.Size(150, 21);
             this.ma_prodcode.Str = null;
             this.ma_prodcode.Str1 = null;
             this.ma_prodcode.Str2 = null;
@@ -435,11 +410,10 @@
             this.pa_totalqty.AllPower = null;
             this.pa_totalqty.BackColor = System.Drawing.Color.White;
             this.pa_totalqty.ID = null;
-            this.pa_totalqty.Location = new System.Drawing.Point(469, 186);
-            this.pa_totalqty.Margin = new System.Windows.Forms.Padding(4);
+            this.pa_totalqty.Location = new System.Drawing.Point(352, 149);
             this.pa_totalqty.Name = "pa_totalqty";
             this.pa_totalqty.Power = null;
-            this.pa_totalqty.Size = new System.Drawing.Size(199, 25);
+            this.pa_totalqty.Size = new System.Drawing.Size(150, 21);
             this.pa_totalqty.Str = null;
             this.pa_totalqty.Str1 = null;
             this.pa_totalqty.Str2 = null;
@@ -452,11 +426,10 @@
             this.ma_prodname.BackColor = System.Drawing.Color.White;
             this.ma_prodname.Enabled = false;
             this.ma_prodname.ID = null;
-            this.ma_prodname.Location = new System.Drawing.Point(144, 128);
-            this.ma_prodname.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_prodname.Location = new System.Drawing.Point(108, 102);
             this.ma_prodname.Name = "ma_prodname";
             this.ma_prodname.Power = null;
-            this.ma_prodname.Size = new System.Drawing.Size(199, 25);
+            this.ma_prodname.Size = new System.Drawing.Size(150, 21);
             this.ma_prodname.Str = null;
             this.ma_prodname.Str1 = null;
             this.ma_prodname.Str2 = null;
@@ -469,11 +442,10 @@
             this.pa_restqty.BackColor = System.Drawing.Color.White;
             this.pa_restqty.Enabled = false;
             this.pa_restqty.ID = null;
-            this.pa_restqty.Location = new System.Drawing.Point(815, 128);
-            this.pa_restqty.Margin = new System.Windows.Forms.Padding(4);
+            this.pa_restqty.Location = new System.Drawing.Point(611, 102);
             this.pa_restqty.Name = "pa_restqty";
             this.pa_restqty.Power = null;
-            this.pa_restqty.Size = new System.Drawing.Size(199, 25);
+            this.pa_restqty.Size = new System.Drawing.Size(150, 21);
             this.pa_restqty.Str = null;
             this.pa_restqty.Str1 = null;
             this.pa_restqty.Str2 = null;
@@ -485,11 +457,10 @@
             this.barcode.AllPower = "ifall";
             this.barcode.BackColor = System.Drawing.Color.White;
             this.barcode.ID = null;
-            this.barcode.Location = new System.Drawing.Point(117, 715);
-            this.barcode.Margin = new System.Windows.Forms.Padding(4);
+            this.barcode.Location = new System.Drawing.Point(88, 572);
             this.barcode.Name = "barcode";
             this.barcode.Power = "ifwrite";
-            this.barcode.Size = new System.Drawing.Size(260, 25);
+            this.barcode.Size = new System.Drawing.Size(196, 21);
             this.barcode.Str = null;
             this.barcode.Str1 = null;
             this.barcode.Str2 = null;
@@ -509,12 +480,11 @@
             this.pd_innerqty,
             this.pa_indate,
             this.pd_id});
-            this.PackageDetail.Location = new System.Drawing.Point(21, 268);
-            this.PackageDetail.Margin = new System.Windows.Forms.Padding(4);
+            this.PackageDetail.Location = new System.Drawing.Point(16, 214);
             this.PackageDetail.Name = "PackageDetail";
             this.PackageDetail.ReadOnly = true;
             this.PackageDetail.RowTemplate.Height = 23;
-            this.PackageDetail.Size = new System.Drawing.Size(995, 430);
+            this.PackageDetail.Size = new System.Drawing.Size(746, 344);
             this.PackageDetail.TabIndex = 134;
             // 
             // pd_barcode
@@ -561,16 +531,16 @@
             // 
             // Make_PackageCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1359, 760);
+            this.ClientSize = new System.Drawing.Size(1019, 608);
+            this.Controls.Add(this.PrintNum);
             this.Controls.Add(this.pa_code);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.pr_id);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.PrintLabel);
             this.Controls.Add(this.PrintList);
-            this.Controls.Add(this.PrintNum);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.pa_id);
             this.Controls.Add(this.ma_code);
@@ -597,7 +567,6 @@
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.ma_code_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_PackageCollection";
             this.Tag = "Make!PackageCollection";
             this.Text = "包装采集";
@@ -607,6 +576,7 @@
             this.SizeChanged += new System.EventHandler(this.包装采集_SizeChanged);
             this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
@@ -646,12 +616,12 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pa_indate;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_id;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
-        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum;
         private CustomControl.ComBoxWithFocus.PrinterCombox PrintList;
         private System.Windows.Forms.ComboBox PrintLabel;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Label pr_id;
         private System.Windows.Forms.Label label2;
         private CustomControl.TextBoxWithIcon.TextBoxGeneratePaCode pa_code;
+        private System.Windows.Forms.NumericUpDown PrintNum;
     }
 }

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

@@ -43,8 +43,9 @@ namespace UAS_MES.Make
             ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_prodname", "pr_id" };
             ma_code.TableName = "Make left join product on  ma_prodcode=pr_code";
             ma_code.SelectField = "pr_id # 物料ID,ma_code # 工单号,ma_prodcode # 物料编号,ma_qty # 数量,ma_prodname # 物料名册,ma_wccode # 工作中心编号";
+            ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
-            PrintNum.Text = "1";
+            PrintNum.Value = 1;
             asc.controllInitializeSize(this);
         }
 
@@ -168,7 +169,7 @@ namespace UAS_MES.Make
                                 sql.Append("select package_seq.nextval,'" + pa_code.Text + "',0," + pa_totalqty.Text + ",0,");
                                 sql.Append("sysdate,'" + ma_code.Text + "', ma_prodcode,ma_salecode,ma_custcode from make where ma_code = '" + ma_code.Text + "'");
                                 dh.ExecuteSql(sql.GetString(), "insert");
-                                OperateResult.AppendText("箱号" + pa_code.Text + "采集成功!\n", Color.Red);
+                                OperateResult.AppendText("箱号" + pa_code.Text + "采集成功!\n", Color.Green);
                                 //验证序列号插入明细表的数据
                                 InsertDetail();
                             }
@@ -285,9 +286,12 @@ namespace UAS_MES.Make
             //lbl.Quit();
         }
 
-        private void ma_code_TextKeyDown(object sender, KeyEventArgs e)
+        private void ma_code_UserControlTextChanged(object sender, EventArgs e)
         {
+            if (ma_code.Text.Length > 5)
+            {
 
+            }
         }
     }
 }

+ 15 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollection.resx

@@ -395,4 +395,19 @@
   <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pd_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pa_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pa_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 4 - 4
UAS-MES/Properties/Settings.Designer.cs

@@ -109,7 +109,7 @@ namespace UAS_MES.Properties {
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("ftp://172.16.11.99/print/|uasmes|Administrator1@#")]
+        [global::System.Configuration.DefaultSettingValueAttribute("ftp://192.168.253.9/MESSetting/print/|mesconfig|Administrator1@#")]
         public string FTPAddress {
             get {
                 return ((string)(this["FTPAddress"]));
@@ -121,9 +121,9 @@ namespace UAS_MES.Properties {
         
         [global::System.Configuration.ApplicationScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_" +
-            "LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SER" +
-            "VER=DEDICATED)(SERVICE_NAME=orcl)));")]
+        [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false" +
+            ";Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180." +
+            "218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
         public string MES {
             get {
                 return ((string)(this["MES"]));

+ 2 - 2
UAS-MES/Properties/Settings.settings

@@ -24,10 +24,10 @@
       <Value Profile="(Default)" />
     </Setting>
     <Setting Name="FTPAddress" Type="System.String" Scope="User">
-      <Value Profile="(Default)">ftp://172.16.11.99/print/|uasmes|Administrator1@#</Value>
+      <Value Profile="(Default)">ftp://192.168.253.9/MESSetting/print/|mesconfig|Administrator1@#</Value>
     </Setting>
     <Setting Name="MES" Type="System.String" Scope="Application">
-      <Value Profile="(Default)">Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
+      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
     </Setting>
   </Settings>
 </SettingsFile>

+ 92 - 0
UAS-MES/PublicMethod/AutoSizeControl.cs

@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace UAS_MES.PublicMethod
+{
+    class AutoSizeControl
+    {
+        /// <summary>
+        /// 记录所有控件
+        /// </summary>
+        List<Control> ctl = new List<Control>();
+        /// <summary>
+        /// 记录控件的初始化位置
+        /// </summary>
+        Dictionary<string, Point> CtlPoint = new Dictionary<string, Point>();
+        /// <summary>
+        /// 记录控件的初始化大小
+        /// </summary>
+        Dictionary<string, Size> CtlSize = new Dictionary<string, Size>();
+        /// <summary>
+        /// 初始化的窗体宽度
+        /// </summary>
+        int InitFormWidth = 0;
+        /// <summary>
+        /// 初始化的窗体高度
+        /// </summary>
+        int InitFormHeight = 0;
+        /// <summary>
+        /// 窗体调整时的宽度
+        /// </summary>
+        int AutoSizeFormWidth = 0;
+        /// <summary>
+        /// 窗体调整时的高度
+        /// </summary>
+        int AutoSizeFormHeight = 0;
+        /// <summary>
+        /// 自适应宽度比例
+        /// </summary>
+        float AutoSizeWidthRate;
+        /// <summary>
+        /// 
+        /// </summary>
+        float AutoSizeHeigthRate;
+
+        public void InitControl(Control control)
+        {
+            InitFormWidth = control.Width;
+            InitFormHeight = control.Height;
+            foreach (Control item in control.Controls)
+            {
+                ctl.Add(item);
+                CtlPoint.Add(item.Name, item.Location);
+                CtlSize.Add(item.Name, item.Size);
+                if (item.Controls.Count > 0)
+                {
+                    AddControl(item);
+                }
+            }
+        }
+
+        public void AddControl(Control control)
+        {
+            foreach (Control item in control.Controls)
+            {
+                ctl.Add(item);
+                if (!CtlPoint.ContainsKey(item.Name))
+                    CtlPoint.Add(item.Name, item.Location);
+                if (!CtlSize.ContainsKey(item.Name))
+                    CtlSize.Add(item.Name, item.Size);
+                if (item.Controls.Count > 0)
+                {
+                    AddControl(item);
+                }
+            }
+        }
+
+        public void AutoSize(Control control)
+        {
+            AutoSizeFormHeight = control.Height;
+            AutoSizeFormWidth = control.Width;
+            AutoSizeWidthRate = (float)(AutoSizeFormWidth * 1.0 / InitFormWidth);
+            AutoSizeHeigthRate = (float)(AutoSizeFormHeight * 1.0 / InitFormHeight);
+            for (int i = 0; i < ctl.Count; i++)
+            {
+                ctl[i].Location = new Point((int)(CtlPoint[ctl[i].Name].X * AutoSizeWidthRate), (int)(CtlPoint[ctl[i].Name].Y * AutoSizeHeigthRate));
+                ctl[i].Size = new Size((int)(CtlSize[ctl[i].Name].Width * AutoSizeWidthRate), (int)(CtlSize[ctl[i].Name].Height * AutoSizeHeigthRate));
+            }
+        }
+    }
+}

+ 2 - 4
UAS-MES/PublicMethod/LogicHandler.cs

@@ -1388,11 +1388,9 @@ namespace UAS_MES.PublicMethod
                         code.Append(lpad(int.Parse(dt.Rows[0]["bs_lennum"].ToString()), dt.Rows[0]["bs_maxnum"].ToString()));// 当前流水号
                         dh.UpdateByCondition("barcodeSet", "bs_maxnum=bs_maxnum+1", "bs_type='PACK' and  bs_id=" + dt.Rows[0]["bs_id"]);// 流水号增加1
                     }
-                    else
-                        BaseUtil.ShowError("未定义包装箱号产生规则或规则未审核");
+                    else BaseUtil.ShowError("未定义包装箱号产生规则或规则未审核");
                 }
-                else
-                    BaseUtil.ShowError("物料管控类型错误!该物料管控类型为不管控");
+                else BaseUtil.ShowError("物料管控类型错误!该物料管控类型为不管控");
             }
             return code.ToString();
         }

+ 5 - 3
UAS-MES/UAS-MES.csproj

@@ -22,7 +22,7 @@
     </SccAuxPath>
     <SccProvider>
     </SccProvider>
-    <PublishUrl>E:\s_user_site\</PublishUrl>
+    <PublishUrl>ftp://192.168.253.9/MESSetting/</PublishUrl>
     <Install>true</Install>
     <InstallFrom>Web</InstallFrom>
     <UpdateEnabled>true</UpdateEnabled>
@@ -32,7 +32,7 @@
     <UpdatePeriodically>false</UpdatePeriodically>
     <UpdateRequired>true</UpdateRequired>
     <MapFileExtensions>true</MapFileExtensions>
-    <InstallUrl>http://172.16.11.99/</InstallUrl>
+    <InstallUrl>http://218.17.158.219:8888/</InstallUrl>
     <UpdateUrl>http://172.16.11.99/</UpdateUrl>
     <TargetCulture>zh</TargetCulture>
     <ProductName>优软MES系统</ProductName>
@@ -42,7 +42,7 @@
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
     <OpenBrowserOnPublish>false</OpenBrowserOnPublish>
-    <ApplicationRevision>399</ApplicationRevision>
+    <ApplicationRevision>422</ApplicationRevision>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>true</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>
@@ -526,6 +526,7 @@
       <DependentUpon>SetLoadingWindow.cs</DependentUpon>
     </Compile>
     <Compile Include="PublicMethod\AssemblyHelper.cs" />
+    <Compile Include="PublicMethod\AutoSizeControl.cs" />
     <Compile Include="PublicMethod\AutoSizeFormClass.cs" />
     <Compile Include="PublicMethod\BaseUtil.cs" />
     <Compile Include="PublicMethod\DrawHelper.cs" />
@@ -1121,6 +1122,7 @@
     <None Include="Resources\0802192135.png" />
     <Content Include="Resources\Sound\3291.wav" />
     <Content Include="Resources\Sound\5185.wav" />
+    <Content Include="Resources\Sound\8378.wav" />
     <Content Include="U_Icon.ico" />
     <None Include="Resources\timg.jpg" />
     <None Include="Resources\matte_white_square_icon_business_tool_hammer_128px_571061_easyicon.net.ico" />

+ 3 - 3
UAS_KanBan/UAS_KanBan.csproj

@@ -14,7 +14,7 @@
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <TargetFrameworkProfile />
     <IsWebBootstrapper>true</IsWebBootstrapper>
-    <PublishUrl>E:\s_user_site\KanBan\</PublishUrl>
+    <PublishUrl>ftp://192.168.253.9/MESSetting/KanBan/</PublishUrl>
     <Install>true</Install>
     <InstallFrom>Web</InstallFrom>
     <UpdateEnabled>true</UpdateEnabled>
@@ -24,14 +24,14 @@
     <UpdatePeriodically>false</UpdatePeriodically>
     <UpdateRequired>true</UpdateRequired>
     <MapFileExtensions>true</MapFileExtensions>
-    <InstallUrl>http://172.16.11.99/KanBan/</InstallUrl>
+    <InstallUrl>http://218.17.158.219:8888/KanBan/</InstallUrl>
     <ProductName>UAS看板</ProductName>
     <PublisherName>深圳市优软科技有限公司</PublisherName>
     <SuiteName>UAS看板</SuiteName>
     <MinimumRequiredVersion>1.0.0.16</MinimumRequiredVersion>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
-    <ApplicationRevision>17</ApplicationRevision>
+    <ApplicationRevision>19</ApplicationRevision>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>false</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>

BIN
UAS_MesInterface/tool/Oracle.ManagedDataAccess.dll


BIN
UAS_WinForm.zip


+ 1 - 1
UAS_XmlAnalysor/Form1.Designer.cs

@@ -235,7 +235,7 @@
             this.Controls.Add(this.StartWatch);
             this.Margin = new System.Windows.Forms.Padding(2);
             this.Name = "Form1";
-            this.Text = "测试数据监测";
+            this.Text = "UAS_XML解析器";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
             this.Load += new System.EventHandler(this.Form1_Load);
             ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).EndInit();

+ 7 - 4
UAS_XmlAnalysor/Form1.cs

@@ -30,7 +30,9 @@ namespace UAS_XmlAnalysor
         {
             CheckForIllegalCrossThreadCalls = false;
             InitDB = new Thread(ConnectDB);
-            SetLoadingWindow stw = new SetLoadingWindow(InitDB, "连接数据库");
+            //添加监控事件
+            XmlWatcher.Created += new FileSystemEventHandler(XmlWatcher_Created);
+            SetLoadingWindow stw = new SetLoadingWindow(InitDB, "正在启动程序");
             stw.StartPosition = FormStartPosition.CenterScreen;
             stw.ShowDialog();
             List<string> CacheInf = new List<string>();
@@ -90,7 +92,6 @@ namespace UAS_XmlAnalysor
             }
             XmlWatcher.Path = FolderPath.Text;
             XmlWatcher.Filter = "*.xml";
-            XmlWatcher.Created += new FileSystemEventHandler(XmlWatcher_Created);
             XmlWatcher.EnableRaisingEvents = true;
             string CacheString = FolderPath.Text + "|" + BackUpFolderPath.Text + "|" + Source.Text + "|" + Master.Text + "|" + AutoStart.Checked;
             //写入前先删除文件
@@ -161,9 +162,11 @@ namespace UAS_XmlAnalysor
                         if (stream != null)
                             break;
                     }
-                    System.Threading.Thread.Sleep(500);
                 }
-                catch (Exception) { }
+                catch (Exception ex)
+                {
+                    Console.WriteLine(ex.Message);
+                }
             }
             string testDate = "";
             string testTime = "";

+ 1 - 1
UAS_XmlAnalysor/UAS_XmlAnalysor.csproj

@@ -31,7 +31,7 @@
     <MinimumRequiredVersion>1.0.0.5</MinimumRequiredVersion>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
-    <ApplicationRevision>21</ApplicationRevision>
+    <ApplicationRevision>22</ApplicationRevision>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>false</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>