yhluo 11 часов назад
Родитель
Сommit
ca0555e109

+ 8 - 5
UAS_MES_WEIP/FunctionCode/Make/Make_EquiConnect.Designer.cs

@@ -140,36 +140,39 @@
             // 
             this.SnType2.AutoSize = true;
             this.SnType2.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.SnType2.Location = new System.Drawing.Point(227, 107);
+            this.SnType2.Location = new System.Drawing.Point(775, 131);
             this.SnType2.Name = "SnType2";
             this.SnType2.Size = new System.Drawing.Size(90, 28);
             this.SnType2.TabIndex = 183;
             this.SnType2.Text = "序列号";
             this.SnType2.UseVisualStyleBackColor = true;
+            this.SnType2.Visible = false;
             this.SnType2.Click += new System.EventHandler(this.SnType2_Click);
             // 
             // SnType1
             // 
             this.SnType1.AutoSize = true;
             this.SnType1.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.SnType1.Location = new System.Drawing.Point(131, 107);
+            this.SnType1.Location = new System.Drawing.Point(679, 131);
             this.SnType1.Name = "SnType1";
             this.SnType1.Size = new System.Drawing.Size(90, 28);
             this.SnType1.TabIndex = 181;
             this.SnType1.Text = "拼板号";
             this.SnType1.UseVisualStyleBackColor = true;
+            this.SnType1.Visible = false;
             this.SnType1.Click += new System.EventHandler(this.SnType1_Click);
             // 
             // SnTypeLab
             // 
             this.SnTypeLab.AutoSize = true;
             this.SnTypeLab.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SnTypeLab.Location = new System.Drawing.Point(30, 106);
+            this.SnTypeLab.Location = new System.Drawing.Point(578, 130);
             this.SnTypeLab.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.SnTypeLab.Name = "SnTypeLab";
             this.SnTypeLab.Size = new System.Drawing.Size(122, 28);
             this.SnTypeLab.TabIndex = 182;
             this.SnTypeLab.Text = "序列号类型:";
+            this.SnTypeLab.Visible = false;
             // 
             // OkBox
             // 
@@ -360,7 +363,7 @@
             // 
             // SNVal
             // 
-            this.SNVal.Location = new System.Drawing.Point(118, 145);
+            this.SNVal.Location = new System.Drawing.Point(118, 103);
             this.SNVal.Name = "SNVal";
             this.SNVal.Size = new System.Drawing.Size(243, 31);
             this.SNVal.TabIndex = 164;
@@ -370,7 +373,7 @@
             // 
             this.SNLab.AutoSize = true;
             this.SNLab.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SNLab.Location = new System.Drawing.Point(60, 146);
+            this.SNLab.Location = new System.Drawing.Point(60, 104);
             this.SNLab.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.SNLab.Name = "SNLab";
             this.SNLab.Size = new System.Drawing.Size(80, 28);

+ 9 - 15
UAS_MES_WEIP/FunctionCode/Make/Make_EquiConnect.cs

@@ -234,11 +234,11 @@ namespace UAS_MES_NEW.Make
                 return;
             }
 
-            if (!SnType1.Checked && !SnType2.Checked)
+            /*if (!SnType1.Checked && !SnType2.Checked)
             {
                 ShowMsg(0, "请勾选序列号类型");
                 return;
-            }
+            }*/
 
             if (string.IsNullOrEmpty(SNVal.Text))
             {
@@ -246,22 +246,16 @@ namespace UAS_MES_NEW.Make
                 return;
             }
 
-            if (SnType1.Checked)
+            List<string> snList = new List<string>();
+            dt = (DataTable)dh.ExecuteSql($@"select * from smtbind where sb_maincode = '{SNVal.Text.Trim()}'", "select");
+            if (dt.Rows.Count > 0)
             {
-                List<string> snList = new List<string>();
-                dt = (DataTable)dh.ExecuteSql($@"select * from smtbind where sb_maincode = '{SNVal.Text.Trim()}'", "select");
-                if (dt.Rows.Count > 0)
+                foreach (DataRow dr in dt.Rows)
                 {
-                    foreach (DataRow dr in dt.Rows)
-                    {
-                        snList.Add(dr["sb_barcode"].ToString());
-                    }
-                }else
-                {
-                    ShowMsg(0, $"条码:{SNVal.Text} 不是拼板号或未导入拼板记录");
-                    return;
+                    snList.Add(dr["sb_barcode"].ToString());
                 }
-                foreach(string str in snList)
+
+                foreach (string str in snList)
                 {
                     dt = (DataTable)dh.ExecuteSql($@"SELECT ms_makecode,ms_prodcode,cd_stepcode,cd_stepname,cd_stepno FROM makeserial,craft,craftdetail
                         WHERE ms_sncode = '{str}' AND ms_prodcode = cr_prodcode AND cr_id = cd_crid AND cd_stepno = 1 ORDER BY cd_stepno", "select");