章政 7 жил өмнө
parent
commit
6a46faf48b

+ 16 - 0
UAS-出货标签管理(泽天)/Login.cs

@@ -3,6 +3,8 @@ using System.Data;
 using System.Drawing;
 using System.Drawing.Drawing2D;
 using System.IO;
+using System.Net;
+using System.Net.Sockets;
 using System.Windows.Forms;
 using UAS_LabelMachine.Entity;
 using UAS_LabelMachine.PublicMethod;
@@ -88,6 +90,15 @@ namespace UAS_LabelMachine
                 Properties.Settings.Default.LastLoginMaster = MasterCombox.Text;
                 Properties.Settings.Default.IPAddress = IP.Text;
                 Properties.Settings.Default.Save();
+                IPHostEntry IpEntry = Dns.GetHostEntry(Dns.GetHostName());
+                string IPAddress = "";
+                for (int i = 0; i < IpEntry.AddressList.Length; i++)
+                {
+                    if (IpEntry.AddressList[i].AddressFamily == AddressFamily.InterNetwork)
+                        IPAddress = IpEntry.AddressList[i].ToString();
+                }
+                string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
+                RecordLogInfo(User.UserCode, User.UserName, version, "CS", IPAddress);
                 //弹出标签打印的主界面
                 UAS_出货标签打印 main = new UAS_出货标签打印(MasterCombox.Text);
                 main.StartPosition = FormStartPosition.CenterScreen;
@@ -127,5 +138,10 @@ namespace UAS_LabelMachine
         {
             Application.Exit();
         }
+
+        private void RecordLogInfo(string iUserCode, string iUserName, string iVersion, string iType, string iIP)
+        {
+            dh.ExecuteSql("insert into LogInfo(id,sip,usname,indate,uscode,versioncode,terminaltype) values (LogInfo_seq.nextval,'" + iIP + "','" + iUserName + "',sysdate,'" + iUserCode + "','" + iVersion + "','" + iType + "')", "insert");
+        }
     }
 }

+ 6 - 0
UAS-出货标签管理(泽天)/PublicMethod/LogManager.cs

@@ -1,5 +1,6 @@
 using System;
 using System.IO;
+using UAS_LabelMachine.Entity;
 
 namespace UAS_LabelMachine.PublicMethod
 {
@@ -11,5 +12,10 @@ namespace UAS_LabelMachine.PublicMethod
             sw.WriteLine("\n" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Message + "\n");
             sw.Close();
         }
+
+        public static void DoCommandLog(string iInoutNO, string iUserCode, string iOperater, string iResult)
+        {
+            SystemInf.dh.ExecuteSql("insert into CS$PRODOUTLOG (cp_id,cp_inoutno,cp_man,cp_operate,cp_result,cp_date) values(CS$PRODOUTLOG_SEQ.nextval,'" + iInoutNO + "','" + iUserCode + "','" + iOperater + "','" + iResult + "',sysdate)", "insert");
+        }
     }
 }

+ 81 - 241
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs

@@ -79,6 +79,15 @@
             this.label1 = new System.Windows.Forms.Label();
             this.DCCheck = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.GridPrcode = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
+            this.pd_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pjd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CollectedNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.UnCollectedNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_outqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pjd_zxbzs_user = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.groupBoxWithBorder1 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.label18 = new System.Windows.Forms.Label();
             this.MidBoxEnd = new UAS_LabelMachine.CustomControl.EnterTextBox();
@@ -88,18 +97,6 @@
             this.SingleBoxBegin = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.label12 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
-            this.CollectionProcess = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
-            this.Capacity = new System.Windows.Forms.Label();
-            this.Process_midboxcode = new System.Windows.Forms.Label();
-            this.Process_outboxcode = new System.Windows.Forms.Label();
-            this.TotalCount = new System.Windows.Forms.Label();
-            this.label17 = new System.Windows.Forms.Label();
-            this.CollectedCount = new System.Windows.Forms.Label();
-            this.label14 = new System.Windows.Forms.Label();
-            this.label11 = new System.Windows.Forms.Label();
-            this.label13 = new System.Windows.Forms.Label();
-            this.Installed = new System.Windows.Forms.Label();
-            this.Process = new System.Windows.Forms.Label();
             this.Input = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
             this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -145,20 +142,10 @@
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
-            this.pd_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pjd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.CollectedNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.UnCollectedNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_outqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pjd_zxbzs_user = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
-            this.CollectionProcess.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).BeginInit();
             this.SingleLabel.SuspendLayout();
             this.MidLabel.SuspendLayout();
