Browse Source

注塑部分优化. 喷涂改返喷功能的一部分

master
ruoxing.wang 3 weeks ago
parent
commit
6383175176
  1. 166
      FacOneZPStation/FrmZP.Designer.cs
  2. 531
      InjectionPC/FrmMain2408.Designer.cs
  3. 373
      InjectionPC/FrmMain2408.cs
  4. 251
      PaintingPC/FrmQuality.cs
  5. 20
      WebService/Function.cs
  6. 10
      WebService/WMSWebService.asmx.cs

166
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, 709F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 652F));
this.tableLayoutPanel3.Controls.Add(this.button6, 3, 0);
this.tableLayoutPanel3.Controls.Add(this.button1, 0, 1);
this.tableLayoutPanel3.Controls.Add(this.button5, 2, 1);
@ -86,14 +86,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, 1225);
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
@ -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(1849, 14);
this.button6.Margin = new System.Windows.Forms.Padding(14, 14, 14, 14);
this.button6.Location = new System.Drawing.Point(1695, 12);
this.button6.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(683, 183);
this.button6.Size = new System.Drawing.Size(627, 161);
this.button6.TabIndex = 7;
this.button6.Text = "手动打印箱单";
this.button6.UseVisualStyleBackColor = false;
@ -116,10 +116,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(601, 200);
this.button1.Size = new System.Drawing.Size(552, 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(1246, 225);
this.button5.Margin = new System.Windows.Forms.Padding(14, 14, 14, 14);
this.button5.Location = new System.Drawing.Point(1142, 197);
this.button5.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(575, 184);
this.button5.Size = new System.Drawing.Size(527, 162);
this.button5.TabIndex = 5;
this.button5.Text = "不合格";
this.button5.UseVisualStyleBackColor = false;
@ -145,10 +145,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(622, 6);
this.button4.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.button4.Location = new System.Drawing.Point(570, 5);
this.button4.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(603, 199);
this.button4.Size = new System.Drawing.Size(553, 175);
this.button4.TabIndex = 4;
this.button4.Text = "下一计划";
this.button4.UseVisualStyleBackColor = false;
@ -159,10 +159,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(601, 199);
this.button3.Size = new System.Drawing.Size(552, 175);
this.button3.TabIndex = 3;
this.button3.Text = "上一计划";
this.button3.UseVisualStyleBackColor = false;
@ -174,10 +174,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(629, 225);
this.button2.Margin = new System.Windows.Forms.Padding(14, 14, 14, 14);
this.button2.Location = new System.Drawing.Point(577, 197);
this.button2.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(589, 184);
this.button2.Size = new System.Drawing.Size(539, 162);
this.button2.TabIndex = 2;
this.button2.Text = "补打标签";
this.button2.UseVisualStyleBackColor = false;
@ -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(1842, 217);
this.button7.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.button7.Location = new System.Drawing.Point(1688, 190);
this.button7.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(697, 200);
this.button7.Size = new System.Drawing.Size(641, 176);
this.button7.TabIndex = 8;
this.button7.Text = "补打箱单";
this.button7.UseVisualStyleBackColor = false;
@ -203,11 +203,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(1517, 3);
this.label7.Location = new System.Drawing.Point(1388, 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, 211);
this.label7.TabIndex = 32;
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@ -215,10 +215,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(437, 127);
this.textBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBox2.Location = new System.Drawing.Point(400, 111);
this.textBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(1073, 87);
this.textBox2.Size = new System.Drawing.Size(981, 77);
this.textBox2.TabIndex = 30;
this.textBox2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox2_KeyDown);
//
@ -227,10 +227,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(423, 124);
this.label3.Size = new System.Drawing.Size(386, 109);
this.label3.TabIndex = 29;
this.label3.Text = "扫描物料条码";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -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(1794, 249);
this.labOrderNo.Location = new System.Drawing.Point(1642, 219);
this.labOrderNo.Margin = new System.Windows.Forms.Padding(2);
this.labOrderNo.Name = "labOrderNo";
this.labOrderNo.Size = new System.Drawing.Size(755, 174);
this.labOrderNo.Size = new System.Drawing.Size(694, 152);
this.labOrderNo.TabIndex = 28;
this.labOrderNo.Text = "A64654646464";
this.labOrderNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -254,10 +254,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(1517, 249);
this.label4.Location = new System.Drawing.Point(1388, 219);
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, 152);
this.label4.TabIndex = 27;
this.label4.Text = "计划编号";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -268,10 +268,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(435, 249);
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(1077, 174);
this.labStationNo.Size = new System.Drawing.Size(985, 152);
this.labStationNo.TabIndex = 26;
this.labStationNo.Text = "V253-MF-S后保下部延伸焊接";
this.labStationNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -282,10 +282,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, 219);
this.label2.Margin = new System.Windows.Forms.Padding(2);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(427, 174);
this.label2.Size = new System.Drawing.Size(390, 152);
this.label2.TabIndex = 25;
this.label2.Text = "工位名称";
this.label2.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(1794, 428);
this.labPName.Location = new System.Drawing.Point(1642, 376);
this.labPName.Margin = new System.Windows.Forms.Padding(2);
this.labPName.Name = "labPName";
this.labPName.Size = new System.Drawing.Size(755, 285);
this.labPName.Size = new System.Drawing.Size(694, 249);
this.labPName.TabIndex = 24;
this.labPName.Text = "MF253 MF S后保";
this.labPName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -309,10 +309,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(1517, 428);
this.label8.Location = new System.Drawing.Point(1388, 376);
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, 249);
this.label8.TabIndex = 23;
this.label8.Text = "产品名称";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -323,10 +323,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(435, 428);
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(1077, 285);
this.labPartNo.Size = new System.Drawing.Size(985, 249);
this.labPartNo.TabIndex = 22;
this.labPartNo.Text = "A2530822665";
this.labPartNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -342,10 +342,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, 376);
this.label6.Margin = new System.Windows.Forms.Padding(2);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(427, 285);
this.label6.Size = new System.Drawing.Size(390, 249);
this.label6.TabIndex = 21;
this.label6.Text = "产品代码";
this.label6.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(1794, 718);
this.labBadCount.Location = new System.Drawing.Point(1642, 630);
this.labBadCount.Margin = new System.Windows.Forms.Padding(2);
this.labBadCount.Name = "labBadCount";
this.labBadCount.Size = new System.Drawing.Size(755, 515);
this.labBadCount.Size = new System.Drawing.Size(694, 449);
this.labBadCount.TabIndex = 20;
this.labBadCount.Text = "0";
this.labBadCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -370,10 +370,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(435, 718);
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(1077, 515);
this.labNum.Size = new System.Drawing.Size(985, 449);
this.labNum.TabIndex = 18;
this.labNum.Text = "152/210";
this.labNum.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -384,10 +384,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, 630);
this.label10.Margin = new System.Windows.Forms.Padding(2);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(427, 515);
this.label10.Size = new System.Drawing.Size(390, 449);
this.label10.TabIndex = 17;
this.label10.Text = "计划/完成数";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -400,7 +400,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(423, 120);
this.label14.Size = new System.Drawing.Size(386, 105);
this.label14.TabIndex = 12;
this.label14.Text = "扫描本体条码";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -409,10 +409,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(437, 6);
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBox1.Location = new System.Drawing.Point(400, 5);
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(1073, 87);
this.textBox1.Size = new System.Drawing.Size(981, 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(1796, 1);
this.labErrMessage.Location = new System.Drawing.Point(1644, 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(751, 245);
this.labErrMessage.Size = new System.Drawing.Size(690, 215);
this.labErrMessage.TabIndex = 16;
this.labErrMessage.Text = "条码与产品不匹配,重新扫描";
this.labErrMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -437,9 +437,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, 758F));
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, 697F));
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);
@ -459,17 +459,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, 4, 4, 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, 1082);
this.tableLayoutPanel4.TabIndex = 2;
//
// label12
@ -478,10 +478,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(1517, 718);
this.label12.Location = new System.Drawing.Point(1388, 630);
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, 449);
this.label12.TabIndex = 19;
this.label12.Text = "不合格数";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -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(1963, 0);
this.labTime.Location = new System.Drawing.Point(1799, 0);
this.labTime.Margin = new System.Windows.Forms.Padding(0);
this.labTime.Name = "labTime";
this.labTime.Size = new System.Drawing.Size(597, 149);
this.labTime.Size = new System.Drawing.Size(548, 130);
this.labTime.TabIndex = 7;
this.labTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.labTime.Click += new System.EventHandler(this.labTime_Click);
@ -508,7 +508,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(355, 149);
this.pictureBox1.Size = new System.Drawing.Size(325, 130);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
@ -518,10 +518,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(355, 0);
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(1608, 149);
this.label1.Size = new System.Drawing.Size(1474, 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, 596F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 547F));
this.tableLayoutPanel2.Controls.Add(this.labTime, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.label1, 1, 0);
@ -542,7 +542,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
@ -559,18 +559,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, 1601);
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, 1601);
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";

