Pārlūkot izejas kodu

修改打印数量不可编辑

章政 8 gadi atpakaļ
vecāks
revīzija
033cc2c59d

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.Designer.cs

@@ -179,6 +179,7 @@
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(195, 23);
             this.PrintLabel.TabIndex = 172;
+            this.PrintLabel.SelectedIndexChanged += new System.EventHandler(this.PrintLabel_SelectedIndexChanged);
             // 
             // PrintLabel_label
             // 
@@ -204,6 +205,7 @@
             // 
             // PrintNum
             // 
+            this.PrintNum.Enabled = false;
             this.PrintNum.Location = new System.Drawing.Point(1105, 161);
             this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
             this.PrintNum.Name = "PrintNum";

+ 27 - 11
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -88,7 +88,6 @@ namespace UAS_MES.Make
                     OperateResult.AppendText(">>大箱号不能为空\n", Color.Red);
                     return;
                 }
-
                 sql.Clear();
                 sql.Append("select pa_makecode,pa_standardqty,pa_packageqty,pa_prodcode,pa_outboxcode,pa_totalqty,pa_currentqty,pa_custcode,pa_salecode ");
                 sql.Append("from package where pa_outboxcode='" + bigoutboxcode.Text + "'  and pa_type =2");
@@ -119,6 +118,11 @@ namespace UAS_MES.Make
                         OperateResult.AppendText(">>卡通箱号不能为空\n", Color.Red);
                         return;
                     }
+                    if (dh.getFieldDataByCondition("package", "pa_nextstep", "pa_outboxcode='" + outboxcode.Text + "'").ToString() != User.CurrentStepCode)
+                    {
+                        OperateResult.AppendText(">>箱号" + outboxcode.Text + "的下一工序不是当前岗位资源对应工序\n", Color.Red, outboxcode);
+                        return;
+                    }
                     if (!dh.CheckExist("package", "pa_outboxcode='" + bigoutboxcode.Text + "' and pa_type=2"))
                     {
                         OperateResult.AppendText(">>大箱号不存在\n", Color.Red);
@@ -163,11 +167,15 @@ namespace UAS_MES.Make
                                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserSourceCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "大箱采集", "卡通箱" + outboxcode.Text + "采集成功", outboxcode.Text, "");
                                     //记录卡通箱所有序列号操作日志
                                     LogicHandler.OutBoxStepPass(outboxcode.Text, pa_makecode.Text, User.UserSourceCode, User.UserCode, "大箱采集成功,大箱号:" + bigoutboxcode.Text, "大箱采集");
-                                    //
-                                    OperateResult.AppendText(">>卡通箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
                                     LoadGridData();
                                     LoadCollectNum();
-                                    //判断明细和箱内的件数的差是不是1,如果只相差1则表示此时已经采集慢了
+                                    //更新箱号的NextStepCode
+                                    if (pa_currentqty.Text == "1")
+                                    {
+                                        string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_outboxcode='" + outboxcode.Text + "'").ToString();
+                                        dh.UpdateByCondition("package", "pa_nextstep='" + nextstepcode + "'", "pa_outboxcode='" + bigoutboxcode.Text + "'");
+                                    }
+                                    OperateResult.AppendText(">>卡通箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
                                     if (packageqty + 1 == pa_stanqty)
                                     {
                                         dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + bigoutboxcode.Text + "'", "update");
@@ -203,11 +211,10 @@ namespace UAS_MES.Make
 
         private void FillPrintLabel()
         {
-            DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where la_prodcode='" + pa_prodcode.Text + "' and la_templatetype='大箱标' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,la_printnos,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where la_prodcode='" + pa_prodcode.Text + "' and la_templatetype='大箱标' and la_statuscode='AUDITED' order by la_isdefault", "select");
             PrintLabel.DataSource = _dt;
             PrintLabel.DisplayMember = "la_name";
             PrintLabel.ValueMember = "la_id";
-            ftpOperater ftp = new ftpOperater();
             for (int i = 0; i < _dt.Rows.Count; i++)
             {
                 BaseUtil.GetPrintLabel(_dt.Rows[i]["la_name"].ToString(), _dt.Rows[i]["la_url"].ToString());
@@ -242,12 +249,15 @@ namespace UAS_MES.Make
         {
             if (PrintLabel.Items.Count != 0)
             {
-                OperateResult.AppendText(">>打印箱号" + bigoutboxcode.Text + "\n", Color.Black);
-                doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
-                Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text));
+                if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + bigoutboxcode.Text + "'").ToString() != "1")
+                {
+                    OperateResult.AppendText(">>打印箱号" + bigoutboxcode.Text + "\n", Color.Black);
+                    doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
+                    Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text));
+                }
+                else OperateResult.AppendText(">>必须封箱才能进行打印\n", Color.Red);
             }
