Browse Source

添加自定义导出功能

章政 7 years ago
parent
commit
337fa3efe8

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

@@ -84,6 +84,7 @@
             this.bi_inman = new System.Windows.Forms.Label();
             this.pib_inman = new System.Windows.Forms.Label();
             this.PackMidBox = new System.Windows.Forms.Button();
+            this.CustomerLabel = new System.Windows.Forms.Button();
             this.DCCheck = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.GridPrcode = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
             this.pd_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -641,6 +642,19 @@
             this.PackMidBox.Visible = false;
             this.PackMidBox.Click += new System.EventHandler(this.PackMidBox_Click);
             // 
+            // CustomerLabel
+            // 
+            this.CustomerLabel.Enabled = false;
+            this.CustomerLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CustomerLabel.Location = new System.Drawing.Point(485, 80);
+            this.CustomerLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.CustomerLabel.Name = "CustomerLabel";
+            this.CustomerLabel.Size = new System.Drawing.Size(84, 26);
+            this.CustomerLabel.TabIndex = 103;
+            this.CustomerLabel.Text = "标签自定义";
+            this.CustomerLabel.UseVisualStyleBackColor = true;
+            this.CustomerLabel.Click += new System.EventHandler(this.CustomerLabel_Click);
+            // 
             // DCCheck
             // 
             this.DCCheck.ID = null;
@@ -1365,6 +1379,7 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
             this.ClientSize = new System.Drawing.Size(1257, 729);
+            this.Controls.Add(this.CustomerLabel);
             this.Controls.Add(this.PackMidBox);
             this.Controls.Add(this.pib_inman);
             this.Controls.Add(this.bi_inman);
@@ -1547,5 +1562,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
         private System.Windows.Forms.Button PackMidBox;
+        private System.Windows.Forms.Button CustomerLabel;
     }
 }

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

@@ -550,6 +550,14 @@ namespace UAS_LabelMachine
                 if (dt.Rows.Count > 0)
                 {
                     pi_cardcode.Text = dt.Rows[0]["pi_cardcode"].ToString();
+                    if (pi_cardcode.Text != "ZGCC")
+                    {
+                        CustomerLabel.Enabled = false;
+                    }
+                    else
+                    {
+                        CustomerLabel.Enabled = true;
+                    }
                     pi_date.Text = dt.Rows[0]["pi_date"].ToString();
                     PI_ID = dt.Rows[0]["pi_id"].ToString();
                     OutBoxNum_Click(new object(), new EventArgs());
@@ -1620,5 +1628,14 @@ namespace UAS_LabelMachine
             }
             Input.Focus();
         }
+
+        private void CustomerLabel_Click(object sender, EventArgs e)
+        {
+            sql.Clear();
+            sql.Append("update prodiobarcode set pib_custbarcode=('SL'||pib_custbarcode),");
+            sql.Append("pib_custoutboxcode=('SC'||pib_custoutboxcode) where pib_inoutno='" + pi_inoutno.Text + "'");
+            dh.ExecuteSql(sql.ToString(), "select");
+            LoadGridData(sender, e);
+        }
     }
 }