浏览代码

修改栈板大箱

章政 8 年之前
父节点
当前提交
6c8c3149e6

+ 12 - 3
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -25,6 +25,8 @@ namespace UAS_MES.Make
 
         LogStringBuilder sql = new LogStringBuilder();
 
+        Make_BigBox NewBigBox;
+
         //箱类型
         string pa_type;
         //物料编号
@@ -189,9 +191,16 @@ namespace UAS_MES.Make
 
         private void NewPallet_Click(object sender, EventArgs e)
         {
-            Make_NewPallet NewPallet = new Make_NewPallet("PACKAGE", pa_makecode.Text);
-            BaseUtil.SetFormCenter(NewPallet);
-            NewPallet.ShowDialog();
+            NewBigBox = new Make_BigBox("PACKAGE", pa_makecode.Text);
+            NewBigBox.Controls["Confirm"].Click += Make_BigBoxCollection_Click;
+            BaseUtil.SetFormCenter(NewBigBox);
+            NewBigBox.ShowDialog();
+        }
+
+        private void Make_BigBoxCollection_Click(object sender, EventArgs e)
+        {
+            palletcode.Text = NewBigBox.OutBoxCode;
+            NewBigBox.Close();
         }
 
         private void Print_Click(object sender, EventArgs e)

+ 172 - 0
UAS-MES/FunctionCode/Make/Make_NewBigBox.Designer.cs

@@ -0,0 +1,172 @@
+namespace UAS_MES.Make
+{
+    partial class Make_BigBox
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_BigBox));
+            this.pr_code_label = new System.Windows.Forms.Label();
+            this.pa_outboxcode_label = new System.Windows.Forms.Label();
+            this.title = new System.Windows.Forms.Label();
+            this.pa_outboxcode = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxGeneratePaCode();
+            this.headBar1 = new UAS_MES.CustomControl.HeadBar();
+            this.pr_code = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.Confirm = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.SuspendLayout();
+            // 
+            // pr_code_label
+            // 
+            this.pr_code_label.AutoSize = true;
+            this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_code_label.Location = new System.Drawing.Point(25, 75);
+            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code_label.Name = "pr_code_label";
+            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_code_label.TabIndex = 0;
+            this.pr_code_label.Text = "产品编号";
+            // 
+            // pa_outboxcode_label
+            // 
+            this.pa_outboxcode_label.AutoSize = true;
+            this.pa_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_outboxcode_label.Location = new System.Drawing.Point(25, 142);
+            this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_outboxcode_label.Name = "pa_outboxcode_label";
+            this.pa_outboxcode_label.Size = new System.Drawing.Size(52, 27);
+            this.pa_outboxcode_label.TabIndex = 2;
+            this.pa_outboxcode_label.Text = "箱号";
+            // 
+            // title
+            // 
+            this.title.AutoSize = true;
+            this.title.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.title.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.title.ForeColor = System.Drawing.SystemColors.ButtonFace;
+            this.title.Location = new System.Drawing.Point(9, 8);
+            this.title.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.title.Name = "title";
+            this.title.Size = new System.Drawing.Size(0, 27);
+            this.title.TabIndex = 9;
+            // 
+            // pa_outboxcode
+            // 
+            this.pa_outboxcode.Caller = null;
+            this.pa_outboxcode.Location = new System.Drawing.Point(128, 142);
+            this.pa_outboxcode.MakeCode = null;
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
+            this.pa_outboxcode.Name = "pa_outboxcode";
+            this.pa_outboxcode.Pr_id = null;
+            this.pa_outboxcode.ProdCode = null;
+            this.pa_outboxcode.Size = new System.Drawing.Size(235, 26);
+            this.pa_outboxcode.TabIndex = 10;
+            this.pa_outboxcode.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxGeneratePaCode.OnTextChange(this.pa_outboxcode_UserControlTextChanged);
+            // 
+            // headBar1
+            // 
+            this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.headBar1.Location = new System.Drawing.Point(0, 0);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(5);
+            this.headBar1.Name = "headBar1";
+            this.headBar1.Size = new System.Drawing.Size(399, 40);
+            this.headBar1.TabIndex = 7;
+            this.headBar1.Title = null;
+            // 
+            // pr_code
+            // 
+            this.pr_code.AllPower = null;
+            this.pr_code.Caller = null;
+            this.pr_code.Condition = null;
+            this.pr_code.DBTitle = "产品编号查询";
+            this.pr_code.FormName = null;
+            this.pr_code.Location = new System.Drawing.Point(128, 75);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(4);
+            this.pr_code.Name = "pr_code";
+            this.pr_code.Power = "ifread";
+            this.pr_code.ReturnData = null;
+            this.pr_code.SelectField = null;
+            this.pr_code.SetValueField = null;
+            this.pr_code.Size = new System.Drawing.Size(235, 26);
+            this.pr_code.TabIndex = 4;
+            this.pr_code.TableName = null;
+            this.pr_code.TextBoxEnable = false;
+            this.pr_code.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextChange(this.pr_code_UserControlTextChanged);
+            // 
+            // Confirm
+            // 
+            this.Confirm.AllPower = null;
+            this.Confirm.BackColor = System.Drawing.Color.Transparent;
+            this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
+            this.Confirm.Image = null;
+            this.Confirm.IsShowBorder = true;
+            this.Confirm.Location = new System.Drawing.Point(163, 218);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(4);
+            this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
+            this.Confirm.Name = "Confirm";
+            this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
+            this.Confirm.Power = null;
+            this.Confirm.Size = new System.Drawing.Size(71, 29);
+            this.Confirm.TabIndex = 3;
+            this.Confirm.Tag = "Make!NewPallet";
+            this.Confirm.Text = "确认";
+            this.Confirm.UseVisualStyleBackColor = true;
+            this.Confirm.Click += new System.EventHandler(this.Confirm_Click);
+            // 
+            // Make_BigBox
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(399, 280);
+            this.Controls.Add(this.pa_outboxcode);
+            this.Controls.Add(this.title);
+            this.Controls.Add(this.headBar1);
+            this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.Confirm);
+            this.Controls.Add(this.pa_outboxcode_label);
+            this.Controls.Add(this.pr_code_label);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Make_BigBox";
+            this.Tag = "ShowDialogWindow";
+            this.Text = "新增栈板";
+            this.Load += new System.EventHandler(this.新增栈板_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label pr_code_label;
+        private System.Windows.Forms.Label pa_outboxcode_label;
+        private CustomControl.ButtonUtil.NormalButton Confirm;
+        private CustomControl.TextBoxWithIcon.SearchTextBox pr_code;
+        private CustomControl.HeadBar headBar1;
+        private System.Windows.Forms.Label title;
+        private CustomControl.TextBoxWithIcon.TextBoxGeneratePaCode pa_outboxcode;
+    }
+}

