ruoxing.wang 23 hours ago
parent
commit
1807276261
  1. 90
      FacOneZPStation/FrmZP.Designer.cs
  2. 4
      InjectionPC/FrmMain2411.Designer.cs
  3. 2
      PaintingPC/FrmQuality.cs
  4. 95
      PunchingMistake/FrmQualityNew.cs
  5. 11
      PunchingMistake/Function2.cs
  6. 3
      PunchingMistake/Program.cs

90
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, 744F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 746F));
this.tableLayoutPanel3.Controls.Add(this.button6, 3, 0);
this.tableLayoutPanel3.Controls.Add(this.button1, 0, 1);
this.tableLayoutPanel3.Controls.Add(this.button5, 2, 1);
@ -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(1602, 12);
this.button6.Location = new System.Drawing.Point(1601, 12);
this.button6.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(720, 161);
this.button6.Size = new System.Drawing.Size(721, 161);
this.button6.TabIndex = 7;
this.button6.Text = "手动打印箱单";
this.button6.UseVisualStyleBackColor = false;
@ -118,7 +118,7 @@
this.button1.Location = new System.Drawing.Point(6, 190);
this.button1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(521, 176);
this.button1.Size = new System.Drawing.Size(520, 176);
this.button1.TabIndex = 6;
this.button1.Text = "打印标签";
this.button1.UseVisualStyleBackColor = false;
@ -130,7 +130,7 @@
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(1080, 197);
this.button5.Location = new System.Drawing.Point(1079, 197);
this.button5.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(496, 162);
@ -144,7 +144,7 @@
this.button4.BackColor = System.Drawing.Color.RoyalBlue;
this.button4.Dock = System.Windows.Forms.DockStyle.Fill;
this.button4.Font = new System.Drawing.Font("黑体", 16F);
this.button4.Location = new System.Drawing.Point(539, 5);
this.button4.Location = new System.Drawing.Point(538, 5);
this.button4.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(522, 175);
@ -161,7 +161,7 @@
this.button3.Location = new System.Drawing.Point(6, 5);
this.button3.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(521, 175);
this.button3.Size = new System.Drawing.Size(520, 175);
this.button3.TabIndex = 3;
this.button3.Text = "上一计划";
this.button3.UseVisualStyleBackColor = false;
@ -173,7 +173,7 @@
this.button2.Dock = System.Windows.Forms.DockStyle.Fill;
this.button2.Font = new System.Drawing.Font("黑体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button2.ForeColor = System.Drawing.Color.Black;
this.button2.Location = new System.Drawing.Point(546, 197);
this.button2.Location = new System.Drawing.Point(545, 197);
this.button2.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(508, 162);
@ -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(1595, 190);
this.button7.Location = new System.Drawing.Point(1594, 190);
this.button7.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(734, 176);
this.button7.Size = new System.Drawing.Size(735, 176);
this.button7.TabIndex = 8;
this.button7.Text = "补打箱单";
this.button7.UseVisualStyleBackColor = false;
@ -202,7 +202,7 @@
this.label7.Dock = System.Windows.Forms.DockStyle.Fill;
this.label7.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.ForeColor = System.Drawing.Color.White;
this.label7.Location = new System.Drawing.Point(1264, 3);
this.label7.Location = new System.Drawing.Point(1262, 3);
this.label7.Margin = new System.Windows.Forms.Padding(2);
this.label7.Name = "label7";
this.tableLayoutPanel4.SetRowSpan(this.label7, 2);
@ -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(365, 111);
this.textBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.textBox2.Location = new System.Drawing.Point(364, 111);
this.textBox2.Margin = new System.Windows.Forms.Padding(4);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(892, 77);
this.textBox2.Size = new System.Drawing.Size(891, 77);
this.textBox2.TabIndex = 30;
this.textBox2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox2_KeyDown);
//
@ -229,7 +229,7 @@
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(351, 108);
this.label3.Size = new System.Drawing.Size(350, 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(1518, 218);
this.labOrderNo.Location = new System.Drawing.Point(1516, 218);
this.labOrderNo.Margin = new System.Windows.Forms.Padding(2);
this.labOrderNo.Name = "labOrderNo";
this.labOrderNo.Size = new System.Drawing.Size(818, 151);
this.labOrderNo.Size = new System.Drawing.Size(820, 151);
this.labOrderNo.TabIndex = 28;
this.labOrderNo.Text = "A64654646464";
this.labOrderNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -253,7 +253,7 @@
this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
this.label4.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.ForeColor = System.Drawing.Color.White;
this.label4.Location = new System.Drawing.Point(1264, 218);
this.label4.Location = new System.Drawing.Point(1262, 218);
this.label4.Margin = new System.Windows.Forms.Padding(2);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(249, 151);
@ -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(363, 218);
this.labStationNo.Location = new System.Drawing.Point(362, 218);
this.labStationNo.Margin = new System.Windows.Forms.Padding(2);
this.labStationNo.Name = "labStationNo";
this.labStationNo.Size = new System.Drawing.Size(896, 151);
this.labStationNo.Size = new System.Drawing.Size(895, 151);
this.labStationNo.TabIndex = 26;
this.labStationNo.Text = "V253-MF-S后保下部延伸焊接";
this.labStationNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -284,7 +284,7 @@
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(355, 151);
this.label2.Size = new System.Drawing.Size(354, 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(1518, 374);
this.labPName.Location = new System.Drawing.Point(1516, 374);
this.labPName.Margin = new System.Windows.Forms.Padding(2);
this.labPName.Name = "labPName";
this.labPName.Size = new System.Drawing.Size(818, 248);
this.labPName.Size = new System.Drawing.Size(820, 248);
this.labPName.TabIndex = 24;
this.labPName.Text = "MF253 MF S后保";
this.labPName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -308,7 +308,7 @@
this.label8.Dock = System.Windows.Forms.DockStyle.Fill;
this.label8.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.ForeColor = System.Drawing.Color.White;
this.label8.Location = new System.Drawing.Point(1264, 374);
this.label8.Location = new System.Drawing.Point(1262, 374);
this.label8.Margin = new System.Windows.Forms.Padding(2);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(249, 248);
@ -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(363, 374);
this.labPartNo.Location = new System.Drawing.Point(362, 374);
this.labPartNo.Margin = new System.Windows.Forms.Padding(2);
this.labPartNo.Name = "labPartNo";
this.labPartNo.Size = new System.Drawing.Size(896, 248);
this.labPartNo.Size = new System.Drawing.Size(895, 248);
this.labPartNo.TabIndex = 22;
this.labPartNo.Text = "A2530822665";
this.labPartNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -344,7 +344,7 @@
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(355, 248);
this.label6.Size = new System.Drawing.Size(354, 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(1518, 627);
this.labBadCount.Location = new System.Drawing.Point(1516, 627);
this.labBadCount.Margin = new System.Windows.Forms.Padding(2);
this.labBadCount.Name = "labBadCount";
this.labBadCount.Size = new System.Drawing.Size(818, 451);
this.labBadCount.Size = new System.Drawing.Size(820, 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(363, 627);
this.labNum.Location = new System.Drawing.Point(362, 627);
this.labNum.Margin = new System.Windows.Forms.Padding(2);
this.labNum.Name = "labNum";
this.labNum.Size = new System.Drawing.Size(896, 451);
this.labNum.Size = new System.Drawing.Size(895, 451);
this.labNum.TabIndex = 18;
this.labNum.Text = "152/210";
this.labNum.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -386,7 +386,7 @@
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(355, 451);
this.label10.Size = new System.Drawing.Size(354, 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(351, 105);
this.label14.Size = new System.Drawing.Size(350, 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(365, 5);
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.textBox1.Location = new System.Drawing.Point(364, 5);
this.textBox1.Margin = new System.Windows.Forms.Padding(4);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(892, 77);
this.textBox1.Size = new System.Drawing.Size(891, 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(1520, 1);
this.labErrMessage.Location = new System.Drawing.Point(1518, 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(814, 214);
this.labErrMessage.Size = new System.Drawing.Size(816, 214);
this.labErrMessage.TabIndex = 16;
this.labErrMessage.Text = "条码与产品不匹配,重新扫描";
this.labErrMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -437,7 +437,7 @@
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 28.52292F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 71.47708F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 253F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 821F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 823F));
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);
@ -459,7 +459,7 @@
this.tableLayoutPanel4.Controls.Add(this.labErrMessage, 3, 0);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel4.Location = new System.Drawing.Point(4, 134);
this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 5;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.8932F));
@ -477,7 +477,7 @@
this.label12.Dock = System.Windows.Forms.DockStyle.Fill;
this.label12.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.ForeColor = System.Drawing.Color.White;
this.label12.Location = new System.Drawing.Point(1264, 627);
this.label12.Location = new System.Drawing.Point(1262, 627);
this.label12.Margin = new System.Windows.Forms.Padding(2);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(249, 451);
@ -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(1737, 0);
this.labTime.Location = new System.Drawing.Point(1736, 0);
this.labTime.Margin = new System.Windows.Forms.Padding(0);
this.labTime.Name = "labTime";
this.labTime.Size = new System.Drawing.Size(610, 130);
this.labTime.Size = new System.Drawing.Size(611, 130);
this.labTime.TabIndex = 7;
this.labTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.labTime.Click += new System.EventHandler(this.labTime_Click);
@ -520,7 +520,7 @@
this.label1.Location = new System.Drawing.Point(314, 0);
this.label1.Margin = new System.Windows.Forms.Padding(0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(1423, 130);
this.label1.Size = new System.Drawing.Size(1422, 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, 609F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 610F));
this.tableLayoutPanel2.Controls.Add(this.labTime, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.label1, 1, 0);

4
InjectionPC/FrmMain2411.Designer.cs

@ -786,7 +786,7 @@
this.tableLayoutPanel2.Controls.Add(this.panel38, 0, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 406);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 570F));
@ -868,7 +868,7 @@
this.tableLayoutPanel1.Controls.Add(this.label11, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));