@@ -189,7 +176,7 @@
             // LabelMainTain
             // 
             this.LabelMainTain.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.LabelMainTain.Location = new System.Drawing.Point(391, 15);
+            this.LabelMainTain.Location = new System.Drawing.Point(392, 15);
             this.LabelMainTain.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.LabelMainTain.Name = "LabelMainTain";
             this.LabelMainTain.Size = new System.Drawing.Size(68, 26);
@@ -482,7 +469,7 @@
             // AttachInfo
             // 
             this.AttachInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AttachInfo.Location = new System.Drawing.Point(391, 48);
+            this.AttachInfo.Location = new System.Drawing.Point(392, 48);
             this.AttachInfo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AttachInfo.Name = "AttachInfo";
             this.AttachInfo.Size = new System.Drawing.Size(68, 26);
@@ -526,7 +513,7 @@
             // PrintFooter
             // 
             this.PrintFooter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintFooter.Location = new System.Drawing.Point(391, 80);
+            this.PrintFooter.Location = new System.Drawing.Point(465, 15);
             this.PrintFooter.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.PrintFooter.Name = "PrintFooter";
             this.PrintFooter.Size = new System.Drawing.Size(68, 26);
@@ -540,7 +527,7 @@
             this.SetPrintStatus_label.AutoSize = true;
             this.SetPrintStatus_label.Font = new System.Drawing.Font("微软雅黑", 12F);
             this.SetPrintStatus_label.ForeColor = System.Drawing.Color.Green;
-            this.SetPrintStatus_label.Location = new System.Drawing.Point(242, 165);
+            this.SetPrintStatus_label.Location = new System.Drawing.Point(475, 165);
             this.SetPrintStatus_label.Name = "SetPrintStatus_label";
             this.SetPrintStatus_label.Size = new System.Drawing.Size(58, 21);
             this.SetPrintStatus_label.TabIndex = 76;
@@ -605,6 +592,74 @@
             this.GridPrcode.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.GridPrcode_CellPainting);
             this.GridPrcode.SelectionChanged += new System.EventHandler(this.GridPrcode_SelectionChanged);
             // 
