Bladeren bron

读取电子秤使用正则表达式过滤数据,修改登录方式

章政 7 jaren geleden
bovenliggende
commit
44fd08bd0d

+ 57 - 0
UAS-MES/DataOperate/AccessDBHelper.cs

@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.OleDb;
+using System.Linq;
+using System.Text;
+
+namespace UAS_MES.DataOperate
+{
+    class AccessDBHelper
+    {
+        private string _fileName;
+        private string _connectionString;
+        private OleDbConnection _odcConnection;
+
+        public AccessDBHelper(string fileName)
+        {
+            this._fileName = fileName;
+            this._connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileName + ";";
+        }
+
+        public void Open()
+        {
+            try
+            {
+                // 建立连接
+                this._odcConnection = new OleDbConnection(this._connectionString);
+                // 打开连接
+                this._odcConnection.Open();
+            }
+            catch (Exception)
+            {
+                throw new Exception("嘗試打开 " + this._fileName + " 失敗, 請確認文件是否存在!");
+            }
+        }
+
+        public void Close()
+        {
+            this._odcConnection.Close();
+        }
+
+        public DataSet GetDataSet(string sql)
+        {
+            DataSet ds = new DataSet();
+            try
+            {
+                OleDbDataAdapter adapter = new OleDbDataAdapter(sql, this._odcConnection);
+                adapter.Fill(ds);
+            }
+            catch (Exception)
+            {
+                throw new Exception("sql語句: " + sql + " 執行失敗!");
+            }
+            return ds;
+        }
+    }
+}

+ 157 - 215
UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs

@@ -113,10 +113,9 @@
             // 
             this.pa_makecode.AutoSize = true;
             this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode.Location = new System.Drawing.Point(1108, 534);
-            this.pa_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_makecode.Location = new System.Drawing.Point(831, 427);
             this.pa_makecode.Name = "pa_makecode";
-            this.pa_makecode.Size = new System.Drawing.Size(0, 27);
+            this.pa_makecode.Size = new System.Drawing.Size(0, 21);
             this.pa_makecode.TabIndex = 76;
             this.pa_makecode.Visible = false;
             // 
@@ -125,10 +124,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(9, 692);
-            this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label13.Location = new System.Drawing.Point(7, 554);
             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 = "序列号";
             // 
@@ -136,10 +134,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(372, 692);
-            this.Cancel.Margin = new System.Windows.Forms.Padding(4);
+            this.Cancel.Location = new System.Drawing.Point(279, 554);
             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;
@@ -148,10 +145,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(1065, 534);
-            this.pa_id.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_id.Location = new System.Drawing.Point(799, 427);
             this.pa_id.Name = "pa_id";
-            this.pa_id.Size = new System.Drawing.Size(0, 27);
+            this.pa_id.Size = new System.Drawing.Size(0, 21);
             this.pa_id.TabIndex = 153;
             this.pa_id.Visible = false;
             // 
@@ -159,10 +155,9 @@
             // 
             this.pr_packrule.AutoSize = true;
             this.pr_packrule.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_packrule.Location = new System.Drawing.Point(1132, 522);
-            this.pr_packrule.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_packrule.Location = new System.Drawing.Point(849, 418);
             this.pr_packrule.Name = "pr_packrule";
-            this.pr_packrule.Size = new System.Drawing.Size(0, 27);
+            this.pr_packrule.Size = new System.Drawing.Size(0, 21);
             this.pr_packrule.TabIndex = 173;
             this.pr_packrule.Visible = false;
             // 
@@ -170,10 +165,9 @@
             // 
             this.pa_status.AutoSize = true;
             this.pa_status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_status.Location = new System.Drawing.Point(1040, 570);
-            this.pa_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_status.Location = new System.Drawing.Point(780, 456);
             this.pa_status.Name = "pa_status";
-            this.pa_status.Size = new System.Drawing.Size(0, 27);
+            this.pa_status.Size = new System.Drawing.Size(0, 21);
             this.pa_status.TabIndex = 174;
             this.pa_status.Visible = false;
             // 
@@ -181,10 +175,9 @@
             // 
             this.pa_sccode.AutoSize = true;
             this.pa_sccode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_sccode.Location = new System.Drawing.Point(1108, 570);
-            this.pa_sccode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_sccode.Location = new System.Drawing.Point(831, 456);
             this.pa_sccode.Name = "pa_sccode";
-            this.pa_sccode.Size = new System.Drawing.Size(0, 27);
+            this.pa_sccode.Size = new System.Drawing.Size(0, 21);
             this.pa_sccode.TabIndex = 176;
             this.pa_sccode.Visible = false;
             // 