531
InjectionPC/FrmMain2408.Designer.cs

File diff suppressed because it is too large

373
InjectionPC/FrmMain2408.cs

@ -2348,11 +2348,11 @@ namespace InjectionPC
return;
}
if (Convert.ToInt32(textBox2.Text.Trim()) > 10)
{
MessageBox.Show("数量不能大于10!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
//if (Convert.ToInt32(textBox2.Text.Trim()) > 10)
//{
// MessageBox.Show("数量不能大于10!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
// return;
//}
#endregion
@ -2415,8 +2415,8 @@ namespace InjectionPC
if (IsSupply != "1")
{
#region 非直供件
for (int i = 1; i <= Convert.ToInt32(textBox2.Text.Trim()); i++)
int printCount = Convert.ToInt32(textBox2.Text.Trim());
for (int i = 1; i <= printCount; i++)
{
GetSjBarCode(stockNo, partNo,false,"0", PartName, ref NewOneCode, ref newcode);
@ -2449,7 +2449,7 @@ namespace InjectionPC
}
//if (bll.Add_Info_New(md, Program.tableName) == false)
if (SaveBarCode(md, Program.tableName, false, "0") == false)
if (SaveBarCode(md, Program.tableName, false, "0",i== printCount) == false)
{
return;
}
@ -3771,28 +3771,7 @@ namespace InjectionPC
{
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, PartName, ref NewOneCode, ref newcode);
#region 插入数据tb_barCode
@ -3830,18 +3809,6 @@ namespace InjectionPC
#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());
// IsSupply = dt3.Rows[0]["IsSupply"].ToString();
//}
DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(),
dt.Rows[0]["StationID"].ToString());
if (dt4 != null && dt4.Rows.Count > 0)
@ -3869,130 +3836,13 @@ namespace InjectionPC
#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(true);
// #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, PartName, ref NewOneCode, ref newcode);
#region 插入数据tb_barCode
@ -4030,18 +3880,6 @@ namespace InjectionPC
#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());
// IsSupply = dt3.Rows[0]["IsSupply"].ToString();
//}
DataTable dt4 = pbll.SearchInfo(partNo[j].ToString().Trim(),
dt.Rows[0]["StationID"].ToString());
if (dt4 != null && dt4.Rows.Count > 0)
@ -4070,102 +3908,7 @@ namespace InjectionPC
#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();
@ -4183,41 +3926,6 @@ namespace InjectionPC
}
private void timer2_Tick(object sender, EventArgs e)
{
//InjectionPlanBLL bll = new InjectionPlanBLL();
//ProductBLL productBll = new ProductBLL();
//try
//{
// #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(',');
// 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 = "暂无生产计划";
// }
// #endregion
//}
//catch (Exception ex)
//{
// LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
// label12.Text = "";
//}
initPlan();
}
@ -4272,54 +3980,12 @@ namespace InjectionPC
textBox1.Text = Program.ProductDate.Substring(2, 2) + Program.ProductDate.Substring(5, 2) +
Program.ProductDate.Substring(8, 2); //批次
initPlan();
#region 获取当前生产信息
//InjectionPlanBLL ibll = new InjectionPlanBLL();
//ProductBLL productBll = new ProductBLL();
//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() + ";";
// }
// if ((partNo1.Length == 1 && comBoxSizeL.SelectedItem == null) || (partNo1.Length == 2 && comBoxSizeL.SelectedItem == null && comBoxSizeR.SelectedItem == null))
// {
// if (!string.IsNullOrEmpty(partNo1[i].ToString().Trim()))
// {
// string currentSize = string.Empty;
// List<string> list = GetProductBoxSize(partNo1[i].ToString().Trim(), ref currentSize);
// if (i == 0)
// {
// comBoxSizeL.DataSource = list;
// comBoxSizeL.SelectedItem = currentSize;
// }
// else
// {
// comBoxSizeR.DataSource = list;
// comBoxSizeR.SelectedItem = currentSize;
// }
// }
// }
// }
//}
//else
//{
// label12.Text = "暂无生产计划";
//}
#region 获取当前生产信息
initPlan();
#endregion
}
catch (Exception ex)
@ -4453,19 +4119,22 @@ namespace InjectionPC
bool SaveBarCode(BarCodeModel bcm,string tableName, bool isAutoPrint,string mould)
bool SaveBarCode(BarCodeModel bcm,string tableName, bool isAutoPrint,string mould,bool handPrint = false)
{
Label lbPackageCode = lbPackageCodeL;
Label lbCurrentlQty = lbCurrentlQtyL;
Label lbNeedQty = lbNeedQtyL;
if (mould == _leftType)
{
lbPackageCode = lbPackageCodeL;
lbCurrentlQty = lbCurrentlQtyL;
lbNeedQty = lbNeedQtyL;
}
else
{
lbPackageCode = lbPackageCodeR;
lbCurrentlQty = lbCurrentlQtyR;
lbNeedQty = lbNeedQtyR;
}
bool saveRst = false;
@ -4486,12 +4155,12 @@ namespace InjectionPC
return false;
}
string realCountStr = dt.Rows[0]["BoxCount"].ToString();
string sizeCountStr = lbNeedQtyL.Text.Trim();
string sizeCountStr = lbNeedQty.Text.Trim();
int realCount = 0;
int sizeCount = 0;
int.TryParse(realCountStr, out realCount);
int.TryParse(sizeCountStr, out sizeCount);
if (realCount != 0 && realCount == sizeCount)
if ((realCount != 0 && realCount == sizeCount) || (isAutoPrint == false && handPrint==true))
{
lbPackageCode.Text = "";
lbCurrentlQty.Text = "0";
@ -5113,6 +4782,10 @@ namespace InjectionPC
comBoxSizeR.Enabled = true;
}
}
else
{
MessageBox.Show("密码错误");
}
};
frm.Controls.Add(tb);
frm.Controls.Add(bt);