+            // pd_pdno
+            // 
+            this.pd_pdno.DataPropertyName = "pd_pdno";
+            this.pd_pdno.HeaderText = "明细序号";
+            this.pd_pdno.Name = "pd_pdno";
+            this.pd_pdno.ReadOnly = true;
+            this.pd_pdno.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // pjd_id
+            // 
+            this.pjd_id.DataPropertyName = "pjd_id";
+            this.pjd_id.HeaderText = "pjd_id";
+            this.pjd_id.Name = "pjd_id";
+            this.pjd_id.Visible = false;
+            // 
+            // pd_prodcode
+            // 
+            this.pd_prodcode.DataPropertyName = "pd_prodcode";
+            this.pd_prodcode.HeaderText = "物料编号";
+            this.pd_prodcode.Name = "pd_prodcode";
+            this.pd_prodcode.ReadOnly = true;
+            this.pd_prodcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // CollectedNum
+            // 
+            this.CollectedNum.DataPropertyName = "CollectedNum";
+            this.CollectedNum.HeaderText = "已采数";
+            this.CollectedNum.Name = "CollectedNum";
+            this.CollectedNum.ReadOnly = true;
+            // 
+            // UnCollectedNum
+            // 
+            this.UnCollectedNum.DataPropertyName = "UnCollectedNum";
+            this.UnCollectedNum.HeaderText = "未采集";
+            this.UnCollectedNum.Name = "UnCollectedNum";
+            // 
+            // pd_outqty
+            // 
+            this.pd_outqty.DataPropertyName = "pd_outqty";
+            this.pd_outqty.HeaderText = "出库数量";
+            this.pd_outqty.Name = "pd_outqty";
+            this.pd_outqty.ReadOnly = true;
+            this.pd_outqty.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // pr_unit
+            // 
+            this.pr_unit.DataPropertyName = "pr_unit";
+            this.pr_unit.HeaderText = "单位";
+            this.pr_unit.Name = "pr_unit";
+            this.pr_unit.ReadOnly = true;
+            this.pr_unit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // pd_brand
+            // 
+            this.pd_brand.DataPropertyName = "pd_brand";
+            this.pd_brand.HeaderText = "品牌";
+            this.pd_brand.Name = "pd_brand";
+            this.pd_brand.ReadOnly = true;
+            this.pd_brand.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // pjd_zxbzs_user
+            // 
+            this.pjd_zxbzs_user.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pjd_zxbzs_user.DataPropertyName = "pjd_zxbzs_user";
+            this.pjd_zxbzs_user.HeaderText = "最小包装";
+            this.pjd_zxbzs_user.Name = "pjd_zxbzs_user";
+            this.pjd_zxbzs_user.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.Controls.Add(this.label18);
@@ -712,138 +767,6 @@
             this.label7.TabIndex = 76;
             this.label7.Text = "单盘范围";
             // 