@@ -192,10 +185,9 @@
             // 
             this.pa_checkno.AutoSize = true;
             this.pa_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_checkno.Location = new System.Drawing.Point(1100, 570);
-            this.pa_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_checkno.Location = new System.Drawing.Point(825, 456);
             this.pa_checkno.Name = "pa_checkno";
-            this.pa_checkno.Size = new System.Drawing.Size(0, 27);
+            this.pa_checkno.Size = new System.Drawing.Size(0, 21);
             this.pa_checkno.TabIndex = 177;
             this.pa_checkno.Visible = false;
             // 
@@ -203,10 +195,9 @@
             // 
             this.pa_downstatus.AutoSize = true;
             this.pa_downstatus.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_downstatus.Location = new System.Drawing.Point(1116, 570);
-            this.pa_downstatus.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_downstatus.Location = new System.Drawing.Point(837, 456);
             this.pa_downstatus.Name = "pa_downstatus";
-            this.pa_downstatus.Size = new System.Drawing.Size(0, 27);
+            this.pa_downstatus.Size = new System.Drawing.Size(0, 21);
             this.pa_downstatus.TabIndex = 178;
             this.pa_downstatus.Visible = false;
             // 
@@ -214,10 +205,9 @@
             // 
             this.pa_standardqty.AutoSize = true;
             this.pa_standardqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_standardqty.Location = new System.Drawing.Point(1132, 588);
-            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_standardqty.Location = new System.Drawing.Point(849, 470);
             this.pa_standardqty.Name = "pa_standardqty";
-            this.pa_standardqty.Size = new System.Drawing.Size(0, 27);
+            this.pa_standardqty.Size = new System.Drawing.Size(0, 21);
             this.pa_standardqty.TabIndex = 180;
             this.pa_standardqty.Visible = false;
             // 
@@ -225,10 +215,9 @@
             // 
             this.pr_sendchecktype.AutoSize = true;
             this.pr_sendchecktype.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_sendchecktype.Location = new System.Drawing.Point(945, 546);
-            this.pr_sendchecktype.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_sendchecktype.Location = new System.Drawing.Point(709, 437);
             this.pr_sendchecktype.Name = "pr_sendchecktype";
-            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 27);
+            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 21);
             this.pr_sendchecktype.TabIndex = 182;
             this.pr_sendchecktype.Visible = false;
             // 
@@ -236,10 +225,9 @@
             // 
             this.mcd_remainqty_label.AutoSize = true;
             this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty_label.Location = new System.Drawing.Point(629, 588);
-            this.mcd_remainqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty_label.Location = new System.Drawing.Point(472, 470);
             this.mcd_remainqty_label.Name = "mcd_remainqty_label";
-            this.mcd_remainqty_label.Size = new System.Drawing.Size(92, 27);
+            this.mcd_remainqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_remainqty_label.TabIndex = 196;
             this.mcd_remainqty_label.Text = "待采集数";
             // 
@@ -247,20 +235,18 @@
             // 
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(739, 588);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty.Location = new System.Drawing.Point(554, 470);
             this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 27);
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
             this.mcd_remainqty.TabIndex = 197;
             // 
             // mcd_inqty_label
             // 
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty_label.Location = new System.Drawing.Point(629, 548);
-            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(472, 438);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
-            this.mcd_inqty_label.Size = new System.Drawing.Size(92, 27);
+            this.mcd_inqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_inqty_label.TabIndex = 194;
             this.mcd_inqty_label.Text = "已采集数";
             // 
@@ -268,30 +254,27 @@
             // 
             this.mcd_inqty.AutoSize = true;
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(739, 548);
-            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_inqty.Location = new System.Drawing.Point(554, 438);
             this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 27);
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
             this.mcd_inqty.TabIndex = 195;
             // 
             // pa_remark_label
             // 
             this.pa_remark_label.AutoSize = true;
             this.pa_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_remark_label.Location = new System.Drawing.Point(629, 625);
-            this.pa_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_remark_label.Location = new System.Drawing.Point(472, 500);
             this.pa_remark_label.Name = "pa_remark_label";
-            this.pa_remark_label.Size = new System.Drawing.Size(52, 27);
+            this.pa_remark_label.Size = new System.Drawing.Size(42, 21);
             this.pa_remark_label.TabIndex = 198;
             this.pa_remark_label.Text = "备注";
             // 
             // CollecRemark
             // 
             this.CollecRemark.AutoSize = true;
-            this.CollecRemark.Location = new System.Drawing.Point(689, 696);
-            this.CollecRemark.Margin = new System.Windows.Forms.Padding(4);
+            this.CollecRemark.Location = new System.Drawing.Point(517, 557);
             this.CollecRemark.Name = "CollecRemark";