-            else
-                OperateResult.AppendText(">>产品" + pa_prodcode.Text + "未维护打印标签或者标签未审核\n", Color.Red);
+            else OperateResult.AppendText(">>产品" + pa_prodcode.Text + "未维护打印标签或者标签未审核\n", Color.Red);
         }
 
         private void ReleasePallet_Click(object sender, EventArgs e)
@@ -285,5 +295,11 @@ namespace UAS_MES.Make
             }
             else OperateResult.AppendText(">>大箱号不能为空\n", Color.Red);
         }
+
+        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);
+        }
     }
 }

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

@@ -657,6 +657,21 @@
   <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pd_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <data name="Packing.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs

@@ -218,6 +218,7 @@
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(199, 28);
             this.PrintLabel.TabIndex = 159;
+            this.PrintLabel.SelectedIndexChanged += new System.EventHandler(this.PrintLabel_SelectedIndexChanged);
             // 
             // label3
             // 
@@ -232,6 +233,7 @@
             // 
             // PrintNum
             // 
+            this.PrintNum.Enabled = false;
             this.PrintNum.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.PrintNum.Location = new System.Drawing.Point(311, 147);
             this.PrintNum.Margin = new System.Windows.Forms.Padding(4);

+ 8 - 1
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -256,7 +256,8 @@ namespace UAS_MES.Make
                                         //采集完后如果是第一个装的序列号,把序列号的NextStepCode赋值给箱号
                                         if (pa_currentqty.Text == "1")
                                         {
-
+                                            string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
+                                            dh.UpdateByCondition("package", "pa_nextstep='"+nextstepcode+"'", "pa_outboxcode='"+pa_outboxcode.Text+"'");
                                         }
                                         if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == pr_outboxinnerqty.Value)
                                         {
@@ -474,5 +475,11 @@ namespace UAS_MES.Make
                 pr_outboxinnerqty.Value = StandardQTY;
             }
         }
+
+        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);
+        }
     }
 }

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.Designer.cs

@@ -184,6 +184,7 @@
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(199, 28);
             this.PrintLabel.TabIndex = 159;
+            this.PrintLabel.SelectedIndexChanged += new System.EventHandler(this.PrintLabel_SelectedIndexChanged);
             // 
             // label3
             // 
@@ -198,6 +199,7 @@
             // 
             // PrintNum
             // 
+            this.PrintNum.Enabled = false;
             this.PrintNum.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.PrintNum.Location = new System.Drawing.Point(311, 147);
             this.PrintNum.Margin = new System.Windows.Forms.Padding(4);

+ 12 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -323,6 +323,12 @@ namespace UAS_MES.Make
                                         OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
                                         //满箱更新状态为1
                                         LoadData();
+                                        //采集完后如果是第一个装的序列号,把序列号的NextStepCode赋值给箱号
+                                        if (pa_currentqty.Text == "1")
+                                        {
+                                            string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
+                                            dh.UpdateByCondition("package", "pa_nextstep='" + nextstepcode + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                                        }
                                         if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == int.Parse(pr_outboxinnerqty.Text))
                                         {
                                             //检查重量合格
@@ -554,5 +560,11 @@ namespace UAS_MES.Make
                 pr_outboxinnerqty.Value = StandardQTY;
             }
         }
+
+        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);
+        }
     }
 }

+ 80 - 79
UAS-MES/FunctionCode/Make/Make_PalletCollection.Designer.cs

@@ -71,10 +71,10 @@
             // 
             this.pa_outboxcode_label.AutoSize = true;
             this.pa_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_outboxcode_label.Location = new System.Drawing.Point(30, 41);
+            this.pa_outboxcode_label.Location = new System.Drawing.Point(27, 34);
             this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_outboxcode_label.Name = "pa_outboxcode_label";
-            this.pa_outboxcode_label.Size = new System.Drawing.Size(86, 31);
+            this.pa_outboxcode_label.Size = new System.Drawing.Size(72, 27);
             this.pa_outboxcode_label.TabIndex = 102;
             this.pa_outboxcode_label.Text = "栈板号";
             // 
@@ -82,10 +82,10 @@
             // 
             this.pa_totalqty_label.AutoSize = true;
             this.pa_totalqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_totalqty_label.Location = new System.Drawing.Point(352, 115);