-            // CollectionProcess
-            // 
-            this.CollectionProcess.Controls.Add(this.Capacity);
-            this.CollectionProcess.Controls.Add(this.Process_midboxcode);
-            this.CollectionProcess.Controls.Add(this.Process_outboxcode);
-            this.CollectionProcess.Controls.Add(this.TotalCount);
-            this.CollectionProcess.Controls.Add(this.label17);
-            this.CollectionProcess.Controls.Add(this.CollectedCount);
-            this.CollectionProcess.Controls.Add(this.label14);
-            this.CollectionProcess.Controls.Add(this.label11);
-            this.CollectionProcess.Controls.Add(this.label13);
-            this.CollectionProcess.Controls.Add(this.Installed);
-            this.CollectionProcess.Controls.Add(this.Process);
-            this.CollectionProcess.Location = new System.Drawing.Point(464, 5);
-            this.CollectionProcess.Margin = new System.Windows.Forms.Padding(2);
-            this.CollectionProcess.Name = "CollectionProcess";
-            this.CollectionProcess.Padding = new System.Windows.Forms.Padding(2);
-            this.CollectionProcess.Size = new System.Drawing.Size(130, 192);
-            this.CollectionProcess.TabIndex = 80;
-            this.CollectionProcess.TabStop = false;
-            this.CollectionProcess.Text = " ";
-            // 
-            // Capacity
-            // 
-            this.Capacity.AutoSize = true;
-            this.Capacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Capacity.Location = new System.Drawing.Point(62, 73);
-            this.Capacity.Name = "Capacity";
-            this.Capacity.Size = new System.Drawing.Size(0, 17);
-            this.Capacity.TabIndex = 75;
-            // 
-            // Process_midboxcode
-            // 
-            this.Process_midboxcode.AutoSize = true;
-            this.Process_midboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_midboxcode.Location = new System.Drawing.Point(62, 118);
-            this.Process_midboxcode.Name = "Process_midboxcode";
-            this.Process_midboxcode.Size = new System.Drawing.Size(15, 17);
-            this.Process_midboxcode.TabIndex = 74;
-            this.Process_midboxcode.Text = "0";
-            // 
-            // Process_outboxcode
-            // 
-            this.Process_outboxcode.AutoSize = true;
-            this.Process_outboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_outboxcode.Location = new System.Drawing.Point(62, 94);
-            this.Process_outboxcode.Name = "Process_outboxcode";
-            this.Process_outboxcode.Size = new System.Drawing.Size(15, 17);
-            this.Process_outboxcode.TabIndex = 73;
-            this.Process_outboxcode.Text = "0";
-            // 
-            // TotalCount
-            // 
-            this.TotalCount.AutoSize = true;
-            this.TotalCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.TotalCount.ForeColor = System.Drawing.Color.Blue;
-            this.TotalCount.Location = new System.Drawing.Point(96, 25);
-            this.TotalCount.Name = "TotalCount";
-            this.TotalCount.Size = new System.Drawing.Size(15, 17);
-            this.TotalCount.TabIndex = 72;
-            this.TotalCount.Text = "0";
-            // 
-            // label17
-            // 
-            this.label17.AutoSize = true;
-            this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label17.Location = new System.Drawing.Point(83, 25);
-            this.label17.Name = "label17";
-            this.label17.Size = new System.Drawing.Size(13, 17);
-            this.label17.TabIndex = 71;
-            this.label17.Text = "/";
-            // 
-            // CollectedCount
-            // 
-            this.CollectedCount.AutoSize = true;
-            this.CollectedCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CollectedCount.ForeColor = System.Drawing.Color.Red;
-            this.CollectedCount.Location = new System.Drawing.Point(65, 25);
-            this.CollectedCount.Name = "CollectedCount";
-            this.CollectedCount.Size = new System.Drawing.Size(15, 17);
-            this.CollectedCount.TabIndex = 70;
-            this.CollectedCount.Text = "0";
-            // 
-            // label14
-            // 
-            this.label14.AutoSize = true;
-            this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(12, 95);
-            this.label14.Name = "label14";
-            this.label14.Size = new System.Drawing.Size(32, 17);
-            this.label14.TabIndex = 69;
-            this.label14.Text = "箱号";
-            // 
-            // label11
-            // 
-            this.label11.AutoSize = true;
-            this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label11.Location = new System.Drawing.Point(12, 118);
-            this.label11.Name = "label11";
-            this.label11.Size = new System.Drawing.Size(32, 17);
-            this.label11.TabIndex = 68;
-            this.label11.Text = "盒号";
-            // 
-            // label13
-            // 
-            this.label13.AutoSize = true;
-            this.label13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label13.Location = new System.Drawing.Point(12, 54);
-            this.label13.Name = "label13";
-            this.label13.Size = new System.Drawing.Size(44, 17);
-            this.label13.TabIndex = 67;
-            this.label13.Text = "当前盒";
-            // 
-            // Installed
-            // 
-            this.Installed.AutoSize = true;
-            this.Installed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Installed.Location = new System.Drawing.Point(62, 54);
-            this.Installed.Name = "Installed";
-            this.Installed.Size = new System.Drawing.Size(0, 17);
-            this.Installed.TabIndex = 66;
-            // 
-            // Process
-            // 
-            this.Process.AutoSize = true;
-            this.Process.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process.Location = new System.Drawing.Point(12, 25);
-            this.Process.Name = "Process";
-            this.Process.Size = new System.Drawing.Size(44, 17);
-            this.Process.TabIndex = 65;
-            this.Process.Text = "总进度";
-            // 
             // Input
             // 
             this.Input.ID = null;