+ 88 - 0
UAS-MES/FunctionCode/Make/Make_NewBigBox.cs

@@ -0,0 +1,88 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+using UAS_MES.DataOperate;
+using UAS_MES.PublicMethod;
+
+namespace UAS_MES.Make
+{
+    public partial class Make_BigBox : Form
+    {
+        DataHelper dh;
+        DataTable Dbfind;
+        //生成的箱类型,2表示大箱号,3表示栈板号
+        string pa_type = "";
+
+        string OutBoxCode1;
+
+        public string OutBoxCode
+        {
+            get
+            {
+                return OutBoxCode1;
+            }
+
+            set
+            {
+                OutBoxCode1 = value;
+            }
+        }
+
+        public Make_BigBox(string Caller, string MakeCode)
+        {
+            InitializeComponent();
+            switch (Caller)
+            {
+                case "PACKAGE":
+                    title.Text = "新增大箱号";
+                    pa_type = "2";
+                    break;
+                case "PALLET":
+                    title.Text = "新增栈板号";
+                    pa_type = "3";
+                    break;
+                default:
+                    break;
+            }
+            pa_outboxcode.Caller = Caller;
+            pa_outboxcode.MakeCode = MakeCode;
+        }
+
+        private void 新增栈板_Load(object sender, EventArgs e)
+        {
+            dh = new DataHelper();
+            pr_code.FormName = Name;
+            pr_code.SetValueField = new string[] { "pr_code" };
+            pr_code.TableName = "product";
+            pr_code.SelectField = "pr_code # 物料编号,pr_detail # 物料名称,pr_kind # 物料种类,pr_spec # 物料规格";
+            pr_code.DbChange += Pr_code_DbChange;
+        }
+
+        private void Pr_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = pr_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
+        private void pr_code_UserControlTextChanged(object sender, EventArgs e)
+        {
+            pa_outboxcode.ProdCode = pr_code.Text;
+        }
+
+        private void Confirm_Click(object sender, EventArgs e)
+        {
+            if (pa_outboxcode.Text != "" && pr_code.Text != "")
+            {
+                string sql = "insert into package (pa_id,pa_outboxcode,pa_makecode,pa_indate,pa_type,pa_prodcode,pa_level,PA_STATUS)values";
+                sql += "(package_seq.nextval,'" + pa_outboxcode.Text + "','" + pa_outboxcode.MakeCode + "',sysdate,'" + pa_type + "','" + pr_code.Text + "',0,'')";
+                dh.ExecuteSql(sql, "insert");
+            }
+            else MessageBox.Show("请先填写完整信息");
+        }
+
+        private void pa_outboxcode_UserControlTextChanged(object sender, EventArgs e)
+        {
+            OutBoxCode1 = pa_outboxcode.Text;
+        }
+    }
+}

