Browse Source

1.MES-CS完工入库采集界面增加当前已采集栈板/箱数统计
2.ERP条码打印插件打印机反应速度优化

caosy 6 năm trước cách đây
mục cha
commit
4043a86539

+ 27 - 0
UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.Designer.cs

@@ -36,6 +36,8 @@
             this.label1 = new System.Windows.Forms.Label();
             this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
             this.Search = new System.Windows.Forms.Button();
+            this.label2 = new System.Windows.Forms.Label();
+            this.outboxqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pallecode = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.cancel = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
@@ -124,6 +126,27 @@
             this.Search.UseVisualStyleBackColor = true;
             this.Search.Click += new System.EventHandler(this.Search_Click);
             // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(387, 12);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(113, 21);
+            this.label2.TabIndex = 238;
+            this.label2.Text = "当前栈板/箱数";
+            // 
+            // outboxqty
+            // 
+            this.outboxqty.AutoSize = true;
+            this.outboxqty.CutLength = null;
+            this.outboxqty.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.outboxqty.Location = new System.Drawing.Point(525, 13);
+            this.outboxqty.MaximumSize = new System.Drawing.Size(200, 0);
+            this.outboxqty.Name = "outboxqty";
+            this.outboxqty.Size = new System.Drawing.Size(0, 21);
+            this.outboxqty.TabIndex = 239;
+            // 
             // pallecode
             // 
             this.pallecode.BackColor = System.Drawing.Color.Transparent;
@@ -265,6 +288,8 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(700, 499);
+            this.Controls.Add(this.outboxqty);
+            this.Controls.Add(this.label2);
             this.Controls.Add(this.Search);
             this.Controls.Add(this.pallecode);
             this.Controls.Add(this.OperateResult);
@@ -312,5 +337,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Sp;
         private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder pallecode;
         private System.Windows.Forms.Button Search;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.ValueLabel.ValueLabel outboxqty;
     }
 }

+ 7 - 0
UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.cs

@@ -313,6 +313,9 @@ namespace UAS_MES.Warehouse
 
                 }
                 getqty.Text = ((DataTable)bindingSource1.DataSource).Rows.Count.ToString();
+                DataView dv = ((DataTable)bindingSource1.DataSource).DefaultView;
+                DataTable dta = dv.ToTable(true, "pim_outboxcode");
+                outboxqty.Text = dta.Rows.Count.ToString();
 
             }
         }
@@ -529,6 +532,10 @@ namespace UAS_MES.Warehouse
         private void InOutDetailDGV_DataSourceChanged(object sender, EventArgs e)
         {
             getqty.Text = InOutDetailDGV.Rows.Count.ToString();
+            DataView dv = ((DataTable)InOutDetailDGV.DataSource).DefaultView;
+            DataTable dt = dv.ToTable(true, "pim_outboxcode");
+            outboxqty.Text = dt.Rows.Count.ToString();
+
         }
     }
 }

+ 0 - 21
UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.resx

@@ -141,25 +141,4 @@
   <metadata name="Sp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="pim_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pim_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pim_mac.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pim_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Sp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>

+ 3 - 3
UAS_PRINT/Form2.cs

@@ -157,7 +157,7 @@ namespace UAS_PRINT
 
         private void 打开根目录ToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            System.Diagnostics.Process.Start(System.AppDomain.CurrentDomain.BaseDirectory);
+            System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory);
         }
 
         private void Form2_FormClosing(object sender, FormClosingEventArgs e)
@@ -167,12 +167,12 @@ namespace UAS_PRINT
                 ThrednHttpPostRequest.Abort();
             if (httpPostRequest.IsListening)
                 httpPostRequest.Close();
-            this.Dispose();
+            Dispose();
         }
 
         private void Form2_Shown(object sender, EventArgs e)
         {
-            this.Visible = false;
+            Visible = false;
         }
     }
 }

+ 11 - 6
UAS_PRINT/PrintHandler.cs

@@ -217,15 +217,20 @@ namespace UAS_PRINT
             }
             try
             {
-                Report.RegisterData(dt, label_type);
-                Report.GetDataSource(label_type).Enabled = true;
                 Report.PrintSettings.ShowDialog = false;
-                Report.PrintSettings.Printer = chooseprintername.Replace("\\\\","\\");
-                Report.Print();
+                Report.PrintSettings.Printer = chooseprintername.Replace("\\\\", "\\");
+                foreach (DataRow dr in dt.Rows)
+                {
+                    DataTable dta = dt.Clone();
+                    dta.Rows.Add(dr.ItemArray);
+                    Report.RegisterData(dta, label_type);
+                    Report.GetDataSource(label_type).Enabled = true;
+                    Report.Print();
+                }
             }
-            catch
+            catch(Exception ex)
             {
-                MessageBox.Show("打印出现错误,请检查标签文件选择是否正确");
+                MessageBox.Show("打印出现错误,请检查标签文件选择是否正确"+ex.Message);
             }
             dt.Clear();
         }