소스 검색

取消采集,产线打印修改

callm 1 개월 전
부모
커밋
c23de75b94

+ 11 - 3
UAS_MES_YDCY/FunctionCode/OQC/OQC_CancelMakeDown.cs

@@ -65,15 +65,23 @@ namespace UAS_MES_NEW.OQC
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(MS_IFQCCHECK,0)MS_IFQCCHECK,ms_makecode,ms_stepcode,ms_status,pr_detail,ms_outboxcode,ms_sncode,ms_firstsn,ms_id,ms_nextstepcode,ms_currentstepcode,ms_makecode,ms_status,ms_checkno,ms_craftcode,ms_prodcode,ms_stepcode,nvl(ms_qccheck,0)ms_qccheck from makeserial left join product on pr_code=ms_prodcode where ms_downcode='" + batch.Text + "'  order by ms_id desc", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select ms_downcode,nvl(MS_IFQCCHECK,0)MS_IFQCCHECK,ms_makecode,ms_stepcode,ms_status,pr_detail,ms_outboxcode,ms_sncode,ms_firstsn,ms_id,ms_nextstepcode,ms_currentstepcode,ms_makecode,ms_status,ms_checkno,ms_craftcode,ms_prodcode,ms_stepcode,nvl(ms_qccheck,0)ms_qccheck from makeserial left join product on pr_code=ms_prodcode where ms_sncode='" + batch.Text + "'  order by ms_id desc", "select");
                 if (dt.Rows.Count > 0)
                 {
                     pr_code.Text = dt.Rows[0]["ms_prodcode"].ToString();
                     string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
-                    string ms_qccheck = dt.Rows[0]["ms_qccheck"].ToString();
+                    string ms_downcode = dt.Rows[0]["ms_downcode"].ToString();
                     pr_detail.Text = dt.Rows[0]["pr_detail"].ToString();
+                    if (ms_downcode == "")
+                    {
+                        OperateResult.AppendText(">>该序列号不存在冻结批次" + batch.Text + "\n", Color.Red, batch);
+                    }
+                    else
+                    {
+                        batch.Text = ms_downcode;
+                    }
                 }
-                else OperateResult.AppendText(">>冻结批次号" + batch.Text + "不存在\n", Color.Red, batch);
+                else OperateResult.AppendText(">>SN" + batch.Text + "不存在\n", Color.Red, batch);
             }
         }
     }

+ 14 - 2
UAS_MES_YDCY/FunctionCode/SystemSetting/SystemSetting_PrinterTest.Designer.cs

@@ -51,6 +51,7 @@
             this.Setting = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.PrintTest = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.MakeSnList = new System.Windows.Forms.RadioButton();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.SuspendLayout();
             // 
@@ -162,7 +163,6 @@
             this.SN.Name = "SN";
             this.SN.Size = new System.Drawing.Size(161, 28);
             this.SN.TabIndex = 39;
-            this.SN.TabStop = true;
             this.SN.Text = "内部序列号";
             this.SN.UseVisualStyleBackColor = true;
             this.SN.CheckedChanged += new System.EventHandler(this.SN_CheckedChanged);
@@ -346,11 +346,22 @@
             this.PrintTest.UseVisualStyleBackColor = true;
             this.PrintTest.Click += new System.EventHandler(this.PrintTest_Click);
             // 
+            // MakeSnList
+            // 
+            this.MakeSnList.AutoSize = true;
+            this.MakeSnList.Location = new System.Drawing.Point(710, 60);
+            this.MakeSnList.Name = "MakeSnList";
+            this.MakeSnList.Size = new System.Drawing.Size(185, 28);
+            this.MakeSnList.TabIndex = 42;
+            this.MakeSnList.Text = "导入清单打印";
+            this.MakeSnList.UseVisualStyleBackColor = true;
+            // 
             // SystemSetting_PrinterTest
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(2034, 1118);
+            this.Controls.Add(this.MakeSnList);
             this.Controls.Add(this.pictureBox1);
             this.Controls.Add(this.Material);
             this.Controls.Add(this.SN);
@@ -380,7 +391,7 @@
             this.Text = "打印机调试";
             this.Load += new System.EventHandler(this.SystemSetting_PrinterTest_Load);
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -408,5 +419,6 @@
         private System.Windows.Forms.RadioButton SN;
         private System.Windows.Forms.RadioButton Material;
         private System.Windows.Forms.PictureBox pictureBox1;
+        private System.Windows.Forms.RadioButton MakeSnList;
     }
 }

+ 34 - 5
UAS_MES_YDCY/FunctionCode/SystemSetting/SystemSetting_PrinterTest.cs

@@ -1,5 +1,6 @@
 using Seagull.BarTender.Print;
 using System;
+using System.Data;
 using System.Drawing;
 using System.Drawing.Printing;
 using System.Windows.Forms;
@@ -51,13 +52,13 @@ namespace UAS_MES_NEW.SystemSetting
 
         private void Export_Click(object sender, EventArgs e)
         {
+            if (!dh.CheckExist("make", "ma_code='" + ma_code.Text + "'"))
+            {
+                MessageBox.Show("工单号不存在");
+                return;
+            }
             if (SN.Checked)
             {
-                if (!dh.CheckExist("make", "ma_code='" + ma_code.Text + "'"))
-                {
-                    MessageBox.Show("工单号不存在");
-                    return;
-                }
                 format.SubStrings["Type"].Value = MachineType.Text;
                 format.SubStrings["Mark"].Value = Mark.Text;
                 for (int i = int.Parse(Rn.Text); i < (int.Parse(Num.Text) + int.Parse(Rn.Text)); i = i + 2)
@@ -90,6 +91,34 @@ namespace UAS_MES_NEW.SystemSetting
                     format.Print();
                 }
             }
+            else if (MakeSnList.Checked)
+            {
+                DataTable dt = (DataTable)dh.ExecuteSql("select msl_sncode from makesnlist where msl_makecode='" + ma_code.Text + "' and msl_type='before' order by msl_sncode", "select");
+                for (int i = 0; i < dt.Rows.Count; i = i + 2)
+                {
+                    int temp = i;
+                    for (int j = 0; j < format.SubStrings.Count; j++)
+                    {
+                        switch (format.SubStrings[j].Name)
+                        {
+                            case "SN":
+                                format.SubStrings[j].Value = dt.Rows[i]["msl_sncode"].ToString();
+                                break;
+                            case "SN2":
+                                if (i + 1 <= dt.Rows.Count - 1)
+                                {
+                                    format.SubStrings[j].Value = dt.Rows[i + 1]["msl_sncode"].ToString();
+                                }
+                                break;
+                            default:
+                                break;
+                        }
+                    }
+                    format.PrintSetup.PrinterName = PrinterList.Text;
+                    format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                    format.Print();
+                }
+            }
             else
             {
                 format1.SubStrings["Mark"].Value = MachineType.Text;

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 832 - 834
UAS_MES_YDCY/FunctionCode/SystemSetting/SystemSetting_PrinterTest.resx


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.