-            this.CollecRemark.Size = new System.Drawing.Size(119, 19);
+            this.CollecRemark.Size = new System.Drawing.Size(96, 16);
             this.CollecRemark.TabIndex = 201;
             this.CollecRemark.Text = "采集备注信息";
             this.CollecRemark.UseVisualStyleBackColor = true;
@@ -301,12 +284,12 @@
             this.pa_remark.AllPower = null;
             this.pa_remark.BackColor = System.Drawing.Color.White;
             this.pa_remark.ID = null;
-            this.pa_remark.Location = new System.Drawing.Point(689, 628);
-            this.pa_remark.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.pa_remark.Location = new System.Drawing.Point(517, 502);
+            this.pa_remark.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.pa_remark.Multiline = true;
             this.pa_remark.Name = "pa_remark";
             this.pa_remark.Power = null;
-            this.pa_remark.Size = new System.Drawing.Size(196, 56);
+            this.pa_remark.Size = new System.Drawing.Size(148, 46);
             this.pa_remark.Str = null;
             this.pa_remark.Str1 = null;
             this.pa_remark.Str2 = null;
@@ -335,11 +318,11 @@
             this.groupBoxWithBorder2.Controls.Add(this.PrintList_label);
             this.groupBoxWithBorder2.Controls.Add(this.PrintNum_label);
             this.groupBoxWithBorder2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder2.Location = new System.Drawing.Point(565, 8);
-            this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.groupBoxWithBorder2.Location = new System.Drawing.Point(424, 6);
+            this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.groupBoxWithBorder2.Name = "groupBoxWithBorder2";
-            this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.groupBoxWithBorder2.Size = new System.Drawing.Size(595, 210);
+            this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBoxWithBorder2.Size = new System.Drawing.Size(446, 168);
             this.groupBoxWithBorder2.TabIndex = 172;
             this.groupBoxWithBorder2.TabStop = false;
             this.groupBoxWithBorder2.Text = "打印";
@@ -352,11 +335,10 @@
             this.PrintNum.Enabled = false;
             this.PrintNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(340, 163);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintNum.Location = new System.Drawing.Point(255, 130);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(40, 27);
+            this.PrintNum.Size = new System.Drawing.Size(31, 23);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -366,20 +348,19 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(356, 21);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(267, 16);
             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 = 181;
             this.label1.Text = "当前批号";
             // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(163, 23);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 9, 4, 9);
+            this.StepCount.Location = new System.Drawing.Point(122, 18);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(3, 7, 3, 7);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(84, 29);
+            this.StepCount.Size = new System.Drawing.Size(63, 23);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 193;
@@ -389,41 +370,37 @@
             this.checkweightlabel.AutoSize = true;
             this.checkweightlabel.CutLength = null;
             this.checkweightlabel.ForeColor = System.Drawing.Color.Red;
-            this.checkweightlabel.Location = new System.Drawing.Point(152, 2);
-            this.checkweightlabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.checkweightlabel.MaximumSize = new System.Drawing.Size(267, 0);
+            this.checkweightlabel.Location = new System.Drawing.Point(114, 1);
+            this.checkweightlabel.MaximumSize = new System.Drawing.Size(200, 0);
             this.checkweightlabel.Name = "checkweightlabel";
-            this.checkweightlabel.Size = new System.Drawing.Size(0, 27);
+            this.checkweightlabel.Size = new System.Drawing.Size(0, 21);
             this.checkweightlabel.TabIndex = 180;
             // 
             // ob_nowcheckqty
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(464, 112);
-            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(348, 89);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 27);
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
             this.ob_nowcheckqty.TabIndex = 178;
             // 
             // ob_batchqty
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.Location = new System.Drawing.Point(464, 65);
-            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_batchqty.Location = new System.Drawing.Point(348, 51);
             this.ob_batchqty.Name = "ob_batchqty";
-            this.ob_batchqty.Size = new System.Drawing.Size(0, 27);
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
             this.ob_batchqty.TabIndex = 177;
             // 
             // ob_nowcheckqty_label
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(356, 112);
-            this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(267, 89);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
-            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(92, 27);
+            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(74, 21);
             this.ob_nowcheckqty_label.TabIndex = 176;
             this.ob_nowcheckqty_label.Text = "当前批数";
             // 
@@ -431,10 +408,9 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.Location = new System.Drawing.Point(356, 67);
-            this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(267, 53);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
-            this.ob_batchqty_label.Size = new System.Drawing.Size(92, 27);
+            this.ob_batchqty_label.Size = new System.Drawing.Size(74, 21);
             this.ob_batchqty_label.TabIndex = 175;
             this.ob_batchqty_label.Text = "标准批数";
             // 