+ 159 - 0
UAS-MES/FunctionCode/Make/Make_NewBigBox.resx

@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="Confirm.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Confirm.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Confirm.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 49 - 35
UAS-MES/FunctionCode/Make/Make_NewPallet.Designer.cs

@@ -35,7 +35,7 @@
             this.title = new System.Windows.Forms.Label();
             this.pa_outboxcode = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxGeneratePaCode();
             this.headBar1 = new UAS_MES.CustomControl.HeadBar();
-            this.pa_packageqty = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.pr_bigboxinnerqty = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.pr_code = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.Confirm = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.SuspendLayout();
@@ -44,9 +44,10 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(19, 60);
+            this.pr_code_label.Location = new System.Drawing.Point(25, 75);
+            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
             this.pr_code_label.TabIndex = 0;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -54,9 +55,10 @@
             // 
             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(19, 105);
+            this.pa_packageqty_label.Location = new System.Drawing.Point(25, 131);
+            this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_packageqty_label.Name = "pa_packageqty_label";
-            this.pa_packageqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_packageqty_label.Size = new System.Drawing.Size(92, 27);
             this.pa_packageqty_label.TabIndex = 1;
             this.pa_packageqty_label.Text = "箱内数量";
             // 
@@ -64,9 +66,10 @@
             // 
             this.pa_outboxcode_label.AutoSize = true;
             this.pa_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_outboxcode_label.Location = new System.Drawing.Point(19, 151);
+            this.pa_outboxcode_label.Location = new System.Drawing.Point(25, 189);
+            this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_outboxcode_label.Name = "pa_outboxcode_label";
-            this.pa_outboxcode_label.Size = new System.Drawing.Size(42, 21);
+            this.pa_outboxcode_label.Size = new System.Drawing.Size(52, 27);
             this.pa_outboxcode_label.TabIndex = 2;
             this.pa_outboxcode_label.Text = "箱号";
             // 
@@ -76,44 +79,51 @@
             this.title.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.title.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.title.ForeColor = System.Drawing.SystemColors.ButtonFace;
-            this.title.Location = new System.Drawing.Point(7, 6);
+            this.title.Location = new System.Drawing.Point(9, 8);
+            this.title.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.title.Name = "title";
-            this.title.Size = new System.Drawing.Size(0, 21);
+            this.title.Size = new System.Drawing.Size(0, 27);
             this.title.TabIndex = 9;
             // 
             // pa_outboxcode
             // 
-            this.pa_outboxcode.Location = new System.Drawing.Point(96, 151);
+            this.pa_outboxcode.Caller = null;
+            this.pa_outboxcode.Location = new System.Drawing.Point(128, 189);
+            this.pa_outboxcode.MakeCode = null;
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Pr_id = null;
-            this.pa_outboxcode.Size = new System.Drawing.Size(176, 21);
+            this.pa_outboxcode.ProdCode = null;
+            this.pa_outboxcode.Size = new System.Drawing.Size(235, 26);
             this.pa_outboxcode.TabIndex = 10;
+            this.pa_outboxcode.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxGeneratePaCode.OnTextChange(this.pa_outboxcode_UserControlTextChanged);
             // 
             // headBar1
             // 
             this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
             this.headBar1.Location = new System.Drawing.Point(0, 0);
-            this.headBar1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(5);
             this.headBar1.Name = "headBar1";
-            this.headBar1.Size = new System.Drawing.Size(299, 32);
+            this.headBar1.Size = new System.Drawing.Size(399, 40);
             this.headBar1.TabIndex = 7;
             this.headBar1.Title = null;
             // 