+            this.pa_totalqty_label.Location = new System.Drawing.Point(313, 96);
             this.pa_totalqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_totalqty_label.Name = "pa_totalqty_label";
-            this.pa_totalqty_label.Size = new System.Drawing.Size(110, 31);
+            this.pa_totalqty_label.Size = new System.Drawing.Size(92, 27);
             this.pa_totalqty_label.TabIndex = 104;
             this.pa_totalqty_label.Text = "已装数量";
             // 
@@ -93,10 +93,10 @@
             // 
             this.pa_makecode_label.AutoSize = true;
             this.pa_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode_label.Location = new System.Drawing.Point(352, 41);
+            this.pa_makecode_label.Location = new System.Drawing.Point(313, 34);
             this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_makecode_label.Name = "pa_makecode_label";
-            this.pa_makecode_label.Size = new System.Drawing.Size(110, 31);
+            this.pa_makecode_label.Size = new System.Drawing.Size(92, 27);
             this.pa_makecode_label.TabIndex = 108;
             this.pa_makecode_label.Text = "制造单号";
             // 
@@ -104,10 +104,10 @@
             // 
             this.pa_restqty_label.AutoSize = true;
             this.pa_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_restqty_label.Location = new System.Drawing.Point(1102, 192);
+            this.pa_restqty_label.Location = new System.Drawing.Point(980, 160);
             this.pa_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_restqty_label.Name = "pa_restqty_label";
-            this.pa_restqty_label.Size = new System.Drawing.Size(110, 31);
+            this.pa_restqty_label.Size = new System.Drawing.Size(92, 27);
             this.pa_restqty_label.TabIndex = 154;
             this.pa_restqty_label.Text = "打印张数";
             // 
@@ -115,10 +115,10 @@
             // 
             this.pa_custcode_label.AutoSize = true;
             this.pa_custcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_custcode_label.Location = new System.Drawing.Point(1102, 41);
+            this.pa_custcode_label.Location = new System.Drawing.Point(980, 34);
             this.pa_custcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_custcode_label.Name = "pa_custcode_label";
-            this.pa_custcode_label.Size = new System.Drawing.Size(62, 31);
+            this.pa_custcode_label.Size = new System.Drawing.Size(52, 27);
             this.pa_custcode_label.TabIndex = 157;
             this.pa_custcode_label.Text = "客户";
             // 
@@ -126,10 +126,10 @@
             // 
             this.palletcode_label.AutoSize = true;
             this.palletcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.palletcode_label.Location = new System.Drawing.Point(1102, 370);
+            this.palletcode_label.Location = new System.Drawing.Point(980, 308);
             this.palletcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.palletcode_label.Name = "palletcode_label";
-            this.palletcode_label.Size = new System.Drawing.Size(86, 31);
+            this.palletcode_label.Size = new System.Drawing.Size(72, 27);
             this.palletcode_label.TabIndex = 165;
             this.palletcode_label.Text = "栈板号";
             // 
@@ -137,10 +137,10 @@
             // 
             this.outboxcode_label.AutoSize = true;
             this.outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.outboxcode_label.Location = new System.Drawing.Point(1102, 436);
+            this.outboxcode_label.Location = new System.Drawing.Point(980, 363);
             this.outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.outboxcode_label.Name = "outboxcode_label";
-            this.outboxcode_label.Size = new System.Drawing.Size(62, 31);
+            this.outboxcode_label.Size = new System.Drawing.Size(52, 27);
             this.outboxcode_label.TabIndex = 166;
             this.outboxcode_label.Text = "箱号";
             // 
@@ -148,10 +148,10 @@
             // 
             this.pa_prodcode_label.AutoSize = true;
             this.pa_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode_label.Location = new System.Drawing.Point(680, 41);
+            this.pa_prodcode_label.Location = new System.Drawing.Point(604, 34);
             this.pa_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_prodcode_label.Name = "pa_prodcode_label";
-            this.pa_prodcode_label.Size = new System.Drawing.Size(110, 31);
+            this.pa_prodcode_label.Size = new System.Drawing.Size(92, 27);
             this.pa_prodcode_label.TabIndex = 169;
             this.pa_prodcode_label.Text = "产品编号";
             // 
@@ -159,20 +159,21 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1243, 121);
+            this.PrintLabel.Location = new System.Drawing.Point(1105, 101);
             this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(219, 26);