@@ -1340,74 +1263,6 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
-            // pd_pdno
-            // 
-            this.pd_pdno.DataPropertyName = "pd_pdno";
-            this.pd_pdno.HeaderText = "明细序号";
-            this.pd_pdno.Name = "pd_pdno";
-            this.pd_pdno.ReadOnly = true;
-            this.pd_pdno.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // pjd_id
-            // 
-            this.pjd_id.DataPropertyName = "pjd_id";
-            this.pjd_id.HeaderText = "pjd_id";
-            this.pjd_id.Name = "pjd_id";
-            this.pjd_id.Visible = false;
-            // 
-            // pd_prodcode
-            // 
-            this.pd_prodcode.DataPropertyName = "pd_prodcode";
-            this.pd_prodcode.HeaderText = "物料编号";
-            this.pd_prodcode.Name = "pd_prodcode";
-            this.pd_prodcode.ReadOnly = true;
-            this.pd_prodcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // CollectedNum
-            // 
-            this.CollectedNum.DataPropertyName = "CollectedNum";
-            this.CollectedNum.HeaderText = "已采数";
-            this.CollectedNum.Name = "CollectedNum";
-            this.CollectedNum.ReadOnly = true;
-            // 
-            // UnCollectedNum
-            // 
-            this.UnCollectedNum.DataPropertyName = "UnCollectedNum";
-            this.UnCollectedNum.HeaderText = "未采集";
-            this.UnCollectedNum.Name = "UnCollectedNum";
-            // 
-            // pd_outqty
-            // 
-            this.pd_outqty.DataPropertyName = "pd_outqty";
-            this.pd_outqty.HeaderText = "出库数量";
-            this.pd_outqty.Name = "pd_outqty";
-            this.pd_outqty.ReadOnly = true;
-            this.pd_outqty.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // pr_unit
-            // 
-            this.pr_unit.DataPropertyName = "pr_unit";
-            this.pr_unit.HeaderText = "单位";
-            this.pr_unit.Name = "pr_unit";
-            this.pr_unit.ReadOnly = true;
-            this.pr_unit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // pd_brand
-            // 
-            this.pd_brand.DataPropertyName = "pd_brand";
-            this.pd_brand.HeaderText = "品牌";
-            this.pd_brand.Name = "pd_brand";
-            this.pd_brand.ReadOnly = true;
-            this.pd_brand.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // pjd_zxbzs_user
-            // 
-            this.pjd_zxbzs_user.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pjd_zxbzs_user.DataPropertyName = "pjd_zxbzs_user";
-            this.pjd_zxbzs_user.HeaderText = "最小包装";
-            this.pjd_zxbzs_user.Name = "pjd_zxbzs_user";
-            this.pjd_zxbzs_user.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1432,7 +1287,6 @@
             this.Controls.Add(this.pi_cardcode);
             this.Controls.Add(this.pib_id);
             this.Controls.Add(this.CleanDetail);
-            this.Controls.Add(this.CollectionProcess);
             this.Controls.Add(this.LabelMainTain);
             this.Controls.Add(this.label24);
             this.Controls.Add(this.Input);
@@ -1456,8 +1310,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).EndInit();
             this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
-            this.CollectionProcess.ResumeLayout(false);
-            this.CollectionProcess.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).EndInit();
             this.SingleLabel.ResumeLayout(false);
             this.SingleLabel.PerformLayout();
@@ -1517,20 +1369,8 @@
         private CustomControl.EnterTextBox Input;
         private System.Windows.Forms.Label label24;
         private System.Windows.Forms.Button LabelMainTain;
-        private System.Windows.Forms.Label Process;
-        private System.Windows.Forms.Label Installed;
-        private System.Windows.Forms.Label label13;
-        private System.Windows.Forms.Label label11;
-        private System.Windows.Forms.Label label14;
-        private System.Windows.Forms.Label CollectedCount;
-        private System.Windows.Forms.Label label17;
-        private System.Windows.Forms.Label TotalCount;
-        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder CollectionProcess;
         private System.Windows.Forms.Button CleanDetail;
         private System.Windows.Forms.Label pib_id;
-        private System.Windows.Forms.Label Process_midboxcode;
-        private System.Windows.Forms.Label Process_outboxcode;
-        private System.Windows.Forms.Label Capacity;
         private System.Windows.Forms.Label pi_cardcode;
         private System.Windows.Forms.Label pi_cardcode_label;
         private System.Windows.Forms.LinkLabel Fresh;