2
PaintingPC/FrmQuality.cs

@ -1458,7 +1458,7 @@ namespace PaintingPC
if (!string.IsNullOrEmpty(state))
{
lableFP.Text = "存在[" + state + "]状态";
lableFP.Text = "存在[" + GetType( state) + "]状态";
}
_carType = dtInspect.Rows[0]["CarType"].ToString().Trim();

95
PunchingMistake/FrmQualityNew.cs

@ -411,52 +411,72 @@ namespace PunchingMistake
{
try
{
if (scanPaintRow !=null)
if (scanPaintRow == null)
{
InspectModel model1 = new InspectModel();
throw new Exception("生产记录为空,无法保存质检记录");
}
InspectModel model1 = new InspectModel();
model1.barcode = scanPaintRow["BarCode"].ToString();
model1.position = _stationType;
model1.stationNo = Program.station;
model1.inspectResult =inspectResult;
model1.damnPosition = position;
model1.reason = reason;
model1.Responsible = responsible;// string.Join(",", _selectResponsibles);
model1.barcode = scanPaintRow["BarCode"].ToString();
model1.position = _stationType;
model1.stationNo = Program.station;
model1.inspectResult = inspectResult;
//model1.remark3 = scanPaintRow["remark3"].ToString();
model1.ForeignPartCode = scanPaintRow["ZcPartNo"].ToString();
//model1.CarType = scanPaintRow["CarType"].ToString();
model1.damnPosition = position;
model1.reason = reason;
model1.Responsible = responsible;// string.Join(",", _selectResponsibles);
if (inspectResult != "合格")
//model1.remark3 = scanPaintRow["remark3"].ToString();
model1.ForeignPartCode = scanPaintRow["ZcPartNo"].ToString();
//model1.CarType = scanPaintRow["CarType"].ToString();
if (inspectResult != "合格")
{
if (string.IsNullOrWhiteSpace(model1.damnPosition) || string.IsNullOrWhiteSpace(model1.reason) || string.IsNullOrWhiteSpace(model1.Responsible))
{
if (string.IsNullOrWhiteSpace(model1.damnPosition) || string.IsNullOrWhiteSpace(model1.reason) || string.IsNullOrWhiteSpace(model1.Responsible))
{
MessageBox.Show("必须选择缺陷位置,缺陷原因与责任部门,否则无法保存!");
return "";
}
MessageBox.Show("必须选择缺陷位置,缺陷原因与责任部门,否则无法保存!");
return "";
}
model1.productInfo = labProductInfo.Text;
//model1.side = scanPaintRow["side"].ToString();
model1.InspectTimes = "1";
//model1.remark1 = scanPaintRow["remark1"].ToString();
//model1.remark2 = scanPaintRow["remark2"].ToString();
}
model1.productInfo = labProductInfo.Text;
//model1.side = scanPaintRow["side"].ToString();
model1.InspectTimes = "1";
//model1.remark1 = scanPaintRow["remark1"].ToString();
//model1.remark2 = scanPaintRow["remark2"].ToString();
//model1.remark3 = scanPaintRow["remark3"].ToString();
//model1.remark3 = scanPaintRow["remark3"].ToString();
model1.AddMan = userName;
model1.AddMan = userName;
string msg = string.Empty;
bool wmsRst = true;
if (inspectResult == "报废")
{
wmsRst = Function2.InsertWmsInterface("0", scanPaintRow["ZcBarCode"].ToString(), scanPaintRow["ZcPartNo"].ToString(), scanPaintRow["barcode"].ToString(), Program.UserName,ref msg);
}
else if (inspectResult == "返修合格" || inspectResult == "合格")
{
wmsRst = Function2.InsertWmsInterface("1", scanPaintRow["ZcBarCode"].ToString(), scanPaintRow["ZcPartNo"].ToString(), scanPaintRow["barcode"].ToString(), Program.UserName, ref msg);
Function2.InsertInspect3(model1, scanPaintRow["ZcBarCode"].ToString(), scanPaintRow["ID"].ToString(), scanPaintRow["PlanID"].ToString());
}
if(inspectResult == "报废")
if(wmsRst == false)
{
MessageBox.Show(msg);
return "";
}
Function2.InsertInspect3(model1, scanPaintRow["ZcBarCode"].ToString(), scanPaintRow["ID"].ToString(), scanPaintRow["PlanID"].ToString());
if (inspectResult == "报废")
{
//更新计划的报废数量
Function2.AddCompleteCount(scanPaintRow["PlanID"].ToString(), "报废");
Function2.UpdateRecordFlag(scanPaintRow["ID"].ToString().ToString(), "0");
Function2.InsertPunchQuality("0", scanPaintRow["ZcBarCode"].ToString(), scanPaintRow["ZcPartNo"].ToString(), scanPaintRow["barcode"].ToString(), Program.UserName);
}
if (inspectResult == "返修")
{
@ -468,13 +488,8 @@ namespace PunchingMistake
if (inspectResult == "返修合格")
{
Function2.UpdateRecordFlag(scanPaintRow["ID"].ToString().ToString(), "1");
Function2.InsertPunchQuality("1", scanPaintRow["ZcBarCode"].ToString(), scanPaintRow["ZcPartNo"].ToString(), scanPaintRow["barcode"].ToString(), Program.UserName);
}
if (inspectResult == "合格")
{
Function2.InsertPunchQuality("1", scanPaintRow["ZcBarCode"].ToString(), scanPaintRow["ZcPartNo"].ToString(), scanPaintRow["barcode"].ToString(), Program.UserName);
}
}
return "";
}
@ -542,7 +557,7 @@ namespace PunchingMistake
}
catch (Exception ex)
{
MessageBox.Show("请查看网络是否与服务器连通,无法连通请联系网络管理员。"+ ex);
MessageBox.Show(ex.Message);
LogHelper.WriteLog(ex.ToString());
}
@ -724,7 +739,7 @@ namespace PunchingMistake
}
catch (Exception ex)
{
MessageBox.Show("请查看网络是否与服务器连通,无法连通请联系网络管理员。" + ex.ToString());
MessageBox.Show(ex.Message);
LogHelper.WriteLog("整体项-" + ex.ToString());
}
}