@@ -442,10 +418,9 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno.Location = new System.Drawing.Point(464, 21);
-            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_checkno.Location = new System.Drawing.Point(348, 16);
             this.ob_checkno.Name = "ob_checkno";
-            this.ob_checkno.Size = new System.Drawing.Size(0, 27);
+            this.ob_checkno.Size = new System.Drawing.Size(0, 21);
             this.ob_checkno.TabIndex = 175;
             this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
             // 
@@ -458,13 +433,12 @@
             this.SendCheck.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.SendCheck.Image = null;
             this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(493, 162);
-            this.SendCheck.Margin = new System.Windows.Forms.Padding(4);
+            this.SendCheck.Location = new System.Drawing.Point(370, 130);
             this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
             this.SendCheck.Name = "SendCheck";
             this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
             this.SendCheck.Power = null;
-            this.SendCheck.Size = new System.Drawing.Size(60, 30);
+            this.SendCheck.Size = new System.Drawing.Size(45, 24);
             this.SendCheck.TabIndex = 174;
             this.SendCheck.Tag = "ifread";
             this.SendCheck.Text = "送检";
@@ -479,13 +453,12 @@
             this.Packing.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.Packing.Image = null;
             this.Packing.IsShowBorder = true;
-            this.Packing.Location = new System.Drawing.Point(20, 162);
-            this.Packing.Margin = new System.Windows.Forms.Padding(4);
+            this.Packing.Location = new System.Drawing.Point(15, 130);
             this.Packing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Packing.MoveImage")));
             this.Packing.Name = "Packing";
             this.Packing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Packing.NormalImage")));
             this.Packing.Power = null;
-            this.Packing.Size = new System.Drawing.Size(67, 30);
+            this.Packing.Size = new System.Drawing.Size(50, 24);
             this.Packing.TabIndex = 173;
             this.Packing.Text = "封箱";
             this.Packing.UseVisualStyleBackColor = true;
@@ -496,10 +469,10 @@
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(163, 114);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.PrintLabel.Location = new System.Drawing.Point(122, 91);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(180, 28);
+            this.PrintLabel.Size = new System.Drawing.Size(136, 25);
             this.PrintLabel.TabIndex = 159;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -507,29 +480,28 @@
             // 
             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(7, 114);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(5, 90);
             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 = "打印标签";
             // 
             // AutoPrint
             // 
             this.AutoPrint.Checked = false;
-            this.AutoPrint.Location = new System.Drawing.Point(111, 164);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.AutoPrint.Location = new System.Drawing.Point(83, 131);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(120, 29);
+            this.AutoPrint.Size = new System.Drawing.Size(90, 23);
             this.AutoPrint.TabIndex = 166;
             // 
             // PrintList
             // 
             this.PrintList.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.PrintList.Location = new System.Drawing.Point(163, 68);
-            this.PrintList.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
+            this.PrintList.Location = new System.Drawing.Point(122, 54);
+            this.PrintList.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.PrintList.Name = "PrintList";
-            this.PrintList.Size = new System.Drawing.Size(181, 28);
+            this.PrintList.Size = new System.Drawing.Size(136, 22);
             this.PrintList.TabIndex = 158;
             // 
             // Printing
@@ -540,13 +512,12 @@
             this.Printing.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.Printing.Image = null;
             this.Printing.IsShowBorder = true;
-            this.Printing.Location = new System.Drawing.Point(415, 162);
-            this.Printing.Margin = new System.Windows.Forms.Padding(4);
+            this.Printing.Location = new System.Drawing.Point(311, 130);
             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(60, 30);
+            this.Printing.Size = new System.Drawing.Size(45, 24);
             this.Printing.TabIndex = 150;
             this.Printing.Tag = "ifread";
             this.Printing.Text = "打印";
@@ -557,10 +528,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(7, 64);
-            this.PrintList_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrintList_label.Location = new System.Drawing.Point(5, 50);
             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 = "打印机列表";
             // 
@@ -568,10 +538,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(280, 158);
-            this.PrintNum_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrintNum_label.Location = new System.Drawing.Point(210, 126);
             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 = "份数";
             // 
@@ -600,11 +569,11 @@
             this.groupBoxWithBorder1.Controls.Add(this.pr_code);
             this.groupBoxWithBorder1.Controls.Add(this.pa_code_label);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(5, 8);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(4, 6);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(548, 210);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(411, 168);
             this.groupBoxWithBorder1.TabIndex = 171;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "装箱信息";
