jingh
2022-01-18 aad43c73582807b7a6199e3f746caa12c071bc9d
扫码打印标签
2个文件已修改
53 ■■■■ 已修改文件
SCM/条码打印/FrmPrintLabel.Designer.cs 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/条码打印/FrmPrintLabel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/ÌõÂë´òÓ¡/FrmPrintLabel.Designer.cs
@@ -48,6 +48,8 @@
            this.button2 = new System.Windows.Forms.Button();
            this.grdMain = new System.Windows.Forms.DataGridView();
            this.timer1 = new System.Windows.Forms.Timer(this.components);
            this.txtHPrintBarCode = new System.Windows.Forms.TextBox();
            this.label8 = new System.Windows.Forms.Label();
            this.groupBox1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit();
            this.SuspendLayout();
@@ -74,6 +76,8 @@
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.txtHPrintBarCode);
            this.groupBox1.Controls.Add(this.label8);
            this.groupBox1.Controls.Add(this.txtHPrint4);
            this.groupBox1.Controls.Add(this.txtHPrint3);
            this.groupBox1.Controls.Add(this.txtHPrint2);
@@ -93,28 +97,28 @@
            // 
            // txtHPrint4
            // 
            this.txtHPrint4.Location = new System.Drawing.Point(462, 140);
            this.txtHPrint4.Location = new System.Drawing.Point(451, 171);
            this.txtHPrint4.Name = "txtHPrint4";
            this.txtHPrint4.Size = new System.Drawing.Size(227, 25);
            this.txtHPrint4.TabIndex = 12;
            // 
            // txtHPrint3
            // 
            this.txtHPrint3.Location = new System.Drawing.Point(113, 140);
            this.txtHPrint3.Location = new System.Drawing.Point(102, 171);
            this.txtHPrint3.Name = "txtHPrint3";
            this.txtHPrint3.Size = new System.Drawing.Size(227, 25);
            this.txtHPrint3.TabIndex = 11;
            // 
            // txtHPrint2
            // 
            this.txtHPrint2.Location = new System.Drawing.Point(462, 97);
            this.txtHPrint2.Location = new System.Drawing.Point(451, 128);
            this.txtHPrint2.Name = "txtHPrint2";
            this.txtHPrint2.Size = new System.Drawing.Size(227, 25);
            this.txtHPrint2.TabIndex = 10;
            // 
            // txtHPrint1
            // 
            this.txtHPrint1.Location = new System.Drawing.Point(113, 97);
            this.txtHPrint1.Location = new System.Drawing.Point(102, 128);
            this.txtHPrint1.Name = "txtHPrint1";
            this.txtHPrint1.Size = new System.Drawing.Size(227, 25);
            this.txtHPrint1.TabIndex = 9;
@@ -122,7 +126,7 @@
            // label7
            // 
            this.label7.AutoSize = true;
            this.label7.Location = new System.Drawing.Point(371, 143);
            this.label7.Location = new System.Drawing.Point(360, 174);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(75, 15);
            this.label7.TabIndex = 8;
@@ -131,7 +135,7 @@
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(28, 143);
            this.label6.Location = new System.Drawing.Point(17, 174);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(75, 15);
            this.label6.TabIndex = 7;
@@ -140,7 +144,7 @@
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(371, 100);
            this.label5.Location = new System.Drawing.Point(360, 131);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(75, 15);
            this.label5.TabIndex = 6;
@@ -149,7 +153,7 @@
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(28, 100);
            this.label4.Location = new System.Drawing.Point(17, 131);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(75, 15);
            this.label4.TabIndex = 5;
@@ -158,7 +162,7 @@
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(28, 43);
            this.label3.Location = new System.Drawing.Point(17, 37);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(67, 15);
            this.label3.TabIndex = 4;
@@ -170,7 +174,7 @@
            this.cmbPrint.FormattingEnabled = true;
            this.cmbPrint.Items.AddRange(new object[] {
            "供应商标签"});
            this.cmbPrint.Location = new System.Drawing.Point(113, 43);
            this.cmbPrint.Location = new System.Drawing.Point(102, 37);
            this.cmbPrint.Name = "cmbPrint";
            this.cmbPrint.Size = new System.Drawing.Size(227, 23);
            this.cmbPrint.TabIndex = 3;
@@ -228,6 +232,23 @@
            this.timer1.Interval = 2000;
            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
            // 
            // txtHPrintBarCode
            //
            this.txtHPrintBarCode.Location = new System.Drawing.Point(102, 88);
            this.txtHPrintBarCode.Name = "txtHPrintBarCode";
            this.txtHPrintBarCode.ReadOnly = true;
            this.txtHPrintBarCode.Size = new System.Drawing.Size(576, 25);
            this.txtHPrintBarCode.TabIndex = 14;
            //
            // label8
            //
            this.label8.AutoSize = true;
            this.label8.Location = new System.Drawing.Point(17, 91);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(52, 15);
            this.label8.TabIndex = 13;
            this.label8.Text = "条形码";
            //
            // FrmPrintLabel
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -274,5 +295,7 @@
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.DataGridView grdMain;
        private System.Windows.Forms.Timer timer1;
        private System.Windows.Forms.TextBox txtHPrintBarCode;
        private System.Windows.Forms.Label label8;
    }
}
SCM/ÌõÂë´òÓ¡/FrmPrintLabel.cs
@@ -57,17 +57,19 @@
        {
            if(e.KeyCode==Keys.Enter)
            {
                txtHbarcode.SelectAll();
                //txtHbarcode.SelectAll();
                if (txtHbarcode.Text.Trim()!="" && txtHbarcode.Text.Length>3)
                {
                    txtHPrintBarCode.Text = txtHbarcode.Text;
                    Sub_PrintLabel();
                    txtHbarcode.Text = "";
                    Thread.Sleep(500);
                    txtHbarcode.Focus();
                }
                else
                {
                    MessageBox.Show("请先扫码条码!!!");
                    txtHbarcode.Focus();
                }
            }
        }
@@ -100,7 +102,7 @@
        {
            try
            {
                Report.FieldByName("条形码").AsString = txtHbarcode.Text;
                Report.FieldByName("条形码").AsString = txtHPrintBarCode.Text;
                Report.FieldByName("字段一").AsString = txtHPrint1.Text;
                Report.FieldByName("字段二").AsString = txtHPrint2.Text;
                Report.FieldByName("字段三").AsString = txtHPrint3.Text;