+ 11 - 3
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -154,7 +154,7 @@ namespace UAS_LabelMachine
         private void 贴标机条码打印_Load(object sender, EventArgs e)
         {
             //杀死之前全部未关闭的进程
-            Process[] processes = System.Diagnostics.Process.GetProcessesByName("lppa");
+            Process[] processes = Process.GetProcessesByName("lppa");
             for (int i = 0; i < processes.Length; i++)
             {
                 processes[i].Kill();
@@ -329,7 +329,8 @@ namespace UAS_LabelMachine
             int CollectNum = 0;
             if (CurrentUnit == "KPCS")
             {
-                if (int.Parse(Data["QTY"]) / 1000 % int.Parse(CurrentZXBZ) != 0)
+                //如果单位是KPCS则必须是1000的整数倍
+                if (int.Parse(Data["QTY"]) % 1000 != 0 || int.Parse(Data["QTY"]) / 1000 % int.Parse(CurrentZXBZ) != 0)
                 {
                     MessageBox.Show("物料" + Data["PRCODE"] + "采集数量无法按照最小包装数拆分", "提示");
                     return;
@@ -500,6 +501,7 @@ namespace UAS_LabelMachine
                     Properties.Settings.Default.SPrinter = SingleLabelPrinter.Text;
                     Properties.Settings.Default.Save();
                 }
+                LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "自动打印箱标", "打印成功");
             }
         }
 
@@ -837,6 +839,7 @@ namespace UAS_LabelMachine
                             catch (Exception ex) { LogManager.DoLog(ex.StackTrace); }
                         }
                     }
+                    LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "手动打印箱标", "打印成功");
                     dh.BatchInsert("update prodiobarcode set pib_printdate=sysdate where pib_id=:pib_id", new string[] { "pib_id" }, SingleID.ToArray());
                     if (CheckedRowCount == 0)
                         MessageBox.Show("未勾选打印明细!", "提示");
@@ -886,7 +889,10 @@ namespace UAS_LabelMachine
                 stw.ShowDialog();
             }
             else
+            {
                 MessageBox.Show("未维护单盘标签", "提示");
+                LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "手动打印箱标", "打印失败,未维护标签");
+            }
         }
 
         private void MidBoxLabelPrint()
@@ -1218,6 +1224,7 @@ namespace UAS_LabelMachine
                     Properties.Settings.Default.OPrinter = OutBoxPrinter.Text;
                     Properties.Settings.Default.Save();
                     LogManager.DoLog("执行打印外箱,pib_id:" + LabelInf.Rows[rowindex].Cells["pib_id1"].Value.ToString());
+                    LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "手动打印外箱箱标", "打印成功");
                 }
                 catch (Exception ex) { MessageBox.Show(ex.Message, "提示"); }
             }
@@ -1238,6 +1245,7 @@ namespace UAS_LabelMachine
                 if (close.ToString() == "Yes")
                 {
                     dh.BatchInsert("delete from prodiobarcode where pib_id=:pib_id", new string[] { "pib_id" }, DeleteID.ToArray());
+                    LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "删除明细", "删除明细成功");
                     MessageBox.Show("删除成功", "提示");
                     LoadGridData(sender, e);
                 }
@@ -1280,7 +1288,6 @@ namespace UAS_LabelMachine
             LabelInfDataTable = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             BaseUtil.FillDgvWithDataTable(LabelInf, LabelInfDataTable);
             //有数据的话默认取第一条的品牌去取采集策略
-            TotalCount.Text = LabelInf.RowCount.ToString();
             if (LabelInf.Rows.Count > 0)
                 LabelInf.FirstDisplayedScrollingRowIndex = LabelInf.Rows.Count - 1;
             //计算所有的采集数量
@@ -1729,6 +1736,7 @@ namespace UAS_LabelMachine
                 FootDoc.Printer.SwitchTo(SingleLabelPrinter.Text);
                 FootDoc.PrintDocument();
             }
+            LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "打印唛头", "成功");
         }
 
         private void Input_KeyUp(object sender, KeyEventArgs e)

+ 2 - 0
UAS-出货标签管理(泽天)/附件内容打印.cs

@@ -7,6 +7,7 @@ using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using UAS_LabelMachine.Entity;
+using UAS_LabelMachine.PublicMethod;
 
 namespace UAS_LabelMachine
 {
@@ -49,6 +50,7 @@ namespace UAS_LabelMachine
                 }
                 dh.ExecuteSql(SQL, "insert");
             }
+            LogManager.DoCommandLog(custcode, User.UserCode, "保存附加参数", "成功");
             MessageBox.Show("保存成功");
             Close();
         }