Browse Source

修改获取打印数据

章政 8 years ago
parent
commit
d626c5a17e

+ 5 - 2
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -298,8 +298,11 @@ namespace UAS_MES.Make
 
         private void PrintLabel_SelectedIndexChanged(object sender, EventArgs e)
         {
-            string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
-            PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
+            {
+                string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
+                PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            }
         }
     }
 }

+ 5 - 2
UAS-MES/FunctionCode/Make/Make_BigBoxWeight.cs

@@ -259,8 +259,11 @@ namespace UAS_MES.Make
 
         private void PrintLabel_SelectedIndexChanged(object sender, EventArgs e)
         {
-            string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
-            PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
+            {
+                string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
+                PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            }
         }
     }
 }

+ 5 - 2
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -478,8 +478,11 @@ namespace UAS_MES.Make
 
         private void PrintLabel_SelectedIndexChanged(object sender, EventArgs e)
         {
-            string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
-            PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
+            {
+                string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
+                PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            }
         }
     }
 }

+ 5 - 2
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -563,8 +563,11 @@ namespace UAS_MES.Make
 
         private void PrintLabel_SelectedIndexChanged(object sender, EventArgs e)
         {
-            string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
-            PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
+            {
+                string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
+                PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            }
         }
     }
 }

+ 5 - 2
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -253,8 +253,11 @@ namespace UAS_MES.Make
 
         private void PrintLabel_SelectedIndexChanged(object sender, EventArgs e)
         {
-            string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
-            PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
+            {
+                string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
+                PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            }
         }
     }
 }

+ 98 - 97
UAS-MES/FunctionCode/Make/Make_PalletWeigh.Designer.cs

@@ -61,7 +61,7 @@
             this.pa_salecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_totalqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.printNum = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.PrintNum = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.Printer = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.palletcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -75,10 +75,10 @@
             this.panel4.Controls.Add(this.pr_cartonunit);
             this.panel4.Controls.Add(this.label22);
             this.panel4.Controls.Add(this.weight);
-            this.panel4.Location = new System.Drawing.Point(46, 92);
-            this.panel4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.panel4.Location = new System.Drawing.Point(41, 77);
+            this.panel4.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.panel4.Name = "panel4";
-            this.panel4.Size = new System.Drawing.Size(552, 186);
+            this.panel4.Size = new System.Drawing.Size(491, 155);
             this.panel4.TabIndex = 92;
             // 
             // pr_cartonunit
@@ -87,10 +87,10 @@
             this.pr_cartonunit.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.pr_cartonunit.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_cartonunit.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.pr_cartonunit.Location = new System.Drawing.Point(460, 76);
+            this.pr_cartonunit.Location = new System.Drawing.Point(409, 63);
             this.pr_cartonunit.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_cartonunit.Name = "pr_cartonunit";
-            this.pr_cartonunit.Size = new System.Drawing.Size(46, 38);
+            this.pr_cartonunit.Size = new System.Drawing.Size(38, 31);
             this.pr_cartonunit.TabIndex = 42;
             this.pr_cartonunit.Text = "克";
             // 
@@ -100,10 +100,10 @@
             this.label22.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.label22.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label22.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.label22.Location = new System.Drawing.Point(22, 76);
+            this.label22.Location = new System.Drawing.Point(20, 63);
             this.label22.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label22.Name = "label22";
-            this.label22.Size = new System.Drawing.Size(75, 38);
+            this.label22.Size = new System.Drawing.Size(62, 31);
             this.label22.TabIndex = 20;
             this.label22.Text = "重量";
             // 