-            // pa_packageqty
-            // 
-            this.pa_packageqty.AllPower = null;
-            this.pa_packageqty.BackColor = System.Drawing.Color.White;
-            this.pa_packageqty.ID = null;
-            this.pa_packageqty.Location = new System.Drawing.Point(96, 105);
-            this.pa_packageqty.Name = "pa_packageqty";
-            this.pa_packageqty.Negative = false;
-            this.pa_packageqty.Power = null;
-            this.pa_packageqty.Size = new System.Drawing.Size(156, 21);
-            this.pa_packageqty.Str = null;
-            this.pa_packageqty.Str1 = null;
-            this.pa_packageqty.Str2 = null;
-            this.pa_packageqty.TabIndex = 6;
+            // pr_bigboxinnerqty
+            // 
+            this.pr_bigboxinnerqty.AllPower = null;
+            this.pr_bigboxinnerqty.BackColor = System.Drawing.Color.White;
+            this.pr_bigboxinnerqty.ID = null;
+            this.pr_bigboxinnerqty.Location = new System.Drawing.Point(128, 131);
+            this.pr_bigboxinnerqty.Margin = new System.Windows.Forms.Padding(4);
+            this.pr_bigboxinnerqty.Name = "pr_bigboxinnerqty";
+            this.pr_bigboxinnerqty.Negative = false;
+            this.pr_bigboxinnerqty.Power = null;
+            this.pr_bigboxinnerqty.Size = new System.Drawing.Size(207, 25);
+            this.pr_bigboxinnerqty.Str = null;
+            this.pr_bigboxinnerqty.Str1 = null;
+            this.pr_bigboxinnerqty.Str2 = null;
+            this.pr_bigboxinnerqty.TabIndex = 6;
             // 
             // pr_code
             // 
@@ -122,12 +132,14 @@
             this.pr_code.Condition = null;
             this.pr_code.DBTitle = "产品编号查询";
             this.pr_code.FormName = null;
-            this.pr_code.Location = new System.Drawing.Point(96, 60);
+            this.pr_code.Location = new System.Drawing.Point(128, 75);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(4);
             this.pr_code.Name = "pr_code";
             this.pr_code.Power = "ifread";
+            this.pr_code.ReturnData = null;
             this.pr_code.SelectField = null;
             this.pr_code.SetValueField = null;
-            this.pr_code.Size = new System.Drawing.Size(176, 21);
+            this.pr_code.Size = new System.Drawing.Size(235, 26);
             this.pr_code.TabIndex = 4;
             this.pr_code.TableName = null;
             this.pr_code.TextBoxEnable = false;
@@ -140,12 +152,13 @@
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = null;
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(123, 189);
+            this.Confirm.Location = new System.Drawing.Point(164, 236);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(4);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.Power = null;
-            this.Confirm.Size = new System.Drawing.Size(53, 23);
+            this.Confirm.Size = new System.Drawing.Size(71, 29);
             this.Confirm.TabIndex = 3;
             this.Confirm.Tag = "Make!NewPallet";
             this.Confirm.Text = "确认";
@@ -154,19 +167,20 @@
             // 
             // Make_NewPallet
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(299, 224);
+            this.ClientSize = new System.Drawing.Size(399, 280);
             this.Controls.Add(this.pa_outboxcode);
             this.Controls.Add(this.title);
             this.Controls.Add(this.headBar1);