@@ -617,10 +586,9 @@
             this.locksalecode.CheckState = System.Windows.Forms.CheckState.Checked;
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.ForeColor = System.Drawing.Color.Red;
-            this.locksalecode.Location = new System.Drawing.Point(392, 15);
-            this.locksalecode.Margin = new System.Windows.Forms.Padding(4);
+            this.locksalecode.Location = new System.Drawing.Point(294, 19);
             this.locksalecode.Name = "locksalecode";
-            this.locksalecode.Size = new System.Drawing.Size(119, 19);
+            this.locksalecode.Size = new System.Drawing.Size(96, 16);
             this.locksalecode.TabIndex = 196;
             this.locksalecode.Text = "当前订单锁定";
             this.locksalecode.UseVisualStyleBackColor = true;
@@ -629,10 +597,9 @@
             // 
             this.PreFix_label.AutoSize = true;
             this.PreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PreFix_label.Location = new System.Drawing.Point(241, 19);
-            this.PreFix_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PreFix_label.Location = new System.Drawing.Point(181, 14);
             this.PreFix_label.Name = "PreFix_label";
-            this.PreFix_label.Size = new System.Drawing.Size(46, 24);
+            this.PreFix_label.Size = new System.Drawing.Size(37, 20);
             this.PreFix_label.TabIndex = 195;
             this.PreFix_label.Text = "前缀";
             // 
@@ -642,11 +609,11 @@
             this.PreFix.BackColor = System.Drawing.Color.White;
             this.PreFix.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.PreFix.ID = null;
-            this.PreFix.Location = new System.Drawing.Point(307, 19);
-            this.PreFix.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
+            this.PreFix.Location = new System.Drawing.Point(230, 15);
+            this.PreFix.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.PreFix.Name = "PreFix";
             this.PreFix.Power = null;
-            this.PreFix.Size = new System.Drawing.Size(49, 27);
+            this.PreFix.Size = new System.Drawing.Size(38, 23);
             this.PreFix.Str = null;
             this.PreFix.Str1 = null;
             this.PreFix.Str2 = null;
@@ -657,10 +624,9 @@
             // 
             this.pa_salecode_label.AutoSize = true;
             this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode_label.Location = new System.Drawing.Point(282, 168);
-            this.pa_salecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_salecode_label.Location = new System.Drawing.Point(212, 134);
             this.pa_salecode_label.Name = "pa_salecode_label";
-            this.pa_salecode_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_salecode_label.Size = new System.Drawing.Size(74, 21);
             this.pa_salecode_label.TabIndex = 185;
             this.pa_salecode_label.Text = "订单编号";
             // 
@@ -668,10 +634,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(10, 168);
-            this.ma_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_code_label.Location = new System.Drawing.Point(8, 134);
             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 = 186;
             this.ma_code_label.Text = "工单号";
             // 
@@ -679,31 +644,28 @@
             // 
             this.ms_salecode.AutoSize = true;
             this.ms_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_salecode.Location = new System.Drawing.Point(391, 168);
-            this.ms_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_salecode.Location = new System.Drawing.Point(293, 134);
             this.ms_salecode.Name = "ms_salecode";
-            this.ms_salecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_salecode.Size = new System.Drawing.Size(0, 21);
             this.ms_salecode.TabIndex = 188;
             // 
             // ms_makecode
             // 
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(126, 168);
-            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_makecode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_makecode.Location = new System.Drawing.Point(94, 134);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
             this.ms_makecode.TabIndex = 187;
             // 
             // OutBoxLength_label
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(111, 19);
-            this.OutBoxLength_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(83, 14);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
-            this.OutBoxLength_label.Size = new System.Drawing.Size(46, 24);
+            this.OutBoxLength_label.Size = new System.Drawing.Size(37, 20);
             this.OutBoxLength_label.TabIndex = 184;
             this.OutBoxLength_label.Text = "长度";
             // 
@@ -713,11 +675,11 @@
             this.OutBoxLength.BackColor = System.Drawing.Color.White;
             this.OutBoxLength.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.OutBoxLength.ID = null;
-            this.OutBoxLength.Location = new System.Drawing.Point(173, 19);
-            this.OutBoxLength.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
+            this.OutBoxLength.Location = new System.Drawing.Point(130, 15);
+            this.OutBoxLength.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.OutBoxLength.Name = "OutBoxLength";
             this.OutBoxLength.Power = null;
-            this.OutBoxLength.Size = new System.Drawing.Size(49, 27);
+            this.OutBoxLength.Size = new System.Drawing.Size(38, 23);
             this.OutBoxLength.Str = null;
             this.OutBoxLength.Str1 = null;
             this.OutBoxLength.Str2 = null;
@@ -731,11 +693,10 @@
             this.pr_outboxinnerqty.Enabled = false;
             this.pr_outboxinnerqty.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_outboxinnerqty.ID = null;