@@ -115,20 +115,20 @@
             this.weight.AutoSize = true;
             this.weight.Font = new System.Drawing.Font("微软雅黑", 22.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.weight.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
-            this.weight.Location = new System.Drawing.Point(156, 64);
+            this.weight.Location = new System.Drawing.Point(139, 53);
             this.weight.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.weight.Name = "weight";
-            this.weight.Size = new System.Drawing.Size(0, 58);
+            this.weight.Size = new System.Drawing.Size(0, 50);
             this.weight.TabIndex = 41;
             // 
             // label15
             // 
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label15.Location = new System.Drawing.Point(46, 16);
+            this.label15.Location = new System.Drawing.Point(41, 13);
             this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label15.Name = "label15";
-            this.label15.Size = new System.Drawing.Size(128, 46);
+            this.label15.Size = new System.Drawing.Size(107, 39);
             this.label15.TabIndex = 93;
             this.label15.Text = "栈板号";
             // 
@@ -136,10 +136,10 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label1.Location = new System.Drawing.Point(978, 94);
+            this.label1.Location = new System.Drawing.Point(869, 78);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(110, 31);
+            this.label1.Size = new System.Drawing.Size(92, 27);
             this.label1.TabIndex = 165;
             this.label1.Text = "打印标签";
             // 
@@ -147,10 +147,10 @@
             // 
             this.Printer_label.AutoSize = true;
             this.Printer_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.Printer_label.Location = new System.Drawing.Point(978, 20);
+            this.Printer_label.Location = new System.Drawing.Point(869, 17);
             this.Printer_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Printer_label.Name = "Printer_label";
-            this.Printer_label.Size = new System.Drawing.Size(134, 31);
+            this.Printer_label.Size = new System.Drawing.Size(112, 27);
             this.Printer_label.TabIndex = 164;
             this.Printer_label.Text = "打印机列表";
             // 
@@ -159,19 +159,20 @@
             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(1125, 100);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrintLabel.Location = new System.Drawing.Point(1000, 83);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(196, 26);
+            this.PrintLabel.Size = new System.Drawing.Size(175, 23);
             this.PrintLabel.TabIndex = 162;
+            this.PrintLabel.SelectedIndexChanged += new System.EventHandler(this.PrintLabel_SelectedIndexChanged);
             // 
             // printNum_label
             // 
             this.printNum_label.AutoSize = true;
             this.printNum_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.printNum_label.Location = new System.Drawing.Point(978, 170);
+            this.printNum_label.Location = new System.Drawing.Point(869, 142);
             this.printNum_label.Name = "printNum_label";
-            this.printNum_label.Size = new System.Drawing.Size(62, 31);
+            this.printNum_label.Size = new System.Drawing.Size(52, 27);
             this.printNum_label.TabIndex = 167;
             this.printNum_label.Text = "份数";
             // 
@@ -179,9 +180,9 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.label2.Location = new System.Drawing.Point(39, 316);
+            this.label2.Location = new System.Drawing.Point(35, 263);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(107, 39);
+            this.label2.Size = new System.Drawing.Size(90, 32);
             this.label2.TabIndex = 169;
             this.label2.Text = "工单号";
             // 
@@ -189,9 +190,9 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.label3.Location = new System.Drawing.Point(39, 378);
+            this.label3.Location = new System.Drawing.Point(35, 315);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(137, 39);
+            this.label3.Size = new System.Drawing.Size(115, 32);
             this.label3.TabIndex = 170;
             this.label3.Text = "栈内总数";
             // 
@@ -199,9 +200,9 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.label4.Location = new System.Drawing.Point(39, 446);
+            this.label4.Location = new System.Drawing.Point(35, 372);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(137, 39);
+            this.label4.Size = new System.Drawing.Size(115, 32);
             this.label4.TabIndex = 171;
             this.label4.Text = "产品编号";
             // 
@@ -209,9 +210,9 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.label5.Location = new System.Drawing.Point(39, 512);
+            this.label5.Location = new System.Drawing.Point(35, 427);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(137, 39);
+            this.label5.Size = new System.Drawing.Size(115, 32);
             this.label5.TabIndex = 172;
             this.label5.Text = "名称规格";
             // 
@@ -219,9 +220,9 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.label6.Location = new System.Drawing.Point(430, 316);
+            this.label6.Location = new System.Drawing.Point(382, 263);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(137, 39);
+            this.label6.Size = new System.Drawing.Size(115, 32);
             this.label6.TabIndex = 173;
             this.label6.Text = "订单编号";
             // 
@@ -229,9 +230,9 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.label7.Location = new System.Drawing.Point(430, 378);
+            this.label7.Location = new System.Drawing.Point(382, 315);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(137, 39);
+            this.label7.Size = new System.Drawing.Size(115, 32);
             this.label7.TabIndex = 174;
             this.label7.Text = "栈内件数";
             // 
@@ -239,9 +240,9 @@
             // 
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label8.Location = new System.Drawing.Point(978, 248);
+            this.label8.Location = new System.Drawing.Point(869, 207);
             this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(62, 31);
+            this.label8.Size = new System.Drawing.Size(52, 27);
             this.label8.TabIndex = 176;
             this.label8.Text = "已称";
             // 
@@ -253,10 +254,10 @@
             this.columnHeader3,
             this.columnHeader4});
             this.showResult.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.showResult.Location = new System.Drawing.Point(770, 378);
+            this.showResult.Location = new System.Drawing.Point(684, 315);
             this.showResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.showResult.Name = "showResult";