-            this.Controls.Add(this.pa_packageqty);
+            this.Controls.Add(this.pr_bigboxinnerqty);
             this.Controls.Add(this.pr_code);
             this.Controls.Add(this.Confirm);
             this.Controls.Add(this.pa_outboxcode_label);
             this.Controls.Add(this.pa_packageqty_label);
             this.Controls.Add(this.pr_code_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_NewPallet";
             this.Tag = "ShowDialogWindow";
             this.Text = "新增栈板";
@@ -183,7 +197,7 @@
         private System.Windows.Forms.Label pa_outboxcode_label;
         private CustomControl.ButtonUtil.NormalButton Confirm;
         private CustomControl.TextBoxWithIcon.SearchTextBox pr_code;
-        private CustomControl.TextBoxWithIcon.NumOnlyTextBox pa_packageqty;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox pr_bigboxinnerqty;
         private CustomControl.HeadBar headBar1;
         private System.Windows.Forms.Label title;
         private CustomControl.TextBoxWithIcon.TextBoxGeneratePaCode pa_outboxcode;

+ 26 - 16
UAS-MES/FunctionCode/Make/Make_NewPallet.cs

@@ -13,7 +13,22 @@ namespace UAS_MES.Make
         //生成的箱类型,2表示大箱号,3表示栈板号
         string pa_type = "";
 
-        public Make_NewPallet(string Caller,string MakeCode)
+        string OutBoxCode1;
+
+        public string OutBoxCode
+        {
+            get
+            {
+                return OutBoxCode1;
+            }
+
+            set
+            {
+                OutBoxCode1 = value;
+            }
+        }
+
+        public Make_NewPallet(string Caller, string MakeCode)
         {
             InitializeComponent();
             switch (Caller)
@@ -24,6 +39,7 @@ namespace UAS_MES.Make
                     break;
                 case "PALLET":
                     title.Text = "新增栈板号";
+                    pr_bigboxinnerqty.Enabled = false;
                     pa_type = "3";
                     break;
                 default:
@@ -37,9 +53,9 @@ namespace UAS_MES.Make
         {
             dh = new DataHelper();
             pr_code.FormName = Name;
-            pr_code.SetValueField = new string[] { "pr_code" };
+            pr_code.SetValueField = new string[] { "pr_code", "pr_bigboxinnerqty" };
             pr_code.TableName = "product";
-            pr_code.SelectField = "pr_code # 物料编号,pr_detail # 物料名称,pr_kind # 物料种类,pr_spec # 物料规格";
+            pr_code.SelectField = "pr_code # 物料编号,pr_detail # 物料名称,pr_kind # 物料种类,pr_spec # 物料规格,pr_bigboxinnerqty # 大箱容量";
             pr_code.DbChange += Pr_code_DbChange;
         }
 
@@ -54,27 +70,21 @@ namespace UAS_MES.Make
             pa_outboxcode.ProdCode = pr_code.Text;
         }
 
-        private void pa_outboxcode_IconClick(object sender, EventArgs e)
-        {
-            pa_outboxcode.Text = dh.GetSerialNumberByCaller(Tag.ToString());
-        }
-
         private void Confirm_Click(object sender, EventArgs e)
         {
-            if (pa_outboxcode.Text != "" && pa_packageqty.Text != "" && pr_code.Text != "")
+            if (pa_outboxcode.Text != "" && pr_bigboxinnerqty.Text != "" && pr_code.Text != "")
             {
                 string sql = "insert into package (pa_id,pa_outboxcode,pa_makecode,pa_indate,pa_packageqty,pa_type,pa_prodcode,pa_level,PA_STATUS)values";
-                sql += "(package_seq.nextval,'" + pa_outboxcode.Text + "','"+pa_outboxcode.MakeCode+"',sysdate,'" + pa_packageqty.Text + "','" + pa_type + "','" + pr_code.Text + "',0,'')";
+                sql += "(package_seq.nextval,'" + pa_outboxcode.Text + "','" + pa_outboxcode.MakeCode + "',sysdate,'" + pr_bigboxinnerqty.Text + "','" + pa_type + "','" + pr_code.Text + "',0,'')";
                 dh.ExecuteSql(sql, "insert");
-                MessageBox.Show("生成箱号成功!");
-                pa_outboxcode.Text = "";
-                pa_packageqty.Text = "";
-                pr_code.Text = "";
             }
             else
-            {
                 MessageBox.Show("请先填写完整信息");
-            }
+        }
+
+        private void pa_outboxcode_UserControlTextChanged(object sender, EventArgs e)
+        {
+            OutBoxCode1 = pa_outboxcode.Text;
         }
     }
 }

+ 21 - 21
UAS-MES/FunctionCode/Make/Make_PalletCollection.Designer.cs

@@ -50,7 +50,7 @@
             this.palletcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.Printlab = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ReleasePallet = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.NewPallet = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.NewPalletCode = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.pa_custcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.PackageInf = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
             this.pd_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -336,24 +336,24 @@
             this.ReleasePallet.UseVisualStyleBackColor = true;
             this.ReleasePallet.Click += new System.EventHandler(this.ReleasePallet_Click);
             // 