-            this.pr_outboxinnerqty.Location = new System.Drawing.Point(120, 92);
-            this.pr_outboxinnerqty.Margin = new System.Windows.Forms.Padding(4);
+            this.pr_outboxinnerqty.Location = new System.Drawing.Point(90, 74);
             this.pr_outboxinnerqty.Name = "pr_outboxinnerqty";
             this.pr_outboxinnerqty.Power = null;
-            this.pr_outboxinnerqty.Size = new System.Drawing.Size(137, 27);
+            this.pr_outboxinnerqty.Size = new System.Drawing.Size(104, 23);
             this.pr_outboxinnerqty.Str = null;
             this.pr_outboxinnerqty.Str1 = null;
             this.pr_outboxinnerqty.Str2 = null;
@@ -749,13 +710,12 @@
             this.DeleteAll.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.DeleteAll.Image = null;
             this.DeleteAll.IsShowBorder = true;
-            this.DeleteAll.Location = new System.Drawing.Point(473, 52);
-            this.DeleteAll.Margin = new System.Windows.Forms.Padding(4);
+            this.DeleteAll.Location = new System.Drawing.Point(355, 42);
             this.DeleteAll.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteAll.MoveImage")));
             this.DeleteAll.Name = "DeleteAll";
             this.DeleteAll.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteAll.NormalImage")));
             this.DeleteAll.Power = "ifspecial";
-            this.DeleteAll.Size = new System.Drawing.Size(60, 30);
+            this.DeleteAll.Size = new System.Drawing.Size(45, 24);
             this.DeleteAll.TabIndex = 181;
             this.DeleteAll.Text = "拆箱";
             this.DeleteAll.UseVisualStyleBackColor = true;
@@ -764,10 +724,10 @@
             // AutoGenBoxCode
             // 
             this.AutoGenBoxCode.AutoSize = true;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(333, 51);
-            this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(250, 40);
+            this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
-            this.AutoGenBoxCode.Size = new System.Drawing.Size(114, 31);
+            this.AutoGenBoxCode.Size = new System.Drawing.Size(93, 25);
             this.AutoGenBoxCode.TabIndex = 171;
             this.AutoGenBoxCode.Text = "自动生成";
             this.AutoGenBoxCode.UseVisualStyleBackColor = true;
@@ -776,10 +736,9 @@
             // 
             this.pa_currentqty_label.AutoSize = true;
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty_label.Location = new System.Drawing.Point(285, 93);
-            this.pa_currentqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(214, 74);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
-            this.pa_currentqty_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_currentqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_currentqty_label.TabIndex = 95;
             this.pa_currentqty_label.Text = "已装数量";
             // 
@@ -787,10 +746,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(282, 128);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(212, 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 = "产品名称";
             // 
@@ -801,11 +759,11 @@
             this.pa_outboxcode.Font = new System.Drawing.Font("微软雅黑", 12F);
             this.pa_outboxcode.ForeColor = System.Drawing.Color.Black;
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(120, 52);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
+            this.pa_outboxcode.Location = new System.Drawing.Point(90, 42);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = null;
-            this.pa_outboxcode.Size = new System.Drawing.Size(192, 34);
+            this.pa_outboxcode.Size = new System.Drawing.Size(145, 29);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -816,20 +774,18 @@
             // 
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty.Location = new System.Drawing.Point(390, 91);
-            this.pa_currentqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_currentqty.Location = new System.Drawing.Point(292, 72);
             this.pa_currentqty.Name = "pa_currentqty";
-            this.pa_currentqty.Size = new System.Drawing.Size(0, 27);
+            this.pa_currentqty.Size = new System.Drawing.Size(0, 21);
             this.pa_currentqty.TabIndex = 169;
             // 
             // 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(10, 128);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code_label.Location = new System.Drawing.Point(8, 102);
             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 = "产品编号";
             // 
@@ -837,20 +793,18 @@
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(391, 128);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail.Location = new System.Drawing.Point(293, 102);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 27);
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 168;
             // 
             // pr_outboxinnerqty_label
             // 
             this.pr_outboxinnerqty_label.AutoSize = true;
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(10, 91);
-            this.pr_outboxinnerqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(8, 72);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
-            this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(74, 21);
             this.pr_outboxinnerqty_label.TabIndex = 97;
             this.pr_outboxinnerqty_label.Text = "箱内容量";
             // 
@@ -858,11 +812,10 @@
             // 
             this.pr_code.AutoSize = true;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(126, 128);
-            this.pr_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_code.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pr_code.Location = new System.Drawing.Point(94, 102);
+            this.pr_code.MaximumSize = new System.Drawing.Size(150, 0);
             this.pr_code.Name = "pr_code";
-            this.pr_code.Size = new System.Drawing.Size(0, 27);
+            this.pr_code.Size = new System.Drawing.Size(0, 21);
             this.pr_code.TabIndex = 167;
             this.pr_code.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
             // 
@@ -870,20 +823,18 @@
             // 
             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(10, 54);
-            this.pa_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_code_label.Location = new System.Drawing.Point(8, 42);
             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 = "箱号";
             // 
             // 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(5, 534);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(4, 427);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(595, 149);
+            this.OperateResult.Size = new System.Drawing.Size(447, 120);
             this.OperateResult.TabIndex = 155;
             this.OperateResult.Text = "";
             // 
@@ -894,13 +845,12 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = null;
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(520, 690);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4);
+            this.Clean.Location = new System.Drawing.Point(390, 552);
             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;
@@ -911,11 +861,10 @@
             this.sn_code.AllPower = "ifall";
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(99, 692);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(4);
+            this.sn_code.Location = new System.Drawing.Point(74, 554);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = "ifread";
-            this.sn_code.Size = new System.Drawing.Size(229, 25);
+            this.sn_code.Size = new System.Drawing.Size(173, 21);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -937,12 +886,11 @@
             this.pa_indate,
             this.pd_id});
             this.PackageDetail.EnableContentClick = true;
-            this.PackageDetail.Location = new System.Drawing.Point(5, 224);
-            this.PackageDetail.Margin = new System.Windows.Forms.Padding(4);
+            this.PackageDetail.Location = new System.Drawing.Point(4, 179);
             this.PackageDetail.Name = "PackageDetail";
             this.PackageDetail.ReadOnly = true;
             this.PackageDetail.RowTemplate.Height = 23;
-            this.PackageDetail.Size = new System.Drawing.Size(1149, 300);
+            this.PackageDetail.Size = new System.Drawing.Size(862, 240);
             this.PackageDetail.TabIndex = 134;
             // 
             // pd_barcode
@@ -1007,13 +955,12 @@
             this.CloseServer.DownImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.DownImage")));
             this.CloseServer.Image = null;
             this.CloseServer.IsShowBorder = true;
-            this.CloseServer.Location = new System.Drawing.Point(1041, 628);
-            this.CloseServer.Margin = new System.Windows.Forms.Padding(4);
+            this.CloseServer.Location = new System.Drawing.Point(781, 502);
             this.CloseServer.MoveImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.MoveImage")));
             this.CloseServer.Name = "CloseServer";
             this.CloseServer.NormalImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.NormalImage")));
             this.CloseServer.Power = null;
-            this.CloseServer.Size = new System.Drawing.Size(80, 30);
+            this.CloseServer.Size = new System.Drawing.Size(60, 24);
             this.CloseServer.TabIndex = 207;
             this.CloseServer.Text = "关闭服务";
             this.CloseServer.UseVisualStyleBackColor = true;
@@ -1026,13 +973,12 @@
             this.BuildServer.DownImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.DownImage")));
             this.BuildServer.Image = null;
             this.BuildServer.IsShowBorder = true;
-            this.BuildServer.Location = new System.Drawing.Point(933, 628);
-            this.BuildServer.Margin = new System.Windows.Forms.Padding(4);
+            this.BuildServer.Location = new System.Drawing.Point(700, 502);
             this.BuildServer.MoveImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.MoveImage")));
             this.BuildServer.Name = "BuildServer";
             this.BuildServer.NormalImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.NormalImage")));
             this.BuildServer.Power = null;
-            this.BuildServer.Size = new System.Drawing.Size(80, 30);
+            this.BuildServer.Size = new System.Drawing.Size(60, 24);
             this.BuildServer.TabIndex = 206;
             this.BuildServer.Text = "开启服务";
             this.BuildServer.UseVisualStyleBackColor = true;
@@ -1044,11 +990,10 @@
             this.Port.BackColor = System.Drawing.Color.White;
             this.Port.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Port.ID = null;
-            this.Port.Location = new System.Drawing.Point(1003, 582);
-            this.Port.Margin = new System.Windows.Forms.Padding(4);
+            this.Port.Location = new System.Drawing.Point(752, 466);
             this.Port.Name = "Port";
             this.Port.Power = null;
-            this.Port.Size = new System.Drawing.Size(151, 27);
+            this.Port.Size = new System.Drawing.Size(114, 23);
             this.Port.Str = null;
             this.Port.Str1 = null;
             this.Port.Str2 = null;
@@ -1058,10 +1003,9 @@
             // 
             this.Port_label.AutoSize = true;
             this.Port_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Port_label.Location = new System.Drawing.Point(923, 580);
-            this.Port_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.Port_label.Location = new System.Drawing.Point(692, 464);
             this.Port_label.Name = "Port_label";
-            this.Port_label.Size = new System.Drawing.Size(52, 27);
+            this.Port_label.Size = new System.Drawing.Size(42, 21);
             this.Port_label.TabIndex = 204;
             this.Port_label.Text = "端口";
             // 
@@ -1071,11 +1015,11 @@
             this.IP.BackColor = System.Drawing.Color.White;
             this.IP.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.IP.ID = null;
-            this.IP.Location = new System.Drawing.Point(1003, 539);
-            this.IP.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
+            this.IP.Location = new System.Drawing.Point(752, 431);
+            this.IP.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.IP.Name = "IP";
             this.IP.Power = null;
-            this.IP.Size = new System.Drawing.Size(151, 27);
+            this.IP.Size = new System.Drawing.Size(114, 23);
             this.IP.Str = null;
             this.IP.Str1 = null;
             this.IP.Str2 = null;
@@ -1085,19 +1029,18 @@
             // 
             this.IP_label.AutoSize = true;
             this.IP_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.IP_label.Location = new System.Drawing.Point(923, 539);
-            this.IP_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.IP_label.Location = new System.Drawing.Point(692, 431);
             this.IP_label.Name = "IP_label";
-            this.IP_label.Size = new System.Drawing.Size(30, 27);
+            this.IP_label.Size = new System.Drawing.Size(25, 21);
             this.IP_label.TabIndex = 202;
             this.IP_label.Text = "IP";
             // 
             // 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.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
-            this.ClientSize = new System.Drawing.Size(1172, 730);
+            this.ClientSize = new System.Drawing.Size(879, 584);
             this.Controls.Add(this.CloseServer);
             this.Controls.Add(this.BuildServer);
             this.Controls.Add(this.Port);
@@ -1129,7 +1072,6 @@
             this.Controls.Add(this.label13);
             this.Controls.Add(this.pa_makecode);
             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 = "包装采集";

+ 3 - 1
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -40,6 +40,8 @@ namespace UAS_MES.Make
 
         string ActWeigh = "0";
 
+        Regex re = new Regex("\\d+.\\d+\\w+");
+
         decimal StandardQTY = 0;
 
         string oOutBoxCode = "";
@@ -127,7 +129,7 @@ namespace UAS_MES.Make
                         {
                             try
                             {
-                                weight.Text = serialPort1.ReadLine().Trim();
+                                weight.Text = re.Match(serialPort1.ReadLine().Trim()).Groups[0].Value;
                             }
                             catch (Exception)
                             {

+ 7 - 15
UAS-MES/Login.cs

@@ -62,10 +62,10 @@ namespace UAS_MES
             {
                 dh = new DataHelper();
                 //将账套的信息查询出来赋给下拉框
-                DbComboxData = (DataTable)dh.ExecuteSql("select ms_pwd,ma_user,ma_address from master", "select");
+                DbComboxData = (DataTable)dh.ExecuteSql("select ms_pwd,ma_user,ma_user||'#'||ma_address db_user from master", "select");
                 DB.DataSource = DbComboxData;
                 DB.DisplayMember = "ma_user";
-                DB.ValueMember = "ma_user";
+                DB.ValueMember = "db_user";
                 DB.Text = BaseUtil.GetCacheData("LastLoginSob").ToString();
                 LoginButton.Enabled = true;
             }
@@ -81,19 +81,11 @@ namespace UAS_MES
             if (DB.SelectedValue == null)
                 BaseUtil.ShowError("请选择一个数据库!");
             //设置选中数据库的链接
-            switch (DB.SelectedValue.ToString().ToUpper())
-            {
-                case "MES_TEST":
-                    DataHelper.DBConnectionString = "Password=select!#%*(;User ID=MES_TEST;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.230.200)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
-                    break;
-                case "MES":
-                    DataHelper.DBConnectionString = "Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.230.200)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
-                    break;
-                default:
-                    break;
-            }
-            SystemInf.CurrentDB = DB.SelectedValue.ToString().ToUpper();
-            //设置屏幕的宽高信息 
+            string DBUser = DB.SelectedValue.ToString().Split('#')[0];
+            string Address = DB.SelectedValue.ToString().Split('#')[1];
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + Address + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            SystemInf.CurrentDB = DBUser;
+            //设置屏幕的宽高信息
             SystemInf.ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;
             SystemInf.ScreenHeight = Screen.PrimaryScreen.WorkingArea.Height;
             //重新执行一遍构造函数使得重置之后的链接字符串生效