-            this.showResult.Size = new System.Drawing.Size(584, 506);
+            this.showResult.Size = new System.Drawing.Size(520, 422);
             this.showResult.TabIndex = 190;
             this.showResult.UseCompatibleStateImageBehavior = false;
             this.showResult.View = System.Windows.Forms.View.Details;
@@ -287,29 +288,29 @@
             // 
             this.pr_detailspec.AutoSize = true;
             this.pr_detailspec.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.pr_detailspec.Location = new System.Drawing.Point(176, 512);
+            this.pr_detailspec.Location = new System.Drawing.Point(156, 427);
             this.pr_detailspec.Name = "pr_detailspec";
-            this.pr_detailspec.Size = new System.Drawing.Size(0, 39);
+            this.pr_detailspec.Size = new System.Drawing.Size(0, 32);
             this.pr_detailspec.TabIndex = 192;
             // 
             // autoPrint
             // 
             this.autoPrint.Checked = false;
-            this.autoPrint.Location = new System.Drawing.Point(983, 316);
-            this.autoPrint.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
+            this.autoPrint.Location = new System.Drawing.Point(874, 263);
+            this.autoPrint.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.autoPrint.Name = "autoPrint";
-            this.autoPrint.Size = new System.Drawing.Size(141, 41);
+            this.autoPrint.Size = new System.Drawing.Size(125, 34);
             this.autoPrint.TabIndex = 193;
             // 
             // ComList
             // 
             this.ComList.AutoSize = true;
             this.ComList.CutLength = null;
-            this.ComList.Location = new System.Drawing.Point(669, 184);
+            this.ComList.Location = new System.Drawing.Point(595, 153);
             this.ComList.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ComList.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ComList.MaximumSize = new System.Drawing.Size(200, 0);
             this.ComList.Name = "ComList";
-            this.ComList.Size = new System.Drawing.Size(71, 18);
+            this.ComList.Size = new System.Drawing.Size(63, 15);
             this.ComList.TabIndex = 191;
             this.ComList.Text = "ComList";
             this.ComList.Visible = false;
@@ -319,12 +320,12 @@
             this.BaudRate.AllPower = null;
             this.BaudRate.BackColor = System.Drawing.Color.White;
             this.BaudRate.ID = null;
-            this.BaudRate.Location = new System.Drawing.Point(670, 134);
-            this.BaudRate.Margin = new System.Windows.Forms.Padding(4);
+            this.BaudRate.Location = new System.Drawing.Point(596, 112);
+            this.BaudRate.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.BaudRate.Name = "BaudRate";
             this.BaudRate.Negative = false;
             this.BaudRate.Power = null;
-            this.BaudRate.Size = new System.Drawing.Size(178, 28);
+            this.BaudRate.Size = new System.Drawing.Size(159, 25);
             this.BaudRate.Str = null;
             this.BaudRate.Str1 = null;
             this.BaudRate.Str2 = null;
@@ -338,13 +339,13 @@
             this.stopWeigh.DownImage = ((System.Drawing.Image)(resources.GetObject("stopWeigh.DownImage")));
             this.stopWeigh.Image = null;
             this.stopWeigh.IsShowBorder = true;
-            this.stopWeigh.Location = new System.Drawing.Point(770, 20);
+            this.stopWeigh.Location = new System.Drawing.Point(684, 17);
             this.stopWeigh.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.stopWeigh.MoveImage = ((System.Drawing.Image)(resources.GetObject("stopWeigh.MoveImage")));
             this.stopWeigh.Name = "stopWeigh";
             this.stopWeigh.NormalImage = ((System.Drawing.Image)(resources.GetObject("stopWeigh.NormalImage")));
             this.stopWeigh.Power = null;
-            this.stopWeigh.Size = new System.Drawing.Size(108, 38);
+            this.stopWeigh.Size = new System.Drawing.Size(96, 32);
             this.stopWeigh.TabIndex = 187;
             this.stopWeigh.Text = "停止称重";
             this.stopWeigh.UseVisualStyleBackColor = false;
@@ -357,13 +358,13 @@
             this.startWeigh.DownImage = ((System.Drawing.Image)(resources.GetObject("startWeigh.DownImage")));
             this.startWeigh.Image = null;
             this.startWeigh.IsShowBorder = true;
-            this.startWeigh.Location = new System.Drawing.Point(650, 20);
+            this.startWeigh.Location = new System.Drawing.Point(578, 17);
             this.startWeigh.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.startWeigh.MoveImage = ((System.Drawing.Image)(resources.GetObject("startWeigh.MoveImage")));
             this.startWeigh.Name = "startWeigh";
             this.startWeigh.NormalImage = ((System.Drawing.Image)(resources.GetObject("startWeigh.NormalImage")));
             this.startWeigh.Power = null;