+            this.PrintLabel.Size = new System.Drawing.Size(195, 23);
             this.PrintLabel.TabIndex = 172;
+            this.PrintLabel.SelectedIndexChanged += new System.EventHandler(this.PrintLabel_SelectedIndexChanged);
             // 
             // PrintLabel_label
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(1102, 119);
+            this.PrintLabel_label.Location = new System.Drawing.Point(980, 99);
             this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrintLabel_label.Name = "PrintLabel_label";
-            this.PrintLabel_label.Size = new System.Drawing.Size(110, 31);
+            this.PrintLabel_label.Size = new System.Drawing.Size(92, 27);
             this.PrintLabel_label.TabIndex = 174;
             this.PrintLabel_label.Text = "标签文件";
             // 
@@ -180,19 +181,19 @@
             // 
             this.PrinterList_label.AutoSize = true;
             this.PrinterList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrinterList_label.Location = new System.Drawing.Point(680, 119);
+            this.PrinterList_label.Location = new System.Drawing.Point(604, 99);
             this.PrinterList_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrinterList_label.Name = "PrinterList_label";
-            this.PrinterList_label.Size = new System.Drawing.Size(134, 31);
+            this.PrinterList_label.Size = new System.Drawing.Size(112, 27);
             this.PrinterList_label.TabIndex = 173;
             this.PrinterList_label.Text = "打印机列表";
             // 
             // PrintNum
             // 