-            // NewPallet
-            // 
-            this.NewPallet.AllPower = "ifall";
-            this.NewPallet.BackColor = System.Drawing.Color.Transparent;
-            this.NewPallet.DownImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.DownImage")));
-            this.NewPallet.Image = ((System.Drawing.Image)(resources.GetObject("NewPallet.Image")));
-            this.NewPallet.IsShowBorder = true;
-            this.NewPallet.Location = new System.Drawing.Point(985, 252);
-            this.NewPallet.Margin = new System.Windows.Forms.Padding(4);
-            this.NewPallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.MoveImage")));
-            this.NewPallet.Name = "NewPallet";
-            this.NewPallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.NormalImage")));
-            this.NewPallet.Power = "ifwrite";
-            this.NewPallet.Size = new System.Drawing.Size(80, 30);
-            this.NewPallet.TabIndex = 159;
-            this.NewPallet.Text = "新增栈板";
-            this.NewPallet.UseVisualStyleBackColor = true;
-            this.NewPallet.Click += new System.EventHandler(this.NewPallet_Click);
+            // NewPalletCode
+            // 
+            this.NewPalletCode.AllPower = "ifall";
+            this.NewPalletCode.BackColor = System.Drawing.Color.Transparent;
+            this.NewPalletCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.DownImage")));
+            this.NewPalletCode.Image = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.Image")));
+            this.NewPalletCode.IsShowBorder = true;
+            this.NewPalletCode.Location = new System.Drawing.Point(985, 252);
+            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(4);
+            this.NewPalletCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.MoveImage")));
+            this.NewPalletCode.Name = "NewPalletCode";
+            this.NewPalletCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.NormalImage")));
+            this.NewPalletCode.Power = "ifwrite";
+            this.NewPalletCode.Size = new System.Drawing.Size(80, 30);
+            this.NewPalletCode.TabIndex = 159;
+            this.NewPalletCode.Text = "新增栈板";
+            this.NewPalletCode.UseVisualStyleBackColor = true;
+            this.NewPalletCode.Click += new System.EventHandler(this.NewPallet_Click);
             // 
             // pa_custcode
             // 
@@ -506,7 +506,7 @@
             this.Controls.Add(this.palletcode);
             this.Controls.Add(this.Printlab);
             this.Controls.Add(this.ReleasePallet);
-            this.Controls.Add(this.NewPallet);
+            this.Controls.Add(this.NewPalletCode);
             this.Controls.Add(this.pa_custcode);
             this.Controls.Add(this.pa_custcode_label);
             this.Controls.Add(this.PackageInf);
@@ -545,7 +545,7 @@
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum PackageInf;
         private CustomControl.ValueLabel.ValueLabel pa_custcode;
         private System.Windows.Forms.Label pa_custcode_label;
-        private CustomControl.ButtonUtil.NormalButton NewPallet;
+        private CustomControl.ButtonUtil.NormalButton NewPalletCode;
         private CustomControl.ButtonUtil.NormalButton ReleasePallet;
         private CustomControl.ButtonUtil.NormalButton Printlab;
         private CustomControl.TextBoxWithIcon.EnterTextBox palletcode;

+ 11 - 1
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -25,6 +25,8 @@ namespace UAS_MES.Make
 
         LogStringBuilder sql = new LogStringBuilder();
 
+        Make_NewPallet NewPallet;
+
         //箱类型
         string pa_type;
         //物料编号
@@ -51,6 +53,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
+                BaseUtil.WriteLbl(lbl);
             }
             catch
             {
@@ -187,11 +190,18 @@ namespace UAS_MES.Make
 
         private void NewPallet_Click(object sender, EventArgs e)
         {
-            Make_NewPallet NewPallet = new Make_NewPallet("PALLET", pa_makecode.Text);
+            NewPallet = new Make_NewPallet("PALLET", pa_makecode.Text);
+            NewPallet.Controls["Confirm"].Click += Make_PalletCollection_Click;
             BaseUtil.SetFormCenter(NewPallet);
             NewPallet.ShowDialog();
         }
 
+        private void Make_PalletCollection_Click(object sender, EventArgs e)
+        {
+            palletcode.Text = NewPallet.OutBoxCode;
+            NewPallet.Close();
+        }
+
         private void Print_Click(object sender, EventArgs e)
         {
             if (PrintLabel.Items.Count != 0)

+ 4 - 4
UAS-MES/FunctionCode/Make/Make_PalletCollection.resx

@@ -511,7 +511,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="NewPallet.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="NewPalletCode.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -523,7 +523,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="NewPallet.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="NewPalletCode.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -616,7 +616,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="NewPallet.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="NewPalletCode.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -629,7 +629,7 @@
         gg==
 </value>
   </data>
-  <data name="NewPallet.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="NewPalletCode.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE