From 979df3ce98eebc454024b8040076c0ca511737d8 Mon Sep 17 00:00:00 2001 From: "ruoxing.wang" <88384874@qq.com> Date: Thu, 7 Nov 2024 11:13:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA=E6=B3=A8?= =?UTF-8?q?=E5=A1=91=E4=B8=8D=E6=89=93=E7=AE=B1=E5=8D=95=E7=9A=84=E6=89=93?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FacOneZPStation/FrmZP.Designer.cs | 72 +- InjectionPC/FrmMain2408.Designer.cs | 39 +- InjectionPC/FrmMain2408.cs | 156 +- InjectionPC/FrmMain2411.Designer.cs | 1454 +++++++ InjectionPC/FrmMain2411.cs | 4337 +++++++++++++++++++ InjectionPC/FrmMain2411.resx | 493 +++ InjectionPC/InjectionPC.csproj | 9 + MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs | 13 +- MESClassLibrary/BLL/Wms/WmsBLL.cs | 31 + MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs | 17 + MESClassLibrary/DAL/Wms/WmsDAL.cs | 15 + PaintingPC/FrmQuality.Designer.cs | 41 +- PaintingPC/FrmQuality.cs | 90 +- 13 files changed, 6591 insertions(+), 176 deletions(-) create mode 100644 InjectionPC/FrmMain2411.Designer.cs create mode 100644 InjectionPC/FrmMain2411.cs create mode 100644 InjectionPC/FrmMain2411.resx diff --git a/FacOneZPStation/FrmZP.Designer.cs b/FacOneZPStation/FrmZP.Designer.cs index 4322dde..1c6f65d 100644 --- a/FacOneZPStation/FrmZP.Designer.cs +++ b/FacOneZPStation/FrmZP.Designer.cs @@ -77,7 +77,7 @@ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.51529F)); this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.62445F)); this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 32.86026F)); - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 652F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 653F)); this.tableLayoutPanel3.Controls.Add(this.button6, 3, 0); this.tableLayoutPanel3.Controls.Add(this.button1, 0, 1); this.tableLayoutPanel3.Controls.Add(this.button5, 2, 1); @@ -102,10 +102,10 @@ this.button6.Dock = System.Windows.Forms.DockStyle.Fill; this.button6.Font = new System.Drawing.Font("黑体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button6.ForeColor = System.Drawing.Color.Black; - this.button6.Location = new System.Drawing.Point(1695, 12); + this.button6.Location = new System.Drawing.Point(1693, 12); this.button6.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); this.button6.Name = "button6"; - this.button6.Size = new System.Drawing.Size(627, 161); + this.button6.Size = new System.Drawing.Size(629, 161); this.button6.TabIndex = 7; this.button6.Text = "手动打印箱单"; this.button6.UseVisualStyleBackColor = false; @@ -119,7 +119,7 @@ this.button1.Location = new System.Drawing.Point(6, 190); this.button1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(552, 176); + this.button1.Size = new System.Drawing.Size(551, 176); this.button1.TabIndex = 6; this.button1.Text = "打印标签"; this.button1.UseVisualStyleBackColor = false; @@ -131,10 +131,10 @@ this.button5.Dock = System.Windows.Forms.DockStyle.Fill; this.button5.Font = new System.Drawing.Font("黑体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button5.ForeColor = System.Drawing.Color.Black; - this.button5.Location = new System.Drawing.Point(1142, 197); + this.button5.Location = new System.Drawing.Point(1141, 197); this.button5.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); this.button5.Name = "button5"; - this.button5.Size = new System.Drawing.Size(527, 162); + this.button5.Size = new System.Drawing.Size(526, 162); this.button5.TabIndex = 5; this.button5.Text = "不合格"; this.button5.UseVisualStyleBackColor = false; @@ -145,7 +145,7 @@ this.button4.BackColor = System.Drawing.Color.RoyalBlue; this.button4.Dock = System.Windows.Forms.DockStyle.Fill; this.button4.Font = new System.Drawing.Font("黑体", 16F); - this.button4.Location = new System.Drawing.Point(570, 5); + this.button4.Location = new System.Drawing.Point(569, 5); this.button4.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(553, 175); @@ -162,7 +162,7 @@ this.button3.Location = new System.Drawing.Point(6, 5); this.button3.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(552, 175); + this.button3.Size = new System.Drawing.Size(551, 175); this.button3.TabIndex = 3; this.button3.Text = "上一计划"; this.button3.UseVisualStyleBackColor = false; @@ -174,7 +174,7 @@ this.button2.Dock = System.Windows.Forms.DockStyle.Fill; this.button2.Font = new System.Drawing.Font("黑体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button2.ForeColor = System.Drawing.Color.Black; - this.button2.Location = new System.Drawing.Point(577, 197); + this.button2.Location = new System.Drawing.Point(576, 197); this.button2.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(539, 162); @@ -188,10 +188,10 @@ this.button7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); this.button7.Dock = System.Windows.Forms.DockStyle.Fill; this.button7.Font = new System.Drawing.Font("黑体", 16F); - this.button7.Location = new System.Drawing.Point(1688, 190); + this.button7.Location = new System.Drawing.Point(1686, 190); this.button7.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); this.button7.Name = "button7"; - this.button7.Size = new System.Drawing.Size(641, 176); + this.button7.Size = new System.Drawing.Size(643, 176); this.button7.TabIndex = 8; this.button7.Text = "补打箱单"; this.button7.UseVisualStyleBackColor = false; @@ -203,7 +203,7 @@ this.label7.Dock = System.Windows.Forms.DockStyle.Fill; this.label7.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label7.ForeColor = System.Drawing.Color.White; - this.label7.Location = new System.Drawing.Point(1388, 3); + this.label7.Location = new System.Drawing.Point(1386, 3); this.label7.Margin = new System.Windows.Forms.Padding(2); this.label7.Name = "label7"; this.tableLayoutPanel4.SetRowSpan(this.label7, 2); @@ -216,9 +216,9 @@ this.textBox2.Dock = System.Windows.Forms.DockStyle.Fill; this.textBox2.Font = new System.Drawing.Font("黑体", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.textBox2.Location = new System.Drawing.Point(400, 111); - this.textBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.textBox2.Margin = new System.Windows.Forms.Padding(4); this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(981, 77); + this.textBox2.Size = new System.Drawing.Size(979, 77); this.textBox2.TabIndex = 30; this.textBox2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox2_KeyDown); // @@ -240,10 +240,10 @@ this.labOrderNo.Dock = System.Windows.Forms.DockStyle.Fill; this.labOrderNo.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.labOrderNo.ForeColor = System.Drawing.Color.White; - this.labOrderNo.Location = new System.Drawing.Point(1642, 219); + this.labOrderNo.Location = new System.Drawing.Point(1640, 219); this.labOrderNo.Margin = new System.Windows.Forms.Padding(2); this.labOrderNo.Name = "labOrderNo"; - this.labOrderNo.Size = new System.Drawing.Size(694, 152); + this.labOrderNo.Size = new System.Drawing.Size(696, 152); this.labOrderNo.TabIndex = 28; this.labOrderNo.Text = "A64654646464"; this.labOrderNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -254,7 +254,7 @@ this.label4.Dock = System.Windows.Forms.DockStyle.Fill; this.label4.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label4.ForeColor = System.Drawing.Color.White; - this.label4.Location = new System.Drawing.Point(1388, 219); + this.label4.Location = new System.Drawing.Point(1386, 219); this.label4.Margin = new System.Windows.Forms.Padding(2); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(249, 152); @@ -271,7 +271,7 @@ this.labStationNo.Location = new System.Drawing.Point(398, 219); this.labStationNo.Margin = new System.Windows.Forms.Padding(2); this.labStationNo.Name = "labStationNo"; - this.labStationNo.Size = new System.Drawing.Size(985, 152); + this.labStationNo.Size = new System.Drawing.Size(983, 152); this.labStationNo.TabIndex = 26; this.labStationNo.Text = "V253-MF-S后保下部延伸焊接"; this.labStationNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -295,10 +295,10 @@ this.labPName.Dock = System.Windows.Forms.DockStyle.Fill; this.labPName.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.labPName.ForeColor = System.Drawing.Color.White; - this.labPName.Location = new System.Drawing.Point(1642, 376); + this.labPName.Location = new System.Drawing.Point(1640, 376); this.labPName.Margin = new System.Windows.Forms.Padding(2); this.labPName.Name = "labPName"; - this.labPName.Size = new System.Drawing.Size(694, 249); + this.labPName.Size = new System.Drawing.Size(696, 249); this.labPName.TabIndex = 24; this.labPName.Text = "MF253 MF S后保"; this.labPName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -309,7 +309,7 @@ this.label8.Dock = System.Windows.Forms.DockStyle.Fill; this.label8.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label8.ForeColor = System.Drawing.Color.White; - this.label8.Location = new System.Drawing.Point(1388, 376); + this.label8.Location = new System.Drawing.Point(1386, 376); this.label8.Margin = new System.Windows.Forms.Padding(2); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(249, 249); @@ -326,7 +326,7 @@ this.labPartNo.Location = new System.Drawing.Point(398, 376); this.labPartNo.Margin = new System.Windows.Forms.Padding(2); this.labPartNo.Name = "labPartNo"; - this.labPartNo.Size = new System.Drawing.Size(985, 249); + this.labPartNo.Size = new System.Drawing.Size(983, 249); this.labPartNo.TabIndex = 22; this.labPartNo.Text = "A2530822665"; this.labPartNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -356,10 +356,10 @@ this.labBadCount.Dock = System.Windows.Forms.DockStyle.Fill; this.labBadCount.Font = new System.Drawing.Font("黑体", 60F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.labBadCount.ForeColor = System.Drawing.Color.Lime; - this.labBadCount.Location = new System.Drawing.Point(1642, 630); + this.labBadCount.Location = new System.Drawing.Point(1640, 630); this.labBadCount.Margin = new System.Windows.Forms.Padding(2); this.labBadCount.Name = "labBadCount"; - this.labBadCount.Size = new System.Drawing.Size(694, 449); + this.labBadCount.Size = new System.Drawing.Size(696, 449); this.labBadCount.TabIndex = 20; this.labBadCount.Text = "0"; this.labBadCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -373,7 +373,7 @@ this.labNum.Location = new System.Drawing.Point(398, 630); this.labNum.Margin = new System.Windows.Forms.Padding(2); this.labNum.Name = "labNum"; - this.labNum.Size = new System.Drawing.Size(985, 449); + this.labNum.Size = new System.Drawing.Size(983, 449); this.labNum.TabIndex = 18; this.labNum.Text = "152/210"; this.labNum.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -410,9 +410,9 @@ this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.textBox1.Font = new System.Drawing.Font("黑体", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.textBox1.Location = new System.Drawing.Point(400, 5); - this.textBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.textBox1.Margin = new System.Windows.Forms.Padding(4); this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(981, 77); + this.textBox1.Size = new System.Drawing.Size(979, 77); this.textBox1.TabIndex = 13; this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown); // @@ -421,11 +421,11 @@ this.labErrMessage.Dock = System.Windows.Forms.DockStyle.Fill; this.labErrMessage.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.labErrMessage.ForeColor = System.Drawing.Color.Red; - this.labErrMessage.Location = new System.Drawing.Point(1644, 1); + this.labErrMessage.Location = new System.Drawing.Point(1642, 1); this.labErrMessage.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labErrMessage.Name = "labErrMessage"; this.tableLayoutPanel4.SetRowSpan(this.labErrMessage, 2); - this.labErrMessage.Size = new System.Drawing.Size(690, 215); + this.labErrMessage.Size = new System.Drawing.Size(692, 215); this.labErrMessage.TabIndex = 16; this.labErrMessage.Text = "条码与产品不匹配,重新扫描"; this.labErrMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -438,7 +438,7 @@ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 28.52292F)); this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 71.47708F)); this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 253F)); - this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 697F)); + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 699F)); this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 37F)); this.tableLayoutPanel4.Controls.Add(this.label7, 2, 0); this.tableLayoutPanel4.Controls.Add(this.textBox2, 1, 1); @@ -460,7 +460,7 @@ this.tableLayoutPanel4.Controls.Add(this.labErrMessage, 3, 0); this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel4.Location = new System.Drawing.Point(4, 134); - this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4); this.tableLayoutPanel4.Name = "tableLayoutPanel4"; this.tableLayoutPanel4.RowCount = 5; this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.8932F)); @@ -478,7 +478,7 @@ this.label12.Dock = System.Windows.Forms.DockStyle.Fill; this.label12.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label12.ForeColor = System.Drawing.Color.White; - this.label12.Location = new System.Drawing.Point(1388, 630); + this.label12.Location = new System.Drawing.Point(1386, 630); this.label12.Margin = new System.Windows.Forms.Padding(2); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(249, 449); @@ -491,10 +491,10 @@ this.labTime.BackColor = System.Drawing.Color.Transparent; this.labTime.Dock = System.Windows.Forms.DockStyle.Fill; this.labTime.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.labTime.Location = new System.Drawing.Point(1799, 0); + this.labTime.Location = new System.Drawing.Point(1798, 0); this.labTime.Margin = new System.Windows.Forms.Padding(0); this.labTime.Name = "labTime"; - this.labTime.Size = new System.Drawing.Size(548, 130); + this.labTime.Size = new System.Drawing.Size(549, 130); this.labTime.TabIndex = 7; this.labTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.labTime.Click += new System.EventHandler(this.labTime_Click); @@ -521,7 +521,7 @@ this.label1.Location = new System.Drawing.Point(325, 0); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(1474, 130); + this.label1.Size = new System.Drawing.Size(1473, 130); this.label1.TabIndex = 1; this.label1.Text = "装配工位信息看板"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -532,7 +532,7 @@ this.tableLayoutPanel2.ColumnCount = 3; this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 18.10651F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 81.89349F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 547F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 548F)); this.tableLayoutPanel2.Controls.Add(this.labTime, 2, 0); this.tableLayoutPanel2.Controls.Add(this.pictureBox1, 0, 0); this.tableLayoutPanel2.Controls.Add(this.label1, 1, 0); diff --git a/InjectionPC/FrmMain2408.Designer.cs b/InjectionPC/FrmMain2408.Designer.cs index cd06584..f43c6ba 100644 --- a/InjectionPC/FrmMain2408.Designer.cs +++ b/InjectionPC/FrmMain2408.Designer.cs @@ -28,6 +28,7 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); GlacialComponents.Controls.GLColumn glColumn1 = new GlacialComponents.Controls.GLColumn(); GlacialComponents.Controls.GLColumn glColumn2 = new GlacialComponents.Controls.GLColumn(); GlacialComponents.Controls.GLColumn glColumn3 = new GlacialComponents.Controls.GLColumn(); @@ -146,10 +147,10 @@ this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.label35 = new System.Windows.Forms.Label(); this.label39 = new System.Windows.Forms.Label(); - this.timer1 = new System.Windows.Forms.Timer(); - this.serialPort1 = new System.IO.Ports.SerialPort(); - this.timer2 = new System.Windows.Forms.Timer(); - this.timer3 = new System.Windows.Forms.Timer(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.serialPort1 = new System.IO.Ports.SerialPort(this.components); + this.timer2 = new System.Windows.Forms.Timer(this.components); + this.timer3 = new System.Windows.Forms.Timer(this.components); this.panel1.SuspendLayout(); this.panel7.SuspendLayout(); this.panel23.SuspendLayout(); @@ -354,7 +355,7 @@ this.cboxHandBox.CheckState = System.Windows.Forms.CheckState.Checked; this.cboxHandBox.Enabled = false; this.cboxHandBox.Location = new System.Drawing.Point(924, 172); - this.cboxHandBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.cboxHandBox.Margin = new System.Windows.Forms.Padding(4); this.cboxHandBox.Name = "cboxHandBox"; this.cboxHandBox.Size = new System.Drawing.Size(256, 55); this.cboxHandBox.TabIndex = 14; @@ -821,7 +822,7 @@ this.tableLayoutPanel2.Controls.Add(this.groupBox1, 0, 1); this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 406); - this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4); this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.RowCount = 2; this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 262F)); @@ -893,9 +894,9 @@ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox1.Location = new System.Drawing.Point(4, 266); - this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox1.Margin = new System.Windows.Forms.Padding(4); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox1.Padding = new System.Windows.Forms.Padding(4); this.groupBox1.Size = new System.Drawing.Size(372, 300); this.groupBox1.TabIndex = 2; this.groupBox1.TabStop = false; @@ -912,7 +913,7 @@ this.tableLayoutPanel3.Controls.Add(this.panel49, 1, 1); this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel3.Location = new System.Drawing.Point(4, 32); - this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(4); this.tableLayoutPanel3.Name = "tableLayoutPanel3"; this.tableLayoutPanel3.RowCount = 3; this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33111F)); @@ -930,7 +931,7 @@ this.panel47.Controls.Add(this.lbCurrentlQtyR); this.panel47.Dock = System.Windows.Forms.DockStyle.Fill; this.panel47.Location = new System.Drawing.Point(4, 179); - this.panel47.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.panel47.Margin = new System.Windows.Forms.Padding(4); this.panel47.Name = "panel47"; this.panel47.Size = new System.Drawing.Size(356, 81); this.panel47.TabIndex = 4; @@ -941,7 +942,7 @@ this.btnHandPrintR.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnHandPrintR.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnHandPrintR.Location = new System.Drawing.Point(247, 16); - this.btnHandPrintR.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnHandPrintR.Margin = new System.Windows.Forms.Padding(4); this.btnHandPrintR.Name = "btnHandPrintR"; this.btnHandPrintR.Size = new System.Drawing.Size(115, 64); this.btnHandPrintR.TabIndex = 3; @@ -1024,7 +1025,7 @@ this.btnChangeSizeR.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnChangeSizeR.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnChangeSizeR.Location = new System.Drawing.Point(127, 15); - this.btnChangeSizeR.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnChangeSizeR.Margin = new System.Windows.Forms.Padding(4); this.btnChangeSizeR.Name = "btnChangeSizeR"; this.btnChangeSizeR.Size = new System.Drawing.Size(121, 64); this.btnChangeSizeR.TabIndex = 4; @@ -1067,7 +1068,7 @@ this.tableLayoutPanel1.Controls.Add(this.groupBox2, 0, 1); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.00047F)); @@ -1095,9 +1096,9 @@ this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold); this.groupBox2.Location = new System.Drawing.Point(4, 105); - this.groupBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox2.Margin = new System.Windows.Forms.Padding(4); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox2.Padding = new System.Windows.Forms.Padding(4); this.groupBox2.Size = new System.Drawing.Size(372, 297); this.groupBox2.TabIndex = 1; this.groupBox2.TabStop = false; @@ -1114,7 +1115,7 @@ this.tableLayoutPanel4.Controls.Add(this.panel48, 1, 1); this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel4.Location = new System.Drawing.Point(4, 32); - this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4); this.tableLayoutPanel4.Name = "tableLayoutPanel4"; this.tableLayoutPanel4.RowCount = 3; this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33111F)); @@ -1146,7 +1147,7 @@ this.panel46.Controls.Add(this.lbCurrentlQtyL); this.panel46.Dock = System.Windows.Forms.DockStyle.Fill; this.panel46.Location = new System.Drawing.Point(4, 177); - this.panel46.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.panel46.Margin = new System.Windows.Forms.Padding(4); this.panel46.Name = "panel46"; this.panel46.Size = new System.Drawing.Size(356, 80); this.panel46.TabIndex = 4; @@ -1157,7 +1158,7 @@ this.btnHandPrintL.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnHandPrintL.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnHandPrintL.Location = new System.Drawing.Point(245, 13); - this.btnHandPrintL.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnHandPrintL.Margin = new System.Windows.Forms.Padding(4); this.btnHandPrintL.Name = "btnHandPrintL"; this.btnHandPrintL.Size = new System.Drawing.Size(115, 64); this.btnHandPrintL.TabIndex = 3; @@ -1227,7 +1228,7 @@ this.btnChangeSizeL.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnChangeSizeL.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnChangeSizeL.Location = new System.Drawing.Point(127, 10); - this.btnChangeSizeL.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnChangeSizeL.Margin = new System.Windows.Forms.Padding(4); this.btnChangeSizeL.Name = "btnChangeSizeL"; this.btnChangeSizeL.Size = new System.Drawing.Size(115, 64); this.btnChangeSizeL.TabIndex = 4; diff --git a/InjectionPC/FrmMain2408.cs b/InjectionPC/FrmMain2408.cs index e5ffb9a..dd361b2 100644 --- a/InjectionPC/FrmMain2408.cs +++ b/InjectionPC/FrmMain2408.cs @@ -66,12 +66,15 @@ namespace InjectionPC private string _lastBoxNoR = string.Empty; private WmsBLL _wmsBll = new WmsBLL(); bool _isLoad = false; + //零件用的打印机编号 <零件号+工位ID,打印机编号> + private Dictionary _printNameDict = new Dictionary(); + private PlasticBLL _plasticBLL = new PlasticBLL(); #endregion public FrmMain2408() { InitializeComponent(); - this.Size = new Size(1280, 1024); + this.Size = new Size(1280, 920); } public string planID = "", productID = "", nextPlanID = "", nextproductID = "",aa=""; @@ -113,6 +116,16 @@ namespace InjectionPC label23.Enabled = false; label23.BackColor = System.Drawing.Color.Gray; + DataTable plasticTable = GetPlastic(); + foreach(DataRow dr in plasticTable.Rows) + { + string key = dr["PartNo"].ToString() + dr["StationID"].ToString(); + if (_printNameDict.Keys.Contains(key) == false) + { + _printNameDict.Add(key, dr["PrinterNo"].ToString()); + } + } + InitPackageInfo(); Ping p1 = new Ping(); @@ -268,9 +281,8 @@ namespace InjectionPC } private DataTable GetPlastic() - { - PlasticBLL bill = new PlasticBLL(); - return bill.SearchAllInfo(_currentStationID); + { + return _plasticBLL.SearchAllInfo(_currentStationID); } List _lastParts = new List(); @@ -395,7 +407,7 @@ namespace InjectionPC BarCodeBLL brbll = new BarCodeBLL(); BarCodeModel md = new BarCodeModel(); ProductBLL productBll = new ProductBLL(); - PlasticBLL pbll=new PlasticBLL(); + PlasticBLL pbll= _plasticBLL; InjectionBoxBLL boxbll=new InjectionBoxBLL(); InjectionBoxModel boxmd=new InjectionBoxModel(); DataTable dt2 = null; @@ -659,12 +671,13 @@ namespace InjectionPC } - DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), - dt.Rows[0]["StationID"].ToString()); - if (dt4 != null && dt4.Rows.Count > 0) - { - printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); - } + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" +_printNameDict[partNo[j].ToString().Trim()+ dt.Rows[0]["StationID"].ToString()]; string reportName = ConfigurationManager.AppSettings[printName] .ToString(); @@ -867,12 +880,13 @@ namespace InjectionPC } - DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), - dt.Rows[0]["StationID"].ToString()); - if (dt4 != null && dt4.Rows.Count > 0) - { - printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); - } + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo[j].ToString().Trim() + dt.Rows[0]["StationID"].ToString()]; string reportName = ConfigurationManager.AppSettings[printName] .ToString(); @@ -1141,12 +1155,13 @@ namespace InjectionPC PrintMoudleName(); } - DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), - dt.Rows[0]["StationID"].ToString()); - if (dt4 != null && dt4.Rows.Count > 0) - { - printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); - } + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo[j].ToString().Trim() + dt.Rows[0]["StationID"].ToString()]; string reportName = ConfigurationManager.AppSettings[printName] .ToString(); @@ -1361,12 +1376,13 @@ namespace InjectionPC filename = System.AppDomain.CurrentDomain.BaseDirectory + PrintMoudleName(); } - DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), - dt.Rows[0]["StationID"].ToString()); - if (dt4 != null && dt4.Rows.Count > 0) - { - printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); - } + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo[j].ToString().Trim() + dt.Rows[0]["StationID"].ToString()]; string reportName = ConfigurationManager.AppSettings[printName].ToString(); DataTable headTable = GetPrintHeadTable(partNo[j].ToString().Trim(), PartName, NewOneCode, newcode); @@ -1443,7 +1459,7 @@ namespace InjectionPC BarCodeBLL brbll = new BarCodeBLL(); BarCodeModel md = new BarCodeModel(); ProductBLL productBll = new ProductBLL(); - PlasticBLL pbll = new PlasticBLL(); + PlasticBLL pbll = _plasticBLL; InjectionBoxBLL boxbll = new InjectionBoxBLL(); InjectionBoxModel boxmd = new InjectionBoxModel(); InjectionQtyBLL qbll=new InjectionQtyBLL(); @@ -1657,12 +1673,13 @@ namespace InjectionPC - DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), - dt.Rows[0]["StationID"].ToString()); - if (dt4 != null && dt4.Rows.Count > 0) - { - printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); - } + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo[j].ToString().Trim() + dt.Rows[0]["StationID"].ToString()]; #region 打印单个标签 @@ -1892,12 +1909,13 @@ namespace InjectionPC // MaxCount = Convert.ToInt32(dt3.Rows[0]["PackCount"].ToString()); //} - DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), - dt.Rows[0]["StationID"].ToString()); - if (dt4 != null && dt4.Rows.Count > 0) - { - printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); - } + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo[j].ToString().Trim() + dt.Rows[0]["StationID"].ToString()]; #region 打印单个标签 @@ -2048,7 +2066,7 @@ namespace InjectionPC { comboBox2.Items.Clear(); - PlasticBLL bll=new PlasticBLL(); + PlasticBLL bll= _plasticBLL; try { @@ -2304,7 +2322,7 @@ namespace InjectionPC ProductBLL pbll = new ProductBLL(); BarCodeBLL bll = new BarCodeBLL(); BarCodeModel md = new BarCodeModel(); - PlasticBLL plbll=new PlasticBLL(); + PlasticBLL plbll= _plasticBLL; InjectionBoxBLL boxbll = new InjectionBoxBLL(); InjectionBoxModel boxmd = new InjectionBoxModel(); InjectionPlanBLL planbll=new InjectionPlanBLL(); @@ -2473,11 +2491,12 @@ namespace InjectionPC "Sill.grf"; } - DataTable dt4 = plbll.SearchInfo(partNo, stationID); - if (dt4 != null && dt4.Rows.Count > 0) - { - printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); - } + //DataTable dt4 = plbll.SearchInfo(partNo, stationID); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo + stationID]; string reportName = ConfigurationManager.AppSettings[printName].ToString(); DataTable headTable = GetPrintHeadTable(partNo, PartName, NewOneCode, newcode); @@ -2730,11 +2749,12 @@ namespace InjectionPC { filename = System.AppDomain.CurrentDomain.BaseDirectory + PrintMoudleName(); - DataTable dt4 = plbll.SearchInfo(partNo, stationID); - if (dt4 != null && dt4.Rows.Count > 0) - { - printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); - } + //DataTable dt4 = plbll.SearchInfo(partNo, stationID); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo + stationID]; string reportName = ConfigurationManager.AppSettings[printName].ToString(); DataTable headTable = GetPrintHeadTable(partNo, PartName, NewOneCode, newcode); @@ -2958,7 +2978,7 @@ namespace InjectionPC BarCodeModel md = new BarCodeModel(); BarCodeBLL bll = new BarCodeBLL(); ProductBLL pbll = new ProductBLL(); - PlasticBLL plbll = new PlasticBLL(); + PlasticBLL plbll = _plasticBLL; try { if (glacialList1.SelectedItems.Count == 0) @@ -3047,11 +3067,12 @@ namespace InjectionPC } - DataTable dt4 = plbll.SearchInfo(md.PartNo, md.StationID); - if (dt4 != null && dt4.Rows.Count > 0) - { - printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); - } + //DataTable dt4 = plbll.SearchInfo(md.PartNo, md.StationID); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[md.PartNo + md.StationID]; string reportName = ConfigurationManager.AppSettings[printName].ToString(); DataTable headTable = GetPrintHeadTable(md.PartNo, partName, md.OneBarCode, md.BarCode); @@ -3133,7 +3154,7 @@ namespace InjectionPC InjectionBoxModel boxmd=new InjectionBoxModel(); BarCodeBLL bll=new BarCodeBLL(); ProductBLL pbll=new ProductBLL(); - PlasticBLL plbll=new PlasticBLL(); + PlasticBLL plbll= _plasticBLL; StationBLL sbll=new StationBLL(); string filename = "", printName = "", printBoxName="",stationID=""; @@ -3204,11 +3225,12 @@ namespace InjectionPC #region 查询打印机名称 - DataTable dt3 = plbll.SearchInfo(row["PartNo"].ToString(), stationID); - if (dt3 != null && dt3.Rows.Count > 0) - { - printName = "Printer" + dt3.Rows[0]["PrinterNo"].ToString(); - } + //DataTable dt3 = plbll.SearchInfo(row["PartNo"].ToString(), stationID); + //if (dt3 != null && dt3.Rows.Count > 0) + //{ + // printName = "Printer" + dt3.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[row["PartNo"].ToString() + stationID]; #endregion @@ -3713,7 +3735,7 @@ namespace InjectionPC BarCodeBLL brbll = new BarCodeBLL(); BarCodeModel md = new BarCodeModel(); ProductBLL productBll = new ProductBLL(); - PlasticBLL pbll = new PlasticBLL(); + PlasticBLL pbll = _plasticBLL; InjectionBoxBLL boxbll = new InjectionBoxBLL(); InjectionBoxModel boxmd = new InjectionBoxModel(); DataTable dt2 = null; diff --git a/InjectionPC/FrmMain2411.Designer.cs b/InjectionPC/FrmMain2411.Designer.cs new file mode 100644 index 0000000..1ed9a2d --- /dev/null +++ b/InjectionPC/FrmMain2411.Designer.cs @@ -0,0 +1,1454 @@ +namespace InjectionPC +{ + partial class FrmMain2411 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + GlacialComponents.Controls.GLColumn glColumn1 = new GlacialComponents.Controls.GLColumn(); + GlacialComponents.Controls.GLColumn glColumn2 = new GlacialComponents.Controls.GLColumn(); + GlacialComponents.Controls.GLColumn glColumn3 = new GlacialComponents.Controls.GLColumn(); + GlacialComponents.Controls.GLColumn glColumn4 = new GlacialComponents.Controls.GLColumn(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain2411)); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel7 = new System.Windows.Forms.Panel(); + this.panel23 = new System.Windows.Forms.Panel(); + this.panel27 = new System.Windows.Forms.Panel(); + this.panel29 = new System.Windows.Forms.Panel(); + this.panel31 = new System.Windows.Forms.Panel(); + this.panel33 = new System.Windows.Forms.Panel(); + this.panel35 = new System.Windows.Forms.Panel(); + this.panel37 = new System.Windows.Forms.Panel(); + this.panel40 = new System.Windows.Forms.Panel(); + this.panel42 = new System.Windows.Forms.Panel(); + this.panel39 = new System.Windows.Forms.Panel(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.label18 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label20 = new System.Windows.Forms.Label(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.label21 = new System.Windows.Forms.Label(); + this.panel43 = new System.Windows.Forms.Panel(); + this.label23 = new System.Windows.Forms.Label(); + this.panel41 = new System.Windows.Forms.Panel(); + this.label22 = new System.Windows.Forms.Label(); + this.panel34 = new System.Windows.Forms.Panel(); + this.label15 = new System.Windows.Forms.Label(); + this.panel32 = new System.Windows.Forms.Panel(); + this.label14 = new System.Windows.Forms.Label(); + this.panel30 = new System.Windows.Forms.Panel(); + this.label13 = new System.Windows.Forms.Label(); + this.panel28 = new System.Windows.Forms.Panel(); + this.label12 = new System.Windows.Forms.Label(); + this.panel24 = new System.Windows.Forms.Panel(); + this.panel26 = new System.Windows.Forms.Panel(); + this.panel45 = new System.Windows.Forms.Panel(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.label25 = new System.Windows.Forms.Label(); + this.panel44 = new System.Windows.Forms.Panel(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.label24 = new System.Windows.Forms.Label(); + this.glacialList1 = new GlacialComponents.Controls.GlacialList(); + this.panel25 = new System.Windows.Forms.Panel(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.panel38 = new System.Windows.Forms.Panel(); + this.label27 = new System.Windows.Forms.Label(); + this.label26 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.panel36 = new System.Windows.Forms.Panel(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.label11 = new System.Windows.Forms.Label(); + this.panel8 = new System.Windows.Forms.Panel(); + this.panel10 = new System.Windows.Forms.Panel(); + this.panel12 = new System.Windows.Forms.Panel(); + this.panel16 = new System.Windows.Forms.Panel(); + this.panel20 = new System.Windows.Forms.Panel(); + this.label10 = new System.Windows.Forms.Label(); + this.panel22 = new System.Windows.Forms.Panel(); + this.label9 = new System.Windows.Forms.Label(); + this.panel19 = new System.Windows.Forms.Panel(); + this.label8 = new System.Windows.Forms.Label(); + this.panel21 = new System.Windows.Forms.Panel(); + this.label7 = new System.Windows.Forms.Label(); + this.panel15 = new System.Windows.Forms.Panel(); + this.panel18 = new System.Windows.Forms.Panel(); + this.label6 = new System.Windows.Forms.Label(); + this.panel17 = new System.Windows.Forms.Panel(); + this.label5 = new System.Windows.Forms.Label(); + this.panel11 = new System.Windows.Forms.Panel(); + this.panel14 = new System.Windows.Forms.Panel(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.panel13 = new System.Windows.Forms.Panel(); + this.label4 = new System.Windows.Forms.Label(); + this.panel9 = new System.Windows.Forms.Panel(); + this.label3 = new System.Windows.Forms.Label(); + this.panel2 = new System.Windows.Forms.Panel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.panel6 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.panel5 = new System.Windows.Forms.Panel(); + this.label2 = new System.Windows.Forms.Label(); + this.panel3 = new System.Windows.Forms.Panel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.label35 = new System.Windows.Forms.Label(); + this.label39 = new System.Windows.Forms.Label(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.serialPort1 = new System.IO.Ports.SerialPort(this.components); + this.timer2 = new System.Windows.Forms.Timer(this.components); + this.timer3 = new System.Windows.Forms.Timer(this.components); + this.panel1.SuspendLayout(); + this.panel7.SuspendLayout(); + this.panel23.SuspendLayout(); + this.panel27.SuspendLayout(); + this.panel29.SuspendLayout(); + this.panel31.SuspendLayout(); + this.panel33.SuspendLayout(); + this.panel35.SuspendLayout(); + this.panel37.SuspendLayout(); + this.panel40.SuspendLayout(); + this.panel42.SuspendLayout(); + this.panel39.SuspendLayout(); + this.panel43.SuspendLayout(); + this.panel41.SuspendLayout(); + this.panel34.SuspendLayout(); + this.panel32.SuspendLayout(); + this.panel30.SuspendLayout(); + this.panel28.SuspendLayout(); + this.panel24.SuspendLayout(); + this.panel26.SuspendLayout(); + this.panel45.SuspendLayout(); + this.panel44.SuspendLayout(); + this.panel25.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + this.panel38.SuspendLayout(); + this.panel36.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.panel8.SuspendLayout(); + this.panel10.SuspendLayout(); + this.panel12.SuspendLayout(); + this.panel16.SuspendLayout(); + this.panel20.SuspendLayout(); + this.panel22.SuspendLayout(); + this.panel19.SuspendLayout(); + this.panel21.SuspendLayout(); + this.panel15.SuspendLayout(); + this.panel18.SuspendLayout(); + this.panel17.SuspendLayout(); + this.panel11.SuspendLayout(); + this.panel14.SuspendLayout(); + this.panel13.SuspendLayout(); + this.panel9.SuspendLayout(); + this.panel2.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel6.SuspendLayout(); + this.panel5.SuspendLayout(); + this.panel3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.panel7); + this.panel1.Controls.Add(this.panel2); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(2347, 1601); + this.panel1.TabIndex = 0; + // + // panel7 + // + this.panel7.Controls.Add(this.panel23); + this.panel7.Controls.Add(this.panel8); + this.panel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel7.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold); + this.panel7.Location = new System.Drawing.Point(0, 147); + this.panel7.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(2347, 1454); + this.panel7.TabIndex = 1; + // + // panel23 + // + this.panel23.Controls.Add(this.panel27); + this.panel23.Controls.Add(this.panel24); + this.panel23.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel23.Location = new System.Drawing.Point(0, 91); + this.panel23.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel23.Name = "panel23"; + this.panel23.Size = new System.Drawing.Size(2347, 1363); + this.panel23.TabIndex = 1; + // + // panel27 + // + this.panel27.Controls.Add(this.panel29); + this.panel27.Controls.Add(this.panel28); + this.panel27.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel27.Location = new System.Drawing.Point(0, 976); + this.panel27.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel27.Name = "panel27"; + this.panel27.Size = new System.Drawing.Size(2347, 387); + this.panel27.TabIndex = 1; + // + // panel29 + // + this.panel29.Controls.Add(this.panel31); + this.panel29.Controls.Add(this.panel30); + this.panel29.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel29.Location = new System.Drawing.Point(311, 0); + this.panel29.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel29.Name = "panel29"; + this.panel29.Size = new System.Drawing.Size(2036, 387); + this.panel29.TabIndex = 1; + // + // panel31 + // + this.panel31.Controls.Add(this.panel33); + this.panel31.Controls.Add(this.panel32); + this.panel31.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel31.Location = new System.Drawing.Point(122, 0); + this.panel31.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel31.Name = "panel31"; + this.panel31.Size = new System.Drawing.Size(1914, 387); + this.panel31.TabIndex = 1; + // + // panel33 + // + this.panel33.Controls.Add(this.panel35); + this.panel33.Controls.Add(this.panel34); + this.panel33.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel33.Location = new System.Drawing.Point(122, 0); + this.panel33.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel33.Name = "panel33"; + this.panel33.Size = new System.Drawing.Size(1792, 387); + this.panel33.TabIndex = 1; + // + // panel35 + // + this.panel35.Controls.Add(this.panel37); + this.panel35.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel35.Location = new System.Drawing.Point(0, 0); + this.panel35.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel35.Name = "panel35"; + this.panel35.Size = new System.Drawing.Size(1670, 387); + this.panel35.TabIndex = 1; + // + // panel37 + // + this.panel37.Controls.Add(this.panel40); + this.panel37.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel37.Location = new System.Drawing.Point(0, 0); + this.panel37.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel37.Name = "panel37"; + this.panel37.Size = new System.Drawing.Size(1670, 387); + this.panel37.TabIndex = 1; + // + // panel40 + // + this.panel40.Controls.Add(this.panel42); + this.panel40.Controls.Add(this.panel41); + this.panel40.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel40.Location = new System.Drawing.Point(0, 0); + this.panel40.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel40.Name = "panel40"; + this.panel40.Size = new System.Drawing.Size(1670, 387); + this.panel40.TabIndex = 1; + // + // panel42 + // + this.panel42.Controls.Add(this.panel39); + this.panel42.Controls.Add(this.panel43); + this.panel42.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel42.Location = new System.Drawing.Point(0, 0); + this.panel42.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel42.Name = "panel42"; + this.panel42.Size = new System.Drawing.Size(1548, 387); + this.panel42.TabIndex = 1; + // + // panel39 + // + this.panel39.BackColor = System.Drawing.Color.Aquamarine; + this.panel39.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel39.Controls.Add(this.textBox2); + this.panel39.Controls.Add(this.label18); + this.panel39.Controls.Add(this.label19); + this.panel39.Controls.Add(this.textBox1); + this.panel39.Controls.Add(this.label20); + this.panel39.Controls.Add(this.comboBox2); + this.panel39.Controls.Add(this.label21); + this.panel39.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel39.Location = new System.Drawing.Point(0, 0); + this.panel39.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel39.Name = "panel39"; + this.panel39.Size = new System.Drawing.Size(1426, 387); + this.panel39.TabIndex = 1; + // + // textBox2 + // + this.textBox2.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.textBox2.Location = new System.Drawing.Point(220, 291); + this.textBox2.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(302, 65); + this.textBox2.TabIndex = 13; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label18.Location = new System.Drawing.Point(40, 304); + this.label18.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(178, 51); + this.label18.TabIndex = 12; + this.label18.Text = "数量:"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label19.Location = new System.Drawing.Point(606, 178); + this.label19.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(238, 51); + this.label19.TabIndex = 11; + this.label19.Text = "(yyMMdd)"; + // + // textBox1 + // + this.textBox1.Enabled = false; + this.textBox1.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.textBox1.Location = new System.Drawing.Point(223, 172); + this.textBox1.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(301, 65); + this.textBox1.TabIndex = 10; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label20.Location = new System.Drawing.Point(41, 186); + this.label20.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(178, 51); + this.label20.TabIndex = 9; + this.label20.Text = "批次:"; + // + // comboBox2 + // + this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox2.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Location = new System.Drawing.Point(223, 63); + this.comboBox2.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(851, 50); + this.comboBox2.TabIndex = 8; + this.comboBox2.TextChanged += new System.EventHandler(this.comboBox2_TextChanged); + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label21.Location = new System.Drawing.Point(41, 70); + this.label21.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(178, 51); + this.label21.TabIndex = 7; + this.label21.Text = "产品:"; + // + // panel43 + // + this.panel43.Controls.Add(this.label23); + this.panel43.Dock = System.Windows.Forms.DockStyle.Right; + this.panel43.Location = new System.Drawing.Point(1426, 0); + this.panel43.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel43.Name = "panel43"; + this.panel43.Size = new System.Drawing.Size(122, 387); + this.panel43.TabIndex = 0; + // + // label23 + // + this.label23.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label23.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label23.Dock = System.Windows.Forms.DockStyle.Fill; + this.label23.Location = new System.Drawing.Point(0, 0); + this.label23.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(122, 387); + this.label23.TabIndex = 0; + this.label23.Text = "手工打印条码"; + this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label23.Click += new System.EventHandler(this.label23_Click); + // + // panel41 + // + this.panel41.Controls.Add(this.label22); + this.panel41.Dock = System.Windows.Forms.DockStyle.Right; + this.panel41.Location = new System.Drawing.Point(1548, 0); + this.panel41.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel41.Name = "panel41"; + this.panel41.Size = new System.Drawing.Size(122, 387); + this.panel41.TabIndex = 0; + // + // label22 + // + this.label22.BackColor = System.Drawing.Color.Gray; + this.label22.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label22.Dock = System.Windows.Forms.DockStyle.Fill; + this.label22.Enabled = false; + this.label22.Location = new System.Drawing.Point(0, 0); + this.label22.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(122, 387); + this.label22.TabIndex = 0; + this.label22.Text = "补打条码"; + this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label22.Click += new System.EventHandler(this.label22_Click); + // + // panel34 + // + this.panel34.Controls.Add(this.label15); + this.panel34.Dock = System.Windows.Forms.DockStyle.Right; + this.panel34.Location = new System.Drawing.Point(1670, 0); + this.panel34.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel34.Name = "panel34"; + this.panel34.Size = new System.Drawing.Size(122, 387); + this.panel34.TabIndex = 0; + // + // label15 + // + this.label15.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label15.Dock = System.Windows.Forms.DockStyle.Fill; + this.label15.Location = new System.Drawing.Point(0, 0); + this.label15.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(122, 387); + this.label15.TabIndex = 0; + this.label15.Text = "删除条码"; + this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label15.Click += new System.EventHandler(this.label15_Click); + // + // panel32 + // + this.panel32.Controls.Add(this.label14); + this.panel32.Dock = System.Windows.Forms.DockStyle.Left; + this.panel32.Location = new System.Drawing.Point(0, 0); + this.panel32.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel32.Name = "panel32"; + this.panel32.Size = new System.Drawing.Size(122, 387); + this.panel32.TabIndex = 0; + // + // label14 + // + this.label14.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label14.Dock = System.Windows.Forms.DockStyle.Fill; + this.label14.Location = new System.Drawing.Point(0, 0); + this.label14.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(122, 387); + this.label14.TabIndex = 0; + this.label14.Text = "下一计划"; + this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label14.Click += new System.EventHandler(this.label14_Click); + // + // panel30 + // + this.panel30.Controls.Add(this.label13); + this.panel30.Dock = System.Windows.Forms.DockStyle.Left; + this.panel30.Location = new System.Drawing.Point(0, 0); + this.panel30.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel30.Name = "panel30"; + this.panel30.Size = new System.Drawing.Size(122, 387); + this.panel30.TabIndex = 0; + // + // label13 + // + this.label13.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label13.Dock = System.Windows.Forms.DockStyle.Fill; + this.label13.Location = new System.Drawing.Point(0, 0); + this.label13.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(122, 387); + this.label13.TabIndex = 0; + this.label13.Text = "暂停打印"; + this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label13.Click += new System.EventHandler(this.label13_Click); + // + // panel28 + // + this.panel28.Controls.Add(this.label12); + this.panel28.Dock = System.Windows.Forms.DockStyle.Left; + this.panel28.Location = new System.Drawing.Point(0, 0); + this.panel28.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel28.Name = "panel28"; + this.panel28.Size = new System.Drawing.Size(311, 387); + this.panel28.TabIndex = 0; + // + // label12 + // + this.label12.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label12.Dock = System.Windows.Forms.DockStyle.Fill; + this.label12.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(0, 0); + this.label12.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(311, 387); + this.label12.TabIndex = 0; + this.label12.Text = "打印信息:"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel24 + // + this.panel24.Controls.Add(this.panel26); + this.panel24.Controls.Add(this.panel25); + this.panel24.Dock = System.Windows.Forms.DockStyle.Top; + this.panel24.Location = new System.Drawing.Point(0, 0); + this.panel24.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel24.Name = "panel24"; + this.panel24.Size = new System.Drawing.Size(2347, 976); + this.panel24.TabIndex = 0; + // + // panel26 + // + this.panel26.Controls.Add(this.panel45); + this.panel26.Controls.Add(this.panel44); + this.panel26.Controls.Add(this.glacialList1); + this.panel26.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel26.Location = new System.Drawing.Point(380, 0); + this.panel26.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel26.Name = "panel26"; + this.panel26.Size = new System.Drawing.Size(1967, 976); + this.panel26.TabIndex = 1; + // + // panel45 + // + this.panel45.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel45.Controls.Add(this.button3); + this.panel45.Controls.Add(this.button4); + this.panel45.Controls.Add(this.textBox4); + this.panel45.Controls.Add(this.label25); + this.panel45.Location = new System.Drawing.Point(296, 592); + this.panel45.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel45.Name = "panel45"; + this.panel45.Size = new System.Drawing.Size(1281, 132); + this.panel45.TabIndex = 2; + // + // button3 + // + this.button3.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.Location = new System.Drawing.Point(1129, 38); + this.button3.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(147, 52); + this.button3.TabIndex = 5; + this.button3.Text = "取消"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // button4 + // + this.button4.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button4.Location = new System.Drawing.Point(951, 38); + this.button4.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(147, 52); + this.button4.TabIndex = 4; + this.button4.Text = "切换"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // textBox4 + // + this.textBox4.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.textBox4.Location = new System.Drawing.Point(308, 39); + this.textBox4.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.textBox4.Name = "textBox4"; + this.textBox4.Size = new System.Drawing.Size(605, 49); + this.textBox4.TabIndex = 3; + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label25.Location = new System.Drawing.Point(26, 46); + this.label25.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(283, 37); + this.label25.TabIndex = 2; + this.label25.Text = "扫描模具条码:"; + this.label25.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel44 + // + this.panel44.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel44.Controls.Add(this.button2); + this.panel44.Controls.Add(this.button1); + this.panel44.Controls.Add(this.textBox3); + this.panel44.Controls.Add(this.label24); + this.panel44.Location = new System.Drawing.Point(330, 318); + this.panel44.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel44.Name = "panel44"; + this.panel44.Size = new System.Drawing.Size(1281, 132); + this.panel44.TabIndex = 1; + // + // button2 + // + this.button2.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.Location = new System.Drawing.Point(1097, 38); + this.button2.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(147, 52); + this.button2.TabIndex = 3; + this.button2.Text = "取消"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button1 + // + this.button1.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button1.Location = new System.Drawing.Point(941, 35); + this.button1.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(147, 52); + this.button1.TabIndex = 2; + this.button1.Text = "确定"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // textBox3 + // + this.textBox3.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.textBox3.Location = new System.Drawing.Point(191, 38); + this.textBox3.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(676, 49); + this.textBox3.TabIndex = 1; + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label24.Location = new System.Drawing.Point(25, 46); + this.label24.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(169, 37); + this.label24.TabIndex = 0; + this.label24.Text = "箱单号:"; + this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // glacialList1 + // + this.glacialList1.AllowColumnResize = true; + this.glacialList1.AllowMultiselect = false; + this.glacialList1.AlternateBackground = System.Drawing.Color.DarkGreen; + this.glacialList1.AlternatingColors = false; + this.glacialList1.AutoHeight = true; + this.glacialList1.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.glacialList1.BackgroundStretchToFit = true; + glColumn1.ActivatedEmbeddedType = GlacialComponents.Controls.GLActivatedEmbeddedTypes.None; + glColumn1.CheckBoxes = false; + glColumn1.ImageIndex = -1; + glColumn1.Name = "条码"; + glColumn1.NumericSort = false; + glColumn1.Text = "条码"; + glColumn1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + glColumn1.Width = 350; + glColumn2.ActivatedEmbeddedType = GlacialComponents.Controls.GLActivatedEmbeddedTypes.None; + glColumn2.CheckBoxes = false; + glColumn2.ImageIndex = -1; + glColumn2.Name = "产品名称"; + glColumn2.NumericSort = false; + glColumn2.Text = "产品名称"; + glColumn2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + glColumn2.Width = 320; + glColumn3.ActivatedEmbeddedType = GlacialComponents.Controls.GLActivatedEmbeddedTypes.None; + glColumn3.CheckBoxes = false; + glColumn3.ImageIndex = -1; + glColumn3.Name = "打印方式"; + glColumn3.NumericSort = false; + glColumn3.Text = "打印方式"; + glColumn3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + glColumn3.Width = 150; + glColumn4.ActivatedEmbeddedType = GlacialComponents.Controls.GLActivatedEmbeddedTypes.None; + glColumn4.CheckBoxes = false; + glColumn4.ImageIndex = -1; + glColumn4.Name = "打印时间"; + glColumn4.NumericSort = false; + glColumn4.Text = "打印时间"; + glColumn4.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + glColumn4.Width = 270; + this.glacialList1.Columns.AddRange(new GlacialComponents.Controls.GLColumn[] { + glColumn1, + glColumn2, + glColumn3, + glColumn4}); + this.glacialList1.ControlStyle = GlacialComponents.Controls.GLControlStyles.Normal; + this.glacialList1.Dock = System.Windows.Forms.DockStyle.Fill; + this.glacialList1.Font = new System.Drawing.Font("宋体", 15.75F); + this.glacialList1.FullRowSelect = true; + this.glacialList1.GridColor = System.Drawing.Color.DeepSkyBlue; + this.glacialList1.GridLines = GlacialComponents.Controls.GLGridLines.gridBoth; + this.glacialList1.GridLineStyle = GlacialComponents.Controls.GLGridLineStyles.gridSolid; + this.glacialList1.GridTypes = GlacialComponents.Controls.GLGridTypes.gridNormal; + this.glacialList1.HeaderHeight = 40; + this.glacialList1.HeaderVisible = true; + this.glacialList1.HeaderWordWrap = false; + this.glacialList1.HotColumnTracking = false; + this.glacialList1.HotItemTracking = false; + this.glacialList1.HotTrackingColor = System.Drawing.Color.LightGray; + this.glacialList1.HoverEvents = false; + this.glacialList1.HoverTime = 1; + this.glacialList1.ImageList = null; + this.glacialList1.ItemHeight = 50; + this.glacialList1.ItemWordWrap = false; + this.glacialList1.Location = new System.Drawing.Point(0, 0); + this.glacialList1.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.glacialList1.Name = "glacialList1"; + this.glacialList1.Selectable = true; + this.glacialList1.SelectedTextColor = System.Drawing.Color.White; + this.glacialList1.SelectionColor = System.Drawing.Color.DarkBlue; + this.glacialList1.ShowBorder = true; + this.glacialList1.ShowFocusRect = false; + this.glacialList1.Size = new System.Drawing.Size(1967, 976); + this.glacialList1.SortType = GlacialComponents.Controls.SortTypes.InsertionSort; + this.glacialList1.SuperFlatHeaderColor = System.Drawing.Color.White; + this.glacialList1.TabIndex = 0; + this.glacialList1.Text = "glacialList1"; + this.glacialList1.Click += new System.EventHandler(this.glacialList1_Click); + // + // panel25 + // + this.panel25.Controls.Add(this.tableLayoutPanel2); + this.panel25.Controls.Add(this.panel36); + this.panel25.Dock = System.Windows.Forms.DockStyle.Left; + this.panel25.Location = new System.Drawing.Point(0, 0); + this.panel25.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel25.Name = "panel25"; + this.panel25.Size = new System.Drawing.Size(380, 976); + this.panel25.TabIndex = 0; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.ColumnCount = 1; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.Controls.Add(this.panel38, 0, 0); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 406); + this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 1; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 570F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 570F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(380, 570); + this.tableLayoutPanel2.TabIndex = 1; + // + // panel38 + // + this.panel38.BackColor = System.Drawing.Color.DeepSkyBlue; + this.panel38.Controls.Add(this.label27); + this.panel38.Controls.Add(this.label26); + this.panel38.Controls.Add(this.label17); + this.panel38.Controls.Add(this.label16); + this.panel38.Location = new System.Drawing.Point(5, 4); + this.panel38.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel38.Name = "panel38"; + this.panel38.Size = new System.Drawing.Size(370, 562); + this.panel38.TabIndex = 1; + // + // label27 + // + this.label27.Font = new System.Drawing.Font("宋体", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label27.Location = new System.Drawing.Point(-3, 171); + this.label27.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(291, 73); + this.label27.TabIndex = 3; + this.label27.Text = "9999"; + this.label27.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label26 + // + this.label26.AutoSize = true; + this.label26.Font = new System.Drawing.Font("宋体", 13.875F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label26.Location = new System.Drawing.Point(0, 136); + this.label26.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(151, 33); + this.label26.TabIndex = 2; + this.label26.Text = "完成数量"; + // + // label17 + // + this.label17.Font = new System.Drawing.Font("宋体", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.Location = new System.Drawing.Point(-3, 49); + this.label17.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(291, 74); + this.label17.TabIndex = 1; + this.label17.Text = "9999"; + this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Font = new System.Drawing.Font("宋体", 13.875F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.Location = new System.Drawing.Point(0, 10); + this.label16.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(151, 33); + this.label16.TabIndex = 0; + this.label16.Text = "计划数量"; + // + // panel36 + // + this.panel36.Controls.Add(this.tableLayoutPanel1); + this.panel36.Dock = System.Windows.Forms.DockStyle.Top; + this.panel36.Location = new System.Drawing.Point(0, 0); + this.panel36.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel36.Name = "panel36"; + this.panel36.Size = new System.Drawing.Size(380, 406); + this.panel36.TabIndex = 0; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.label11, 0, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 1; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 406F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(380, 406); + this.tableLayoutPanel1.TabIndex = 1; + // + // label11 + // + this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label11.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label11.Location = new System.Drawing.Point(5, 0); + this.label11.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(370, 406); + this.label11.TabIndex = 0; + this.label11.Text = "打印记录:"; + this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // panel8 + // + this.panel8.Controls.Add(this.panel10); + this.panel8.Controls.Add(this.panel9); + this.panel8.Dock = System.Windows.Forms.DockStyle.Top; + this.panel8.Location = new System.Drawing.Point(0, 0); + this.panel8.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel8.Name = "panel8"; + this.panel8.Size = new System.Drawing.Size(2347, 91); + this.panel8.TabIndex = 0; + // + // panel10 + // + this.panel10.Controls.Add(this.panel12); + this.panel10.Controls.Add(this.panel11); + this.panel10.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel10.Location = new System.Drawing.Point(380, 0); + this.panel10.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel10.Name = "panel10"; + this.panel10.Size = new System.Drawing.Size(1967, 91); + this.panel10.TabIndex = 2; + // + // panel12 + // + this.panel12.Controls.Add(this.panel16); + this.panel12.Controls.Add(this.panel15); + this.panel12.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel12.Location = new System.Drawing.Point(451, 0); + this.panel12.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel12.Name = "panel12"; + this.panel12.Size = new System.Drawing.Size(1516, 91); + this.panel12.TabIndex = 1; + // + // panel16 + // + this.panel16.Controls.Add(this.panel20); + this.panel16.Controls.Add(this.panel19); + this.panel16.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel16.Location = new System.Drawing.Point(467, 0); + this.panel16.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel16.Name = "panel16"; + this.panel16.Size = new System.Drawing.Size(1049, 91); + this.panel16.TabIndex = 1; + // + // panel20 + // + this.panel20.Controls.Add(this.label10); + this.panel20.Controls.Add(this.panel22); + this.panel20.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel20.Location = new System.Drawing.Point(428, 0); + this.panel20.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel20.Name = "panel20"; + this.panel20.Size = new System.Drawing.Size(621, 91); + this.panel20.TabIndex = 1; + // + // label10 + // + this.label10.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label10.Dock = System.Windows.Forms.DockStyle.Fill; + this.label10.Location = new System.Drawing.Point(341, 0); + this.label10.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(280, 91); + this.label10.TabIndex = 1; + this.label10.Text = "停机录入"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label10.Click += new System.EventHandler(this.label10_Click); + // + // panel22 + // + this.panel22.Controls.Add(this.label9); + this.panel22.Dock = System.Windows.Forms.DockStyle.Left; + this.panel22.Location = new System.Drawing.Point(0, 0); + this.panel22.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel22.Name = "panel22"; + this.panel22.Size = new System.Drawing.Size(341, 91); + this.panel22.TabIndex = 0; + // + // label9 + // + this.label9.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label9.Dock = System.Windows.Forms.DockStyle.Fill; + this.label9.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold); + this.label9.Location = new System.Drawing.Point(0, 0); + this.label9.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(341, 91); + this.label9.TabIndex = 0; + this.label9.Text = "质量录入"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label9.Click += new System.EventHandler(this.label9_Click); + // + // panel19 + // + this.panel19.Controls.Add(this.label8); + this.panel19.Controls.Add(this.panel21); + this.panel19.Dock = System.Windows.Forms.DockStyle.Left; + this.panel19.Location = new System.Drawing.Point(0, 0); + this.panel19.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel19.Name = "panel19"; + this.panel19.Size = new System.Drawing.Size(428, 91); + this.panel19.TabIndex = 0; + // + // label8 + // + this.label8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label8.Dock = System.Windows.Forms.DockStyle.Fill; + this.label8.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold); + this.label8.Location = new System.Drawing.Point(202, 0); + this.label8.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(226, 91); + this.label8.TabIndex = 1; + this.label8.Text = "cy"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel21 + // + this.panel21.Controls.Add(this.label7); + this.panel21.Dock = System.Windows.Forms.DockStyle.Left; + this.panel21.Location = new System.Drawing.Point(0, 0); + this.panel21.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel21.Name = "panel21"; + this.panel21.Size = new System.Drawing.Size(202, 91); + this.panel21.TabIndex = 0; + // + // label7 + // + this.label7.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label7.Dock = System.Windows.Forms.DockStyle.Fill; + this.label7.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold); + this.label7.Location = new System.Drawing.Point(0, 0); + this.label7.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(202, 91); + this.label7.TabIndex = 0; + this.label7.Text = "用户:"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label7.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.label7_MouseDoubleClick); + // + // panel15 + // + this.panel15.Controls.Add(this.panel18); + this.panel15.Controls.Add(this.panel17); + this.panel15.Dock = System.Windows.Forms.DockStyle.Left; + this.panel15.Location = new System.Drawing.Point(0, 0); + this.panel15.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel15.Name = "panel15"; + this.panel15.Size = new System.Drawing.Size(467, 91); + this.panel15.TabIndex = 0; + // + // panel18 + // + this.panel18.Controls.Add(this.label6); + this.panel18.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel18.Location = new System.Drawing.Point(202, 0); + this.panel18.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel18.Name = "panel18"; + this.panel18.Size = new System.Drawing.Size(265, 91); + this.panel18.TabIndex = 1; + // + // label6 + // + this.label6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label6.Dock = System.Windows.Forms.DockStyle.Fill; + this.label6.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold); + this.label6.Location = new System.Drawing.Point(0, 0); + this.label6.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(265, 91); + this.label6.TabIndex = 0; + this.label6.Text = "IM01"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel17 + // + this.panel17.Controls.Add(this.label5); + this.panel17.Dock = System.Windows.Forms.DockStyle.Left; + this.panel17.Location = new System.Drawing.Point(0, 0); + this.panel17.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel17.Name = "panel17"; + this.panel17.Size = new System.Drawing.Size(202, 91); + this.panel17.TabIndex = 0; + // + // label5 + // + this.label5.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label5.Dock = System.Windows.Forms.DockStyle.Fill; + this.label5.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold); + this.label5.Location = new System.Drawing.Point(0, 0); + this.label5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(202, 91); + this.label5.TabIndex = 0; + this.label5.Text = "工位:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label5.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.label5_MouseDoubleClick); + // + // panel11 + // + this.panel11.Controls.Add(this.panel14); + this.panel11.Controls.Add(this.panel13); + this.panel11.Dock = System.Windows.Forms.DockStyle.Left; + this.panel11.Location = new System.Drawing.Point(0, 0); + this.panel11.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel11.Name = "panel11"; + this.panel11.Size = new System.Drawing.Size(451, 91); + this.panel11.TabIndex = 0; + // + // panel14 + // + this.panel14.Controls.Add(this.comboBox1); + this.panel14.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel14.Location = new System.Drawing.Point(202, 0); + this.panel14.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel14.Name = "panel14"; + this.panel14.Size = new System.Drawing.Size(249, 91); + this.panel14.TabIndex = 1; + // + // comboBox1 + // + this.comboBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox1.Font = new System.Drawing.Font("宋体", 32F, System.Drawing.FontStyle.Bold); + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Items.AddRange(new object[] { + "A班", + "B班"}); + this.comboBox1.Location = new System.Drawing.Point(0, 0); + this.comboBox1.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(249, 83); + this.comboBox1.TabIndex = 0; + // + // panel13 + // + this.panel13.Controls.Add(this.label4); + this.panel13.Dock = System.Windows.Forms.DockStyle.Left; + this.panel13.Location = new System.Drawing.Point(0, 0); + this.panel13.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel13.Name = "panel13"; + this.panel13.Size = new System.Drawing.Size(202, 91); + this.panel13.TabIndex = 0; + // + // label4 + // + this.label4.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label4.Dock = System.Windows.Forms.DockStyle.Fill; + this.label4.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold); + this.label4.Location = new System.Drawing.Point(0, 0); + this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(202, 91); + this.label4.TabIndex = 0; + this.label4.Text = "班组:"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel9 + // + this.panel9.Controls.Add(this.label3); + this.panel9.Dock = System.Windows.Forms.DockStyle.Left; + this.panel9.Location = new System.Drawing.Point(0, 0); + this.panel9.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel9.Name = "panel9"; + this.panel9.Size = new System.Drawing.Size(380, 91); + this.panel9.TabIndex = 0; + // + // label3 + // + this.label3.BackColor = System.Drawing.Color.DeepSkyBlue; + this.label3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label3.Dock = System.Windows.Forms.DockStyle.Fill; + this.label3.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold); + this.label3.Location = new System.Drawing.Point(0, 0); + this.label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(380, 91); + this.label3.TabIndex = 0; + this.label3.Text = "用户信息:"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel2 + // + this.panel2.Controls.Add(this.panel4); + this.panel2.Controls.Add(this.panel3); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(2347, 147); + this.panel2.TabIndex = 0; + // + // panel4 + // + this.panel4.Controls.Add(this.panel6); + this.panel4.Controls.Add(this.panel5); + this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel4.Location = new System.Drawing.Point(311, 0); + this.panel4.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(2036, 147); + this.panel4.TabIndex = 1; + // + // panel6 + // + this.panel6.Controls.Add(this.label1); + this.panel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel6.Location = new System.Drawing.Point(0, 0); + this.panel6.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(1684, 147); + this.panel6.TabIndex = 1; + // + // label1 + // + this.label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.Font = new System.Drawing.Font("宋体", 36F, System.Drawing.FontStyle.Bold); + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(1684, 147); + this.label1.TabIndex = 0; + this.label1.Text = "注塑车间条码打印"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel5 + // + this.panel5.Controls.Add(this.label2); + this.panel5.Dock = System.Windows.Forms.DockStyle.Right; + this.panel5.Location = new System.Drawing.Point(1684, 0); + this.panel5.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(352, 147); + this.panel5.TabIndex = 0; + // + // label2 + // + this.label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label2.Dock = System.Windows.Forms.DockStyle.Fill; + this.label2.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold); + this.label2.Location = new System.Drawing.Point(0, 0); + this.label2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(352, 147); + this.label2.TabIndex = 0; + this.label2.Text = "2019-05-29 10:30:31"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label2.Click += new System.EventHandler(this.label2_Click); + // + // panel3 + // + this.panel3.Controls.Add(this.pictureBox1); + this.panel3.Dock = System.Windows.Forms.DockStyle.Left; + this.panel3.Location = new System.Drawing.Point(0, 0); + this.panel3.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(311, 147); + this.panel3.TabIndex = 0; + // + // pictureBox1 + // + this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(5, 4); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(307, 139); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // label35 + // + this.label35.AutoSize = true; + this.label35.Font = new System.Drawing.Font("宋体", 16.125F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label35.Location = new System.Drawing.Point(3, 0); + this.label35.Name = "label35"; + this.label35.Size = new System.Drawing.Size(0, 43); + this.label35.TabIndex = 5; + // + // label39 + // + this.label39.AutoSize = true; + this.label39.Font = new System.Drawing.Font("宋体", 16.125F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label39.Location = new System.Drawing.Point(3, 0); + this.label39.Name = "label39"; + this.label39.Size = new System.Drawing.Size(0, 43); + this.label39.TabIndex = 5; + // + // timer1 + // + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // serialPort1 + // + this.serialPort1.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort1_DataReceived); + // + // timer2 + // + this.timer2.Interval = 5000; + this.timer2.Tick += new System.EventHandler(this.timer2_Tick); + // + // timer3 + // + this.timer3.Enabled = true; + this.timer3.Interval = 5000; + this.timer3.Tick += new System.EventHandler(this.timer3_Tick); + // + // FrmMain2411 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(2347, 1601); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.Name = "FrmMain2411"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "FrmMain"; + this.Load += new System.EventHandler(this.FrmMain_Load); + this.panel1.ResumeLayout(false); + this.panel7.ResumeLayout(false); + this.panel23.ResumeLayout(false); + this.panel27.ResumeLayout(false); + this.panel29.ResumeLayout(false); + this.panel31.ResumeLayout(false); + this.panel33.ResumeLayout(false); + this.panel35.ResumeLayout(false); + this.panel37.ResumeLayout(false); + this.panel40.ResumeLayout(false); + this.panel42.ResumeLayout(false); + this.panel39.ResumeLayout(false); + this.panel39.PerformLayout(); + this.panel43.ResumeLayout(false); + this.panel41.ResumeLayout(false); + this.panel34.ResumeLayout(false); + this.panel32.ResumeLayout(false); + this.panel30.ResumeLayout(false); + this.panel28.ResumeLayout(false); + this.panel24.ResumeLayout(false); + this.panel26.ResumeLayout(false); + this.panel45.ResumeLayout(false); + this.panel45.PerformLayout(); + this.panel44.ResumeLayout(false); + this.panel44.PerformLayout(); + this.panel25.ResumeLayout(false); + this.tableLayoutPanel2.ResumeLayout(false); + this.panel38.ResumeLayout(false); + this.panel38.PerformLayout(); + this.panel36.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + this.panel8.ResumeLayout(false); + this.panel10.ResumeLayout(false); + this.panel12.ResumeLayout(false); + this.panel16.ResumeLayout(false); + this.panel20.ResumeLayout(false); + this.panel22.ResumeLayout(false); + this.panel19.ResumeLayout(false); + this.panel21.ResumeLayout(false); + this.panel15.ResumeLayout(false); + this.panel18.ResumeLayout(false); + this.panel17.ResumeLayout(false); + this.panel11.ResumeLayout(false); + this.panel14.ResumeLayout(false); + this.panel13.ResumeLayout(false); + this.panel9.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.panel6.ResumeLayout(false); + this.panel5.ResumeLayout(false); + this.panel3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Panel panel6; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Panel panel8; + private System.Windows.Forms.Panel panel9; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Panel panel23; + private System.Windows.Forms.Panel panel24; + private System.Windows.Forms.Panel panel25; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Panel panel26; + private GlacialComponents.Controls.GlacialList glacialList1; + private System.Windows.Forms.Panel panel27; + private System.Windows.Forms.Panel panel28; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Panel panel29; + private System.Windows.Forms.Panel panel30; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Panel panel31; + private System.Windows.Forms.Panel panel32; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Panel panel33; + private System.Windows.Forms.Panel panel34; + private System.Windows.Forms.Panel panel35; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Panel panel37; + private System.Windows.Forms.Panel panel39; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.Panel panel40; + private System.Windows.Forms.Panel panel42; + private System.Windows.Forms.Panel panel43; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.Panel panel41; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.Panel panel44; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.Panel panel45; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.Label label25; + private System.IO.Ports.SerialPort serialPort1; + private System.Windows.Forms.Timer timer2; + private System.Windows.Forms.Panel panel36; + private System.Windows.Forms.Timer timer3; + private System.Windows.Forms.Panel panel10; + private System.Windows.Forms.Panel panel12; + private System.Windows.Forms.Panel panel16; + private System.Windows.Forms.Panel panel20; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Panel panel22; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Panel panel19; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Panel panel21; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Panel panel15; + private System.Windows.Forms.Panel panel18; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Panel panel17; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Panel panel11; + private System.Windows.Forms.Panel panel14; + public System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.Panel panel13; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.Panel panel38; + private System.Windows.Forms.Label label27; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label35; + private System.Windows.Forms.Label label39; + } +} \ No newline at end of file diff --git a/InjectionPC/FrmMain2411.cs b/InjectionPC/FrmMain2411.cs new file mode 100644 index 0000000..1501464 --- /dev/null +++ b/InjectionPC/FrmMain2411.cs @@ -0,0 +1,4337 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Configuration; +using System.Data; +using System.Diagnostics; +using System.Diagnostics.Eventing.Reader; +using System.Drawing; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using MESClassLibrary.BLL; +using MESClassLibrary.BLL.BasicInfo; +using MESClassLibrary.BLL.Injection; +using MESClassLibrary.BLL.Inspection; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.BLL.Mistake247; +using MESClassLibrary.BLL.Weight; +using MESClassLibrary.DAL; +using MESClassLibrary.Model; +using OPCAutomation; +using System.IO; +using System.IO.Ports; +using System.Net.Mime; +using System.Net.NetworkInformation; +using gregn6Lib; +using MESClassLibrary; +using MESClassLibrary.EFModel; + +namespace InjectionPC +{ + public partial class FrmMain2411 : Form + { + #region 变量 + + private string strHostIP; + private string strHostName; + private OPCServer opcServer; + private OPCGroups opcGroups; + private OPCGroup opcGroup1; + private OPCItems opcItems1; + private OPCItem[] opcItemm1; + private OPCGroup opcGroup2; + private OPCItems opcItems2; + private OPCItem[] opcItemm2; + private string[] ItemIDs; + object ItemValues; + object Qualities; + object TimeStamps; + public bool Connected = false; + private BasicBLL1 _basicBLL1 = new BasicBLL1(); + private UniqueBll _uniqueBll = new UniqueBll(); + private bool _isPrintPackage = true; + private BarCodeBLL _barCodeBLL = new BarCodeBLL(); + private InjectionBoxBLL _injectionBoxBLL = new InjectionBoxBLL(); + private DataTable tb_Plastic = new DataTable(); + private string _currentStationID = string.Empty; + private const string _leftType = "0"; //模具1 + private const string _rightType = "1";//模具2 + private DateTime _loginTime = DateTime.Now; + + private WmsBLL _wmsBll = new WmsBLL(); + //零件用的打印机编号 <零件号+工位ID,打印机编号> + private Dictionary _printNameDict = new Dictionary(); + private PlasticBLL _plasticBLL = new PlasticBLL(); + #endregion + + public FrmMain2411() + { + InitializeComponent(); + this.Size = new Size(1280, 920); + } + + public string planID = "", productID = "", nextPlanID = "", nextproductID = "",aa=""; + + public static int ID = 0; + DateTime lastTime = DateTime.Now; + //public string Conn = ConfigurationManager.ConnectionStrings["SqlConnStringWeight"].ConnectionString; + + bool status = false; + + private static int InterVal_Seconds = 0; + + private void FrmMain_Load(object sender, EventArgs e) + { + try + { + _currentStationID = getStationID(Program.station); + tb_Plastic = GetPlastic(); + Control.CheckForIllegalCrossThreadCalls = false; + //this.WindowState = FormWindowState.Maximized; + Thread t = new Thread(new ThreadStart(TimeGo)); + t.Start(); + timer1.Interval = Program.interVal; + timer1.Enabled=false; + panel44.Visible = false; + panel45.Visible = false; + textBox4.Text = ""; + textBox3.Text = ""; + label6.Text = Program.station; //工位 + label8.Text = Program.OperatorName; //用户 + //InterVal_Seconds = GetSeconds(label6.Text); + GetClass(); + comboBox1.Text = "A班"; //班次 + Program.cc = comboBox1.Text; + initProduct(); + textBox1.Text = Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + + Program.ProductDate.Substring(8, 2); //批次 + initBarCode(); + label23.Enabled = false; + label23.BackColor = System.Drawing.Color.Gray; + + DataTable plasticTable = GetPlastic(); + foreach(DataRow dr in plasticTable.Rows) + { + string key = dr["PartNo"].ToString() + dr["StationID"].ToString(); + if (_printNameDict.Keys.Contains(key) == false) + { + _printNameDict.Add(key, dr["PrinterNo"].ToString()); + } + } + + + Ping p1 = new Ping(); + + PingReply reply = p1.Send("10.60.101.60"); //发送主机名或Ip地址 + StringBuilder sbuilder; + if (reply.Status == IPStatus.Success) + { + status = true; + label2.BackColor = Color.LightGray; + } + else + { + status = false; + label2.BackColor = Color.Red; + } + + //comBoxSizeL.DataSource = _basicBLL1.GetPackageSize(); + //comBoxSizeL.DisplayMember = "describe"; + //comBoxSizeL.ValueMember = "Count"; + //comBoxSizeR.DataSource = _basicBLL1.GetPackageSize(); + //comBoxSizeR.DisplayMember = "describe"; + //comBoxSizeR.ValueMember = "Count"; + + + + + comboBox2.MouseWheel += new MouseEventHandler(comboBox2_MouseWheel); + + #region 获取当前生产信息 + + initPlan(); + + #endregion + + #region 测试opc暂时注销 + //if (ConfigurationManager.AppSettings["StationMode"].ToString() == "1") //自动称重 + //{ + // timer1.Start(); + //} + //else + //{ + // timer1.Stop(); + + // #region 设置串口属性 + + // serialPort1.PortName = ConfigurationManager.AppSettings["PortName"].ToString(); + // serialPort1.BaudRate = 9600; + // serialPort1.DataBits = 8; + // serialPort1.StopBits = (StopBits)1; + // serialPort1.Parity = 0; + // serialPort1.ReadTimeout = 5000; + + // if (serialPort1.IsOpen) + // { + // serialPort1.Close(); + // serialPort1.Open(); + // } + // else + // { + // serialPort1.Open(); + // } + + // #endregion + //} + #endregion + + #region 连接PLC + + try + { + if (CreateServer()) + { + if (ConnectServer(strHostIP, "Kepware.KEPServerEX.V6")) + { + Connected = true; + + #region 创建组 + + opcGroups = opcServer.OPCGroups; + opcGroup1 = opcGroups.Add("Mould"); + SetGroupProperty(opcGroup1, 500); + opcGroup2 = opcGroups.Add("Break"); + SetGroupProperty(opcGroup2, 500); + + #endregion + + #region 创建项 + + opcItems1 = opcGroup1.OPCItems; + opcItems1.DefaultIsActive = true; + + PLCMouldBLL PLCbll = new PLCMouldBLL(); + PLCBreakBLL bbll = new PLCBreakBLL(); + + DataTable PLCdt = PLCbll.SearchMould(Program.station); + if (PLCdt != null && PLCdt.Rows.Count > 0) + { + opcItemm1 = new OPCItem[PLCdt.Rows.Count]; + for (int i = 0; i < PLCdt.Rows.Count; i++) + { + opcItemm1[i] = opcItems1.AddItem(PLCdt.Rows[i]["Address"].ToString(), i); + } + } + + Thread.Sleep(200); + + opcGroup1.DataChange += new DIOPCGroupEvent_DataChangeEventHandler(opcGroup1_DataChange); + + #endregion + } + else + { + MessageBox.Show("连接到OPC服务器失败!", "提示", MessageBoxButtons.OK); + Connected = false; + LogHelper.WriteLog("连接到OPC服务器失败!"); + return; + } + } + else + { + MessageBox.Show("创建OPC服务失败!", "提示", MessageBoxButtons.OK); + Connected = false; + LogHelper.WriteLog("创建OPC服务失败!"); + return; + } + } + catch(Exception ex) + { + MessageBox.Show("创建OPC服务失败!", "提示", MessageBoxButtons.OK); + Connected = false; + LogHelper.WriteLog("创建OPC服务失败!"); + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return; + } + + + #endregion + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + + } + + private DataTable GetPlastic() + { + return _plasticBLL.SearchAllInfo(_currentStationID); + } + + private void initPlan() + { + try + { + InjectionPlanBLL bll = new InjectionPlanBLL(); + ProductBLL productBll = new ProductBLL(); + DataTable dt = bll.SearchInfoByName(Program.station); + if (dt != null && dt.Rows.Count > 0) + { + planID = dt.Rows[0]["InjectionPlanID"].ToString(); + aa = dt.Rows[0]["PartNo"].ToString(); + label17.Text = dt.Rows[0]["PlanCount"].ToString(); + + DataTable dt2 = bll.SearchQty(planID); + if (dt2 != null && dt2.Rows.Count > 0) + { + label27.Text = dt2.Rows[0]["ProductCount"].ToString(); + } + else + { + label27.Text = "0"; + } + + string[] partNo = dt.Rows[0]["PartNo"].ToString().Split(','); + + label12.Text = "当前生产计划为:"; + + for (int i = 0; i < partNo.Length; i++) + { + DataTable sdt = productBll.SearchInfoByPartNo(partNo[i].ToString().Trim()); + if (sdt != null && sdt.Rows.Count > 0) + { + label12.Text += "零件号" + partNo[i].ToString().Trim() + ",零件名称" + sdt.Rows[0]["ProductName"].ToString() + ";"; + } + } + } + else + { + label12.Text = "暂无生产计划"; + label17.Text = "0"; + label27.Text = "0"; + } + + if (Convert.ToDouble(label17.Text) < Convert.ToDouble(label27.Text)) + { + label27.BackColor = Color.Red; + } + else + { + label27.BackColor = Color.DeepSkyBlue; + } + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(),MethodBase.GetCurrentMethod()); + } + } + + void comboBox2_MouseWheel(object sender, MouseEventArgs e) + { + HandledMouseEventArgs h = e as HandledMouseEventArgs; + if (h != null) + { + h.Handled = true; + } + } + + void opcGroup1_DataChange(int TransactionID, int NumItems, ref Array ClientHandles, ref Array ItemValues,ref Array Qualities, ref Array TimeStamps) + { + try + { + InjectionPlanBLL bll = new InjectionPlanBLL(); + BarCodeBLL brbll = new BarCodeBLL(); + BarCodeModel md = new BarCodeModel(); + ProductBLL productBll = new ProductBLL(); + PlasticBLL pbll= _plasticBLL; + InjectionBoxBLL boxbll=new InjectionBoxBLL(); + InjectionBoxModel boxmd=new InjectionBoxModel(); + DataTable dt2 = null; + string code = "", OneCode = ""; + string newcode = "", newcode1 = "", NewOneCode = "", NewOneCode1 = ""; + string IsPack = "", IsOne = "", QLevel="",IsPaint="",PartName="",IsSame="",IsSupply=""; + string ManufacturerName = ""; + string filename = "", printName = "", printBoxName=""; + int MaxCount = 0, CurrentCount = 0; + + if (status == false) + { + MessageBox.Show("连接服务器失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + for (int i = 1; i <= NumItems; i++) + { + if ((ItemValues!=null && ItemValues.GetValue(i).ToString() == "True") || IsTest ==true) + { + LogSysBLL.AddInfo("true" + label6.Text, MethodBase.GetCurrentMethod()); + GetClass(); + + #region 增加时间差判定 + + //DateTime lastTime = GetPrintTime(label6.Text); + + //long ts = TimeDiff(lastTime, DateTime.Now); + TimeSpan span=DateTime.Now - lastTime; + if (span.TotalSeconds < Convert.ToDouble(ConfigurationManager.AppSettings["InterValT"])) + { + return; + } + + #endregion + + //comboBox1.Text = "A班"; //班次 + textBox1.Text = Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + + Program.ProductDate.Substring(8, 2); //批次 + #region 查找当前计划 + + DataTable dt = bll.SearchInfoByName(Program.station); + if (dt != null && dt.Rows.Count > 0) + { + + if (aa != dt.Rows[0]["PartNo"].ToString()) + { + DialogResult result=MessageBox.Show("计划有变更,请确认!", "提示", MessageBoxButtons.OKCancel, + MessageBoxIcon.Information); + if (result == DialogResult.OK) + { + + planID = dt.Rows[0]["InjectionPlanID"].ToString(); + string[] partNo = dt.Rows[0]["PartNo"].ToString().Split(','); + //string[] stockNo = dt.Rows[0]["StockNo"].ToString().Split(','); + string[] stockNo = new string[partNo.Length]; + string ProductNature = dt.Rows[0]["ProductNature"].ToString(); + aa = dt.Rows[0]["PartNo"].ToString(); + + //ManufacturerName = dt.Rows[0]["ManufacturerName"].ToString(); + DataTable dtM = productBll.SearchInfoByPartNo(partNo[0]); + if (dtM != null && dtM.Rows.Count > 0) + { + ManufacturerName = dtM.Rows[0]["ManufacturerName"].ToString(); + } + + #region 判断有几个零件号 + string mould = "0"; + for (int j = 0; j < partNo.Length; j++) + { + #region 根据零件号查找存货代码 + + DataTable sdt = productBll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + if (sdt != null && sdt.Rows.Count > 0) + { + stockNo[j] = sdt.Rows[0]["StockNo"].ToString(); + IsSame = sdt.Rows[0]["IsSame"].ToString(); + } + else + { + stockNo[j] = ""; + } + + #endregion + + #region 获取零件属性 + + DataTable dtx = productBll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + if (dtx != null && dtx.Rows.Count > 0) + { + QLevel = dtx.Rows[0]["QLevel"].ToString(); + IsOne = dtx.Rows[0]["IsPrintOneTag"].ToString(); + IsPack = dtx.Rows[0]["IsPrintPackList"].ToString(); + IsPaint = dtx.Rows[0]["IsPlating"].ToString(); + PartName = dtx.Rows[0]["ProductName"].ToString(); + IsSupply = dtx.Rows[0]["IsSupply"].ToString(); + } + + #endregion + + if (IsSame == "1")//一模两压相同的 + { + for (int k = 0; k < 2; k++) + { + #region 非直供件打印 + + if (IsSupply != "1") + { + if (ManufacturerName.Contains("蔚来")) + { + //DataTable dts = brbll.SearchInfoByPartNo1(partNo[j].ToString().Trim()); + //if (dts != null && dts.Rows.Count > 0) + //{ + // code = dts.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(code.Length - 4, 4)) + + // 1).ToString() + // .PadLeft(4, '0'); + //} + //else + //{ + // newcode = partNo[j].Trim() + "." + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "." + "0001"; + //} + + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(),true, mould, PartName, ref NewOneCode, ref newcode); + } + else + { + //dt2 = brbll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + //if (dt2 != null && dt2.Rows.Count > 0) + //{ + // code = dt2.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(code.Length - 4, 4)) + + // 1).ToString() + // .PadLeft(4, '0'); + // OneCode = dt2.Rows[0]["OneBarCode"].ToString().Trim(); + // NewOneCode = + // OneCode.Substring(0, OneCode.Length - 4) + + // (Convert.ToInt32(OneCode.Substring(OneCode.Length - 4, + // 4)) + + // 1).ToString().PadLeft(4, '0'); + //} + //else + //{ + // newcode = partNo[j].ToString().Trim() + "." + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "." + + // "0001"; + // NewOneCode = + // stockNo[j].ToString().Trim() + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "0001"; + //} + + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(), true, mould, PartName, ref NewOneCode, ref newcode); + + } + } + + #endregion + + #region 直供件打印 + + if (IsSupply == "1") + { + //DataTable dts = brbll.SearchInfoByPartNo1(partNo[j].ToString().Trim()); + //if (dts != null && dts.Rows.Count > 0) + //{ + // code = dts.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(23, 3)) + + // 1).ToString() + // .PadLeft(3, '0')+"#"; + //} + //else + //{ + // newcode = partNo[j].ToString().Trim() + "#" + QLevel+"#"+ + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "#" + "001"+"#"; + //} + + GetSupplyCode(partNo[j].ToString().Trim(), QLevel, true, mould, PartName, ref newcode); + } + + #endregion + + #region 插入数据tb_barCode + + md.ID = Guid.NewGuid().ToString(); + md.StationID = dt.Rows[0]["StationID"].ToString(); + md.OneBarCode = NewOneCode; + md.BarCode = newcode; + md.StockNo = stockNo[j].ToString().Trim(); + md.PartNo = partNo[j].ToString().Trim(); + md.PrintType = 0; + md.PlanID = planID; + md.ProductNature = ProductNature; + + //DataTable pdt = productBll.SearchIsImportByPartNo(partNo[j].ToString()); + //if (pdt != null && pdt.Rows.Count > 0) + //{ + // if (pdt.Rows[0]["isImport"].ToString() == "1") + // { + // md.Import = "国产料Kingfa"; + // } + // else + // { + // md.Import = ""; + // } + //} + + //if (brbll.Add_Info_New(md, Program.tableName) == false) + if (SaveBarCode (md, Program.tableName, true, mould) == false) + { + int a = 0; + for (int l = 0; l < 5; l++) + { + // if (brbll.Add_Info_New(md, Program.tableName)) + if (SaveBarCode(md, Program.tableName, true, mould) == false) + { + break; + } + + a += 1; + Thread.Sleep(200); + } + + if (a >= 4) + { + return; + } + //return; + } + + #endregion + + #region 打印条码,判断是否打印单个条码 + + #region 打印单个标签 + + if (IsOne == "1") + { + if (IsSupply != "1") + { + filename = ManufacturerName.Contains("蔚来") + ? System.AppDomain.CurrentDomain.BaseDirectory + + "wl.grf" + : System.AppDomain.CurrentDomain.BaseDirectory + + PrintMoudleName(); //new + } + else + { + filename = System.AppDomain.CurrentDomain.BaseDirectory + + PrintMoudleName(); + } + + + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" +_printNameDict[partNo[j].ToString().Trim()+ dt.Rows[0]["StationID"].ToString()]; + + string reportName = ConfigurationManager.AppSettings[printName] + .ToString(); + + DataTable headTable = GetPrintHeadTable(partNo[j].ToString().Trim(), PartName, NewOneCode, newcode); + + ReportHelper rp = new ReportHelper(filename, headTable, null, + (int) GRPaperOrientation.grpoDefault, 1, reportName); + + LogSysBLL.AddInfo( + GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + NewOneCode, + MethodBase.GetCurrentMethod()); + rp.Report.Print(false); + + } + + #endregion + + #endregion + + initBarCode(); + } + } + else//一模两压不同的 + { + if (IsSupply != "1") + { + #region 非直供件 + + if (ManufacturerName.Contains("蔚来")) + { + //DataTable dts = brbll.SearchInfoByPartNo1(partNo[j].ToString().Trim()); + //if (dts != null && dts.Rows.Count > 0) + //{ + // code = dt2.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(code.Length - 4, 4)) + + // 1).ToString() + // .PadLeft(4, '0') ; + //} + //else + //{ + // newcode = partNo[j].Trim() + "." + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "." + "0001"; + //} + + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(), true, mould, PartName, ref NewOneCode, ref newcode); + + } + else + { + //dt2 = brbll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + //if (dt2 != null && dt2.Rows.Count > 0) + //{ + // code = dt2.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(code.Length - 4, 4)) + + // 1) + // .ToString() + // .PadLeft(4, '0'); + // OneCode = dt2.Rows[0]["OneBarCode"].ToString().Trim(); + // NewOneCode = + // OneCode.Substring(0, OneCode.Length - 4) + + // (Convert.ToInt32(OneCode.Substring(OneCode.Length - 4, 4)) + + // 1) + // .ToString().PadLeft(4, '0'); + //} + //else + //{ + // newcode = partNo[j].ToString().Trim() + "." + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "." + "0001"; + // NewOneCode = + // stockNo[j].ToString().Trim() + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "0001"; + //} + + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(), true, mould, PartName, ref NewOneCode, ref newcode); + + } + + #endregion + } + else + { + #region 直供件 + //DataTable dts = brbll.SearchInfoByPartNo1(partNo[j].ToString().Trim()); + //if (dts != null && dts.Rows.Count > 0) + //{ + // code = dt2.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(23, 3)) + + // 1).ToString() + // .PadLeft(3, '0') + "#"; + //} + //else + //{ + // newcode = partNo[j].ToString().Trim() + "#" + QLevel + "#" + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "#" + "001" + "#"; + //} + + GetSupplyCode(partNo[j].ToString().Trim(), QLevel, true, mould, PartName, ref newcode); + #endregion + } + + #region 插入数据tb_barCode + + md.ID = Guid.NewGuid().ToString(); + md.StationID = dt.Rows[0]["StationID"].ToString(); + md.OneBarCode = NewOneCode; + md.BarCode = newcode; + md.StockNo = stockNo[j].ToString().Trim(); + md.PartNo = partNo[j].ToString().Trim(); + md.PrintType = 0; + md.PlanID = planID; + md.ProductNature = ProductNature; + + DataTable pdt = productBll.SearchIsImportByPartNo(partNo[j].ToString()); + if (pdt != null && pdt.Rows.Count > 0) + { + if (pdt.Rows[0]["isImport"].ToString() == "1") + { + md.Import = "国产料Kingfa"; + } + else + { + md.Import = ""; + } + } + + // if (brbll.Add_Info_New(md, Program.tableName) == false) + if (SaveBarCode(md, Program.tableName, true, mould) == false) + { + int a = 0; + for (int l = 0; l < 5; l++) + { + //if (brbll.Add_Info_New(md, Program.tableName)) + if (SaveBarCode(md, Program.tableName, true, mould) == false) + { + break; + } + + a += 1; + Thread.Sleep(200); + } + + if (a >= 4) + { + return; + } + //return; + } + + #endregion + + #region 打印条码,判断是否打印单个条码 + + DataTable dt3 = productBll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + if (dt3 != null && dt3.Rows.Count > 0) + { + QLevel = dt3.Rows[0]["QLevel"].ToString(); + IsOne = dt3.Rows[0]["IsPrintOneTag"].ToString(); + IsPack = dt3.Rows[0]["IsPrintPackList"].ToString(); + IsPaint = dt3.Rows[0]["IsPlating"].ToString(); + PartName = dt3.Rows[0]["ProductName"].ToString(); + //MaxCount = Convert.ToInt32(dt3.Rows[0]["PackCount"].ToString()); + IsSame = dt3.Rows[0]["IsSame"].ToString(); + IsSupply = dt3.Rows[0]["IsSupply"].ToString(); + } + + #region 打印单个标签 + + if (IsOne == "1") + { + if (IsSupply != "1") + { + filename = ManufacturerName.Contains("蔚来") + ? System.AppDomain.CurrentDomain.BaseDirectory + + "wl.grf" + : System.AppDomain.CurrentDomain.BaseDirectory + + PrintMoudleName(); //new + if (partNo[j].Contains("A2146982300") || + partNo[j].Contains("A2146982400")) + { + filename = AppDomain.CurrentDomain.BaseDirectory + + PrintMoudleName(); + } + } + else + { + filename = System.AppDomain.CurrentDomain.BaseDirectory + + PrintMoudleName(); + } + + + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo[j].ToString().Trim() + dt.Rows[0]["StationID"].ToString()]; + + string reportName = ConfigurationManager.AppSettings[printName] + .ToString(); + DataTable headTable = GetPrintHeadTable(partNo[j].ToString().Trim(), PartName, NewOneCode, newcode); + + + ReportHelper rp = new ReportHelper(filename, headTable, null, + (int) GRPaperOrientation.grpoDefault, 1, reportName); + LogSysBLL.AddInfo( + GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + NewOneCode, + MethodBase.GetCurrentMethod()); + rp.Report.Print(false); + + } + + #endregion + + #endregion + + initBarCode(); + } + } + + #endregion + } + else + { + return; + } + } + else + { + planID = dt.Rows[0]["InjectionPlanID"].ToString(); + string[] partNo = dt.Rows[0]["PartNo"].ToString().Split(','); + //string[] stockNo = dt.Rows[0]["StockNo"].ToString().Split(','); + string[] stockNo = new string[partNo.Length]; + string ProductNature = dt.Rows[0]["ProductNature"].ToString(); + //ManufacturerName = dt.Rows[0]["ManufacturerName"].ToString(); + DataTable dtM = productBll.SearchInfoByPartNo(partNo[0]); + if (dtM != null && dtM.Rows.Count > 0) + { + ManufacturerName = dtM.Rows[0]["ManufacturerName"].ToString(); + } + + #region 判断有几个零件号 + string mould = "0"; + for (int j = 0; j < partNo.Length; j++) + { + #region 根据零件号查找存货代码 + mould = j.ToString(); + DataTable sdt = productBll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + if (sdt != null && sdt.Rows.Count > 0) + { + stockNo[j] = sdt.Rows[0]["StockNo"].ToString(); + IsSame = sdt.Rows[0]["IsSame"].ToString(); + } + else + { + stockNo[j] = ""; + } + + #endregion + + #region 查询零件属性 + + DataTable dt10 = productBll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + if (dt10 != null && dt10.Rows.Count > 0) + { + QLevel = dt10.Rows[0]["QLevel"].ToString(); + IsOne = dt10.Rows[0]["IsPrintOneTag"].ToString(); + IsPack = dt10.Rows[0]["IsPrintPackList"].ToString(); + IsPaint = dt10.Rows[0]["IsPlating"].ToString(); + PartName = dt10.Rows[0]["ProductName"].ToString(); + //MaxCount = Convert.ToInt32(dt10.Rows[0]["PackCount"].ToString()); + IsSupply = dt10.Rows[0]["IsSupply"].ToString(); + } + + #endregion + + if (IsSame == "1") + { + for (int k = 0; k < 2; k++) + { + if (IsSupply != "1") + { + #region 非直供件 + + try + { + if (ManufacturerName.Contains("蔚来")) + { + #region 修改前,屏蔽 + + //DataTable dts = brbll.SearchInfoByPartNo1(partNo[j].ToString().Trim()); + //if (dts != null && dts.Rows.Count > 0) + //{ + // code = dts.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(code.Length - 4, 4)) + + // 1).ToString() + // .PadLeft(4, '0'); + //} + //else + //{ + // newcode = partNo[j].Trim() + "." + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "." + "0001"; + //} + + #endregion + + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(), true, mould, PartName, ref NewOneCode, ref newcode); + + } + else + { + #region 修改前,屏蔽 + + //dt2 = brbll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + //if (dt2 != null && dt2.Rows.Count > 0) + //{ + // code = dt2.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(code.Length - 4, + // 4)) + 1) + // .ToString() + // .PadLeft(4, '0'); + // OneCode = dt2.Rows[0]["OneBarCode"].ToString().Trim(); + // NewOneCode = + // OneCode.Substring(0, OneCode.Length - 4) + + // (Convert.ToInt32(OneCode.Substring(OneCode.Length - 4, + // 4)) + 1) + // .ToString().PadLeft(4, '0'); + //} + //else + //{ + // newcode = partNo[j].ToString().Trim() + "." + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "." + + // "0001"; + // NewOneCode = + // stockNo[j].ToString().Trim() + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "0001"; + //} + + #endregion + + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(), true, mould, PartName, ref NewOneCode, ref newcode); + + } + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return; + } + + #endregion + } + else + { + #region 直供件 + + try + { + //DataTable dts = brbll.SearchInfoByPartNo1(partNo[j].ToString().Trim()); + //if (dts != null && dts.Rows.Count > 0) + //{ + // code = dt2.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(23, 3)) + + // 1).ToString() + // .PadLeft(3, '0') + "#"; + //} + //else + //{ + // newcode = partNo[j].ToString().Trim() + "#" + QLevel + "#" + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "#" + "001" + "#"; + //} + + GetSupplyCode(partNo[j].ToString().Trim(), QLevel, true, mould, PartName, ref newcode); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return; + } + + #endregion + } + + #region 插入数据tb_barCode + + md.ID = Guid.NewGuid().ToString(); + md.StationID = dt.Rows[0]["StationID"].ToString(); + md.OneBarCode = NewOneCode; + md.BarCode = newcode; + md.StockNo = stockNo[j].ToString().Trim(); + md.PartNo = partNo[j].ToString().Trim(); + md.PrintType = 0; + md.PlanID = planID; + md.ProductNature = ProductNature; + + DataTable pdt = productBll.SearchIsImportByPartNo(partNo[j].ToString()); + if (pdt != null && pdt.Rows.Count > 0) + { + if (pdt.Rows[0]["isImport"].ToString() == "1") + { + md.Import = "国产料Kingfa"; + } + else + { + md.Import = ""; + } + } + + //if (brbll.Add_Info_New(md, Program.tableName) == false) + if (SaveBarCode(md, Program.tableName, true, mould) == false) + { + int a = 0; + for (int l = 0; l < 5; l++) + { + //if (brbll.Add_Info_New(md, Program.tableName)) + if (SaveBarCode(md, Program.tableName, true, mould) == false) + { + break; + } + + a += 1; + Thread.Sleep(200); + } + + if (a >= 4) + { + return; + } + } + + #endregion + + #region 打印条码,判断是否打印单个条码 + + #region 打印单个标签 + + if (IsOne == "1") + { + if (IsSupply != "1") + { + filename = ManufacturerName.Contains("蔚来") + ? System.AppDomain.CurrentDomain.BaseDirectory + + "wl.grf" + : System.AppDomain.CurrentDomain.BaseDirectory + + PrintMoudleName(); //new + } + else + { + filename = System.AppDomain.CurrentDomain.BaseDirectory + + PrintMoudleName(); + } + + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo[j].ToString().Trim() + dt.Rows[0]["StationID"].ToString()]; + + string reportName = ConfigurationManager.AppSettings[printName] + .ToString(); + DataTable headTable = GetPrintHeadTable(partNo[j].ToString().Trim(), PartName, NewOneCode, newcode); + + ReportHelper rp = new ReportHelper(filename, headTable, null, + (int) GRPaperOrientation.grpoDefault, 1, reportName); + + LogSysBLL.AddInfo( + GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + NewOneCode, + MethodBase.GetCurrentMethod()); + rp.Report.Print(false); + + } + + #endregion + + #endregion + + initBarCode(); + } + } + else + { + if (IsSupply != "1") + { + #region 非直供件 + + try + { + if (ManufacturerName.Contains("蔚来")) + { + #region 修改前,屏蔽 + + //DataTable dts = brbll.SearchInfoByPartNo1(partNo[j].ToString().Trim()); + //if (dts != null && dts.Rows.Count > 0) + //{ + // code = dts.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(code.Length - 4, 4)) + + // 1).ToString() + // .PadLeft(4, '0'); + //} + //else + //{ + // newcode = partNo[j].Trim() + "." + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "." + "0001"; + //} + + #endregion + + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(), true, mould, PartName, ref NewOneCode, ref newcode); + + } + else + { + #region 修改前,屏蔽 + + //dt2 = brbll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + //if (dt2 != null && dt2.Rows.Count > 0) + //{ + // code = dt2.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(code.Length - 4, 4)) + + // 1) + // .ToString() + // .PadLeft(4, '0'); + // OneCode = dt2.Rows[0]["OneBarCode"].ToString().Trim(); + // NewOneCode = + // OneCode.Substring(0, OneCode.Length - 4) + + // (Convert.ToInt32(OneCode.Substring(OneCode.Length - 4, 4)) + + // 1) + // .ToString().PadLeft(4, '0'); + //} + //else + //{ + // newcode = partNo[j].ToString().Trim() + "." + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "." + "0001"; + // NewOneCode = + // stockNo[j].ToString().Trim() + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "0001"; + //} + + #endregion + + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(), true, mould, PartName, ref NewOneCode, ref newcode); + + } + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return; + } + + #endregion + } + else + { + #region 直供件 + + try + { + //DataTable dts = brbll.SearchInfoByPartNo1(partNo[j].ToString().Trim()); + //if (dts != null && dts.Rows.Count > 0) + //{ + // code = dts.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(23, 3)) + + // 1).ToString() + // .PadLeft(3, '0') + "#"; + //} + //else + //{ + // newcode = partNo[j].ToString().Trim() + "#" + QLevel + "#" + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "#" + "001" + "#"; + //} + + GetSupplyCode(partNo[j].ToString().Trim(), QLevel, true, mould, PartName, ref newcode); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return; + } + + #endregion + } + + #region 插入数据tb_barCode + + md.ID = Guid.NewGuid().ToString(); + md.StationID = dt.Rows[0]["StationID"].ToString(); + md.OneBarCode = NewOneCode; + md.BarCode = newcode; + md.StockNo = stockNo[j].ToString().Trim(); + md.PartNo = partNo[j].ToString().Trim(); + md.PrintType = 0; + md.PlanID = planID; + md.ProductNature = ProductNature; + + DataTable pdt = productBll.SearchIsImportByPartNo(partNo[j].ToString()); + if (pdt != null && pdt.Rows.Count > 0) + { + if (pdt.Rows[0]["isImport"].ToString() == "1") + { + md.Import = "国产料Kingfa"; + } + else + { + md.Import = ""; + } + } + + //if (brbll.Add_Info_New(md, Program.tableName) == false) + if (SaveBarCode(md, Program.tableName, true, mould) == false) + { + int a = 0; + for (int l = 0; l < 5; l++) + { + //if (brbll.Add_Info_New(md, Program.tableName)) + if (SaveBarCode(md, Program.tableName, true, mould) == false) + { + break; + } + + a += 1; + Thread.Sleep(200); + } + + if (a >= 4) + { + return; + } + } + + #endregion + + #region 打印条码,判断是否打印单个条码 + + #region 打印单个标签 + + if (IsOne == "1") + { + + if (IsSupply != "1") + { + filename = ManufacturerName.Contains("蔚来") + ? System.AppDomain.CurrentDomain.BaseDirectory + + "wl.grf" + : System.AppDomain.CurrentDomain.BaseDirectory + + PrintMoudleName();//new + if (partNo[j].Contains("A2146982300") || + partNo[j].Contains("A2146982400")) + { + filename = AppDomain.CurrentDomain.BaseDirectory + + "Sill.grf"; + } + } + else + { + filename = System.AppDomain.CurrentDomain.BaseDirectory + PrintMoudleName(); + } + + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo[j].ToString().Trim() + dt.Rows[0]["StationID"].ToString()]; + + string reportName = ConfigurationManager.AppSettings[printName].ToString(); + DataTable headTable = GetPrintHeadTable(partNo[j].ToString().Trim(), PartName, NewOneCode, newcode); + + ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + LogSysBLL.AddInfo(GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + NewOneCode, MethodBase.GetCurrentMethod()); + rp.Report.Print(false); + } + + #endregion + + #endregion + + initBarCode(); + } + + } + + #endregion + } + + } + + #endregion + + #region 修改打印时间 + + //UpdatePrintTime(DateTime.Now, label6.Text); + + #endregion + + initPlan(); + lastTime=DateTime.Now; + } + } + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + MessageBox.Show(ex.ToString()); + } + } + + + + private void TimeGo() + { + System.Timers.Timer timer = new System.Timers.Timer(); + timer.Interval = 1000; + timer.Enabled = true; + timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Tick); + } + + private void timer_Tick(object sender, EventArgs e) + { + try + { + label2.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + Thread.Sleep(500); + } + catch(Exception ex) + { + Console.Write(ex.Message); + } + } + + private void timer1_Tick(object sender, EventArgs e) + { + int wID = 0; + WeightRecordBLL wrbll = new WeightRecordBLL(); + WeightBLL wbll = new WeightBLL(); + WeightRecordModel wmd=new WeightRecordModel(); + InjectionPlanBLL bll = new InjectionPlanBLL(); + BarCodeBLL brbll = new BarCodeBLL(); + BarCodeModel md = new BarCodeModel(); + ProductBLL productBll = new ProductBLL(); + PlasticBLL pbll = _plasticBLL; + InjectionBoxBLL boxbll = new InjectionBoxBLL(); + InjectionBoxModel boxmd = new InjectionBoxModel(); + InjectionQtyBLL qbll=new InjectionQtyBLL(); + InjectionQtyModel qmd = new InjectionQtyModel(); + StationBLL sbll=new StationBLL(); + DataTable dt2 = null; + string code = "", OneCode = ""; + string newcode = "", newcode1 = "", NewOneCode = "", NewOneCode1 = ""; + string IsPack = "", IsOne = "", QLevel = "", IsPaint = "", PartName = ""; + string filename = "", printName = "",StationID="",printBoxName=""; + int MaxCount = 0, CurrentCount = 0,IsSame=0; + int aa = 0; + + try + { + timer1.Enabled=false; + + GetClass(); + aa = aa + 1; + + LogHelper.WriteLog(aa.ToString()); + + #region 查找MES数据库总存储的最大ID + + DataTable wrdt = wrbll.SearchMaxIDByDevice(Program.station); + if (wrdt != null && wrdt.Rows.Count > 0) + { + ID = Convert.ToInt32(wrdt.Rows[0]["ID"].ToString()); + } + else + { + ID = 0; + } + LogHelper.WriteLog(ID.ToString()); + + #endregion + + #region 查找称重数据库的最大ID + + //DataTable wdt = wbll.SearchInfo(Conn); + //if (wdt != null && wdt.Rows.Count > 0) + //{ + // wID = Convert.ToInt32(wdt.Rows[0]["ID"].ToString()); + //} + //else + //{ + // wID = 0; + //} + + #endregion + + #region 如果称重数据库里的ID大于MES数据库中的ID,打印条码,并将称重数据库中的ID存入MES数据库 + + if (wID > ID) + { + #region 打印 + + #region 查找当前计划 + + DataTable dt = bll.SearchInfoByName(Program.station); + if (dt != null && dt.Rows.Count > 0) + { + planID = dt.Rows[0]["InjectionPlanID"].ToString(); + string[] partNo = dt.Rows[0]["PartNo"].ToString().Split(','); + string[] stockNo = new string[partNo.Length]; + //string[] stockNo = dt.Rows[0]["StockNo"].ToString().Split(','); + string ProductNature = dt.Rows[0]["ProductNature"].ToString(); + int[] same = new int[partNo.Length]; + + #region 判断有几个零件号 + int mould = 0; + for (int j = 0; j < partNo.Length; j++) + { + mould = j; + #region 根据零件号查找存货代码 + + DataTable sdt = productBll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + if (sdt != null && sdt.Rows.Count > 0) + { + stockNo[j] = sdt.Rows[0]["StockNo"].ToString(); + same[j] = Convert.ToInt32(sdt.Rows[0]["IsSame"].ToString()); + } + else + { + stockNo[j] = ""; + same[j] =0; + } + + + #endregion + + DataTable dt3 = productBll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + if (dt3 != null && dt3.Rows.Count > 0) + { + QLevel = dt3.Rows[0]["QLevel"].ToString(); + IsOne = dt3.Rows[0]["IsPrintOneTag"].ToString(); + IsPack = dt3.Rows[0]["IsPrintPackList"].ToString(); + IsPaint = dt3.Rows[0]["IsPlating"].ToString(); + PartName = dt3.Rows[0]["ProductName"].ToString(); + MaxCount = Convert.ToInt32(dt3.Rows[0]["PackCount"].ToString()); + } + + + if (partNo.Length == 1 && same[j] == 1) //一个零件号,且一模两具生产的是两根一样的产品 + { + for (int k = 0; k < 2; k++) + { + //dt2 = brbll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + //if (dt2 != null && dt2.Rows.Count > 0) + //{ + // code = dt2.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(code.Length - 4, 4)) + 1).ToString() + // .PadLeft(4, '0'); + // OneCode = dt2.Rows[0]["OneBarCode"].ToString().Trim(); + // NewOneCode = OneCode.Substring(0, OneCode.Length - 4) + (Convert.ToInt32(OneCode.Substring(OneCode.Length - 4, 4)) + 1).ToString().PadLeft(4, '0'); + //} + //else + //{ + // newcode = partNo[j].ToString().Trim() + "." + Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + Program.ProductDate.Substring(8, 2) + "." + "0001"; + // NewOneCode = stockNo[j].ToString().Trim() + Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + Program.ProductDate.Substring(8, 2) + "0001"; + //} + + + + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(), true, mould.ToString(), PartName, ref NewOneCode, ref newcode); + + + #region 插入数据tb_barCode + + md.ID = Guid.NewGuid().ToString(); + md.StationID = dt.Rows[0]["StationID"].ToString(); + md.OneBarCode = NewOneCode; + md.BarCode = newcode; + md.StockNo = stockNo[j].ToString().Trim(); + md.PartNo = partNo[j].ToString().Trim(); + md.PrintType = 0; + md.PlanID = planID; + md.ProductNature = ProductNature; + + DataTable pdt = productBll.SearchIsImportByPartNo(partNo[j].ToString()); + if (pdt != null && pdt.Rows.Count > 0) + { + if (pdt.Rows[0]["isImport"].ToString() == "1") + { + md.Import = "国产料Kingfa"; + } + else + { + md.Import = ""; + } + } + + //if (brbll.Add_Info_New(md, Program.tableName) == false) + if (SaveBarCode(md, Program.tableName, true, same[j].ToString()) == false) + { + int a = 0; + for (int l = 0; l < 5; l++) + { + //if (brbll.Add_Info_New(md, Program.tableName)) + if (SaveBarCode(md, Program.tableName, true, same[j].ToString()) == false) + { + break; + } + + a += 1; + Thread.Sleep(200); + } + + if (a >= 4) + { + return; + } + //return; + } + + #endregion + + #region 增加产量 + + qmd.ID = Guid.NewGuid().ToString(); + qmd.PlanID = planID; + qmd.StationID = getStationID(Program.station); + qmd.ProductDate = Program.ProductDate; + qmd.ClassName = Program.Shift; + qmd.StockNo = stockNo[j].ToString().Trim(); + qmd.PartNo = partNo[j].ToString().Trim(); + if (ProductNature == "售后件") + { + qmd.MarketCount = 1; + } + else + { + qmd.MarketCount = 0; + } + + DataTable isExistdt = qbll.SearchInfo(qmd); + if (isExistdt != null && isExistdt.Rows.Count > 0) + { + qbll.UpdateQty(qmd); + } + else + { + qmd.ProductCount = 1; + qbll.AddInfo(qmd); + } + + #endregion + + #region 打印条码,判断是否打印单个条码 + + + + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo[j].ToString().Trim() + dt.Rows[0]["StationID"].ToString()]; + + #region 打印单个标签 + + if (IsOne == "1") + { + filename = System.AppDomain.CurrentDomain.BaseDirectory + PrintMoudleName(); //new + + string reportName = ConfigurationManager.AppSettings[printName].ToString(); + DataTable headTable = GetPrintHeadTable(partNo[j].ToString().Trim(), PartName, NewOneCode, newcode); + + + ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + + rp.Report.Print(false); + } + + #endregion + + //DataTable dt5 = brbll.SearchBoxIsNull(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString(), Program.tableName, ProductNature); + + //if (dt5 != null && dt5.Rows.Count > 0) + //{ + // CurrentCount = Convert.ToInt32(dt5.Rows[0]["SumCount"].ToString()); + //} + + //if (CurrentCount >= MaxCount) + //{ + // #region 判断是否满箱,满箱打印箱单 + + // DialogResult result = MessageBox.Show("是否打印装箱单?", "提示", MessageBoxButtons.OKCancel, + // MessageBoxIcon.Information); + // if (result == DialogResult.OK) + // { + // filename = System.AppDomain.CurrentDomain.BaseDirectory + "装箱单.grf"; + // DataTable headTable = new DataTable(); + // headTable.Columns.Add("BoxNo"); + // headTable.Columns.Add("PartName"); + // headTable.Columns.Add("PartNo"); + // headTable.Columns.Add("BatchNo"); + // headTable.Columns.Add("PackCount"); + // headTable.Columns.Add("QLevel"); + // DataRow row = headTable.NewRow(); + + // row["BatchNo"] = Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + Program.ProductDate.Substring(8, 2); + + // #region 查询当前批次装箱单 + + // DataTable dt6 = boxbll.SeachInfoByBox(partNo[j].ToString().Trim(), Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + Program.ProductDate.Substring(8, 2)); + // if (dt6 != null && dt6.Rows.Count > 0) + // { + // row["BoxNo"] = + // dt6.Rows[0]["BoxNo"].ToString().Substring(0, + // dt6.Rows[0]["BoxNo"].ToString().Length - 6) + + // (Convert.ToInt32(dt6.Rows[0]["BoxNo"].ToString() + // .Substring(dt6.Rows[0]["BoxNo"].ToString().Length - 6, 6)) + 1) + // .ToString().PadLeft(6, '0'); + // } + // else + // { + // row["BoxNo"] = + // partNo[j].ToString().Trim() + "." + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "." + "000001"; + // } + + // #endregion + + // row["PartNo"] = partNo[j].ToString().Trim(); + // row["PartName"] = PartName; + // row["PackCount"] = MaxCount.ToString() + " EA"; + // row["QLevel"] = QLevel; + + // #region 更新barCode表中BoxNo的绑定关系 + + // brbll.UpdateBoxNo(Program.tableName, row["BoxNo"].ToString(), + // partNo[j].ToString().Trim()); + + // #endregion + + // #region 保存箱单记录 + + // boxmd.ID = Guid.NewGuid().ToString(); + // boxmd.BoxNo = row["BoxNo"].ToString(); + // boxmd.IsFlag = 0; + // boxmd.BoxCount = MaxCount; + + // boxbll.AddInfo(boxmd); + + // #endregion + + // #region 打印箱单 + + // printBoxName = "Printer" + (Convert.ToInt32(printName.Substring(7, 1))+2).ToString(); + // string reportName = ConfigurationManager.AppSettings[printBoxName].ToString(); + // headTable.Rows.Add(row); + + // ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + + // rp.Report.Print(false); + + // #endregion + // } + // else + // { + + // } + + // #endregion + //} + + #endregion + } + } + else + { + //dt2 = brbll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + //if (dt2 != null && dt2.Rows.Count > 0) + //{ + // code = dt2.Rows[0]["BarCode"].ToString().Trim(); + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(code.Length - 4, 4)) + 1).ToString() + // .PadLeft(4, '0'); + // OneCode = dt2.Rows[0]["OneBarCode"].ToString().Trim(); + // NewOneCode = OneCode.Substring(0, OneCode.Length - 4) + (Convert.ToInt32(OneCode.Substring(OneCode.Length - 4, 4)) + 1).ToString().PadLeft(4, '0'); + //} + //else + //{ + // newcode = partNo[j].ToString().Trim() + "." + Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + Program.ProductDate.Substring(8, 2) + "." + "0001"; + // NewOneCode = stockNo[j].ToString().Trim() + Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + Program.ProductDate.Substring(8, 2) + "0001"; + //} + + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(), true, mould.ToString(), PartName, ref NewOneCode, ref newcode); + + #region 插入数据tb_barCode + + md.ID = Guid.NewGuid().ToString(); + md.StationID = dt.Rows[0]["StationID"].ToString(); + md.OneBarCode = NewOneCode; + md.BarCode = newcode; + md.StockNo = stockNo[j].ToString().Trim(); + md.PartNo = partNo[j].ToString().Trim(); + md.PrintType = 0; + md.PlanID = planID; + md.ProductNature = ProductNature; + + DataTable pdt = productBll.SearchIsImportByPartNo(partNo[j].ToString()); + if (pdt != null && pdt.Rows.Count > 0) + { + if (pdt.Rows[0]["isImport"].ToString() == "1") + { + md.Import = "国产料Kingfa"; + } + else + { + md.Import = ""; + } + } + + // if (brbll.Add_Info_New(md, Program.tableName) == false) + if (SaveBarCode(md, Program.tableName, true, same[j].ToString()) == false) + { + int a = 0; + for (int l = 0; l < 5; l++) + { + //if (brbll.Add_Info_New(md, Program.tableName)) + if (SaveBarCode(md, Program.tableName, true, same[j].ToString()) == false) + { + break; + } + + a += 1; + Thread.Sleep(200); + } + + if (a >= 4) + { + return; + } + //return; + } + + #endregion + + #region 增加产量 + + qmd.ID = Guid.NewGuid().ToString(); + qmd.PlanID = planID; + qmd.StationID = getStationID(Program.station); + qmd.ProductDate = Program.ProductDate; + qmd.ClassName = Program.Shift; + qmd.StockNo = stockNo[j].ToString().Trim(); + qmd.PartNo = partNo[j].ToString().Trim(); + if (ProductNature == "售后件") + { + qmd.MarketCount = 1; + } + else + { + qmd.MarketCount = 0; + } + + DataTable isExistdt = qbll.SearchInfo(qmd); + if (isExistdt != null && isExistdt.Rows.Count > 0) + { + qbll.UpdateQty(qmd); + } + else + { + qmd.ProductCount = 1; + qbll.AddInfo(qmd); + } + + #endregion + + #region 打印条码,判断是否打印单个条码 + + //DataTable dt3 = productBll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + //if (dt3 != null && dt3.Rows.Count > 0) + //{ + // QLevel = dt3.Rows[0]["QLevel"].ToString(); + // IsOne = dt3.Rows[0]["IsPrintOneTag"].ToString(); + // IsPack = dt3.Rows[0]["IsPrintPackList"].ToString(); + // IsPaint = dt3.Rows[0]["IsPlating"].ToString(); + // PartName = dt3.Rows[0]["ProductName"].ToString(); + // MaxCount = Convert.ToInt32(dt3.Rows[0]["PackCount"].ToString()); + //} + + //DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString()); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo[j].ToString().Trim() + dt.Rows[0]["StationID"].ToString()]; + + #region 打印单个标签 + + if (IsOne == "1") + { + filename = System.AppDomain.CurrentDomain.BaseDirectory + PrintMoudleName(); //new + + string reportName = ConfigurationManager.AppSettings[printName].ToString(); + DataTable headTable = GetPrintHeadTable(partNo[j].ToString().Trim(), PartName, NewOneCode, newcode); + + ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + + rp.Report.Print(false); + } + + #endregion + + //DataTable dt5 = brbll.SearchBoxIsNull(partNo[j].ToString().Trim(), + // dt.Rows[0]["StationID"].ToString(), Program.tableName, ProductNature); + + //if (dt5 != null && dt5.Rows.Count > 0) + //{ + // CurrentCount = Convert.ToInt32(dt5.Rows[0]["SumCount"].ToString()); + //} + + //if (CurrentCount >= MaxCount) + //{ + // #region 判断是否满箱,满箱打印箱单 + + // DialogResult result = MessageBox.Show("是否打印装箱单?", "提示", MessageBoxButtons.OKCancel, + // MessageBoxIcon.Information); + // if (result == DialogResult.OK) + // { + // filename = System.AppDomain.CurrentDomain.BaseDirectory + "装箱单.grf"; + // DataTable headTable = new DataTable(); + // headTable.Columns.Add("BoxNo"); + // headTable.Columns.Add("PartName"); + // headTable.Columns.Add("PartNo"); + // headTable.Columns.Add("BatchNo"); + // headTable.Columns.Add("PackCount"); + // headTable.Columns.Add("QLevel"); + // DataRow row = headTable.NewRow(); + + // row["BatchNo"] = Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + Program.ProductDate.Substring(8, 2); + + // #region 查询当前批次装箱单 + + // DataTable dt6 = boxbll.SeachInfoByBox(partNo[j].ToString().Trim(), Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + Program.ProductDate.Substring(8, 2)); + // if (dt6 != null && dt6.Rows.Count > 0) + // { + // row["BoxNo"] = + // dt6.Rows[0]["BoxNo"].ToString().Substring(0, + // dt6.Rows[0]["BoxNo"].ToString().Length - 6) + + // (Convert.ToInt32(dt6.Rows[0]["BoxNo"].ToString() + // .Substring(dt6.Rows[0]["BoxNo"].ToString().Length - 6, 6)) + 1) + // .ToString().PadLeft(6, '0'); + // } + // else + // { + // row["BoxNo"] = + // partNo[j].ToString().Trim() + "." + + // Program.ProductDate.Substring(2, 2) + + // Program.ProductDate.Substring(5, 2) + + // Program.ProductDate.Substring(8, 2) + "." + "000001"; + // } + + // #endregion + + // row["PartNo"] = partNo[j].ToString().Trim(); + // row["PartName"] = PartName; + // row["PackCount"] = MaxCount.ToString() + " EA"; + // row["QLevel"] = QLevel; + + // #region 更新barCode表中BoxNo的绑定关系 + + // brbll.UpdateBoxNo(Program.tableName, row["BoxNo"].ToString(), + // partNo[j].ToString().Trim()); + + // #endregion + + // #region 保存箱单记录 + + // boxmd.ID = Guid.NewGuid().ToString(); + // boxmd.BoxNo = row["BoxNo"].ToString(); + // boxmd.IsFlag = 0; + // boxmd.BoxCount = MaxCount; + + // boxbll.AddInfo(boxmd); + + // #endregion + + // #region 打印箱单 + + // printBoxName = "Printer" + (Convert.ToInt32(printName.Substring(7, 1)) + 2).ToString(); + // string reportName = ConfigurationManager.AppSettings[printBoxName].ToString(); + // headTable.Rows.Add(row); + + // ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + + // rp.Report.Print(false); + + // #endregion + // } + // else + // { + + // } + + // #endregion + //} + + #endregion + } + + + initBarCode(); + } + + #endregion + } + + #endregion + + #endregion + + #region 存ID + + wmd.GID = Guid.NewGuid().ToString(); + wmd.ID = wID; + wmd.DeviceNo = Program.station; + wrbll.AddInfo(wmd); + + #endregion + } + + #endregion + + timer1.Enabled = true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + + } + + private void initProduct() + { + comboBox2.Items.Clear(); + + PlasticBLL bll= _plasticBLL; + + try + { + DataTable dt = bll.SearchPartByStation(Program.station); + if (dt != null && dt.Rows.Count > 0) + { + for (int i = 0; i < dt.Rows.Count; i++) + { + comboBox2.Items.Add(dt.Rows[i]["ProductName"].ToString()); + } + } + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + + } + + private void GetClass() + { + try + { + DateTime aa = GetDateTime(); + + if (GetDateTime().Hour >= 8 && GetDateTime().Hour < 20) + { + Program.Shift = "A班"; + Program.ProductDate = aa.ToString("yyyy-MM-dd"); + + } + else + { + Program.Shift = "B班"; + if (GetDateTime().Hour >= 0 && GetDateTime().Hour < 8) + { + Program.ProductDate = aa.AddDays(-1).ToString("yyyy-MM-dd"); + } + else if (GetDateTime().Hour >= 20 && GetDateTime().Hour <= 23) + { + Program.ProductDate = aa.ToString("yyyy-MM-dd"); + } + } + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + } + + private DateTime GetDateTime() + { + string sql = ""; + DateTime time; + DataTable dt; + try + { + sql = @"select convert(char(23),getdate(),121) as time"; + + dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + if (dt != null && dt.Rows.Count > 0) + { + //time = Convert.ToDateTime(dt.Rows[0]["time"].ToString()); + time = DateTime.ParseExact(dt.Rows[0]["time"].ToString(), "yyyy-MM-dd HH:mm:ss.fff", + System.Globalization.CultureInfo.CurrentCulture); + + } + else + { + time = DateTime.Now; + } + return time; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return DateTime.Now; + } + } + + private void initBarCode() + { + BarCodeBLL bll = new BarCodeBLL(); + + try + { + glacialList1.Items.Clear(); + DataTable dt = bll.SearchInfo(Program.station); + if (dt != null && dt.Rows.Count > 0) + { + for (int i = 0; i < dt.Rows.Count; i++) + { + glacialList1.Items.Add(i.ToString()); + glacialList1.Items[i].SubItems[0].Text = dt.Rows[i]["BarCode"].ToString(); + glacialList1.Items[i].SubItems[0].Tag = dt.Rows[i]["BoxNo"].ToString(); + glacialList1.Items[i].SubItems[1].Text = dt.Rows[i]["ProductName"].ToString(); + glacialList1.Items[i].SubItems[2].Text = dt.Rows[i]["PrintType"].ToString(); + glacialList1.Items[i].SubItems[3].Text = dt.Rows[i]["CreateTime"].ToString() == "" ? "" : Convert.ToDateTime(dt.Rows[i]["CreateTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + //glacialList1.Items[i].SubItems[4].Text = dt.Rows[i]["BoxNo"].ToString(); + + } + } + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + } + + + /// + /// 创建服务 + /// + /// + private bool CreateServer() + { + try + { + opcServer = new OPCServer(); + } + catch + { + return false; + } + return true; + } + + /// + /// 连接到服务器 + /// + /// + /// + /// + private bool ConnectServer(string strHostIP, string strHostName) + { + try + { + opcServer.Connect(strHostName, strHostIP); + } + catch + { + return false; + } + return true; + } + + /// + /// 设置组的属性 + /// + /// + /// + + private void SetGroupProperty(OPCGroup opcGroup, int updateRate) + { + opcGroup.IsActive = true; + opcGroup.DeadBand = 0; + opcGroup.UpdateRate = updateRate; + opcGroup.IsSubscribed = true; + } + + #region 调用键盘 + + private const Int32 WM_SYSCOMMAND = 274; + + private const UInt32 SC_CLOSE = 61536; + + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] + + private static extern bool PostMessage(IntPtr hWnd, int Msg, int wParam, int lParam); + + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] + + private static extern bool PostMessage(IntPtr hWnd, int Msg, uint wParam, uint lParam); + + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] + + private static extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); + + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] + + private static extern IntPtr FindWindow(string lpClassName, string lpWindowName); + + [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] + + private static extern int RegisterWindowMessage(string lpString); + + + + //显示屏幕键盘 + + public static int ShowInputPanel() + { + + try + { + + dynamic file = "C:\\Program Files\\Common Files\\microsoft shared\\ink\\TabTip.exe"; + + if (!System.IO.File.Exists(file)) + + return -1; + + Process.Start(file); + + //return SetUnDock(); //不知SetUnDock()是什么,所以直接注释返回1 + + return 1; + + } + + catch (Exception) + { + + return 255; + + } + + } + + #endregion + + private void label2_Click(object sender, EventArgs e) + { + try + { + if (serialPort1.IsOpen) + { + serialPort1.Close(); + } + Environment.Exit(0); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(),MethodBase.GetCurrentMethod()); + Environment.Exit(0); + } + } + + + /// + /// 手工打印条码 + /// + /// + /// + private void label23_Click(object sender, EventArgs e) + { + string code = "",stationID="",OneCode=""; + string newcode = "",partNo="",stockNo="",NewOneCode=""; + string IsPack = "", IsOne = "", QLevel = "", IsPaint = "", PartName = "", printBoxName="",IsSupply="",ManufacturerName=""; + string filename = "", printName = ""; + int MaxCount = 0, CurrentCount = 0; + ProductBLL pbll = new ProductBLL(); + BarCodeBLL bll = new BarCodeBLL(); + BarCodeModel md = new BarCodeModel(); + PlasticBLL plbll= _plasticBLL; + InjectionBoxBLL boxbll = new InjectionBoxBLL(); + InjectionBoxModel boxmd = new InjectionBoxModel(); + InjectionPlanBLL planbll=new InjectionPlanBLL(); + + try + { + //if (status == false) + //{ + // MessageBox.Show("连接服务器失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + // return; + //} + + #region 数据合法性判断 + + if (comboBox2.Text.Trim() == "") + { + MessageBox.Show("请选择产品!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + + if (textBox1.Text.Trim() == "") + { + MessageBox.Show("请输入批次!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + + if (textBox1.Text.Trim().Length != 6) + { + MessageBox.Show("批次格式不正确!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + + if (textBox2.Text.Trim() == "") + { + MessageBox.Show("请输入数量!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + if (!IsNumeric(textBox2.Text.Trim())) + { + MessageBox.Show("数量格式不正确!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + + //if (Convert.ToInt32(textBox2.Text.Trim()) > 10) + //{ + // MessageBox.Show("数量不能大于10!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + // return; + //} + + #endregion + + #region 获取工位编号 + + StationBLL sbll = new StationBLL(); + DataTable sdt = sbll.SearchInfoByNo(Program.station); + if (sdt != null && sdt.Rows.Count > 0) + { + stationID = sdt.Rows[0]["StationID"].ToString(); + } + + #endregion + + DialogResult result = MessageBox.Show("确定手工打印条码?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); + if (result == DialogResult.OK) + { + #region 查询零件号 + + DataTable pdt = pbll.SearchInfoByName(comboBox2.Text, "2000"); + if (pdt != null && pdt.Rows.Count > 0) + { + partNo = pdt.Rows[0]["PartNo"].ToString().Trim(); + stockNo = pdt.Rows[0]["StockNo"].ToString().Trim(); + ManufacturerName = pdt.Rows[0]["ManufacturerName"].ToString().Trim(); + } + else + { + MessageBox.Show($"零件[{comboBox2.Text}]在系统中不存在!"); + return; + } + + #endregion + + #region 判断是否打印单个条码 + + DataTable dt3 = pbll.SearchInfoByPartNo(partNo); + if (dt3 != null && dt3.Rows.Count > 0) + { + QLevel = dt3.Rows[0]["QLevel"].ToString(); + IsOne = dt3.Rows[0]["IsPrintOneTag"].ToString(); + PartName = dt3.Rows[0]["ProductName"].ToString(); + IsSupply = dt3.Rows[0]["IsSupply"].ToString(); + + } + + #endregion + + //todo 判断零件号和计划是不是一致 + + DataTable plandt = planbll.searchPlanInfo(planID); + if (plandt != null && plandt.Rows.Count > 0) + { + if (plandt.Rows[0]["PartNo"].ToString().Contains(partNo)==false) + { + planID = ""; + } + } + + if (IsSupply != "1") + { + #region 非直供件 + int printCount = Convert.ToInt32(textBox2.Text.Trim()); + for (int i = 1; i <= printCount; i++) + { + GetSjBarCode(stockNo, partNo,false,"0", PartName, ref NewOneCode, ref newcode); + + string[] part = newcode.Split('.'); + + #region 插入数据tb_barCode + + md.ID = Guid.NewGuid().ToString(); + md.StationID = stationID; + md.OneBarCode = NewOneCode; + md.BarCode = newcode; + md.StockNo = stockNo; + md.PartNo = partNo; + md.PrintType = 1; + md.PlanID = planID; + + md.ProductNature = "正常件"; //第一次没有这个 + + DataTable dt2 = pbll.SearchIsImportByPartNo(partNo); + if (dt2 != null && dt2.Rows.Count > 0) + { + if (dt2.Rows[0]["isImport"].ToString() == "1") + { + md.Import = "国产料Kingfa"; + } + else + { + md.Import = ""; + } + } + + //if (bll.Add_Info_New(md, Program.tableName) == false) + if (SaveBarCode(md, Program.tableName, false, "0",i== printCount) == false) + { + return; + } + + #endregion + + #region 打印单个标签 + + if (IsOne == "1") + { + //filename = System.AppDomain.CurrentDomain.BaseDirectory + "单个条码.grf"; + filename = ManufacturerName.Contains("蔚来") + ? System.AppDomain.CurrentDomain.BaseDirectory + + "wl.grf" + : System.AppDomain.CurrentDomain.BaseDirectory + + PrintMoudleName(); //new + if (partNo.Contains("A2146982300") || + partNo.Contains("A2146982400")) + { + filename = AppDomain.CurrentDomain.BaseDirectory + + "Sill.grf"; + } + + //DataTable dt4 = plbll.SearchInfo(partNo, stationID); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo + stationID]; + + string reportName = ConfigurationManager.AppSettings[printName].ToString(); + DataTable headTable = GetPrintHeadTable(partNo, PartName, NewOneCode, newcode); + + ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + LogSysBLL.AddInfo(GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + NewOneCode, MethodBase.GetCurrentMethod()); + rp.Report.Print(false); + } + + #endregion + + + } + + #region 原来的 已注释 + //DataTable dt = bll.SearchSerialNoByBarCodeNew(partNo + "." + textBox1.Text.Trim(), Program.tableName); + //if (dt != null && dt.Rows.Count > 0) + //{ + // OneCode = dt.Rows[0]["OneBarCode"].ToString().Trim(); + // code = dt.Rows[0]["BarCode"].ToString().TrimEnd(); + // for (int i = 1; i <= Convert.ToInt32(textBox2.Text.Trim()); i++) + // { + // //newcode = code.Substring(0, code.Length - 4) + + // // (Convert.ToInt32(code.Substring(code.Length - 4, 4)) + i) + // // .ToString() + // // .PadLeft(4, '0'); + // ////86611-BU500.240826.0003 + // //if (OneCode != "") + // //{ + // // NewOneCode = OneCode.Substring(0, OneCode.Length - 4) + + // // (Convert.ToInt32(OneCode.Substring(OneCode.Length - 4, 4)) + i) + // // .ToString() + // // .PadLeft(4, '0'); + // //} + // //60000001942408260003 + // GetSjBarCode(stockNo, partNo, ref NewOneCode, ref newcode); + // string[] part = newcode.Split('.'); + + // #region 插入数据tb_barCode + + // md.ID = Guid.NewGuid().ToString(); + // md.StationID = stationID; + // md.OneBarCode = NewOneCode; + // md.BarCode = newcode; + // md.StockNo = stockNo; + // md.PartNo = partNo; + // md.PrintType = 1; + // md.PlanID = planID; + + // md.ProductNature = "正常件"; //第一次没有这个 + + // DataTable dt2 = pbll.SearchIsImportByPartNo(partNo); + // if (dt2 != null && dt2.Rows.Count > 0) + // { + // if (dt2.Rows[0]["isImport"].ToString() == "1") + // { + // md.Import = "国产料Kingfa"; + // } + // else + // { + // md.Import = ""; + // } + // } + + // if (bll.Add_Info_New(md, Program.tableName) == false) + // { + // return; + // } + + // #endregion + + // #region 打印单个标签 + + // if (IsOne == "1") + // { + // //filename = System.AppDomain.CurrentDomain.BaseDirectory + "单个条码.grf"; + // filename = ManufacturerName.Contains("蔚来") + // ? System.AppDomain.CurrentDomain.BaseDirectory + + // "wl.grf" + // : System.AppDomain.CurrentDomain.BaseDirectory + + // "单个条码.grf"; + // if (partNo.Contains("A2146982300") || + // partNo.Contains("A2146982400")) + // { + // filename = AppDomain.CurrentDomain.BaseDirectory + + // "Sill.grf"; + // } + // DataTable headTable = new DataTable(); + // headTable.Columns.Add("PrintTime"); + // headTable.Columns.Add("PartNo"); + // headTable.Columns.Add("PartName"); + // headTable.Columns.Add("OneBarCode"); + // headTable.Columns.Add("BarCode"); + // DataRow row = headTable.NewRow(); + // row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss"); + // row["PartNo"] = partNo; + // row["PartName"] = PartName; + // row["OneBarCode"] = NewOneCode; + // row["BarCode"] = newcode; + + // DataTable dt4 = plbll.SearchInfo(partNo, stationID); + // if (dt4 != null && dt4.Rows.Count > 0) + // { + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + // } + + // string reportName = ConfigurationManager.AppSettings[printName].ToString(); + // headTable.Rows.Add(row); + + // ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + // LogSysBLL.AddInfo(GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + NewOneCode, MethodBase.GetCurrentMethod()); + // rp.Report.Print(false); + // } + + // #endregion + // } + //} + //else + //{ + // for (int i = 1; i <= Convert.ToInt32(textBox2.Text.Trim()); i++) + // { + // //newcode = partNo + "." + textBox1.Text.Trim() + "." + i.ToString().PadLeft(4, '0'); + // //NewOneCode = stockNo + textBox1.Text.Trim() + i.ToString().PadLeft(4, '0'); + + // GetSjBarCode(stockNo, partNo,false, ref NewOneCode, ref newcode); + // string[] part = newcode.Split('.'); + + // #region 插入数据tb_barCode + + // md.ID = Guid.NewGuid().ToString(); + // md.StationID = stationID; + // md.OneBarCode = NewOneCode; + // md.BarCode = newcode; + // md.StockNo = stockNo; + // md.PartNo = partNo; + // md.PrintType = 1; + // md.PlanID = planID; + + // DataTable dt2 = pbll.SearchIsImportByPartNo(partNo); + // if (dt2 != null && dt2.Rows.Count > 0) + // { + // if (dt2.Rows[0]["isImport"].ToString() == "1") + // { + // md.Import = "国产料Kingfa"; + // } + // else + // { + // md.Import = ""; + // } + // } + + // if (bll.Add_Info_New(md, Program.tableName) == false) + // { + // return; + // } + + // #endregion + + // #region 打印单个标签 + + // if (IsOne == "1") + // { + // //filename = System.AppDomain.CurrentDomain.BaseDirectory + "单个条码.grf"; + // filename = ManufacturerName.Contains("蔚来") + // ? System.AppDomain.CurrentDomain.BaseDirectory + + // "wl.grf" + // : System.AppDomain.CurrentDomain.BaseDirectory + + // "单个条码.grf"; + // DataTable headTable = new DataTable(); + // headTable.Columns.Add("PrintTime"); + // headTable.Columns.Add("PartNo"); + // headTable.Columns.Add("PartName"); + // headTable.Columns.Add("OneBarCode"); + // headTable.Columns.Add("BarCode"); + // DataRow row = headTable.NewRow(); + // row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss"); + // row["PartNo"] = partNo; + // row["PartName"] = PartName; + // row["OneBarCode"] = NewOneCode; + // row["BarCode"] = newcode; + + // DataTable dt4 = plbll.SearchInfo(partNo, stationID); + // if (dt4 != null && dt4.Rows.Count > 0) + // { + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + // } + + // string reportName = ConfigurationManager.AppSettings[printName].ToString(); + // headTable.Rows.Add(row); + + // ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + // LogSysBLL.AddInfo(GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + NewOneCode, MethodBase.GetCurrentMethod()); + // rp.Report.Print(false); + // } + + // #endregion + // } + //} + #endregion + + #endregion + } + else + { + #region 直供件 + + for (int i = 1; i <= Convert.ToInt32(textBox2.Text.Trim()); i++) + { + //newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(23, 3)) + + // i).ToString() + // .PadLeft(3, '0') + "#"; + GetSupplyCode(partNo, QLevel,false, "0", PartName, ref newcode); + + #region 插入数据tb_barCode + + md.ID = Guid.NewGuid().ToString(); + md.StationID = stationID; + md.OneBarCode = NewOneCode; + md.BarCode = newcode; + md.StockNo = stockNo; + md.PartNo = partNo; + md.PrintType = 1; + md.PlanID = planID; + + DataTable dt2 = pbll.SearchIsImportByPartNo(partNo); + if (dt2 != null && dt2.Rows.Count > 0) + { + if (dt2.Rows[0]["isImport"].ToString() == "1") + { + md.Import = "国产料Kingfa"; + } + else + { + md.Import = ""; + } + } + + //if (bll.Add_Info_New(md, Program.tableName) == false) + if (SaveBarCode(md, Program.tableName, false, "0") == false) + { + return; + } + + #endregion + + #region 打印单个标签 + + if (IsOne == "1") + { + filename = System.AppDomain.CurrentDomain.BaseDirectory + PrintMoudleName(); + + //DataTable dt4 = plbll.SearchInfo(partNo, stationID); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[partNo + stationID]; + + string reportName = ConfigurationManager.AppSettings[printName].ToString(); + DataTable headTable = GetPrintHeadTable(partNo, PartName, NewOneCode, newcode); + + ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + LogSysBLL.AddInfo(GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + NewOneCode, MethodBase.GetCurrentMethod()); + rp.Report.Print(false); + } + + #endregion + } + + + + //DataTable dts = bll.SearchInfoByPartNo1(partNo); + //if (dts != null && dts.Rows.Count > 0) + //{ + // code = dts.Rows[0]["BarCode"].ToString().Trim(); + // for (int i = 1; i <= Convert.ToInt32(textBox2.Text.Trim()); i++ ) + // { + // newcode = code.Substring(0, code.Length - 4) + + // (Convert.ToInt32(code.Substring(23, 3)) + + // i).ToString() + // .PadLeft(3, '0') + "#"; + // 需要用GetSupplyCode新生成 + + // #region 插入数据tb_barCode + + // md.ID = Guid.NewGuid().ToString(); + // md.StationID = stationID; + // md.OneBarCode = NewOneCode; + // md.BarCode = newcode; + // md.StockNo = stockNo; + // md.PartNo = partNo; + // md.PrintType = 1; + // md.PlanID = planID; + + // DataTable dt2 = pbll.SearchIsImportByPartNo(partNo); + // if (dt2 != null && dt2.Rows.Count > 0) + // { + // if (dt2.Rows[0]["isImport"].ToString() == "1") + // { + // md.Import = "国产料Kingfa"; + // } + // else + // { + // md.Import = ""; + // } + // } + + // if (bll.Add_Info_New(md, Program.tableName) == false) + // { + // return; + // } + + // #endregion + + // #region 打印单个标签 + + // if (IsOne == "1") + // { + // filename = System.AppDomain.CurrentDomain.BaseDirectory + "单个条码1.grf"; + // DataTable headTable = new DataTable(); + // headTable.Columns.Add("PrintTime"); + // headTable.Columns.Add("PartNo"); + // headTable.Columns.Add("PartName"); + // headTable.Columns.Add("OneBarCode"); + // headTable.Columns.Add("BarCode"); + // DataRow row = headTable.NewRow(); + // row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss"); + // row["PartNo"] = partNo; + // row["PartName"] = PartName; + // row["OneBarCode"] = NewOneCode; + // row["BarCode"] = newcode; + + // DataTable dt4 = plbll.SearchInfo(partNo, stationID); + // if (dt4 != null && dt4.Rows.Count > 0) + // { + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + // } + + // string reportName = ConfigurationManager.AppSettings[printName].ToString(); + // headTable.Rows.Add(row); + + // ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + // LogSysBLL.AddInfo(GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + NewOneCode, MethodBase.GetCurrentMethod()); + // rp.Report.Print(false); + // } + + // #endregion + // } + //} + //else + //{ + // for (int i = 1; i <= Convert.ToInt32(textBox2.Text.Trim()); i++) + // { + // newcode = partNo + "#" + QLevel + "#" + + // textBox1.Text.Trim() + "#" + i.ToString().PadLeft(3, '0') + "#"; + // 需要用GetSupplyCode新写 + // #region 插入数据tb_barCode + + // md.ID = Guid.NewGuid().ToString(); + // md.StationID = stationID; + // md.OneBarCode = NewOneCode; + // md.BarCode = newcode; + // md.StockNo = stockNo; + // md.PartNo = partNo; + // md.PrintType = 1; + // md.PlanID = planID; + + // DataTable dt2 = pbll.SearchIsImportByPartNo(partNo); + // if (dt2 != null && dt2.Rows.Count > 0) + // { + // if (dt2.Rows[0]["isImport"].ToString() == "1") + // { + // md.Import = "国产料Kingfa"; + // } + // else + // { + // md.Import = ""; + // } + // } + + // if (bll.Add_Info_New(md, Program.tableName) == false) + // { + // return; + // } + + // #endregion + + // #region 打印单个标签 + + // if (IsOne == "1") + // { + // filename = System.AppDomain.CurrentDomain.BaseDirectory + "单个条码1.grf"; + // DataTable headTable = new DataTable(); + // headTable.Columns.Add("PrintTime"); + // headTable.Columns.Add("PartNo"); + // headTable.Columns.Add("PartName"); + // headTable.Columns.Add("OneBarCode"); + // headTable.Columns.Add("BarCode"); + // DataRow row = headTable.NewRow(); + // row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss"); + // row["PartNo"] = partNo; + // row["PartName"] = PartName; + // row["OneBarCode"] = NewOneCode; + // row["BarCode"] = newcode; + + // DataTable dt4 = plbll.SearchInfo(partNo, stationID); + // if (dt4 != null && dt4.Rows.Count > 0) + // { + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + // } + + // string reportName = ConfigurationManager.AppSettings[printName].ToString(); + // headTable.Rows.Add(row); + + // ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + // LogSysBLL.AddInfo(GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + NewOneCode, MethodBase.GetCurrentMethod()); + // rp.Report.Print(false); + // } + + // #endregion + // } + //} + + #endregion + } + + initBarCode(); + } + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + MessageBox.Show(ex.ToString()); + } + } + + private static bool IsNumeric(string str) + { + System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^[0-9]\d*$"); + return reg1.IsMatch(str); + } + + private static string getStationID(string stationName) + { + try + { + string id = ""; + StationBLL bll=new StationBLL(); + + DataTable dt = bll.SearchInfoByNo(stationName); + if (dt != null && dt.Rows.Count > 0) + { + id = dt.Rows[0]["StationID"].ToString(); + } + else + { + id = ""; + } + + return id; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + } + + /// + /// 补打条码 + /// + /// + /// + private void label22_Click(object sender, EventArgs e) + { + string code = "", filename = "", printName = "", ManufacturerName=""; + BarCodeModel md = new BarCodeModel(); + BarCodeBLL bll = new BarCodeBLL(); + ProductBLL pbll = new ProductBLL(); + PlasticBLL plbll = _plasticBLL; + try + { + if (glacialList1.SelectedItems.Count == 0) + { + MessageBox.Show("请选择要补打的条码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + else + { + DialogResult result = MessageBox.Show("确定补打条码?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); + if (result == DialogResult.OK) + { + GlacialComponents.Controls.GLItem gv; + gv = glacialList1.SelectedItems[0] as GlacialComponents.Controls.GLItem; + code = gv.Text; + + DataTable dt = bll.SearchInfoByBarCodeNew(code, Program.tableName); + if (dt != null && dt.Rows.Count > 0) + { + md.ID = Guid.NewGuid().ToString(); + md.BarCode = code; + md.StationID = dt.Rows[0]["StationID"].ToString(); + md.StockNo = dt.Rows[0]["StockNo"].ToString(); + md.OneBarCode = dt.Rows[0]["OneBarCode"].ToString(); + //md.BoxNo = dt.Rows[0]["BoxNo"].ToString(); + md.PartNo = dt.Rows[0]["PartNo"].ToString(); + + md.PrintType = 2; + + //DataTable pdt = pbll.SearchIsImportByPartNo(md.PartNo); + + DataTable pdt = pbll.SearchInfoByPartNo(md.PartNo); + if (pdt != null && pdt.Rows.Count > 0) + { + if (pdt.Rows[0]["isImport"].ToString() == "1") + { + md.Import = "国产料Kingfa"; + } + else + { + md.Import = ""; + } + + ManufacturerName = pdt.Rows[0]["ManufacturerName"].ToString().Trim(); + + } + } + else + { + MessageBox.Show($"补打失败,条码[{code}]在表[{ Program.tableName}]中不存在!"); + return; + } + + if (bll.Add_Info_New(md, Program.tableName) == false) + // if (SaveBarCode(md, Program.tableName, true) == false) 补打不装箱 + { + return; + } + glacialList1.SelectedItems.Clear(); + initBarCode(); + + #region 打印条码 + + //filename = System.AppDomain.CurrentDomain.BaseDirectory + "单个条码.grf"; + filename = ManufacturerName.Contains("蔚来") + ? AppDomain.CurrentDomain.BaseDirectory + + "wl.grf" + : AppDomain.CurrentDomain.BaseDirectory + + PrintMoudleName(); //new + if (md.PartNo.Contains("A2146982300") || + md.PartNo.Contains("A2146982400")) + { + filename = AppDomain.CurrentDomain.BaseDirectory + + "Sill.grf"; + } + + string partName = ""; + DataTable dt2 = pbll.SearchInfoByPartNo(md.PartNo); + if (dt2 != null && dt2.Rows.Count > 0) + { + partName = dt2.Rows[0]["ProductName"].ToString(); + } + else + { + partName = ""; + } + + + //DataTable dt4 = plbll.SearchInfo(md.PartNo, md.StationID); + //if (dt4 != null && dt4.Rows.Count > 0) + //{ + // printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[md.PartNo + md.StationID]; + + string reportName = ConfigurationManager.AppSettings[printName].ToString(); + DataTable headTable = GetPrintHeadTable(md.PartNo, partName, md.OneBarCode, md.BarCode); + + + ReportHelper rp = new ReportHelper(filename, headTable, null, + (int) GRPaperOrientation.grpoDefault, 1, reportName); + LogSysBLL.AddInfo(GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + md.OneBarCode, MethodBase.GetCurrentMethod()); + rp.Report.Print(false); + + #endregion + } + } + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + } + + /// + /// 补打箱单 + /// + /// + /// + private void label16_Click(object sender, EventArgs e) + { + panel44.Visible = true; + } + + /// + /// 删除条码 + /// + /// + /// + private void label15_Click(object sender, EventArgs e) + { + BarCodeBLL bll = new BarCodeBLL(); + BarCodeModel md = new BarCodeModel(); + + try + { + if (glacialList1.SelectedItems.Count == 0) + { + MessageBox.Show("请选择要删除的条码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + else + { + DialogResult result = MessageBox.Show("确定删除条码?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); + if (result == DialogResult.OK) + { + GlacialComponents.Controls.GLItem gv; + gv = glacialList1.SelectedItems[0] as GlacialComponents.Controls.GLItem; + md.BarCode = gv.Text; + + bll.DelBarCode_New(md, Program.tableName); + initBarCode(); + } + } + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + } + + + /// + /// 补打装箱单确定按钮 + /// + /// + /// + private void button1_Click(object sender, EventArgs e) + { + try + { + InjectionBoxBLL boxbll=new InjectionBoxBLL(); + InjectionBoxModel boxmd=new InjectionBoxModel(); + BarCodeBLL bll=new BarCodeBLL(); + ProductBLL pbll=new ProductBLL(); + PlasticBLL plbll= _plasticBLL; + StationBLL sbll=new StationBLL(); + string filename = "", printName = "", printBoxName="",stationID=""; + + #region 验证输入合法性 + + if (textBox3.Text.Trim() == "") + { + MessageBox.Show("请输入箱单号", "提示", MessageBoxButtons.OK); + return; + } + + DataTable dt = boxbll.SearchBox(textBox3.Text.Trim()); + if (dt != null && dt.Rows.Count > 0) + { + DataTable dt1 = bll.SearchCountByBox(textBox3.Text.Trim(), Program.tableName); + if (dt1 != null && dt1.Rows.Count > 0) + { + #region 查找该箱单内容 + + filename = System.AppDomain.CurrentDomain.BaseDirectory + "装箱单.grf"; + DataTable headTable = new DataTable(); + headTable.Columns.Add("BoxNo"); + headTable.Columns.Add("PartName"); + headTable.Columns.Add("PartNo"); + headTable.Columns.Add("BatchNo"); + headTable.Columns.Add("PackCount"); + headTable.Columns.Add("QLevel"); + DataRow row = headTable.NewRow(); + + string[] box = textBox3.Text.Trim().Split('.'); + row["BoxNo"] = textBox3.Text.Trim(); + row["PartNo"] = box[0].Trim(); + + DataTable dt2 = pbll.SearchInfoByPartNo(row["PartNo"].ToString()); + if (dt2 != null && dt2.Rows.Count > 0) + { + row["PartName"] = dt2.Rows[0]["ProductName"].ToString(); + } + + row["BatchNo"] = box[1].Trim(); + row["PackCount"] = dt1.Rows[0]["SumCount"].ToString(); + row["QLevel"] = dt2.Rows[0]["QLevel"].ToString(); + + #endregion + + #region 保存箱单 + + boxmd.ID = Guid.NewGuid().ToString(); + boxmd.BoxNo = textBox3.Text.Trim(); + boxmd.IsFlag = 1; + boxmd.BoxCount = Convert.ToInt32(dt1.Rows[0]["SumCount"].ToString()); + + boxbll.AddInfo(boxmd); + + #endregion + + #region 打印箱单 + + #region 查询工位ID + + DataTable sdt = sbll.SearchInfoByNo(Program.station); + if (sdt != null && sdt.Rows.Count > 0) + { + stationID = sdt.Rows[0]["StationID"].ToString(); + } + + #endregion + + #region 查询打印机名称 + + //DataTable dt3 = plbll.SearchInfo(row["PartNo"].ToString(), stationID); + //if (dt3 != null && dt3.Rows.Count > 0) + //{ + // printName = "Printer" + dt3.Rows[0]["PrinterNo"].ToString(); + //} + printName = "Printer" + _printNameDict[row["PartNo"].ToString() + stationID]; + + #endregion + + printBoxName = "Printer" + (Convert.ToInt32(printName.Substring(7, 1)) + 2).ToString(); + string reportName = ConfigurationManager.AppSettings[printBoxName].ToString(); + headTable.Rows.Add(row); + + ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + + rp.Report.Print(false); + + #endregion + + panel44.Visible = false; + textBox3.Text = ""; + + + } + } + else + { + MessageBox.Show("此箱单不存在,请重新输入", "提示", MessageBoxButtons.OK); + textBox3.Focus(); + return; + } + + #endregion + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + } + + private void button2_Click(object sender, EventArgs e) + { + panel44.Visible = false; + textBox3.Text = ""; + } + + /// + /// 下一计划 + /// + /// + /// + private void label14_Click(object sender, EventArgs e) + { + try + { + if (MessageBox.Show("确认切换下一计划?", "确认提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return; + + InjectionPlanBLL planbll=new InjectionPlanBLL(); + + #region 查询有无下一计划 + + DataTable dt = planbll.NextSearchInfoByName(Program.station); + if (dt != null && dt.Rows.Count > 1) + { + planID = dt.Rows[0]["InjectionPlanID"].ToString(); + productID = dt.Rows[0]["ProductID"].ToString(); + nextproductID = dt.Rows[1]["InjectionPlanID"].ToString(); + panel45.Visible = true; + } + else + { + MessageBox.Show("暂无下一计划,请联系计划员!", "提示", MessageBoxButtons.OK); + return; + } + + #endregion + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + } + + /// + /// 切换模具 + /// + /// + /// + private void button4_Click(object sender, EventArgs e) + { + try + { + ModelInfoBLL bll=new ModelInfoBLL(); + ModelProductBLL mbll=new ModelProductBLL(); + InjectionPlanBLL ibll=new InjectionPlanBLL(); + InjectionPlanModel md=new InjectionPlanModel(); + ProductBLL productBll = new ProductBLL(); + string aa = ""; + string[] partNo = null; + + + #region 验证数据有效性 模具条码不全暂时先屏蔽 + + if (textBox4.Text.Trim() == "") + { + MessageBox.Show("请扫描模具条码!", "提示", MessageBoxButtons.OK); + textBox4.Focus(); + return; + } + + #endregion + + #region 更新上一计划为完成模具条码不全暂时直接更新计划,后期需要屏蔽,打开下面的Region + + //StationBLL sbll = new StationBLL(); + //DataTable sdt = sbll.SearchInfoByNo(Program.station); + //if (sdt != null && sdt.Rows.Count > 0) + //{ + // md.StationID = sdt.Rows[0]["StationID"].ToString(); + //} + + //ibll.UpdateFinish(md); + + #endregion + + #region 判断模具编号是否存在 模具条码不全暂时先屏蔽 + + DataTable dt5 = bll.SearchInfo(textBox4.Text.Trim()); + if (dt5 != null && dt5.Rows.Count > 0) + { + #region 校验模具和下一计划是否匹配 + + DataTable nextdt = ibll.NextSearchInfoByName(Program.station); + if (nextdt != null && nextdt.Rows.Count > 1) + { + nextPlanID = nextdt.Rows[1]["InjectionPlanID"].ToString(); + aa= nextdt.Rows[1]["PartNo"].ToString(); + partNo = aa.Split(','); + + DataTable dt1 = mbll.SearchInfo(textBox4.Text.Trim(), partNo[0]); + if (dt1 != null && dt1.Rows.Count > 0) + { + #region 更新上一计划为完成 + + //#region 获取工位编号 + + //StationBLL sbll1 = new StationBLL(); + //DataTable sdt1 = sbll1.SearchInfoByNo(Program.station); + //if (sdt1 != null && sdt1.Rows.Count > 0) + //{ + // md.StationID = sdt1.Rows[0]["StationID"].ToString(); + //} + + //#endregion + md.InjectionPlanID = planID; + ibll.UpdateFinish(md); + + #endregion + + panel45.Visible = false; + textBox4.Text = ""; + + } + else + { + MessageBox.Show("模具和计划不匹配!", "提示", MessageBoxButtons.OK); + textBox4.SelectAll(); + textBox4.Focus(); + return; + } + + } + else + { + #region 更新上一计划为完成 + + //StationBLL sbll1 = new StationBLL(); + //DataTable sdt1 = sbll1.SearchInfoByNo(Program.station); + //if (sdt1 != null && sdt1.Rows.Count > 0) + //{ + // md.StationID = sdt1.Rows[0]["StationID"].ToString(); + //} + + //md.InjectionPlanID = planID; + //ibll.UpdateFinish(md); + + #endregion + + label12.Text = "暂无一下生产计划"; + return; + } + + + + #endregion + } + else + { + MessageBox.Show("模具条码不存在!", "提示", MessageBoxButtons.OK); + textBox4.Focus(); + return; + } + + #endregion + + panel45.Visible = false; + + #region 获取当前生产信息 + + //DataTable dt = ibll.SearchInfoByName(Program.station); + //if (dt != null && dt.Rows.Count > 0) + //{ + // planID = dt.Rows[0]["InjectionPlanID"].ToString(); + // string[] partNo1 = dt.Rows[0]["PartNo"].ToString().Split(','); + + // label12.Text = "当前生产计划为:"; + // for (int i = 0; i < partNo1.Length; i++) + // { + // DataTable dt2 = productBll.SearchInfoByPartNo(partNo1[i].ToString().Trim()); + // if (dt2 != null && dt2.Rows.Count > 0) + // { + // label12.Text += "零件号" + partNo1[i].ToString().Trim() + ",零件名称" + dt2.Rows[0]["ProductName"].ToString() + ";"; + // } + // } + //} + //else + //{ + // label12.Text = "暂无生产计划"; + //} + initPlan(); + + #endregion + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + } + + private void button3_Click(object sender, EventArgs e) + { + panel45.Visible = false; + textBox4.Text = ""; + } + + /// + /// 暂停打印 + /// + /// + /// + private void label13_Click(object sender, EventArgs e) + { + try + { + + if (label13.Text == "暂停打印") + { + + DialogResult result = MessageBox.Show("确认暂停打印?", "提示", MessageBoxButtons.OKCancel, + MessageBoxIcon.Information); + if (result == DialogResult.OK) + { + opcGroup1.DataChange -= new DIOPCGroupEvent_DataChangeEventHandler(opcGroup1_DataChange); + opcServer.OPCGroups.RemoveAll(); + opcServer.Disconnect(); + serialPort1.Close(); + + label23.Enabled = true; + label23.BackColor = System.Drawing.Color.DeepSkyBlue; + //if (ConfigurationManager.AppSettings["StationMode"].ToString() == "1") + //{ + // timer1.Enabled = false; + //} + //if (ConfigurationManager.AppSettings["StationMode"].ToString() == "2") + //{ + // serialPort1.Close(); + //} + label13.Text = "开始打印"; + label13.BackColor = System.Drawing.Color.Gray; + } + else + { + return; + } + } + + else + { + + DialogResult result = MessageBox.Show("确认开始打印?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); + if (result == DialogResult.OK) + { + + #region 连接PLC + try + { + if (CreateServer()) + { + if (ConnectServer(strHostIP, "Kepware.KEPServerEX.V6")) + { + Connected = true; + + #region 创建组 + + opcGroups = opcServer.OPCGroups; + opcGroup1 = opcGroups.Add("Mould"); + SetGroupProperty(opcGroup1, 500); + + #endregion + + #region 创建项 + + opcItems1 = opcGroup1.OPCItems; + opcItems1.DefaultIsActive = true; + + PLCMouldBLL PLCbll = new PLCMouldBLL(); + PLCBreakBLL bbll = new PLCBreakBLL(); + + DataTable PLCdt = PLCbll.SearchMould(Program.station); + if (PLCdt != null && PLCdt.Rows.Count > 0) + { + opcItemm1 = new OPCItem[PLCdt.Rows.Count]; + for (int i = 0; i < PLCdt.Rows.Count; i++) + { + opcItemm1[i] = opcItems1.AddItem(PLCdt.Rows[i]["Address"].ToString(), i); + } + } + + Thread.Sleep(200); + + opcGroup1.DataChange += new DIOPCGroupEvent_DataChangeEventHandler(opcGroup1_DataChange); + + + #endregion + } + else + { + MessageBox.Show("连接到OPC服务器失败!", "提示", MessageBoxButtons.OK); + Connected = false; + LogHelper.WriteLog("连接到OPC服务器失败!"); + return; + } + } + else + { + MessageBox.Show("创建OPC服务失败!", "提示", MessageBoxButtons.OK); + Connected = false; + LogHelper.WriteLog("创建OPC服务失败!"); + return; + } + } + catch(Exception ex) + { + MessageBox.Show("创建OPC服务失败!", "提示", MessageBoxButtons.OK); + Connected = false; + LogHelper.WriteLog("创建OPC服务失败!"); + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return; + } + + + #endregion + + + //if (ConfigurationManager.AppSettings["StationMode"].ToString() == "1") + //{ + // timer1.Enabled = true; + //} + //if (ConfigurationManager.AppSettings["StationMode"].ToString() == "2") + //{ + // if (serialPort1.IsOpen) + // { + // serialPort1.Close(); + // serialPort1.Open(); + // } + // else + // { + // serialPort1.Open(); + // } + //} + + label13.Text = "暂停打印"; + label13.BackColor = System.Drawing.Color.DeepSkyBlue; + label23.Enabled = false; + label23.BackColor = System.Drawing.Color.Gray; + textBox2.Text = ""; + } + else + { + return; + } + } + + } + + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + } + + /// + /// 质量录入 + /// + /// + /// + private void label9_Click(object sender, EventArgs e) + { + FrmQuality fr = new FrmQuality(); + fr.QualityViewClosed += (arg1) => + { + try + { + initBarCode(); + } + catch(Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + }; + fr.Show(); + } + + /// + /// 停机录入 + /// + /// + /// + private void label10_Click(object sender, EventArgs e) + { + Form fr = new FrmDown(); + fr.Show(); + } + + private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e) + { + try + { + base.Invoke(new EventHandler(this.Scan)); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + + } + + private void Scan(object sender, EventArgs e) + { + string _code_meca = "",printBoxName=""; + try + { + Thread.Sleep(1500); + char[] buffer = new char[serialPort1.BytesToRead]; + serialPort1.Read(buffer, 0, serialPort1.BytesToRead); + for (int i = 0; i < buffer.Length; i++) + { + _code_meca = _code_meca + buffer[i]; + } + + GetClass(); + + string aa = _code_meca; + + var result1 = System.Text.RegularExpressions.Regex.Replace(aa, @"\s*\n\s*", ","); + result1 = System.Text.RegularExpressions.Regex.Replace(aa, @"\s*\f\s*", ","); + result1 = System.Text.RegularExpressions.Regex.Replace(aa, @"\s*\r\s*", ","); + result1 = result1.Remove(result1.LastIndexOf(","), 1); + result1 = result1.Remove(result1.LastIndexOf("g"), 1); + int idxStart = result1.LastIndexOf(" "); + string value = result1.Substring(idxStart, result1.Length - idxStart).Trim(); + string[] b = value.Split('.'); + string c = b[0]; + string d = b[1]; + int chengzhong = Convert.ToInt32(c); + int chengzhong1 = Convert.ToInt32(d); + if (chengzhong1 >= 5) + { + chengzhong = chengzhong + 1; //重量 + } + + InjectionPlanBLL bll = new InjectionPlanBLL(); + BarCodeBLL brbll = new BarCodeBLL(); + BarCodeModel md = new BarCodeModel(); + ProductBLL productBll = new ProductBLL(); + PlasticBLL pbll = _plasticBLL; + InjectionBoxBLL boxbll = new InjectionBoxBLL(); + InjectionBoxModel boxmd = new InjectionBoxModel(); + DataTable dt2 = null; + string code = "", OneCode = ""; + string newcode = "", newcode1 = "", NewOneCode = "", NewOneCode1 = ""; + string IsPack = "", IsOne = "", QLevel = "", IsPaint = "", PartName = "",IsSupply=""; + string filename = "", printName = ""; + int MaxCount = 0, CurrentCount = 0; + + #region 查找当前计划 + + DataTable dt = bll.SearchInfoByName(Program.station); + if (dt != null && dt.Rows.Count > 0) + { + planID = dt.Rows[0]["InjectionPlanID"].ToString(); + string[] partNo = dt.Rows[0]["PartNo"].ToString().Split(','); + string[] stockNo = new string [partNo.Length]; + //string[] stockNo = dt.Rows[0]["StockNo"].ToString().Split(','); + string ProductNature = dt.Rows[0]["ProductNature"].ToString(); + int IsSame = 0; + + #region 判断有几个零件号 + string mould = "0"; + for (int j = 0; j < partNo.Length; j++) + { + #region 根据零件号查找存货代码 + + DataTable sdt = productBll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + if (sdt != null && sdt.Rows.Count > 0) + { + stockNo[j] = sdt.Rows[0]["StockNo"].ToString(); + IsSame=Convert.ToInt32(sdt.Rows[0]["IsSame"].ToString()); + } + else + { + stockNo[j] = ""; + IsSame = 0; + } + + #endregion + + DataTable dt3 = productBll.SearchInfoByPartNo(partNo[j].ToString().Trim()); + if (dt3 != null && dt3.Rows.Count > 0) + { + QLevel = dt3.Rows[0]["QLevel"].ToString(); + IsOne = dt3.Rows[0]["IsPrintOneTag"].ToString(); + IsPack = dt3.Rows[0]["IsPrintPackList"].ToString(); + IsPaint = dt3.Rows[0]["IsPlating"].ToString(); + PartName = dt3.Rows[0]["ProductName"].ToString(); + MaxCount = Convert.ToInt32(dt3.Rows[0]["PackCount"].ToString()); + IsSupply = dt3.Rows[0]["IsSupply"].ToString(); + } + + if (IsSame == 1) + { + for (int k = 0; k < 2; k++) + { + + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(),true, mould, PartName, ref NewOneCode, ref newcode); + + #region 插入数据tb_barCode + + md.ID = Guid.NewGuid().ToString(); + md.StationID = dt.Rows[0]["StationID"].ToString(); + md.OneBarCode = NewOneCode; + md.BarCode = newcode; + md.StockNo = stockNo[j].ToString().Trim(); + md.PartNo = partNo[j].ToString().Trim(); + md.PrintType = 0; + md.PlanID = planID; + md.ProductNature = ProductNature; + + DataTable pdt = productBll.SearchIsImportByPartNo(partNo[j].ToString()); + if (pdt != null && pdt.Rows.Count > 0) + { + if (pdt.Rows[0]["isImport"].ToString() == "1") + { + md.Import = "国产料Kingfa"; + } + else + { + md.Import = ""; + } + } + + //if (brbll.Add_Info_New(md, Program.tableName)==false) + if (SaveBarCode(md, Program.tableName, true, mould) == false) + { + return; + } + + #endregion + + #region 打印条码,判断是否打印单个条码 + + DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + dt.Rows[0]["StationID"].ToString()); + if (dt4 != null && dt4.Rows.Count > 0) + { + printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + } + + #region 打印单个标签 + + if (IsOne == "1") + { + if (IsSupply == "1") + { + filename = System.AppDomain.CurrentDomain.BaseDirectory + PrintMoudleName(); + + string reportName = ConfigurationManager.AppSettings[printName].ToString(); + DataTable headTable = GetPrintHeadTable(partNo[j].ToString().Trim(), PartName, NewOneCode, newcode); + + ReportHelper rp = new ReportHelper(filename, headTable, null, + (int) GRPaperOrientation.grpoDefault, 1, reportName); + + rp.Report.Print(false); + } + } + + #endregion + + + + #endregion + } + } + else + { + GetSjBarCode(stockNo[j].ToString().Trim(), partNo[j].ToString().Trim(),true, mould, PartName, ref NewOneCode, ref newcode); + + #region 插入数据tb_barCode + + md.ID = Guid.NewGuid().ToString(); + md.StationID = dt.Rows[0]["StationID"].ToString(); + md.OneBarCode = NewOneCode; + md.BarCode = newcode; + md.StockNo = stockNo[j].ToString().Trim(); + md.PartNo = partNo[j].ToString().Trim(); + md.PrintType = 0; + md.PlanID = planID; + md.ProductNature = ProductNature; + + DataTable pdt = productBll.SearchIsImportByPartNo(partNo[j].ToString()); + if (pdt != null && pdt.Rows.Count > 0) + { + if (pdt.Rows[0]["isImport"].ToString() == "1") + { + md.Import = "国产料Kingfa"; + } + else + { + md.Import = ""; + } + } + + //if (brbll.Add_Info_New(md, Program.tableName)==false) + if (SaveBarCode(md, Program.tableName, true, mould) == false) + { + return; + } + + #endregion + + #region 打印条码,判断是否打印单个条码 + + DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(), + dt.Rows[0]["StationID"].ToString()); + if (dt4 != null && dt4.Rows.Count > 0) + { + printName = "Printer" + dt4.Rows[0]["PrinterNo"].ToString(); + } + + #region 打印单个标签 + + if (IsOne == "1") + { + if (IsSupply == "1") + { + filename = System.AppDomain.CurrentDomain.BaseDirectory + PrintMoudleName(); //new + + string reportName = ConfigurationManager.AppSettings[printName].ToString(); + DataTable headTable = GetPrintHeadTable(partNo[j].ToString().Trim(), PartName, NewOneCode, newcode); + + LogHelper.WriteLog(printName + ";" + reportName + ";" + filename); + ReportHelper rp = new ReportHelper(filename, headTable, null, + (int) GRPaperOrientation.grpoDefault, 1, reportName); + + rp.Report.Print(false); + } + } + + #endregion + + + #endregion + } + initBarCode(); + } + + #endregion + } + + #endregion + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + } + private void timer2_Tick(object sender, EventArgs e) + { + initPlan(); + } + + private void comboBox2_TextChanged(object sender, EventArgs e) + { + label12.Focus(); + } + + private void glacialList1_Click(object sender, EventArgs e) + { + try + { + if (glacialList1.SelectedItems.Count > 0) + { + GlacialComponents.Controls.GLItem gv; + gv = glacialList1.SelectedItems[0] as GlacialComponents.Controls.GLItem; + Program.strBarCode = gv.Text; + //Program.strBoxCode = gv.SubItems[4].Text; + Program.strBoxCode = gv.SubItems[0].Tag?.ToString(); + } + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + + } + /// + /// 每隔几秒,连接一下服务器,刷新一下当前计划 + /// + /// + /// + private void timer3_Tick(object sender, EventArgs e) + { + try + { + Ping p1 = new Ping(); + + PingReply reply = p1.Send("10.60.101.60"); //发送主机名或Ip地址 + StringBuilder sbuilder; + if (reply.Status == IPStatus.Success) + { + status = true; + label2.BackColor = Color.LightGray; + } + else + { + status = false; + label2.BackColor = Color.Red; + } + GetClass(); + textBox1.Text = Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + + Program.ProductDate.Substring(8, 2); //批次 + + + + + #region 获取当前生产信息 + + initPlan(); + #endregion + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + + } + + private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) + { + Program.cc = comboBox1.Text; + } + + + + private DateTime GetPrintTime(string station) + { + try + { + DateTime time = DateTime.Now; + StationBLL bll = new StationBLL(); + + DataTable dt = bll.SearchInfoByNo(station); + if (dt != null && dt.Rows.Count > 0) + { + if (string.IsNullOrEmpty(dt.Rows[0]["PrintTime"].ToString())) + { + time = DateTime.Now; + } + else + { + time = Convert.ToDateTime(dt.Rows[0]["PrintTime"].ToString()); + } + } + + return time; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return DateTime.Now; + } + } + + + + private bool UpdatePrintTime(DateTime time, string station) + { + try + { + StationBLL bll = new StationBLL(); + return bll.UpdateTime(time, station); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + private int GetSeconds(string station) + { + try + { + int seconds = 0; + StationBLL bll = new StationBLL(); + + DataTable dt = bll.SearchInfoByNo(station); + if (dt != null && dt.Rows.Count > 0) + { + if (string.IsNullOrEmpty(dt.Rows[0]["Seconds"].ToString())) + { + seconds = 0; + } + else + { + seconds = Convert.ToInt32(dt.Rows[0]["Seconds"].ToString()); + } + } + + return seconds; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return 0; + } + } + + /// + /// 计算时间差 + /// + /// 时间1 + /// 时间2 + /// 返回值:时间差(毫秒为单位) + private long TimeDiff(DateTime t, DateTime t2) + { + long lReturn = -1; + System.TimeSpan NowValue = new TimeSpan(t.Ticks); + System.TimeSpan TimeValue = new TimeSpan(t2.Ticks); + System.TimeSpan DateDiff = TimeSpan.Zero; + try + { + //计算时间差 + //DateDiff = TimeValue.Subtract(NowValue).Duration(); + DateDiff = TimeValue.Subtract(NowValue); + int hours = DateDiff.Hours; + int minutes = DateDiff.Minutes; + int seconds = DateDiff.Seconds; + int milliseconds = DateDiff.Milliseconds; + + string TimeDiff = hours.ToString() + ":" + + minutes.ToString() + ":" + + seconds.ToString() + "." + + milliseconds.ToString(); + //是否比现在的时间小,如果小就设置成第二天再启动,否则当天启动 + if (hours <= 0 && minutes <= 0 && seconds <= 0 && milliseconds <= 0) + hours += 24; + + lReturn = hours * 3600 + + minutes * 60 + + seconds; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + } + return lReturn; + } + + + + bool SaveBarCode(BarCodeModel bcm,string tableName, bool isAutoPrint,string mould,bool handPrint = false) + { + + string rst = _wmsBll.SaveRecordAndInterface(bcm, Program.tableName); + if (string.IsNullOrEmpty(rst)) + { + return true; + } + else + { + LogErrBLL.AddInfo(rst, MethodBase.GetCurrentMethod()); + return false; + } + } + + + + /// + /// 打印箱码 + /// + /// + /// + /// + private void PrintBoxCode(DataRow boxRow,int realCount,string mould) + { + string filename = System.AppDomain.CurrentDomain.BaseDirectory + "装箱单.grf"; + DataTable headTable = new DataTable(); + headTable.Columns.Add("BoxNo"); + headTable.Columns.Add("PartName"); + headTable.Columns.Add("PartNo"); + headTable.Columns.Add("BatchNo"); + headTable.Columns.Add("PackCount"); + headTable.Columns.Add("Line"); + DataRow row = headTable.NewRow(); + string boxCode = boxRow["BoxNo"].ToString(); + string[] boxes = boxCode.Split('.'); + if(boxes.Length != 4) + { + //新生成一个箱码 应该都有 + } + else + { + row["BoxNo"] = boxCode; + row["PartNo"] = boxes[0].Trim(); + row["PartName"] = boxRow["PartName"].ToString(); + row["BatchNo"] = boxes[1].Trim(); + row["PackCount"] = realCount; + row["Line"] = boxRow["StationNo"].ToString()+"注塑机"; + } + UpdateBoxRecordPrintState(boxCode); + string printBoxName = string.Empty; + if (mould == "1") + { + printBoxName = "Printer3"; + } + else + { + printBoxName = "Printer4"; + } + + string reportName = ConfigurationManager.AppSettings[printBoxName].ToString(); + headTable.Rows.Add(row); + + ReportHelper rp = new ReportHelper(filename, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, reportName); + + rp.Report.Print(false); + + + } + + private void UpdateBoxRecordPrintState(string UpdatePrinted) + { + _injectionBoxBLL.UpdatePrinted(UpdatePrinted); + } + + + + /// + /// 20位注塑条码 + /// + /// + /// + /// + /// + /// + /// + void GetSjBarCode(string stockNo,string partNo, bool autoPrint,string mould,string partName, ref string newOneCode,ref string newCode) + { + string batch = GetBatch(autoPrint); + newOneCode = _uniqueBll.GetSjBarCodeSerialNo(stockNo, batch); + newCode = partNo + "." + batch + "." + newOneCode.Substring(newOneCode.Length - 4, 4); + } + + + string GetBatch(bool isAutoPrint) + { + string batch = string.Empty; + if (isAutoPrint) + { + batch = Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + Program.ProductDate.Substring(8, 2); + } + else + { + batch = textBox1.Text.Trim(); + } + return batch; + } + //private object _selectItemL = null; + //bool _isShowHintL = true; + + //private object _selectItemR = null; + //bool _isShowHintR = true; + + + /// + /// 直供件条码 A2478852600#Q02#240826#001# + /// + /// + /// + /// + void GetSupplyCode(string partNo,string qLevel, bool autoPrint,string mould,string partName, ref string newCode) + { + string batch = string.Empty; + if (autoPrint) + { + batch = Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + Program.ProductDate.Substring(8, 2); + } + else + { + batch = textBox1.Text.Trim(); + } + newCode = _uniqueBll.GetSupplySerialNo(partNo, qLevel, batch); + + } + + + bool? lastCheckState = null; + + + /// + /// 用户双击 + /// + /// + /// + private void label7_MouseDoubleClick(object sender, MouseEventArgs e) + { + timer3.Enabled = false; + //调用测试 + Array a = null; + Array b = null; + Array c = null; + Array d = null; + status = true; + IsTest = true; + bool bbb = true; + //label23_Click(null, null); + textBox1.Text = Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) + + Program.ProductDate.Substring(8, 2); + if (bbb == true) + { //自动 + opcGroup1_DataChange(1, 1, ref a, ref b, ref c, ref d); + } + else + { //手动 + label23_Click(null, null); + } + } + bool IsTest = false; + /// + /// 工位双击 + /// + /// + /// + private void label5_MouseDoubleClick(object sender, MouseEventArgs e) + { + timer3.Enabled = false; + } + + + string PrintMoudleName() + { + if("IM05,IM08,IM10".Contains(Program.station)) //二维小条码 + { + return "单个条码2.grf"; + } + else if ("IM06,IM07,IM09,IM11,IM12,".Contains(Program.station)) //一维条码 + { + return "单个条码.grf"; + } + + else if ("IM01,IM02,IM03,IM04,IM15,IM18,IM20".Contains(Program.station)) //小米大条码 + { + return "Sill.grf"; + } + else if ("IM13,IM14".Contains(Program.station)) //直供条码 + { + return "单个条码1.grf"; + } + else + { + return "单个条码2.grf"; + } + + } + DataTable GetPrintLableModel() + { + DataTable headTable = new DataTable(); + headTable.Columns.Add("PrintTime"); + headTable.Columns.Add("PartNo"); + headTable.Columns.Add("PartName"); + headTable.Columns.Add("OneBarCode"); + headTable.Columns.Add("BarCode"); + headTable.Columns.Add("Station"); + return headTable; + } + DataTable GetPrintHeadTable(string partNo,string partName,string oneBarCode,string barCode) + { + DataTable headTable = GetPrintLableModel(); + DataRow row = headTable.NewRow(); + row["PrintTime"] = + GetDateTime().ToString("yyyy/MM/dd HH:mm:ss"); + row["PartNo"] = partNo; + row["PartName"] = partName; + row["OneBarCode"] = oneBarCode; + row["BarCode"] = barCode; + row["Station"] = Program.station; + headTable.Rows.Add(row); + return headTable; + } + List GetProductBoxSize(string productCode,ref string currentSize) + { + try + { + ProductBLL productBll = new ProductBLL(); + DataTable dt = productBll.SearchInfoByPartNo(productCode); + if (dt.Rows.Count == 0) + { + currentSize = "24"; + MessageBox.Show("零件号{productCode}未设置标包,默认为24,请及时核对后进行配置."); + return null; + } + currentSize = dt.Rows[0]["PackCount"].ToString(); + string sizeStr = dt.Rows[0]["PackCountSize"].ToString(); + List list = new List(); + if (string.IsNullOrEmpty(sizeStr)) + { + list.Add(currentSize); + return list; + } + else + { + string[] array = sizeStr.Split(','); + foreach (string item in array) + { + if (!list.Contains(item)) + { + list.Add(item); + } + } + if (!list.Contains(currentSize)) + { + list.Add(currentSize); + } + } + return list; + } + catch(Exception ex) + { + currentSize = "24"; + MessageBox.Show("零件号{productCode}未设置标包,默认为24,请及时核对后进行配置."); + return null; + } + + } + } +} diff --git a/InjectionPC/FrmMain2411.resx b/InjectionPC/FrmMain2411.resx new file mode 100644 index 0000000..58c5060 --- /dev/null +++ b/InjectionPC/FrmMain2411.resx @@ -0,0 +1,493 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAAH0AAABMCAYAAABAprgtAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADrwAAA68AZW8ckkAAFLNSURBVHhezb13fFfFvi7M+3n/ + vfe957jde4uFooiI2HsXuwiWrShYwQJSpIr0jvTeewm9hk4IkAAhIQESIIEQEggJ6e3Xe8nzPs+Exc72 + RN3nnns/+4x+Weu31sysmXm+dWbWSiP8QQqHw4Zqa2sNhUIhRKNRXgsiZMiDUOTvFI54EeX1YCQIfziK + QDiC2hAQiYDntQjURlgmCj/r8Qf8zOPmby8iUT8iYZ85D4f9CAZcCId4XddYZ4DXdQxG3CzL+2xDqJb1 + RyMIhkOIgG3iebg2jECEhFpeC7MttTf7oHar/fX782vSPaUIG6z89a+r7D9DKiuyfqu8flt1/6vT74Ju + dVxkdUQNrxuAAAH2G5Drjn+nIO/7CbY3WAtXqBbeQAQufxgOXwC2QAj2QC1s/gCqvT7YQz4DWpgAikIE + zBsJwc36fTz38J6bTOQIBeHk0ebzspwHlW4Xavw+uHjNqTxB1uX38jcZicAHBRTrs9ptkUBQ++sDWp+s + e8pr/bbKiYLB4M0x+DVFbhytvFZ+1Wfl+e+Qfhf0sAaK4FmNjlKSQhx8dSQUDhCgOinUtbAhXtO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/Iqo2dYWkC/rXaq + rO7pXEfVrWuWFAtc1WHl1dGSepHy65raqDbrt+430kWLlKzMVmEd/3fIevD/LWromfWpoTIi9c06WoP0 + 62P9PBboVp317+moe9a5RQJFyarTuq7fVv5fP8e6bpVVOevZOrfaYP22rln1W4wjsp4nssr9/Xlh/P/3 + q22C8fY24wAAAABJRU5ErkJggg== + + + + 17, 17 + + + 103, 17 + + + 217, 17 + + + 307, 17 + + \ No newline at end of file diff --git a/InjectionPC/InjectionPC.csproj b/InjectionPC/InjectionPC.csproj index 0e246c8..9774840 100644 --- a/InjectionPC/InjectionPC.csproj +++ b/InjectionPC/InjectionPC.csproj @@ -109,6 +109,12 @@ FrmLogin.cs + + Form + + + FrmMain2411.cs + Form @@ -189,6 +195,9 @@ FrmLogin.cs + + FrmMain2411.cs + FrmMain2408.cs diff --git a/MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs b/MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs index b7d12f1..2953027 100644 --- a/MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs +++ b/MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs @@ -99,7 +99,18 @@ namespace MESClassLibrary.BLL.BasicInfo return false; } } - + public bool Add_Info_New(LocalDBService local, BarCodeModel md, string tableName) + { + try + { + return db.AddInfoNew(md, tableName); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } public DataTable SearchInfo(string stationNo) { try diff --git a/MESClassLibrary/BLL/Wms/WmsBLL.cs b/MESClassLibrary/BLL/Wms/WmsBLL.cs index 7102fb4..935bf83 100644 --- a/MESClassLibrary/BLL/Wms/WmsBLL.cs +++ b/MESClassLibrary/BLL/Wms/WmsBLL.cs @@ -18,6 +18,37 @@ namespace MESClassLibrary.BLL.Injection private WmsDAL da=new WmsDAL(); private BarCodeDAl barCodeDal = new BarCodeDAl(); + public string SaveRecordAndInterface(BarCodeModel bcm,string tableName) + { + LocalDBService local = new LocalDBService(SqlHelper.GetConnSting()); + try + { + local.BeginTrans(); + + barCodeDal.AddInfoNew(local, bcm, tableName); + da.SaveInterface(local, bcm); + local.Commit(); + } + catch (Exception ex) + { + if (local != null) + { + local.Rollback(); + } + return ex.Message; + } + finally + { + if (local != null) + { + local.EndTrans(); + } + } + return null; + + + } + public string SaveInterface(string boxNo,string lastBoxNo1,string lastBoxNo2, WmsInterfaceEnum interfaceType) { //上一个是否传递成功,没成功重新传 左侧 diff --git a/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs b/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs index 07dfd04..6d0f058 100644 --- a/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs +++ b/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs @@ -364,7 +364,24 @@ namespace MESClassLibrary.DAL.BasicInfo return false; } } + public bool AddInfoNew(LocalDBService local, BarCodeModel md, string tableName) + { + + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + tableName + " (ID,StationID,OneBarCode,[BarCode],[StockNo],[PartNo],[PrintType],[CreateTime],[IsImport],StationID2,PlanID,ProductNature,Des1,Des2,Des3,Des4,Des5,BoxNo,Weight"; + sql += $") VALUES ('{md.ID}','{md.StationID}','{md.OneBarCode}','{md.BarCode}','{md.StockNo}','{md.PartNo}','{md.PrintType}','{md.Import}'," + + $"'{md.StationID2}','{md.PlanID}','{md.ProductNature}','{md.Des1}','{md.Des2}','{md.Des3}','{md.Des4}','{md.Des5}','{md.BoxNo}','{ md.Weight}')"; + + #endregion + return local.Exec_NonQuery(sql); + + + + + } public DataTable SearchInfo(string stationNo) { try diff --git a/MESClassLibrary/DAL/Wms/WmsDAL.cs b/MESClassLibrary/DAL/Wms/WmsDAL.cs index c3709a0..43c37da 100644 --- a/MESClassLibrary/DAL/Wms/WmsDAL.cs +++ b/MESClassLibrary/DAL/Wms/WmsDAL.cs @@ -53,6 +53,21 @@ namespace MESClassLibrary.DAL.Injection } return null; } + + public bool SaveInterface(LocalDBService local, BarCodeModel bcm) + { + try + { + string sql = $" insert into tb_Injectionn_Interface(PackageCode,OneBarCode,BarCode,Remark)" + + $" values ('{bcm.BoxNo}','{bcm.OneBarCode}','{bcm.BarCode}','')"; + return local.Exec_NonQuery(sql); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } /// /// wms注塑中间表tb_Injectionn_Interface 单条插入箱码,注塑码数据 /// diff --git a/PaintingPC/FrmQuality.Designer.cs b/PaintingPC/FrmQuality.Designer.cs index 3053313..b0e40f9 100644 --- a/PaintingPC/FrmQuality.Designer.cs +++ b/PaintingPC/FrmQuality.Designer.cs @@ -55,6 +55,7 @@ this.panel1 = new System.Windows.Forms.Panel(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.panelAttchColor = new System.Windows.Forms.Panel(); + this.lbForeig = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.cboxAddColor = new System.Windows.Forms.ComboBox(); this.btnOk = new System.Windows.Forms.Button(); @@ -62,7 +63,6 @@ this.btnRepair = new System.Windows.Forms.Button(); this.btnAbt = new System.Windows.Forms.Button(); this.lableFP = new System.Windows.Forms.Label(); - this.lbForeig = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); this.panel1.SuspendLayout(); @@ -295,6 +295,19 @@ this.panelAttchColor.Size = new System.Drawing.Size(1829, 176); this.panelAttchColor.TabIndex = 0; // + // lbForeig + // + this.lbForeig.AutoSize = true; + this.lbForeig.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbForeig.ForeColor = System.Drawing.Color.Red; + this.lbForeig.Location = new System.Drawing.Point(41, 149); + this.lbForeig.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbForeig.Name = "lbForeig"; + this.lbForeig.Size = new System.Drawing.Size(58, 21); + this.lbForeig.TabIndex = 72; + this.lbForeig.Tag = "老外库提示"; + this.lbForeig.Text = " "; + // // label1 // this.label1.AutoSize = true; @@ -322,7 +335,7 @@ // this.btnOk.BackColor = System.Drawing.Color.LawnGreen; this.btnOk.Font = new System.Drawing.Font("宋体", 25.875F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnOk.Location = new System.Drawing.Point(1852, 819); + this.btnOk.Location = new System.Drawing.Point(1852, 760); this.btnOk.Name = "btnOk"; this.btnOk.Size = new System.Drawing.Size(491, 197); this.btnOk.TabIndex = 67; @@ -334,20 +347,19 @@ // this.btnNok.BackColor = System.Drawing.Color.Yellow; this.btnNok.Font = new System.Drawing.Font("宋体", 25.875F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnNok.Location = new System.Drawing.Point(1860, 1073); + this.btnNok.Location = new System.Drawing.Point(1852, 1626); this.btnNok.Name = "btnNok"; - this.btnNok.Size = new System.Drawing.Size(491, 12); + this.btnNok.Size = new System.Drawing.Size(491, 160); this.btnNok.TabIndex = 68; - this.btnNok.Text = "不 良"; + this.btnNok.Text = "其 它"; this.btnNok.UseVisualStyleBackColor = false; - this.btnNok.Visible = false; this.btnNok.Click += new System.EventHandler(this.btnNok_Click); // // btnRepair // this.btnRepair.BackColor = System.Drawing.Color.DodgerBlue; this.btnRepair.Font = new System.Drawing.Font("宋体", 25.875F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnRepair.Location = new System.Drawing.Point(1852, 1220); + this.btnRepair.Location = new System.Drawing.Point(1848, 1039); this.btnRepair.Name = "btnRepair"; this.btnRepair.Size = new System.Drawing.Size(491, 197); this.btnRepair.TabIndex = 69; @@ -359,7 +371,7 @@ // this.btnAbt.BackColor = System.Drawing.Color.OrangeRed; this.btnAbt.Font = new System.Drawing.Font("宋体", 25.875F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnAbt.Location = new System.Drawing.Point(1852, 1599); + this.btnAbt.Location = new System.Drawing.Point(1848, 1339); this.btnAbt.Name = "btnAbt"; this.btnAbt.Size = new System.Drawing.Size(491, 190); this.btnAbt.TabIndex = 70; @@ -380,19 +392,6 @@ this.lableFP.Tag = "存在返喷"; this.lableFP.Text = " "; // - // lbForeig - // - this.lbForeig.AutoSize = true; - this.lbForeig.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lbForeig.ForeColor = System.Drawing.Color.Red; - this.lbForeig.Location = new System.Drawing.Point(41, 149); - this.lbForeig.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lbForeig.Name = "lbForeig"; - this.lbForeig.Size = new System.Drawing.Size(58, 21); - this.lbForeig.TabIndex = 72; - this.lbForeig.Tag = "老外库提示"; - this.lbForeig.Text = " "; - // // FrmQuality // this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F); diff --git a/PaintingPC/FrmQuality.cs b/PaintingPC/FrmQuality.cs index d58764a..c98f2ba 100644 --- a/PaintingPC/FrmQuality.cs +++ b/PaintingPC/FrmQuality.cs @@ -29,7 +29,7 @@ namespace PaintingPC { InitializeComponent(); //WindowState = FormWindowState.Normal; - this.Size = new Size(1280, 1024); + this.Size = new Size(1280, 1020); this._isWmsQuality = isWmsQuality; if(isWmsQuality == true) @@ -251,7 +251,7 @@ namespace PaintingPC private Control[] SetControlGroup() { //Control[] controls = { btnPass, btnAbt, btnRepair }; - Control[] controls = { btnAbt, btnRepair }; + Control[] controls = { }; return controls; } @@ -323,7 +323,7 @@ namespace PaintingPC } /// - /// 不合格 + /// 其它 /// /// /// @@ -335,7 +335,7 @@ namespace PaintingPC return; } - if (MessageBox.Show($"确认对[{txtBarCode.Text}]进行不良判定?", "操作确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return; + if (MessageBox.Show($"确认对[{txtBarCode.Text}]进行[其它]判定?", "操作确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return; ShowHint(""); #region 必须选择缺陷位置与缺陷原因,否则无法保存 if (CheckDefect() == false) return; @@ -347,17 +347,25 @@ namespace PaintingPC if (CheckColor(ref colorName, ref partName) == false) return; #endregion string lastRst = GetLastInspectRst(txtBarCode.Text.Trim()); - if (lastRst.Contains("不良")) + if (lastRst.Contains("其它")) { - MessageBox.Show("条码已判定为不合格,无需重复判定"); + MessageBox.Show("条码已判定为其它,无需重复判定"); Clear(); return; } //保存 - SaveInspect("不良", colorName, partName); - ClearPage(); - ClearTxtBarcode(); - txtBarCode.TabIndex = 0; + SaveInspect("其它", colorName, partName); + try + { + SendToWms(txtBarCode.Text.Trim(), 8); + } + catch (Exception ex) + { + ShowHint("返喷WMS报工异常,原因:" + ex.Message); + MessageBox.Show("返喷WMS报工异常,原因:" + ex.Message); + LogHelper.WriteErrLogBase("返喷WMS报工调用WMS接口:" + ex.ToString(), MethodBase.GetCurrentMethod().Name); + } + Clear(); } /// @@ -481,25 +489,6 @@ namespace PaintingPC try { SendToWms(txtBarCode.Text.Trim(), 0); - - // WMSWebService webService = new WMSWebService(); - // webService.Url = ConfigurationManager.AppSettings["WMSWebServiceURL"].ToString(); - // //webService.Timeout = 1200000; - - // string errorReason = ""; - //bool rst = webService.WMSSprayingForCS(Function.UniteBarCodeToOne(txtBarCode.Text.Trim()), 0, out errorReason); - //if(rst == false) - // { - - // if (!string.IsNullOrEmpty(id)) - // { - // LogHelper.WriteErrLogBase($"质检调用WMS接口失败,删除条码为[{txtBarCode.Text}]的质检记录", MethodBase.GetCurrentMethod().Name); - - // Function.DelInspectRst(id); - // } - // MessageBox.Show("报废操作失败,原因:"+ errorReason); - // return; - // } } catch (Exception ex) @@ -1104,8 +1093,8 @@ namespace PaintingPC { labProductInfo.Tag = null; labProductInfo.Text = ""; - btnAbt.BackColor = Color.LightGray; - btnRepair.BackColor = Color.LightGray; + //btnAbt.BackColor = Color.LightGray; + //btnRepair.BackColor = Color.LightGray; //ClearRadioButton(); ClearInspect(); @@ -1212,7 +1201,44 @@ namespace PaintingPC } } - + void UserInput(Action GetUserName) + { + Form frm = new Form(); + frm.Size = new Size(400, 300); + frm.StartPosition = FormStartPosition.CenterParent; + TextBox tb = new TextBox(); + tb.Width = 300; + tb.Location = new System.Drawing.Point(30, 30); + tb.PasswordChar = '#'; + Button bt = new Button(); + bt.Width = 100; + bt.Text = "确定"; + bt.Margin = new Padding(40, 100, 0, 0); + bt.Location = new System.Drawing.Point(100, 171); + bt.Click += (arg1, arg2) => { + frm.Close(); + string s = tb.Text; + + //if (s == pass) + //{ + // if (moudel == "0") + // { + // comBoxSizeL.Enabled = true; + // } + // else + // { + // comBoxSizeR.Enabled = true; + // } + //} + //else + //{ + // MessageBox.Show("密码错误"); + //} + }; + frm.Controls.Add(tb); + frm.Controls.Add(bt); + frm.ShowDialog(); + } private void txtBarCode_DoubleClick(object sender, EventArgs e)