-            this.startWeigh.Size = new System.Drawing.Size(92, 38);
+            this.startWeigh.Size = new System.Drawing.Size(82, 32);
             this.startWeigh.TabIndex = 186;
             this.startWeigh.Text = "开始称重";
             this.startWeigh.UseVisualStyleBackColor = false;
@@ -375,12 +376,12 @@
             this.weightedNum.BackColor = System.Drawing.Color.White;
             this.weightedNum.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.weightedNum.ID = null;
-            this.weightedNum.Location = new System.Drawing.Point(1122, 248);
+            this.weightedNum.Location = new System.Drawing.Point(997, 207);
             this.weightedNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.weightedNum.Name = "weightedNum";
             this.weightedNum.Negative = false;
             this.weightedNum.Power = null;
-            this.weightedNum.Size = new System.Drawing.Size(196, 28);
+            this.weightedNum.Size = new System.Drawing.Size(175, 25);
             this.weightedNum.Str = null;
             this.weightedNum.Str1 = null;
             this.weightedNum.Str2 = null;
@@ -392,10 +393,10 @@
             this.PA_PACKAGEQTY.AutoSize = true;
             this.PA_PACKAGEQTY.CutLength = null;
             this.PA_PACKAGEQTY.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.PA_PACKAGEQTY.Location = new System.Drawing.Point(560, 378);
-            this.PA_PACKAGEQTY.MaximumSize = new System.Drawing.Size(200, 0);
+            this.PA_PACKAGEQTY.Location = new System.Drawing.Point(498, 315);
+            this.PA_PACKAGEQTY.MaximumSize = new System.Drawing.Size(178, 0);
             this.PA_PACKAGEQTY.Name = "PA_PACKAGEQTY";
-            this.PA_PACKAGEQTY.Size = new System.Drawing.Size(0, 39);
+            this.PA_PACKAGEQTY.Size = new System.Drawing.Size(0, 32);
             this.PA_PACKAGEQTY.TabIndex = 184;
             // 
             // pa_salecode
@@ -403,10 +404,10 @@
             this.pa_salecode.AutoSize = true;
             this.pa_salecode.CutLength = null;
             this.pa_salecode.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.pa_salecode.Location = new System.Drawing.Point(560, 316);
-            this.pa_salecode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_salecode.Location = new System.Drawing.Point(498, 263);
+            this.pa_salecode.MaximumSize = new System.Drawing.Size(178, 0);
             this.pa_salecode.Name = "pa_salecode";
-            this.pa_salecode.Size = new System.Drawing.Size(0, 39);
+            this.pa_salecode.Size = new System.Drawing.Size(0, 32);
             this.pa_salecode.TabIndex = 183;
             // 
             // pa_totalqty
@@ -414,10 +415,10 @@
             this.pa_totalqty.AutoSize = true;
             this.pa_totalqty.CutLength = null;
             this.pa_totalqty.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.pa_totalqty.Location = new System.Drawing.Point(176, 378);
-            this.pa_totalqty.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_totalqty.Location = new System.Drawing.Point(156, 315);
+            this.pa_totalqty.MaximumSize = new System.Drawing.Size(178, 0);
             this.pa_totalqty.Name = "pa_totalqty";
-            this.pa_totalqty.Size = new System.Drawing.Size(0, 39);
+            this.pa_totalqty.Size = new System.Drawing.Size(0, 32);
             this.pa_totalqty.TabIndex = 180;
             // 
             // pa_makecode
@@ -425,47 +426,47 @@
             this.pa_makecode.AutoSize = true;
             this.pa_makecode.CutLength = null;
             this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.pa_makecode.Location = new System.Drawing.Point(176, 316);
-            this.pa_makecode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_makecode.Location = new System.Drawing.Point(156, 263);
+            this.pa_makecode.MaximumSize = new System.Drawing.Size(178, 0);
             this.pa_makecode.Name = "pa_makecode";
-            this.pa_makecode.Size = new System.Drawing.Size(0, 39);
+            this.pa_makecode.Size = new System.Drawing.Size(0, 32);
             this.pa_makecode.TabIndex = 179;
             // 
-            // printNum
-            // 
-            this.printNum.AllPower = null;
-            this.printNum.BackColor = System.Drawing.Color.White;
-            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(1122, 170);
-            this.printNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.printNum.Name = "printNum";
-            this.printNum.Negative = false;
-            this.printNum.Power = null;
-            this.printNum.Size = new System.Drawing.Size(196, 28);
-            this.printNum.Str = null;
-            this.printNum.Str1 = null;
-            this.printNum.Str2 = null;
-            this.printNum.TabIndex = 178;
-            this.printNum.Text = "1";
+            // PrintNum
+            // 
+            this.PrintNum.AllPower = null;
+            this.PrintNum.BackColor = System.Drawing.Color.White;
+            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(997, 142);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.PrintNum.Name = "PrintNum";
+            this.PrintNum.Negative = false;
+            this.PrintNum.Power = null;
+            this.PrintNum.Size = new System.Drawing.Size(175, 25);
+            this.PrintNum.Str = null;
+            this.PrintNum.Str1 = null;
+            this.PrintNum.Str2 = null;
+            this.PrintNum.TabIndex = 178;
+            this.PrintNum.Text = "1";
             // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(33, 574);
+            this.OperateResult.Location = new System.Drawing.Point(29, 478);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(662, 310);
+            this.OperateResult.Size = new System.Drawing.Size(589, 259);
             this.OperateResult.TabIndex = 175;
             this.OperateResult.Text = "";
             // 
             // Printer
             // 
             this.Printer.Font = new System.Drawing.Font("宋体", 9F);
-            this.Printer.Location = new System.Drawing.Point(1122, 24);
-            this.Printer.Margin = new System.Windows.Forms.Padding(6);
+            this.Printer.Location = new System.Drawing.Point(997, 20);
+            this.Printer.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
             this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(196, 32);
+            this.Printer.Size = new System.Drawing.Size(174, 27);
             this.Printer.TabIndex = 163;
             // 
             // palletcode
@@ -474,11 +475,11 @@
             this.palletcode.BackColor = System.Drawing.Color.White;
             this.palletcode.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.palletcode.ID = null;
-            this.palletcode.Location = new System.Drawing.Point(183, 14);
-            this.palletcode.Margin = new System.Windows.Forms.Padding(4);
+            this.palletcode.Location = new System.Drawing.Point(163, 12);
+            this.palletcode.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.palletcode.Name = "palletcode";
             this.palletcode.Power = null;
-            this.palletcode.Size = new System.Drawing.Size(416, 55);
+            this.palletcode.Size = new System.Drawing.Size(370, 47);
             this.palletcode.Str = null;
             this.palletcode.Str1 = null;
             this.palletcode.Str2 = null;
@@ -489,16 +490,16 @@
             // 
             this.pa_prodcode.AutoSize = true;
             this.pa_prodcode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode.Location = new System.Drawing.Point(176, 446);
+            this.pa_prodcode.Location = new System.Drawing.Point(156, 372);
             this.pa_prodcode.Name = "pa_prodcode";
-            this.pa_prodcode.Size = new System.Drawing.Size(0, 39);
+            this.pa_prodcode.Size = new System.Drawing.Size(0, 32);
             this.pa_prodcode.TabIndex = 194;
             // 
             // Make_PalletWeigh
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1402, 902);
+            this.ClientSize = new System.Drawing.Size(1246, 752);
             this.Controls.Add(this.pa_prodcode);
             this.Controls.Add(this.autoPrint);
             this.Controls.Add(this.pr_detailspec);
@@ -512,7 +513,7 @@
             this.Controls.Add(this.pa_salecode);
             this.Controls.Add(this.pa_totalqty);
             this.Controls.Add(this.pa_makecode);
-            this.Controls.Add(this.printNum);
+            this.Controls.Add(this.PrintNum);
             this.Controls.Add(this.label8);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.label7);
@@ -565,7 +566,7 @@
         private System.Windows.Forms.Label label7;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private System.Windows.Forms.Label label8;
-        private CustomControl.TextBoxWithIcon.NumOnlyTextBox printNum;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum;
         private CustomControl.ValueLabel.ValueLabel pa_makecode;
         private CustomControl.ValueLabel.ValueLabel pa_totalqty;
         private CustomControl.ValueLabel.ValueLabel pa_salecode;

+ 10 - 1
UAS-MES/FunctionCode/Make/Make_PalletWeigh.cs

@@ -161,7 +161,7 @@ namespace UAS_MES.Make
                                     return;
                                 }
                                 doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
-                                Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(printNum.Text));
+                                Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(PrintNum.Text));
                             }
                             catch (Exception ex)
                             {
@@ -286,5 +286,14 @@ namespace UAS_MES.Make
             //添加结果的信息进去
             showResult.Items.Add(lvi);
         }
+
+        private void PrintLabel_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
+            {
+                string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
+                PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            }
+        }
     }
 }