11
PunchingMistake/Function2.cs

@ -1143,11 +1143,12 @@ namespace PunchingMistake
/// <param name="planID"></param>
/// <param name="recordID"></param>
/// <returns></returns>
public static string InsertPunchQuality(string state, string zcBarCode, string ZcPartNo,string barcode, string userName)
public static bool InsertWmsInterface(string state, string zcBarCode, string ZcPartNo,string barcode, string userName,ref string msg)
{
int res = 0; string sql = string.Empty;
try
{
string carType = Function2.GetCarType(ZcPartNo);
sql = @" INSERT INTO [dbo].[TM_BJBMPT_MYASSEMBE]
(
@ -1168,18 +1169,18 @@ namespace PunchingMistake
,'" + carType + @"'
,'" + barcode + @"'
);select @@Identity ";
DataTable dt = SqlHelper.GetDataDateTable(SqlHelper.SqlConnString, CommandType.Text, sql, null);
DataTable dt = SqlHelper.GetDataDateTable(Program.WmsConn, CommandType.Text, sql, null);
if (dt.Rows.Count > 0)
{
return dt.Rows[0][0].ToString();
return true;
}
return "";
}
catch (Exception ex)
{
LogHelper.WriteLog($"插入tb_Punch_Quality表错误,sql ='{sql}' ,异常信息:" + ex.Message);
return "";
msg = $"插入tb_Punch_Quality表错误,异常信息:" + ex.Message;
}
return false;
}
public static DataTable SearchDefectInfo(string stationNo)

3
PunchingMistake/Program.cs

@ -13,6 +13,8 @@ namespace PunchingMistake
public static string station;
public static string UserName;
public static SqlConnection DBConn;
public static string WmsConn;
/// <summary>
/// 应用程序的主入口点。
/// </summary>
@ -21,6 +23,7 @@ namespace PunchingMistake
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
WmsConn = ConfigurationManager.AppSettings["WmsSqlConnString"].ToString();
Application.Run(new FrmLogin());
}

Loading…
Cancel
Save