251
PaintingPC/FrmQuality.cs

@ -24,6 +24,7 @@ namespace PaintingPC
private static string position = "", reason = "";
private bool _isWmsQuality = false ;
private string _carType = string.Empty;
private Dictionary<string, string> _lastJustDict = new Dictionary<string, string>();
public FrmQuality(bool isWmsQuality)
{
InitializeComponent();
@ -266,56 +267,6 @@ namespace PaintingPC
}
}
/// <summary>
/// 抛光按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
//private void btnPass_Click(object sender, EventArgs e)
//{
// #region 必须选择缺陷位置与缺陷原因,否则无法保存
// string damnPositionTemp = "";
// string reasonTemp = "";
// //缺陷位置
// foreach (Control c in pictureBox2.Controls)
// {
// Label lab = c as Label;
// if (lab.BackColor != Color.Transparent)
// {
// damnPositionTemp += lab.Text + ";";
// }
// }
// //缺陷原因
// foreach (Control c in panel2.Controls)
// {
// Label lab = c as Label;
// if (lab.BackColor != Color.Transparent)
// {
// reasonTemp += lab.Text + ";";
// }
// }
// if (string.IsNullOrWhiteSpace(damnPositionTemp) || string.IsNullOrWhiteSpace(reasonTemp))
// {
// MessageBox.Show("必须选择缺陷位置与缺陷原因,否则无法保存!");
// return;
// }
// #endregion
// ClearControlColor(SetControlGroup());
// btnRepair.BackColor = Color.Yellow;
// //保存
// SaveInspect("抛光");
// ClearPage();
// ClearTxtBarcode();
// txtBarCode.TabIndex = 0;
// //LoadPage();
// //ClearInspect();
// //ClearControlColor(SetControlGroup());
//}
/// <summary>
/// 合格
/// </summary>
@ -328,16 +279,44 @@ namespace PaintingPC
MessageBox.Show("请先扫描数据,然后操作.");
return;
}
ShowHint("");
#region 判断产品是否有颜色
string colorName = string.Empty;
string partName = string.Empty;
if (CheckColor(ref colorName,ref partName) == false) return;
#endregion
ClearControlColor(SetControlGroup());
btnAbt.BackColor = Color.Red;
string lastRst = GetLastInspectRst(txtBarCode.Text.Trim());
if (lastRst.Contains("合格"))
{
MessageBox.Show("条码已判定为合格,无需重复判定");
Clear();
return;
}
//保存
SaveInspect("合格", colorName, partName);
try
{
SendToWms(txtBarCode.Text.Trim(), 1);
}
catch (Exception ex)
{
ShowHint("合格WMS报工异常,原因:" + ex.Message);
MessageBox.Show("合格WMS报工异常,原因:" + ex.Message);
LogHelper.WriteErrLogBase("合格WMS报工调用WMS接口:" + ex.ToString(), MethodBase.GetCurrentMethod().Name);
}
Clear();
}
void Clear()
{
ClearPage();
ClearTxtBarcode();
txtBarCode.TabIndex = 0;
@ -355,8 +334,9 @@ namespace PaintingPC
MessageBox.Show("请先扫描数据,然后操作.");
return;
}
if (MessageBox.Show($"确认对[{txtBarCode.Text}]进行不良判定?", "操作确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return;
ShowHint("");
#region 必须选择缺陷位置与缺陷原因,否则无法保存
if (CheckDefect() == false) return;
#endregion
@ -366,6 +346,13 @@ namespace PaintingPC
string partName = string.Empty;
if (CheckColor(ref colorName, ref partName) == false) return;
#endregion
string lastRst = GetLastInspectRst(txtBarCode.Text.Trim());
if (lastRst.Contains("不良"))
{
MessageBox.Show("条码已判定为不合格,无需重复判定");
Clear();
return;
}
//保存
SaveInspect("不良", colorName, partName);
ClearPage();
@ -386,16 +373,12 @@ namespace PaintingPC
MessageBox.Show("请先扫描数据,然后操作.");
return;
}
if (MessageBox.Show($"确认对[{txtBarCode.Text}]进行返喷操作?", "操作确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return;
ShowHint("");
string barcode = Function.UniteBarCodeToOne(txtBarCode.Text.Trim());
int cs = Function.YiDaMoCiShu(barcode);
//if (cs >= 1)
//{
// MessageBox.Show("该条码已有判定为打磨的质检结果!");
// return;
//}
int keHuiPen = Function.keHuiPen(barcode);
if (keHuiPen > 0 && cs < keHuiPen)
@ -413,24 +396,38 @@ namespace PaintingPC
if (CheckColor(ref colorName, ref partName) == false) return;
#endregion
ClearControlColor(SetControlGroup());
btnRepair.BackColor = Color.Yellow;
string lastRst = GetLastInspectRst(txtBarCode.Text.Trim());
if (lastRst.Contains("打磨"))
{
MessageBox.Show("条码已判定为返喷,无需重复判定");
Clear();
return;
}
string s = _isWmsQuality == false ? "打磨" : "WMS打磨";
//保存
SaveInspect(s, colorName, partName);
ClearPage();
ClearTxtBarcode();
txtBarCode.TabIndex = 0;
try
{
SendToWms(txtBarCode.Text.Trim(), 9);
}
catch (Exception ex)
{
ShowHint("返喷WMS报工异常,原因:" + ex.Message);
MessageBox.Show("返喷WMS报工异常,原因:" + ex.Message);
LogHelper.WriteErrLogBase("返喷WMS报工调用WMS接口:" + ex.ToString(), MethodBase.GetCurrentMethod().Name);
}
Clear();
}
else
{
MessageBox.Show("根据该零件可回喷次数设置,不能判定为打磨或已超过打磨次数!");
ClearPage();
ClearTxtBarcode();
txtBarCode.TabIndex = 0;
Clear();
return;
}
@ -449,8 +446,9 @@ namespace PaintingPC
MessageBox.Show("请先扫描数据,然后操作.");
return;
}
if (MessageBox.Show($"确认对[{txtBarCode.Text}]进行报废操作?", "操作确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return;
ShowHint("");
#region 必须选择缺陷位置与缺陷原因,否则无法保存
if (CheckDefect() == false) return;
#endregion
@ -461,15 +459,20 @@ namespace PaintingPC
if (CheckColor(ref colorName, ref partName) == false) return;
#endregion
DataTable inspectTable = Function. GetInspectInfoByBarCode2(txtBarCode.Text.Trim());
if(inspectTable.Rows.Count>0)
string lastRst = GetLastInspectRst(txtBarCode.Text.Trim());
if (lastRst.Contains("合格"))
{
if (inspectTable.Rows[0]["inspectResult"].ToString().Contains("合格"))
{
MessageBox.Show("条码已判定为合格,无法重新判定为报废");
return ;
}
MessageBox.Show("条码已判定为合格,无法重新判定为报废");
Clear();
return;
}
if (lastRst.Contains("报废"))
{
MessageBox.Show("条码已判定为报废,无需重复报废");
Clear();
return;
}
ClearControlColor(SetControlGroup());
btnAbt.BackColor = Color.Red;
string id = SaveInspect("报废", colorName, partName);
@ -477,24 +480,26 @@ namespace PaintingPC
try
{
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;
}
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)
@ -512,6 +517,53 @@ namespace PaintingPC
//ClearControlColor(SetControlGroup());
}
/// <summary>
///
/// </summary>
/// <param name="barCode"></param>
/// <returns></returns>
string GetLastInspectRst(string barCode)
{
DataTable inspectTable = Function.GetInspectInfoByBarCode2(txtBarCode.Text.Trim());
if (inspectTable.Rows.Count > 0)
{
return inspectTable.Rows[0]["inspectResult"].ToString();
}
return "";
}
/// <summary>
/// 发送wms罢工
/// </summary>
/// <param name="scanBarCode"></param>
/// <param name="isOk">0:报废 1:合格 9:返喷 </param>
void SendToWms(string scanBarCode, int isOk)
{
WMSWebService webService = new WMSWebService();
webService.Url = ConfigurationManager.AppSettings["WMSWebServiceURL"].ToString();
//webService.Timeout = 1200000;
string errorReason = "";
//上次异常提交
if (_lastJustDict.Count > 0)
{
bool rst2 = webService.WMSSprayingForCS(Function.UniteBarCodeToOne(_lastJustDict.First().Key), int.Parse( _lastJustDict.First().Value), out errorReason);
}
bool rst = webService.WMSSprayingForCS(Function.UniteBarCodeToOne(scanBarCode), isOk, out errorReason);
if (rst == false)
{
ShowHint("WMS报工接口调用失败: " + errorReason);
_lastJustDict.Clear();
_lastJustDict.Add(scanBarCode, isOk.ToString());
return;
}
_lastJustDict.Clear();
}
/// <summary>
/// 判断产品是否有颜色
/// </summary>
/// <returns></returns>
@ -655,12 +707,16 @@ namespace PaintingPC
}
catch (Exception ex)
{
ShowHint("质检提交异常,原因:" + ex.Message);
LogHelper.WriteErrLogBase("质检提交:" + ex.ToString(), MethodBase.GetCurrentMethod().Name);
MessageBox.Show("质检提交异常,原因:" + ex.Message);
return null;
}
}
void ShowHint(string txt)
{
lbForeig.Text = txt;
}
public void ClearInspect()
{
//缺陷位置
@ -967,7 +1023,7 @@ namespace PaintingPC
string[] info = Function.GetProductInfo2(barcode,ref paintError).Split(',');
if (!string.IsNullOrEmpty(paintError))
{
lbForeig.Text = paintError;
ShowHint(paintError);
}
labProductInfo.Text = info[0] + "," + info[1];
paintId = info[2];
@ -1048,10 +1104,6 @@ namespace PaintingPC
{
labProductInfo.Tag = null;
labProductInfo.Text = "";
//labFirstCheck.Text = "";
//labSecondCheck.Text = "";
//labThirdCheck.Text = "";
//btnPass.BackColor = Color.LightGray;
btnAbt.BackColor = Color.LightGray;
btnRepair.BackColor = Color.LightGray;
@ -1140,6 +1192,7 @@ namespace PaintingPC
private void UpdateSoftware()
{
return;
var serverUrl = "http://10.60.101.59:8013/";
var updateXmlFileName = "PaintingUpdatePC.xml";
var updater = new AutoUpdater();

20
WebService/Function.cs

@ -1178,7 +1178,7 @@ namespace Webservice
/// 是否允许发送给wms 是否质检等判断
/// </summary>
/// <param name="oneBarCode"></param>
/// <param name="state">0-不合格;1-合格</param>
/// <param name="state">0-不合格;1-合格 9-返喷</param>
/// <returns></returns>
static bool AllowSendToWms(string oneBarCode, int state,
ref int pRepaint,ref string errorMssg ,ref string paintColor, ref string colorName, ref string productName,ref string carType)
@ -1215,7 +1215,7 @@ namespace Webservice
rePaint = 0;
}
pRepaint = rePaint;
//不合格 返喷=0 有报工记录不能重发
//不合格0 有报工记录不能重发
if (state == 0)
{
if (inspectTable.Rows[0]["inspectResult"].ToString().Contains("报废") == false)
@ -1232,14 +1232,14 @@ namespace Webservice
}
}
}
//合格 返喷=0 最近一条是报废记录,可以重发. 否则不可以.
//合格 1 最近一条是报废记录,可以重发. 否则不可以.
else if (state == 1)
{
if(inspectTable.Rows[0]["inspectResult"].ToString().Contains("合格") ==false)
{
errorMssg = $"条码[{oneBarCode}]质检记录是[{inspectTable.Rows[0]["inspectResult"].ToString()}]状态,无法合格报工.";
return false;
}
//if(inspectTable.Rows[0]["inspectResult"].ToString().Contains("合格") ==false)
//{
// errorMssg = $"条码[{oneBarCode}]质检记录是[{inspectTable.Rows[0]["inspectResult"].ToString()}]状态,无法合格报工.";
// return false;
//}
if (rePaint == 0) //没返喷的合格,
{
if (IsStockInAll(oneBarCode))
@ -1262,6 +1262,10 @@ namespace Webservice
{
return true;
}
if (lastRst.Contains("打磨")) //允许返喷二次判定为合格
{
return true;
}
errorMssg = $"条码[{oneBarCode}]存在返喷报工,不能重新报工.";
return false;
}

10
WebService/WMSWebService.asmx.cs

@ -78,6 +78,16 @@ namespace Webservice
Context.Response.Write(res);
}
[WebMethod]
[ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]
public string WMSSprayingForCSForTest(string barcode, int isOK)
{
string errorReason = string.Empty;
bool b = WMSSprayingForCS(barcode, isOK, out errorReason);
if (string.IsNullOrEmpty(errorReason))
return "true";
return errorReason;
}
/// <summary>
/// 调用WMS接口03

Loading…
Cancel
Save