Browse Source

注塑质检微调. 记录显示改为20位一维码

master
ruoxing.wang 4 weeks ago
parent
commit
d6d473022c
  1. 166
      FacOneZPStation/FrmZP.Designer.cs
  2. 428
      InjectionPC/FrmMain.Designer.cs
  3. 669
      InjectionPC/FrmMain2408.Designer.cs
  4. 460
      InjectionPC/FrmMain2408.cs
  5. 3
      InjectionPC/FrmMain2408.resx
  6. 410
      InjectionPC/FrmMain2411.Designer.cs
  7. 168
      InjectionPC/FrmMain2411.cs
  8. 117
      InjectionPC/FrmQuality.cs
  9. 40
      MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs
  10. 3
      MESClassLibrary/BLL/Wms/WmsBLL.cs
  11. 10
      MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs
  12. 1
      MESClassLibrary/DAL/Wms/WmsDAL.cs
  13. 12
      PaintingPC/FrmQuality.cs

166
FacOneZPStation/FrmZP.Designer.cs

@ -76,7 +76,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, 765F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 705F));
this.tableLayoutPanel3.Controls.Add(this.button6, 3, 0);
this.tableLayoutPanel3.Controls.Add(this.button1, 0, 1);
this.tableLayoutPanel3.Controls.Add(this.button5, 2, 1);
@ -85,14 +85,14 @@
this.tableLayoutPanel3.Controls.Add(this.button2, 1, 1);
this.tableLayoutPanel3.Controls.Add(this.button7, 3, 1);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(7, 1401);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.tableLayoutPanel3.Location = new System.Drawing.Point(6, 1224);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 2;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(2546, 423);
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(2335, 371);
this.tableLayoutPanel3.TabIndex = 3;
//
// button6
@ -101,10 +101,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(1793, 14);
this.button6.Margin = new System.Windows.Forms.Padding(14);
this.button6.Location = new System.Drawing.Point(1642, 12);
this.button6.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(739, 183);
this.button6.Size = new System.Drawing.Size(680, 161);
this.button6.TabIndex = 7;
this.button6.Text = "手动打印箱单";
this.button6.UseVisualStyleBackColor = false;
@ -115,10 +115,10 @@
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.button1.Dock = System.Windows.Forms.DockStyle.Fill;
this.button1.Font = new System.Drawing.Font("黑体", 16F);
this.button1.Location = new System.Drawing.Point(7, 217);
this.button1.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
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(582, 200);
this.button1.Size = new System.Drawing.Size(534, 176);
this.button1.TabIndex = 6;
this.button1.Text = "打印标签";
this.button1.UseVisualStyleBackColor = false;
@ -130,10 +130,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(1208, 225);
this.button5.Margin = new System.Windows.Forms.Padding(14);
this.button5.Location = new System.Drawing.Point(1107, 197);
this.button5.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(557, 184);
this.button5.Size = new System.Drawing.Size(509, 162);
this.button5.TabIndex = 5;
this.button5.Text = "不合格";
this.button5.UseVisualStyleBackColor = false;
@ -144,10 +144,10 @@
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(603, 6);
this.button4.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.button4.Location = new System.Drawing.Point(552, 5);
this.button4.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(584, 199);
this.button4.Size = new System.Drawing.Size(536, 175);
this.button4.TabIndex = 4;
this.button4.Text = "下一计划";
this.button4.UseVisualStyleBackColor = false;
@ -158,10 +158,10 @@
this.button3.BackColor = System.Drawing.Color.Aqua;
this.button3.Dock = System.Windows.Forms.DockStyle.Fill;
this.button3.Font = new System.Drawing.Font("黑体", 16F);
this.button3.Location = new System.Drawing.Point(7, 6);
this.button3.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
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(582, 199);
this.button3.Size = new System.Drawing.Size(534, 175);
this.button3.TabIndex = 3;
this.button3.Text = "上一计划";
this.button3.UseVisualStyleBackColor = false;
@ -173,10 +173,10 @@
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(610, 225);
this.button2.Margin = new System.Windows.Forms.Padding(14);
this.button2.Location = new System.Drawing.Point(559, 197);
this.button2.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(570, 184);
this.button2.Size = new System.Drawing.Size(522, 162);
this.button2.TabIndex = 2;
this.button2.Text = "补打标签";
this.button2.UseVisualStyleBackColor = false;
@ -187,10 +187,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(1786, 217);
this.button7.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.button7.Location = new System.Drawing.Point(1635, 190);
this.button7.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(753, 200);
this.button7.Size = new System.Drawing.Size(694, 176);
this.button7.TabIndex = 8;
this.button7.Text = "补打箱单";
this.button7.UseVisualStyleBackColor = false;
@ -202,11 +202,11 @@
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(1443, 3);
this.label7.Location = new System.Drawing.Point(1318, 3);
this.label7.Margin = new System.Windows.Forms.Padding(2);
this.label7.Name = "label7";
this.tableLayoutPanel4.SetRowSpan(this.label7, 2);
this.label7.Size = new System.Drawing.Size(272, 241);
this.label7.Size = new System.Drawing.Size(249, 210);
this.label7.TabIndex = 32;
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@ -214,10 +214,10 @@
//
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(416, 127);
this.textBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBox2.Location = new System.Drawing.Point(380, 111);
this.textBox2.Margin = new System.Windows.Forms.Padding(4);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(1020, 87);
this.textBox2.Size = new System.Drawing.Size(931, 77);
this.textBox2.TabIndex = 30;
this.textBox2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox2_KeyDown);
//
@ -226,10 +226,10 @@
this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
this.label3.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ForeColor = System.Drawing.Color.White;
this.label3.Location = new System.Drawing.Point(5, 122);
this.label3.Location = new System.Drawing.Point(5, 107);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(402, 124);
this.label3.Size = new System.Drawing.Size(366, 108);
this.label3.TabIndex = 29;
this.label3.Text = "扫描物料条码";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -239,10 +239,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(1720, 249);
this.labOrderNo.Location = new System.Drawing.Point(1572, 218);
this.labOrderNo.Margin = new System.Windows.Forms.Padding(2);
this.labOrderNo.Name = "labOrderNo";
this.labOrderNo.Size = new System.Drawing.Size(829, 174);
this.labOrderNo.Size = new System.Drawing.Size(764, 151);
this.labOrderNo.TabIndex = 28;
this.labOrderNo.Text = "A64654646464";
this.labOrderNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -253,10 +253,10 @@
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(1443, 249);
this.label4.Location = new System.Drawing.Point(1318, 218);
this.label4.Margin = new System.Windows.Forms.Padding(2);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(272, 174);
this.label4.Size = new System.Drawing.Size(249, 151);
this.label4.TabIndex = 27;
this.label4.Text = "计划编号";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -267,10 +267,10 @@
this.labStationNo.Dock = System.Windows.Forms.DockStyle.Fill;
this.labStationNo.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labStationNo.ForeColor = System.Drawing.Color.White;
this.labStationNo.Location = new System.Drawing.Point(414, 249);
this.labStationNo.Location = new System.Drawing.Point(378, 218);
this.labStationNo.Margin = new System.Windows.Forms.Padding(2);
this.labStationNo.Name = "labStationNo";
this.labStationNo.Size = new System.Drawing.Size(1024, 174);
this.labStationNo.Size = new System.Drawing.Size(935, 151);
this.labStationNo.TabIndex = 26;
this.labStationNo.Text = "V253-MF-S后保下部延伸焊接";
this.labStationNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -281,10 +281,10 @@
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
this.label2.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(3, 249);
this.label2.Location = new System.Drawing.Point(3, 218);
this.label2.Margin = new System.Windows.Forms.Padding(2);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(406, 174);
this.label2.Size = new System.Drawing.Size(370, 151);
this.label2.TabIndex = 25;
this.label2.Text = "工位名称";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -294,10 +294,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(1720, 428);
this.labPName.Location = new System.Drawing.Point(1572, 374);
this.labPName.Margin = new System.Windows.Forms.Padding(2);
this.labPName.Name = "labPName";
this.labPName.Size = new System.Drawing.Size(829, 285);
this.labPName.Size = new System.Drawing.Size(764, 248);
this.labPName.TabIndex = 24;
this.labPName.Text = "MF253 MF S后保";
this.labPName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -308,10 +308,10 @@
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(1443, 428);
this.label8.Location = new System.Drawing.Point(1318, 374);
this.label8.Margin = new System.Windows.Forms.Padding(2);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(272, 285);
this.label8.Size = new System.Drawing.Size(249, 248);
this.label8.TabIndex = 23;
this.label8.Text = "产品名称";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -322,10 +322,10 @@
this.labPartNo.Dock = System.Windows.Forms.DockStyle.Fill;
this.labPartNo.Font = new System.Drawing.Font("黑体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labPartNo.ForeColor = System.Drawing.Color.White;
this.labPartNo.Location = new System.Drawing.Point(414, 428);
this.labPartNo.Location = new System.Drawing.Point(378, 374);
this.labPartNo.Margin = new System.Windows.Forms.Padding(2);
this.labPartNo.Name = "labPartNo";
this.labPartNo.Size = new System.Drawing.Size(1024, 285);
this.labPartNo.Size = new System.Drawing.Size(935, 248);
this.labPartNo.TabIndex = 22;
this.labPartNo.Text = "A2530822665";
this.labPartNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -341,10 +341,10 @@
this.label6.Dock = System.Windows.Forms.DockStyle.Fill;
this.label6.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.ForeColor = System.Drawing.Color.White;
this.label6.Location = new System.Drawing.Point(3, 428);
this.label6.Location = new System.Drawing.Point(3, 374);
this.label6.Margin = new System.Windows.Forms.Padding(2);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(406, 285);
this.label6.Size = new System.Drawing.Size(370, 248);
this.label6.TabIndex = 21;
this.label6.Text = "产品代码";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -355,10 +355,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(1720, 718);
this.labBadCount.Location = new System.Drawing.Point(1572, 627);
this.labBadCount.Margin = new System.Windows.Forms.Padding(2);
this.labBadCount.Name = "labBadCount";
this.labBadCount.Size = new System.Drawing.Size(829, 515);
this.labBadCount.Size = new System.Drawing.Size(764, 451);
this.labBadCount.TabIndex = 20;
this.labBadCount.Text = "0";
this.labBadCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -369,10 +369,10 @@
this.labNum.Dock = System.Windows.Forms.DockStyle.Fill;
this.labNum.Font = new System.Drawing.Font("黑体", 60F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labNum.ForeColor = System.Drawing.Color.Lime;
this.labNum.Location = new System.Drawing.Point(414, 718);
this.labNum.Location = new System.Drawing.Point(378, 627);
this.labNum.Margin = new System.Windows.Forms.Padding(2);
this.labNum.Name = "labNum";
this.labNum.Size = new System.Drawing.Size(1024, 515);
this.labNum.Size = new System.Drawing.Size(935, 451);
this.labNum.TabIndex = 18;
this.labNum.Text = "152/210";
this.labNum.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -383,10 +383,10 @@
this.label10.Dock = System.Windows.Forms.DockStyle.Fill;
this.label10.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.ForeColor = System.Drawing.Color.White;
this.label10.Location = new System.Drawing.Point(3, 718);
this.label10.Location = new System.Drawing.Point(3, 627);
this.label10.Margin = new System.Windows.Forms.Padding(2);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(406, 515);
this.label10.Size = new System.Drawing.Size(370, 451);
this.label10.TabIndex = 17;
this.label10.Text = "计划/完成数";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -399,7 +399,7 @@
this.label14.Location = new System.Drawing.Point(5, 1);
this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(402, 120);
this.label14.Size = new System.Drawing.Size(366, 105);
this.label14.TabIndex = 12;
this.label14.Text = "扫描本体条码";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -408,10 +408,10 @@
//
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(416, 6);
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBox1.Location = new System.Drawing.Point(380, 5);
this.textBox1.Margin = new System.Windows.Forms.Padding(4);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(1020, 87);
this.textBox1.Size = new System.Drawing.Size(931, 77);
this.textBox1.TabIndex = 13;
this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown);
//
@ -420,11 +420,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(1722, 1);
this.labErrMessage.Location = new System.Drawing.Point(1574, 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(825, 245);
this.labErrMessage.Size = new System.Drawing.Size(760, 214);
this.labErrMessage.TabIndex = 16;
this.labErrMessage.Text = "条码与产品不匹配,重新扫描";
this.labErrMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -436,9 +436,9 @@
this.tableLayoutPanel4.ColumnCount = 4;
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, 276F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 832F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F));
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, 767F));
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);
this.tableLayoutPanel4.Controls.Add(this.label3, 0, 1);
@ -458,17 +458,17 @@
this.tableLayoutPanel4.Controls.Add(this.textBox1, 1, 0);
this.tableLayoutPanel4.Controls.Add(this.labErrMessage, 3, 0);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel4.Location = new System.Drawing.Point(4, 154);
this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tableLayoutPanel4.Location = new System.Drawing.Point(4, 134);
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));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 17.47573F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40.52419F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 517F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(2552, 1236);
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 452F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(2339, 1081);
this.tableLayoutPanel4.TabIndex = 2;
//
// label12
@ -477,10 +477,10 @@
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(1443, 718);
this.label12.Location = new System.Drawing.Point(1318, 627);
this.label12.Margin = new System.Windows.Forms.Padding(2);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(272, 515);
this.label12.Size = new System.Drawing.Size(249, 451);
this.label12.TabIndex = 19;
this.label12.Text = "不合格数";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -490,10 +490,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(1927, 0);
this.labTime.Location = new System.Drawing.Point(1765, 0);
this.labTime.Margin = new System.Windows.Forms.Padding(0);
this.labTime.Name = "labTime";
this.labTime.Size = new System.Drawing.Size(633, 149);
this.labTime.Size = new System.Drawing.Size(582, 130);
this.labTime.TabIndex = 7;
this.labTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.labTime.Click += new System.EventHandler(this.labTime_Click);
@ -507,7 +507,7 @@
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(349, 149);
this.pictureBox1.Size = new System.Drawing.Size(319, 130);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
@ -517,10 +517,10 @@
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
this.label1.Font = new System.Drawing.Font("黑体", 22F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(349, 0);
this.label1.Location = new System.Drawing.Point(319, 0);
this.label1.Margin = new System.Windows.Forms.Padding(0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(1578, 149);
this.label1.Size = new System.Drawing.Size(1446, 130);
this.label1.TabIndex = 1;
this.label1.Text = "装配工位信息看板";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -531,7 +531,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, 632F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 581F));
this.tableLayoutPanel2.Controls.Add(this.labTime, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.label1, 1, 0);
@ -541,7 +541,7 @@
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(2560, 149);
this.tableLayoutPanel2.Size = new System.Drawing.Size(2347, 130);
this.tableLayoutPanel2.TabIndex = 0;
//
// tableLayoutPanel1
@ -558,18 +558,18 @@
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.69692F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 89.30308F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 434F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(2560, 1830);
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 380F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(2347, 1600);
this.tableLayoutPanel1.TabIndex = 9;
//
// FrmZP
//
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(2560, 1830);
this.ClientSize = new System.Drawing.Size(2347, 1600);
this.Controls.Add(this.tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.Name = "FrmZP";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FrmZP";

428
InjectionPC/FrmMain.Designer.cs

File diff suppressed because it is too large

669
InjectionPC/FrmMain2408.Designer.cs

File diff suppressed because it is too large

460
InjectionPC/FrmMain2408.cs

@ -69,6 +69,7 @@ namespace InjectionPC
//零件用的打印机编号 <零件号+工位ID,打印机编号>
private Dictionary<string, string> _printNameDict = new Dictionary<string, string>();
private PlasticBLL _plasticBLL = new PlasticBLL();
private int _plcRate = 100; //500
#endregion
public FrmMain2408()
@ -112,10 +113,28 @@ namespace InjectionPC
initProduct();
textBox1.Text = Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) +
Program.ProductDate.Substring(8, 2); //批次
string devRate = ConfigurationManager.AppSettings["DevRate"];
if (!string.IsNullOrEmpty(devRate))
{
int i = 0;
if (int.TryParse(devRate, out i) == true)
{
if (i > 0)
{
_plcRate = i;
}
}
}
initBarCode();
label23.Enabled = false;
label23.BackColor = System.Drawing.Color.Gray;
DataTable plasticTable = GetPlastic();
foreach(DataRow dr in plasticTable.Rows)
{
@ -125,6 +144,9 @@ namespace InjectionPC
_printNameDict.Add(key, dr["PrinterNo"].ToString());
}
}
InitPackageInfo();
Ping p1 = new Ping();
@ -205,9 +227,9 @@ namespace InjectionPC
opcGroups = opcServer.OPCGroups;
opcGroup1 = opcGroups.Add("Mould");
SetGroupProperty(opcGroup1, 500);
SetGroupProperty(opcGroup1, _plcRate);
opcGroup2 = opcGroups.Add("Break");
SetGroupProperty(opcGroup2, 500);
SetGroupProperty(opcGroup2, _plcRate);
#endregion
@ -2229,7 +2251,7 @@ namespace InjectionPC
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].Text = dt.Rows[i]["OneBarCode"].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();
@ -3051,6 +3073,187 @@ namespace InjectionPC
return "";
}
}
/// <summary>
/// 往左箱单添加新码
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void lbAddPrintL_Click(object sender, EventArgs e)
{
ReAddBarCodeToBox( lbPackageCodeL, lbCurrentlQtyL, lbNeedQtyL,"左侧");
}
/// <summary>
/// 往右箱单添加新码
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void lbAddPrintR_Click(object sender, EventArgs e)
{
ReAddBarCodeToBox(lbPackageCodeR, lbCurrentlQtyR, lbNeedQtyR, "右侧");
}
void ReAddBarCodeToBox(Label lbPackageCode, Label lbCurrentlQty, Label lbNeedQty,string hintTxt)
{
BarCodeBLL bll = new BarCodeBLL();
InjectionBoxBLL inBoxBll = new InjectionBoxBLL();
string boxCode = lbPackageCode.Text?.Trim();
if (string.IsNullOrEmpty(boxCode))
{
MessageBox.Show(hintTxt + "箱码为空,无法添加新零件.");
return;
}
string tcompletedQtyStr = lbCurrentlQty.Text?.Trim();
string allQtyStr = lbNeedQty.Text?.Trim();
int count1 = 0;
int count2 = 0;
int.TryParse(tcompletedQtyStr, out count1);
int.TryParse(allQtyStr, out count2);
if (count2 == 0)
{
MessageBox.Show(hintTxt + "箱码规格为空,无法添加新零件.");
return;
}
if (count1 >= count2)
{
MessageBox.Show(hintTxt + "箱码已满,无法添加新零件.");
return;
}
DialogResult result = MessageBox.Show($"确定向"+ hintTxt +$"箱码[{boxCode}]插入一条全新数据并打印?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
if (result == DialogResult.OK)
{
DataTable dt = bll.SearchInfoByBox(boxCode, Program.tableName);
if (dt.Rows.Count == 0)
{
MessageBox.Show($"表[{Program.tableName}]中没有找到{hintTxt}箱码[{boxCode}]关联的数据记录.");
return;
}
try
{
inBoxBll.UpdateBoxCount(boxCode, 1, false);
BoxBarCodeReAddAndPrint(dt.Rows[0]);
InitPackageInfo();
//试试打印数量是否更新
int count3 = 0;
int count4 = 0;
int.TryParse(lbCurrentlQty.Text?.Trim(), out count3);
int.TryParse(allQtyStr, out count4);
if(count3 == count4)
{
if(hintTxt == "左侧")
{
UnCompletePrintBox("手动打印箱码", "left");
}
else
{
UnCompletePrintBox("手动打印箱码", "right");
}
}
}
catch (Exception ex)
{
MessageBox.Show($"向{hintTxt}箱码[{boxCode}]添加数据失败,原因:" + ex.Message);
InitPackageInfo();
}
}
}
bool BoxBarCodeReAddAndPrint(DataRow barCodeRow)
{
ProductBLL pbll = new ProductBLL();
BarCodeBLL bll = new BarCodeBLL();
string code = "", filename = "", printName = "", ManufacturerName = "";
string IsSupply = "0";
BarCodeModel md = new BarCodeModel();
md.ID = Guid.NewGuid().ToString();
md.StationID = barCodeRow["StationID"].ToString();
md.StockNo = barCodeRow["StockNo"].ToString();
md.PartNo = barCodeRow["PartNo"].ToString();
md.BatchNo = barCodeRow["BatchNo"].ToString();
string newOneCode = string.Empty;
string newBarCode = string.Empty;
GetBarCode(md.StockNo, md.BatchNo, md.PartNo, ref newOneCode, ref newBarCode);
md.OneBarCode = newOneCode;
md.BarCode = newBarCode;
md.BoxNo = barCodeRow["BoxNo"].ToString();
md.Des1 = barCodeRow["Des1"].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();
IsSupply = pdt.Rows[0]["IsSupply"].ToString();
}
string msg = bll.ReprintSave(md, Program.tableName, "", "", Program.station);
if (!string.IsNullOrEmpty(msg))
{
MessageBox.Show($"补打失败,原因:" + msg);
return false;
}
glacialList1.SelectedItems.Clear();
initBarCode();
#region 打印条码
filename = ManufacturerName.Contains("蔚来")
? AppDomain.CurrentDomain.BaseDirectory +
"wl.grf"
: AppDomain.CurrentDomain.BaseDirectory +
PrintMoudleName(IsSupply, "Print" + Program.station + "_3102"); //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 = "";
}
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
return true;
}
/// <summary>
/// 补打条码
@ -3089,54 +3292,53 @@ namespace InjectionPC
}
DataTable dt = bll.SearchInfoByBarCodeNew(code, Program.tableName);
if (dt != null && dt.Rows.Count > 0)
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.PartNo = dt.Rows[0]["PartNo"].ToString();
md.BatchNo = dt.Rows[0]["BatchNo"].ToString();
string newOneCode = string.Empty;
string newBarCode = string.Empty;
GetBarCode(md.StockNo, md.BatchNo, md.PartNo, ref newOneCode, ref newBarCode);
md.OneBarCode = newOneCode;
md.BarCode = newBarCode;
md.BoxNo = dt.Rows[0]["BoxNo"].ToString();
if (gv.SubItems.Count > 1)
{
md.Des1 = gv.SubItems[1].Text;
}
md.PrintType = 2;
MessageBox.Show($"补打失败,条码[{code}]在表[{ Program.tableName}]中不存在!");
return;
}
//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 = "";
}
md.ID = Guid.NewGuid().ToString();
//md.BarCode = code;
md.StationID = dt.Rows[0]["StationID"].ToString();
md.StockNo = dt.Rows[0]["StockNo"].ToString();
md.PartNo = dt.Rows[0]["PartNo"].ToString();
md.BatchNo = dt.Rows[0]["BatchNo"].ToString();
string newOneCode = string.Empty;
string newBarCode = string.Empty;
GetBarCode(md.StockNo, md.BatchNo, md.PartNo, ref newOneCode, ref newBarCode);
md.OneBarCode = newOneCode;
md.BarCode = newBarCode;
md.BoxNo = dt.Rows[0]["BoxNo"].ToString();
if (gv.SubItems.Count > 1)
{
md.Des1 = gv.SubItems[1].Text;
}
ManufacturerName = pdt.Rows[0]["ManufacturerName"].ToString().Trim();
IsSupply = pdt.Rows[0]["IsSupply"].ToString();
}
md.PrintType = 2;
//DataTable pdt = pbll.SearchIsImportByPartNo(md.PartNo);
}
else
DataTable pdt = pbll.SearchInfoByPartNo(md.PartNo);
if (pdt != null && pdt.Rows.Count > 0)
{
MessageBox.Show($"补打失败,条码[{code}]在表[{ Program.tableName}]中不存在!");
return;
if (pdt.Rows[0]["isImport"].ToString() == "1")
{
md.Import = "国产料Kingfa";
}
else
{
md.Import = "";
}
ManufacturerName = pdt.Rows[0]["ManufacturerName"].ToString().Trim();
IsSupply = pdt.Rows[0]["IsSupply"].ToString();
}
string msg = bll.ReprintSave(md, Program.tableName, dt.Rows[0]["OneBarCode"].ToString(), dt.Rows[0]["BarCode"].ToString(),Program.station);
string msg = bll.ReprintSave(md, Program.tableName, dt.Rows[0]["OneBarCode"].ToString(), dt.Rows[0]["BarCode"].ToString(), Program.station);
if (!string.IsNullOrEmpty(msg))
{
MessageBox.Show($"补打失败,原因:" + msg);
@ -3188,7 +3390,7 @@ namespace InjectionPC
ReportHelper rp = new ReportHelper(filename, headTable, null,
(int) GRPaperOrientation.grpoDefault, 1, reportName);
(int)GRPaperOrientation.grpoDefault, 1, reportName);
LogSysBLL.AddInfo(GetDateTime().ToString("yyyy/MM/dd HH:mm:ss") + md.OneBarCode, MethodBase.GetCurrentMethod());
rp.Report.Print(false);
@ -3676,7 +3878,7 @@ namespace InjectionPC
opcGroups = opcServer.OPCGroups;
opcGroup1 = opcGroups.Add("Mould");
SetGroupProperty(opcGroup1, 500);
SetGroupProperty(opcGroup1, _plcRate);
#endregion
@ -4335,38 +4537,6 @@ namespace InjectionPC
lbPackageCode.Text = "";
lbCurrentlQty.Text = "0";
////检查上一个箱码是否给wms传成功了, 没成功重传一次.
//if (!string.IsNullOrEmpty(_lastBoxNoL))
//{
// if (_wmsBll.IsSendPackageCode(_lastBoxNoL) == false)
// {
// DataTable dt2 = _injectionBoxBLL.SearchBox(_lastBoxNoL);
// if (dt2.Rows.Count > 0)
// {
// _wmsBll.SaveInterface(dt2.Rows[0], MESClassLibrary.Enum.WmsInterfaceEnum.塑件箱码报工);
// }
// }
// _lastBoxNoL = "";
//}
//if (!string.IsNullOrEmpty(_lastBoxNoR))
//{
// if (_wmsBll.IsSendPackageCode(_lastBoxNoR) == false)
// {
// DataTable dt2 = _injectionBoxBLL.SearchBox(_lastBoxNoR);
// if (dt2.Rows.Count > 0)
// {
// _wmsBll.SaveInterface(dt2.Rows[0], MESClassLibrary.Enum.WmsInterfaceEnum.塑件箱码报工);
// }
// }
// _lastBoxNoR = "";
//}
////wms接口传递
//_wmsBll.SaveInterface(dt.Rows[0]["BoxNo"].ToString(), MESClassLibrary.Enum.WmsInterfaceEnum.塑件箱码报工);
string rst = _wmsBll.SaveInterface(dt.Rows[0]["BoxNo"].ToString(), _lastBoxNoL, _lastBoxNoR, MESClassLibrary.Enum.WmsInterfaceEnum., Program.station);
if (string.IsNullOrEmpty(rst))
{
@ -4734,11 +4904,6 @@ namespace InjectionPC
frmPackageDetail.ShowDialog();
}
private void tableLayoutPanel1_Paint(object sender, PaintEventArgs e)
{
}
/// <summary>
/// 直供件条码 A2478852600#Q02#240826#001#
@ -4888,14 +5053,18 @@ namespace InjectionPC
/// <param name="e"></param>
private void label5_MouseDoubleClick(object sender, MouseEventArgs e)
{
timer3.Enabled = false;
string cs = ConfigurationManager.AppSettings["测试"];
if (!string.IsNullOrEmpty(cs) && cs == "true")
{
timer3.Enabled = false;
}
}
/// <summary>
/// 未满器具打箱码 变更规格型号,手工打印箱码,切换下一计划,手动自动切换
/// </summary>
/// <param name="lable"></param>
/// <returns></returns>
bool UnCompletePrintBox(string lable,string leftOrRight)
bool UnCompletePrintBox(string lable,string leftOrRight,bool needConfirm = true)
{
string boxCodeL = lbPackageCodeL.Text?.Trim();
string boxCodeR = lbPackageCodeR.Text?.Trim();
@ -4907,10 +5076,14 @@ namespace InjectionPC
DataTable dt = _injectionBoxBLL.SearchBox(boxCodeL);
if (dt.Rows.Count > 0 && dt.Rows[0]["IsPrint"].ToString() == "0" && int.Parse(dt.Rows[0]["BoxCount"].ToString()) > 0)
{
if (MessageBox.Show($"当前箱码[{boxCodeL}]未满器具,执行[{lable}]操作,该箱码会被设置为完成状态,是否继续?", "未满器具提醒", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
if (needConfirm)
{
return false;
if (MessageBox.Show($"当前箱码[{boxCodeL}]未满器具,执行[{lable}]操作,该箱码会被设置为完成状态,是否继续?", "未满器具提醒", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
{
return false;
}
}
lbPackageCodeL.Text = "";
lbCurrentlQtyL.Text = "0";
@ -4935,10 +5108,14 @@ namespace InjectionPC
DataTable dt = _injectionBoxBLL.SearchBox(boxCodeR);
if (dt.Rows.Count > 0 && dt.Rows[0]["IsPrint"].ToString() == "0" && int.Parse(dt.Rows[0]["BoxCount"].ToString()) > 0)
{
if (MessageBox.Show($"当前箱码[{boxCodeR}]未满器具,执行[{lable}]操作,该箱码会被设置为完成状态,是否继续?", "未满器具提醒", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
if (needConfirm)
{
return false;
if (MessageBox.Show($"当前箱码[{boxCodeR}]未满器具,执行[{lable}]操作,该箱码会被设置为完成状态,是否继续?", "未满器具提醒", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
{
return false;
}
}
lbPackageCodeR.Text = "";
lbCurrentlQtyR.Text = "0";
@ -5064,10 +5241,10 @@ namespace InjectionPC
string PrintMoudleName(string isSupply = "0",string invokeInfo ="")
{
if (!string.IsNullOrEmpty(invokeInfo))
{
SaveLog2(invokeInfo);
}
//if (!string.IsNullOrEmpty(invokeInfo))
//{
// SaveLog2(invokeInfo);
//}
if("IM05,IM08,IM10".Contains(Program.station)) //二维小条码
{
@ -5203,6 +5380,107 @@ namespace InjectionPC
}
}
private void label5_Click(object sender, EventArgs e)
{
}
/// <summary>
/// 设备状态
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void lbDevState_Click(object sender, EventArgs e)
{
if(lbDevState.Text == "设备已连接")
{
if (MessageBox.Show("确认断开设备连接?", "设备断开确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return;
lbDevState.Text = "设备已断开";
lbDevState.BackColor = Color.Red;
opcGroup1.DataChange -= new DIOPCGroupEvent_DataChangeEventHandler(opcGroup1_DataChange);
opcServer.OPCGroups.RemoveAll();
opcServer.Disconnect();
serialPort1.Close();
timer3.Enabled = false;
}
else
{
if (MessageBox.Show("确认连接到注塑设备?", "设备连接确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return;
try
{
if (CreateServer())
{
if (ConnectServer(strHostIP, "Kepware.KEPServerEX.V6"))
{
Connected = true;
#region 创建组
opcGroups = opcServer.OPCGroups;
opcGroup1 = opcGroups.Add("Mould");
SetGroupProperty(opcGroup1, _plcRate);
#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;
}
lbDevState.Text = "设备已连接";
lbDevState.BackColor = Color.DeepSkyBlue;
timer3.Enabled = true;
}
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;
}
}
}
void SaveLog(string txt)
{
//try

3
InjectionPC/FrmMain2408.resx

@ -490,4 +490,7 @@
<metadata name="timer3.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>307, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>90</value>
</metadata>
</root>

410
InjectionPC/FrmMain2411.Designer.cs

File diff suppressed because it is too large

168
InjectionPC/FrmMain2411.cs

@ -67,6 +67,7 @@ namespace InjectionPC
//零件用的打印机编号 <零件号+工位ID,打印机编号>
private Dictionary<string, string> _printNameDict = new Dictionary<string, string>();
private PlasticBLL _plasticBLL = new PlasticBLL();
private int _plcRate = 100; //500
#endregion
public FrmMain2411()
@ -147,8 +148,18 @@ namespace InjectionPC
//comBoxSizeR.DisplayMember = "describe";
//comBoxSizeR.ValueMember = "Count";
string devRate = ConfigurationManager.AppSettings["DevRate"];
if (!string.IsNullOrEmpty(devRate))
{
int i = 0;
if(int.TryParse(devRate,out i) == true)
{
if(i>0)
{
_plcRate = i;
}
}
}
comboBox2.MouseWheel += new MouseEventHandler(comboBox2_MouseWheel);
@ -204,9 +215,9 @@ namespace InjectionPC
opcGroups = opcServer.OPCGroups;
opcGroup1 = opcGroups.Add("Mould");
SetGroupProperty(opcGroup1, 500);
SetGroupProperty(opcGroup1, _plcRate);
opcGroup2 = opcGroups.Add("Break");
SetGroupProperty(opcGroup2, 500);
SetGroupProperty(opcGroup2, _plcRate);
#endregion
@ -2180,7 +2191,7 @@ namespace InjectionPC
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].Text = dt.Rows[i]["OneBarCode"].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();
@ -3602,7 +3613,7 @@ namespace InjectionPC
opcGroups = opcServer.OPCGroups;
opcGroup1 = opcGroups.Add("Mould");
SetGroupProperty(opcGroup1, 500);
SetGroupProperty(opcGroup1, _plcRate);
#endregion
@ -4232,31 +4243,41 @@ namespace InjectionPC
SaveBarCode(_lastbarCodeModel, Program.tableName, isAutoPrint, mould, ref errMsg, handPrint);
}
}
_lastbarCodeModel = md;
if (SaveBarCode(md, Program.tableName, isAutoPrint, mould, ref errMsg, handPrint) == false)
_lastbarCodeModel = null;
try
{
int a = 0;
for (int l = 0; l < 3; l++)
if (SaveBarCode(md, Program.tableName, isAutoPrint, mould, ref errMsg, handPrint) == false)
{
// if (brbll.Add_Info_New(md, Program.tableName))
if (SaveBarCode(md, Program.tableName, true, mould, ref errMsg, handPrint) == true)
int a = 0;
for (int l = 0; l < 3; l++)
{
break;
}
// if (brbll.Add_Info_New(md, Program.tableName))
if (SaveBarCode(md, Program.tableName, true, mould, ref errMsg, handPrint) == true)
{
break;
}
a += 1;
//Thread.Sleep(200);
Thread.Sleep(200);
}
a += 1;
//Thread.Sleep(200);
Thread.Sleep(200);
}
if (a >= 2)
{
SaveLog3(Program.station+"保存3次失败,条码" + md.OneBarCode);
return false;
if (a >= 2)
{
_lastbarCodeModel = md;
SaveLog3(Program.station + "保存3次失败,条码" + md.OneBarCode);
return false;
}
}
return true;
}
catch(Exception ex)
{
_lastbarCodeModel = md;
errMsg = ex.Message;
LogErrBLL.AddInfo(Program.station + "保存异常-" + md.OneBarCode + ":" + errMsg, MethodBase.GetCurrentMethod());
return false;
}
return true;
}
/// <summary>
@ -4363,7 +4384,12 @@ namespace InjectionPC
/// <param name="e"></param>
private void label5_MouseDoubleClick(object sender, MouseEventArgs e)
{
timer3.Enabled = false;
string cs = ConfigurationManager.AppSettings["测试"];
if (!string.IsNullOrEmpty(cs) && cs=="true")
{
timer3.Enabled = false;
}
}
private void btnBarCodeWithBox_Click(object sender, EventArgs e)
@ -4390,6 +4416,98 @@ namespace InjectionPC
}
}
private void lbDevState_Click(object sender, EventArgs e)
{
if (lbDevState.Text == "设备已连接")
{
if (MessageBox.Show("确认断开设备连接?", "设备断开确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return;
lbDevState.Text = "设备已断开";
lbDevState.BackColor = Color.Red;
opcGroup1.DataChange -= new DIOPCGroupEvent_DataChangeEventHandler(opcGroup1_DataChange);
opcServer.OPCGroups.RemoveAll();
opcServer.Disconnect();
serialPort1.Close();
timer3.Enabled = false;
}
else
{
if (MessageBox.Show("确认连接到注塑设备?", "设备连接确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return;
try
{
if (CreateServer())
{
if (ConnectServer(strHostIP, "Kepware.KEPServerEX.V6"))
{
Connected = true;
#region 创建组
opcGroups = opcServer.OPCGroups;
opcGroup1 = opcGroups.Add("Mould");
SetGroupProperty(opcGroup1, _plcRate);
#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;
}
lbDevState.Text = "设备已连接";
lbDevState.BackColor = Color.DeepSkyBlue;
timer3.Enabled = true;
}
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;
}
}
}
string PrintMoudleName(string isSupply = "0")
{
if("IM05,IM08,IM10".Contains(Program.station)) //二维小条码

117
InjectionPC/FrmQuality.cs

@ -750,14 +750,30 @@ namespace InjectionPC
return reg1.IsMatch(str);
}
/// <summary>
/// 扫描条码
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void textBox3_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
textBox2.Text = "1";
_boxDetailTable = null;
BarCodeScan(txtScanBarCode.Text.Trim());
try
{
textBox2.Text = "1";
_boxDetailTable = null;
BarCodeScan(txtScanBarCode.Text.Trim());
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
txtScanBarCode.SelectAll();
}
}
}
private string _scanPartNo = string.Empty;
@ -791,16 +807,31 @@ namespace InjectionPC
MessageBox.Show("条码有误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
barcode = code.Split('.');
DataTable dt = bll.SearchInfoByPartNo(barcode[0]);
if (dt != null && dt.Rows.Count > 0)
if (code.Contains("#"))
{
textBox4.Text = dt.Rows[0]["ProductName"].ToString();
row = Convert.ToInt32(dt.Rows[0]["Rows"].ToString());
col = Convert.ToInt32(dt.Rows[0]["Cols"].ToString());
picture = dt.Rows[0]["PicturePath"].ToString();
barcode = code.Split('#');
DataTable dt = bll.SearchInfoByPartNo(barcode[0]);
if (dt != null && dt.Rows.Count > 0)
{
textBox4.Text = dt.Rows[0]["ProductName"].ToString();
row = Convert.ToInt32(dt.Rows[0]["Rows"].ToString());
col = Convert.ToInt32(dt.Rows[0]["Cols"].ToString());
picture = dt.Rows[0]["PicturePath"].ToString();
}
}
else
{
barcode = code.Split('.');
DataTable dt = bll.SearchInfoByPartNo(barcode[0]);
if (dt != null && dt.Rows.Count > 0)
{
textBox4.Text = dt.Rows[0]["ProductName"].ToString();
row = Convert.ToInt32(dt.Rows[0]["Rows"].ToString());
col = Convert.ToInt32(dt.Rows[0]["Cols"].ToString());
picture = dt.Rows[0]["PicturePath"].ToString();
}
}
}
else
{
@ -844,7 +875,35 @@ namespace InjectionPC
}
}
#region 缺陷图划分区域
Label[] lb = new Label[5];
string[] str =
{
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
"U", "V", "W", "X", "Y", "Z"
};
for (int i = 0; i < col; i++)
{
for (int j = 0; j < row; j++)
{
lb[i] = new Label();
lb[i].Text = str[i + col * j].ToString();
lb[i].Font = new Font(lb[i].Font.FontFamily, 32, FontStyle.Bold);
lb[i].Size = new Size(pictureBox2.Width / col, pictureBox2.Height / row);
lb[i].Location = new Point(0 + i * lb[i].Size.Width, 0 + j * lb[i].Size.Height);
lb[i].BorderStyle = BorderStyle.FixedSingle;
lb[i].BackColor = Color.Transparent;
lb[i].TextAlign = ContentAlignment.MiddleCenter;
pictureBox2.Controls.Add(lb[i]);
lb[i].Click += new EventHandler(lblRoom_Click);
}
}
#endregion
try
{
#region Load PictureBox
@ -871,38 +930,10 @@ namespace InjectionPC
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
LogErrBLL.AddInfo(Program.station + "质检-加载图片"+ ex.ToString(), MethodBase.GetCurrentMethod());
}
#region 缺陷图划分区域
Label[] lb = new Label[5];
string[] str =
{
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
"U", "V", "W", "X", "Y", "Z"
};
for (int i = 0; i < col; i++)
{
for (int j = 0; j < row; j++)
{
lb[i] = new Label();
lb[i].Text = str[i + col * j].ToString();
lb[i].Font = new Font(lb[i].Font.FontFamily, 32, FontStyle.Bold);
lb[i].Size = new Size(pictureBox2.Width / col, pictureBox2.Height / row);
lb[i].Location = new Point(0 + i * lb[i].Size.Width, 0 + j * lb[i].Size.Height);
lb[i].BorderStyle = BorderStyle.FixedSingle;
lb[i].BackColor = Color.Transparent;
lb[i].TextAlign = ContentAlignment.MiddleCenter;
pictureBox2.Controls.Add(lb[i]);
lb[i].Click += new EventHandler(lblRoom_Click);
}
}
#endregion
#region 缺陷原因
@ -1069,6 +1100,10 @@ namespace InjectionPC
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
}
finally
{
txtBoxCode.SelectAll();
}
}
private void timer2_Tick(object sender, EventArgs e)

40
MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs

@ -129,22 +129,34 @@ namespace MESClassLibrary.BLL.BasicInfo
{
local.BeginTrans();
//tb_barCode 更新 isDel=1
db.DelBarCode(local, oldOneBarCode, tableName,$",Des5='条码补打,新条码[{md.OneBarCode}]'");
if (!string.IsNullOrEmpty(oldOneBarCode))
{
db.DelBarCode(local, oldOneBarCode, tableName, $",Des5='条码补打,新条码[{md.OneBarCode}]'");
}
//tb_barCode 插入 printType=2 补打
db.AddInfoNew(local, md, tableName);
if(!string.IsNullOrEmpty(md.BoxNo))
if (!string.IsNullOrEmpty(oldOneBarCode))
{
//根据箱码删除接口表tb_Injectionn_Interface中数据
wmsDal.DeleteRecord(local, md.BoxNo, oldOneBarCode, oldBarCode);
if (!string.IsNullOrEmpty(md.BoxNo))
{
//根据箱码删除接口表tb_Injectionn_Interface中数据
wmsDal.DeleteRecord(local, md.BoxNo, oldOneBarCode, oldBarCode);
}
else
{
//根据旧条码删除接口tb_Injectionn_Interface中数据
wmsDal.DeleteInterface(local, oldOneBarCode);
}
md.Remark = "补打,原塑件码:" + oldOneBarCode;
}
else
{
//根据旧条码删除接口tb_Injectionn_Interface中数据
wmsDal.DeleteInterface(local, oldOneBarCode);
md.Remark = "手动箱单添加";
}
md.Remark = "补打,原塑件码:" + oldOneBarCode;
//不绑箱码时,补打时向接口表插入
if (string.IsNullOrEmpty(md.BoxNo))
@ -316,7 +328,17 @@ namespace MESClassLibrary.BLL.BasicInfo
return null;
}
}
/// <summary>
/// 根据boxcode查询barcode表相关数据
/// </summary>
/// <param name="boxNo"></param>
/// <param name="tableName"></param>
/// <returns></returns>
public DataTable SearchInfoByBox(string boxNo, string tableName)
{
DataTable barCodeTable = db.SearchInfoByBox(boxNo, tableName);
return barCodeTable;
}
public bool Update_Info(BarCodeModel md)
{
try

3
MESClassLibrary/BLL/Wms/WmsBLL.cs

@ -103,6 +103,9 @@ namespace MESClassLibrary.BLL.Injection
string rst = da.SaveInterface(barCodeTable, badReason, station);
return rst;
}
/// <summary>
/// 是否已传到WMS
/// </summary>

10
MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs

@ -387,7 +387,7 @@ namespace MESClassLibrary.DAL.BasicInfo
if (stationNo.Substring(2, 2) == "01" || stationNo.Substring(2, 2) == "02" ||
stationNo.Substring(2, 2) == "03" || stationNo.Substring(2, 2) == "04")
{
sql = @"SELECT top 100 dbo.tb_BarCode1.BarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode1.BoxNo,
sql = @"SELECT top 100 dbo.tb_BarCode1.BarCode,dbo.tb_BarCode1.OneBarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode1.BoxNo,
CASE dbo.tb_BarCode1.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.tb_BarCode1.CreateTime
FROM dbo.tb_BarCode1 with (nolock) LEFT OUTER JOIN
@ -399,7 +399,7 @@ namespace MESClassLibrary.DAL.BasicInfo
if (stationNo.Substring(2, 2) == "05" || stationNo.Substring(2, 2) == "06" ||
stationNo.Substring(2, 2) == "07" || stationNo.Substring(2, 2) == "08")
{
sql = @"SELECT top 100 dbo.tb_BarCode2.BarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode2.BoxNo,
sql = @"SELECT top 100 dbo.tb_BarCode2.BarCode,dbo.tb_BarCode2.OneBarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode2.BoxNo,
CASE dbo.tb_BarCode2.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.tb_BarCode2.CreateTime
FROM dbo.tb_BarCode2 with (nolock) LEFT OUTER JOIN
@ -411,7 +411,7 @@ namespace MESClassLibrary.DAL.BasicInfo
if (stationNo.Substring(2, 2) == "09" || stationNo.Substring(2, 2) == "10" ||
stationNo.Substring(2, 2) == "11" || stationNo.Substring(2, 2) == "12")
{
sql = @"SELECT top 100 dbo.tb_BarCode3.BarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode3.BoxNo,
sql = @"SELECT top 100 dbo.tb_BarCode3.BarCode,dbo.tb_BarCode3.OneBarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode3.BoxNo,
CASE dbo.tb_BarCode3.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.tb_BarCode3.CreateTime
FROM dbo.tb_BarCode3 with (nolock) LEFT OUTER JOIN
@ -423,7 +423,7 @@ namespace MESClassLibrary.DAL.BasicInfo
if (stationNo.Substring(2, 2) == "13" || stationNo.Substring(2, 2) == "14" ||
stationNo.Substring(2, 2) == "15" || stationNo.Substring(2, 2) == "16")
{
sql = @"SELECT top 100 dbo.tb_BarCode4.BarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode4.BoxNo,
sql = @"SELECT top 100 dbo.tb_BarCode4.BarCode,dbo.tb_BarCode4.OneBarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode4.BoxNo,
CASE dbo.tb_BarCode4.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.tb_BarCode4.CreateTime
FROM dbo.tb_BarCode4 with (nolock) LEFT OUTER JOIN
@ -435,7 +435,7 @@ namespace MESClassLibrary.DAL.BasicInfo
if (stationNo.Substring(2, 2) == "17" || stationNo.Substring(2, 2) == "18" ||
stationNo.Substring(2, 2) == "19" || stationNo.Substring(2, 2) == "20")
{
sql = @"SELECT top 100 dbo.tb_BarCode5.BarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode5.BoxNo,
sql = @"SELECT top 100 dbo.tb_BarCode5.BarCode,dbo.tb_BarCode5.OneBarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode5.BoxNo,
CASE dbo.tb_BarCode5.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.tb_BarCode5.CreateTime
FROM dbo.tb_BarCode5 with (nolock) LEFT OUTER JOIN

1
MESClassLibrary/DAL/Wms/WmsDAL.cs

@ -199,6 +199,7 @@ namespace MESClassLibrary.DAL.Injection
}
}
public bool DelRecordByBox(string boxNo)
{
try

12
PaintingPC/FrmQuality.cs

@ -25,6 +25,8 @@ namespace PaintingPC
private bool _isWmsQuality = false ;
private string _carType = string.Empty;
private Dictionary<string, string> _lastJustDict = new Dictionary<string, string>();
private string _foreighColor = string.Empty;
public FrmQuality(bool isWmsQuality)
{
InitializeComponent();
@ -88,6 +90,10 @@ namespace PaintingPC
{ }
}
/// <summary>
/// 初始化颜色选择框列表
/// </summary>
/// <param name="stockNo"></param>
public void InitColor(string stockNo)
{
try
@ -970,6 +976,7 @@ namespace PaintingPC
DataTable dtInspect = Function.GetInspectInfoByBarCode2(barcode);
if (dtInspect != null && dtInspect.Rows.Count > 0)
{
cboxAddColor.Enabled = false;
List<DataRow> list = dtInspect.AsEnumerable().Where(p => p.Field<string>("inspectResult").Contains("打磨")).ToList();
string state = string.Empty;
if (list.Count > 0)
@ -1056,8 +1063,9 @@ namespace PaintingPC
}
else
{
cboxAddColor.Enabled = true;
#region 没有一检结果,查询老外数据库,取产品信息
if(_isWmsQuality == false)
if (_isWmsQuality == false)
{
string paintError = string.Empty;
//喷涂线边质检,没有质检结果,查询老外数据库,取产品信息
@ -1066,6 +1074,7 @@ namespace PaintingPC
{
ShowHint(paintError);
}
_foreighColor = info[0];
labProductInfo.Text = info[0] + "," + info[1];
paintId = info[2];
labProPosition.Tag = paintId;
@ -1159,6 +1168,7 @@ namespace PaintingPC
position = "";
reason = "";
lableFP.Text = "";
_foreighColor = "";
cboxAddColor.DataSource = null;
_carType = string.Empty;

Loading…
Cancel
Save