-            this.PrintNum.Location = new System.Drawing.Point(1243, 193);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.PrintNum.Location = new System.Drawing.Point(1105, 161);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.PrintNum.Name = "PrintNum";
-            this.PrintNum.Size = new System.Drawing.Size(220, 28);
+            this.PrintNum.Size = new System.Drawing.Size(196, 25);
             this.PrintNum.TabIndex = 175;
             this.PrintNum.Value = new decimal(new int[] {
             1,
@@ -204,10 +205,10 @@
             // 
             this.pa_packageqty_label.AutoSize = true;
             this.pa_packageqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_packageqty_label.Location = new System.Drawing.Point(30, 115);
+            this.pa_packageqty_label.Location = new System.Drawing.Point(27, 96);
             this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_packageqty_label.Name = "pa_packageqty_label";
-            this.pa_packageqty_label.Size = new System.Drawing.Size(110, 31);
+            this.pa_packageqty_label.Size = new System.Drawing.Size(92, 27);
             this.pa_packageqty_label.TabIndex = 176;
             this.pa_packageqty_label.Text = "箱内容量";
             // 
@@ -218,13 +219,13 @@
             this.Packing.DownImage = ((System.Drawing.Image)(resources.GetObject("Packing.DownImage")));
             this.Packing.Image = ((System.Drawing.Image)(resources.GetObject("Packing.Image")));
             this.Packing.IsShowBorder = true;
-            this.Packing.Location = new System.Drawing.Point(1314, 318);
-            this.Packing.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.Packing.Location = new System.Drawing.Point(1168, 265);
+            this.Packing.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             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(90, 36);
+            this.Packing.Size = new System.Drawing.Size(80, 30);
             this.Packing.TabIndex = 178;
             this.Packing.Text = "封栈板";
             this.Packing.UseVisualStyleBackColor = true;
@@ -235,20 +236,20 @@
             this.pa_standardqty.AutoSize = true;
             this.pa_standardqty.CutLength = null;
             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(177, 115);
+            this.pa_standardqty.Location = new System.Drawing.Point(157, 96);
             this.pa_standardqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_standardqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.pa_standardqty.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_standardqty.Name = "pa_standardqty";
-            this.pa_standardqty.Size = new System.Drawing.Size(0, 31);
+            this.pa_standardqty.Size = new System.Drawing.Size(0, 27);
             this.pa_standardqty.TabIndex = 177;
             this.pa_standardqty.Tag = "1";
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(845, 119);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(6);
+            this.PrinterList.Location = new System.Drawing.Point(751, 99);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(219, 30);
+            this.PrinterList.Size = new System.Drawing.Size(195, 25);
             this.PrinterList.TabIndex = 171;
             // 
             // pa_prodcode
@@ -256,11 +257,11 @@
             this.pa_prodcode.AutoSize = true;
             this.pa_prodcode.CutLength = null;
             this.pa_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode.Location = new System.Drawing.Point(838, 41);
+            this.pa_prodcode.Location = new System.Drawing.Point(745, 34);
             this.pa_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_prodcode.MaximumSize = new System.Drawing.Size(225, 0);
+            this.pa_prodcode.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_prodcode.Name = "pa_prodcode";
-            this.pa_prodcode.Size = new System.Drawing.Size(0, 31);
+            this.pa_prodcode.Size = new System.Drawing.Size(0, 27);
             this.pa_prodcode.TabIndex = 170;
             this.pa_prodcode.Tag = "1";
             // 
@@ -271,13 +272,13 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1243, 764);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.Clean.Location = new System.Drawing.Point(1105, 637);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             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(90, 36);
+            this.Clean.Size = new System.Drawing.Size(80, 30);
             this.Clean.TabIndex = 168;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -286,10 +287,10 @@
             // 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(1072, 491);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.OperateResult.Location = new System.Drawing.Point(953, 409);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(414, 263);
+            this.OperateResult.Size = new System.Drawing.Size(368, 220);
             this.OperateResult.TabIndex = 167;
             this.OperateResult.Text = "";
             // 
@@ -298,11 +299,11 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(1244, 436);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.outboxcode.Location = new System.Drawing.Point(1106, 363);
+            this.outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifwrite";
-            this.outboxcode.Size = new System.Drawing.Size(219, 28);
+            this.outboxcode.Size = new System.Drawing.Size(195, 25);
             this.outboxcode.Str = null;
             this.outboxcode.Str1 = null;
             this.outboxcode.Str2 = null;
@@ -315,11 +316,11 @@
             this.palletcode.AllPower = "ifall";
             this.palletcode.BackColor = System.Drawing.Color.White;
             this.palletcode.ID = null;
-            this.palletcode.Location = new System.Drawing.Point(1244, 370);
-            this.palletcode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.palletcode.Location = new System.Drawing.Point(1106, 308);
+            this.palletcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.palletcode.Name = "palletcode";
             this.palletcode.Power = "ifwrite";
-            this.palletcode.Size = new System.Drawing.Size(219, 28);
+            this.palletcode.Size = new System.Drawing.Size(195, 25);
             this.palletcode.Str = null;
             this.palletcode.Str1 = null;
             this.palletcode.Str2 = null;
@@ -334,13 +335,13 @@
             this.Printlab.DownImage = ((System.Drawing.Image)(resources.GetObject("Printlab.DownImage")));
             this.Printlab.Image = ((System.Drawing.Image)(resources.GetObject("Printlab.Image")));
             this.Printlab.IsShowBorder = true;
-            this.Printlab.Location = new System.Drawing.Point(1314, 251);
-            this.Printlab.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.Printlab.Location = new System.Drawing.Point(1168, 209);
+            this.Printlab.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Printlab.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printlab.MoveImage")));
             this.Printlab.Name = "Printlab";
             this.Printlab.NormalImage = ((System.Drawing.Image)(resources.GetObject("Printlab.NormalImage")));
             this.Printlab.Power = null;
-            this.Printlab.Size = new System.Drawing.Size(90, 36);
+            this.Printlab.Size = new System.Drawing.Size(80, 30);
             this.Printlab.TabIndex = 161;
             this.Printlab.Text = "打印";
             this.Printlab.UseVisualStyleBackColor = true;
@@ -353,13 +354,13 @@
             this.ReleasePallet.DownImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.DownImage")));
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
-            this.ReleasePallet.Location = new System.Drawing.Point(1171, 318);
-            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ReleasePallet.Location = new System.Drawing.Point(1041, 265);
+            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ReleasePallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.MoveImage")));
             this.ReleasePallet.Name = "ReleasePallet";
             this.ReleasePallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.NormalImage")));
             this.ReleasePallet.Power = null;
-            this.ReleasePallet.Size = new System.Drawing.Size(90, 36);
+            this.ReleasePallet.Size = new System.Drawing.Size(80, 30);
             this.ReleasePallet.TabIndex = 160;
             this.ReleasePallet.Text = "解除栈板";
             this.ReleasePallet.UseVisualStyleBackColor = true;
@@ -372,13 +373,13 @@
             this.NewPalletCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.DownImage")));
             this.NewPalletCode.Image = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.Image")));
             this.NewPalletCode.IsShowBorder = true;
-            this.NewPalletCode.Location = new System.Drawing.Point(1171, 251);
-            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.NewPalletCode.Location = new System.Drawing.Point(1041, 209);
+            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.NewPalletCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.MoveImage")));
             this.NewPalletCode.Name = "NewPalletCode";
             this.NewPalletCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.NormalImage")));
             this.NewPalletCode.Power = "ifwrite";
-            this.NewPalletCode.Size = new System.Drawing.Size(90, 36);
+            this.NewPalletCode.Size = new System.Drawing.Size(80, 30);
             this.NewPalletCode.TabIndex = 159;
             this.NewPalletCode.Text = "新增栈板";
             this.NewPalletCode.UseVisualStyleBackColor = true;
@@ -389,11 +390,11 @@
             this.pa_custcode.AutoSize = true;
             this.pa_custcode.CutLength = null;
             this.pa_custcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_custcode.Location = new System.Drawing.Point(1243, 41);
+            this.pa_custcode.Location = new System.Drawing.Point(1105, 34);
             this.pa_custcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_custcode.MaximumSize = new System.Drawing.Size(225, 0);
+            this.pa_custcode.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_custcode.Name = "pa_custcode";
-            this.pa_custcode.Size = new System.Drawing.Size(0, 31);
+            this.pa_custcode.Size = new System.Drawing.Size(0, 27);
             this.pa_custcode.TabIndex = 158;
             this.pa_custcode.Tag = "1";
             // 
@@ -407,11 +408,11 @@
             this.Column3,
             this.Column4,
             this.Column5});
-            this.PackageInf.Location = new System.Drawing.Point(4, 193);
-            this.PackageInf.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.PackageInf.Location = new System.Drawing.Point(4, 161);
+            this.PackageInf.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
-            this.PackageInf.Size = new System.Drawing.Size(1059, 623);
+            this.PackageInf.Size = new System.Drawing.Size(941, 519);
             this.PackageInf.TabIndex = 156;
             // 
             // pd_outboxcode
@@ -455,11 +456,11 @@
             this.pa_makecode.AutoSize = true;
             this.pa_makecode.CutLength = null;
             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(494, 41);
+            this.pa_makecode.Location = new System.Drawing.Point(439, 34);
             this.pa_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_makecode.MaximumSize = new System.Drawing.Size(225, 0);
+            this.pa_makecode.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_makecode.Name = "pa_makecode";
-            this.pa_makecode.Size = new System.Drawing.Size(0, 31);
+            this.pa_makecode.Size = new System.Drawing.Size(0, 27);
             this.pa_makecode.TabIndex = 109;
             this.pa_makecode.Tag = "1";
             // 
@@ -468,11 +469,11 @@
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.CutLength = null;
             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(494, 115);
+            this.pa_currentqty.Location = new System.Drawing.Point(439, 96);
             this.pa_currentqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_currentqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.pa_currentqty.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_currentqty.Name = "pa_currentqty";
-            this.pa_currentqty.Size = new System.Drawing.Size(0, 31);
+            this.pa_currentqty.Size = new System.Drawing.Size(0, 27);
             this.pa_currentqty.TabIndex = 105;
             this.pa_currentqty.Tag = "1";
             // 
@@ -481,19 +482,19 @@
             this.pa_outboxcode.AutoSize = true;
             this.pa_outboxcode.CutLength = null;
             this.pa_outboxcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_outboxcode.Location = new System.Drawing.Point(177, 41);
+            this.pa_outboxcode.Location = new System.Drawing.Point(157, 34);
             this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_outboxcode.MaximumSize = new System.Drawing.Size(225, 0);
+            this.pa_outboxcode.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_outboxcode.Name = "pa_outboxcode";
-            this.pa_outboxcode.Size = new System.Drawing.Size(0, 31);
+            this.pa_outboxcode.Size = new System.Drawing.Size(0, 27);
             this.pa_outboxcode.TabIndex = 103;
             this.pa_outboxcode.Tag = "1";
             // 
             // Make_PalletCollection
             // 
-            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(1495, 828);
+            this.ClientSize = new System.Drawing.Size(1329, 690);
             this.Controls.Add(this.Packing);
             this.Controls.Add(this.pa_standardqty);
             this.Controls.Add(this.pa_packageqty_label);
@@ -524,7 +525,7 @@
             this.Controls.Add(this.pa_outboxcode);
             this.Controls.Add(this.pa_outboxcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Make_PalletCollection";
             this.Tag = "Make!BigBoxCollection";
             this.Text = "栈板采集";
@@ -533,7 +534,7 @@
             this.SizeChanged += new System.EventHandler(this.栈板称重_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 6 - 0
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -250,5 +250,11 @@ namespace UAS_MES.Make
             }
             else OperateResult.AppendText(">>栈板号不能为空\n", Color.Red);
         }
+
+        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);
+        }
     }
 }