Browse Source

修改指定界面支持SN解析打印

callm 1 month ago
parent
commit
bf1c92fc94

+ 6 - 1
UAS_MES_YDCY/CustomControl/TextBoxWithIcon/SnCollectionBox.cs

@@ -44,7 +44,12 @@ namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
         {
             if (e.KeyCode == Keys.Enter)
             {
-                if (this.FindForm().Tag.ToString() == "")
+                if (this.FindForm().Tag.ToString() == "Make!Make_RepairBookLabelPrint" ||
+                    this.FindForm().Tag.ToString() == "Make.Make_ColorBoxLoadPrintSH" ||
+                    this.FindForm().Tag.ToString() == "Make!ColorBoxWeigh" ||
+                    this.FindForm().Tag.ToString() == "Make!TestCollection" ||
+                    this.FindForm().Tag.ToString() == "Make!ColorBoxLabelPrint" ||
+                    this.FindForm().Tag.ToString() == "Make!Repair")
                 {
                     DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("select nvl(pr_alllength,0)pr_alllength,pr_suffix,pr_prefix,nvl(pr_length,0)pr_length from product where " +
                         "pr_code ='" + Str + "'", "select");

+ 1 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -335,6 +335,7 @@ namespace UAS_MES_NEW.Make
             PrintLabel.DisplayMember = "la_url";
             PrintLabel.ValueMember = "la_id";
             pr_change = true;
+            sncode.Str = pr_code.Text;
         }
 
         private void Make_ColorBoxLabelPrint_Activated(object sender, EventArgs e)

+ 1 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_ColorBoxLoadPrintSH.cs

@@ -309,6 +309,7 @@ namespace UAS_MES_NEW.Make
             PrintLabel.DisplayMember = "la_url";
             PrintLabel.ValueMember = "la_id";
             pr_change = true;
+            sncode.Str = pr_code.Text;
         }
 
         private void Make_ColorBoxLabelPrint_Activated(object sender, EventArgs e)

+ 1 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_ColorBoxWeigh_HUAGUAN.cs

@@ -374,6 +374,7 @@ namespace UAS_MES_NEW.Make
             PrintLabel.DataSource = _dt;
             PrintLabel.DisplayMember = "la_url";
             PrintLabel.ValueMember = "la_id";
+            sncode.Str = pr_code.Text;
         }
 
         private void SendCheck_Click(object sender, EventArgs e)

+ 2 - 2
UAS_MES_YDCY/FunctionCode/Make/Make_RePrintLabel.cs

@@ -113,7 +113,7 @@ namespace UAS_MES_NEW.Make
                 }
                 OperateResult.AppendText(">>" + inputText.Text + "\n", Color.Black);
                 //打印类型为彩盒或者机身标
-                if (giftBox.Checked || fuselagel.Checked||repaircard.Checked||aftersalecard.Checked)
+                if (giftBox.Checked || fuselagel.Checked || repaircard.Checked || aftersalecard.Checked)
                 {
                     //select max(ms_id)ms_id from makeserial where ms_sncode=? 
                     ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id) ms_id", "ms_sncode='" + inputText.Text + "'").ToString();
@@ -234,7 +234,7 @@ namespace UAS_MES_NEW.Make
                 return;
             }
             //打印类型 彩盒或者标签,再次判断是否已装箱,未转号
-            if (giftBox.Checked || fuselagel.Checked||repaircard.Checked||aftersalecard.Checked)
+            if (giftBox.Checked || fuselagel.Checked || repaircard.Checked || aftersalecard.Checked)
             {
                 mapB = (DataTable)dh.ExecuteSql("select ms_outboxcode, nvl(ms_downstatus,0) ms_downstatus from makeserial where ms_id='" + ms_id + "' and (ms_sncode='" + inputValue.Text + "' or ms_imei1='" + inputValue.Text + "' or ms_imei2='" + inputValue.Text + "')", "select");
                 if (mapB.Rows.Count == 0)

+ 1 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_RepairBookLabelPrint.cs

@@ -335,6 +335,7 @@ namespace UAS_MES_NEW.Make
             PrintLabel.DisplayMember = "la_url";
             PrintLabel.ValueMember = "la_id";
             pr_change = true;
+            sncode.Str = pr_code.Text;
         }
 
         private void Make_ColorBoxLabelPrint_Activated(object sender, EventArgs e)

+ 79 - 76
UAS_MES_YDCY/FunctionCode/Make/Make_SNLabelCheck.Designer.cs

@@ -45,6 +45,14 @@
             this.ma_craftcode = new System.Windows.Forms.Label();
             this.NoteForChange = new System.Windows.Forms.CheckBox();
             this.LabelDataGridView = new System.Windows.Forms.DataGridView();
+            this.lcd_detno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lcd_labeltype = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lcd_prefix = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lcd_suffix = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lcd_alllength = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lcd_length = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lcd_content = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lcd_sql = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.sir_remark_label = new System.Windows.Forms.CheckBox();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -72,14 +80,6 @@
             this.label2 = new System.Windows.Forms.Label();
             this.PrintLabel_label = new System.Windows.Forms.Label();
             this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
-            this.lcd_detno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lcd_labeltype = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lcd_prefix = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lcd_suffix = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lcd_alllength = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lcd_length = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lcd_content = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lcd_sql = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
@@ -164,6 +164,7 @@
             this.Loading.TabStop = true;
             this.Loading.Text = "上料";
             this.Loading.UseVisualStyleBackColor = true;
+            this.Loading.Visible = false;
             // 
             // UnLoading
             // 
@@ -177,6 +178,7 @@
             this.UnLoading.TabIndex = 63;
             this.UnLoading.Text = "下料";
             this.UnLoading.UseVisualStyleBackColor = true;
+            this.UnLoading.Visible = false;
             // 
             // sn_code_label
             // 
@@ -270,6 +272,75 @@
             this.LabelDataGridView.Size = new System.Drawing.Size(1282, 454);
             this.LabelDataGridView.TabIndex = 193;
             // 
+            // lcd_detno
+            // 
+            this.lcd_detno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.lcd_detno.DataPropertyName = "lcd_detno";
+            this.lcd_detno.HeaderText = "序号";
+            this.lcd_detno.MinimumWidth = 30;
+            this.lcd_detno.Name = "lcd_detno";
+            this.lcd_detno.Width = 30;
+            // 
+            // lcd_labeltype
+            // 
+            this.lcd_labeltype.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
+            this.lcd_labeltype.DataPropertyName = "lcd_labeltype";
+            this.lcd_labeltype.HeaderText = "标签类型";
+            this.lcd_labeltype.MinimumWidth = 100;
+            this.lcd_labeltype.Name = "lcd_labeltype";
+            this.lcd_labeltype.ReadOnly = true;
+            // 
+            // lcd_prefix
+            // 
+            this.lcd_prefix.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.lcd_prefix.DataPropertyName = "lcd_prefix";
+            this.lcd_prefix.HeaderText = "前缀";
+            this.lcd_prefix.MinimumWidth = 100;
+            this.lcd_prefix.Name = "lcd_prefix";
+            this.lcd_prefix.ReadOnly = true;
+            this.lcd_prefix.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // lcd_suffix
+            // 
+            this.lcd_suffix.DataPropertyName = "lcd_suffix";
+            this.lcd_suffix.HeaderText = "后缀";
+            this.lcd_suffix.MinimumWidth = 100;
+            this.lcd_suffix.Name = "lcd_suffix";
+            this.lcd_suffix.Width = 200;
+            // 
+            // lcd_alllength
+            // 
+            this.lcd_alllength.DataPropertyName = "lcd_alllength";
+            this.lcd_alllength.HeaderText = "总长度";
+            this.lcd_alllength.MinimumWidth = 10;
+            this.lcd_alllength.Name = "lcd_alllength";
+            this.lcd_alllength.Width = 200;
+            // 
+            // lcd_length
+            // 
+            this.lcd_length.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.lcd_length.DataPropertyName = "lcd_length";
+            this.lcd_length.HeaderText = "截取长度";
+            this.lcd_length.MinimumWidth = 100;
+            this.lcd_length.Name = "lcd_length";
+            this.lcd_length.ReadOnly = true;
+            // 
+            // lcd_content
+            // 
+            this.lcd_content.DataPropertyName = "lcd_content";
+            this.lcd_content.HeaderText = "核对内容";
+            this.lcd_content.MinimumWidth = 10;
+            this.lcd_content.Name = "lcd_content";
+            this.lcd_content.Width = 200;
+            // 
+            // lcd_sql
+            // 
+            this.lcd_sql.DataPropertyName = "lcd_sql";
+            this.lcd_sql.HeaderText = "SQL";
+            this.lcd_sql.MinimumWidth = 10;
+            this.lcd_sql.Name = "lcd_sql";
+            this.lcd_sql.Width = 200;
+            // 
             // sir_remark_label
             // 
             this.sir_remark_label.AutoSize = true;
@@ -624,74 +695,6 @@
             this.Printer.Size = new System.Drawing.Size(262, 50);
             this.Printer.TabIndex = 200;
             // 
-            // lcd_detno
-            // 
-            this.lcd_detno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.lcd_detno.DataPropertyName = "lcd_detno";
-            this.lcd_detno.HeaderText = "序号";
-            this.lcd_detno.MinimumWidth = 30;
-            this.lcd_detno.Name = "lcd_detno";
-            this.lcd_detno.Width = 30;
-            // 
-            // lcd_labeltype
-            // 
-            this.lcd_labeltype.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
-            this.lcd_labeltype.DataPropertyName = "lcd_labeltype";
-            this.lcd_labeltype.HeaderText = "标签类型";
-            this.lcd_labeltype.MinimumWidth = 100;
-            this.lcd_labeltype.Name = "lcd_labeltype";
-            this.lcd_labeltype.ReadOnly = true;
-            // 
-            // lcd_prefix
-            // 
-            this.lcd_prefix.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
-            this.lcd_prefix.DataPropertyName = "lcd_prefix";
-            this.lcd_prefix.HeaderText = "前缀";
-            this.lcd_prefix.MinimumWidth = 100;
-            this.lcd_prefix.Name = "lcd_prefix";
-            this.lcd_prefix.ReadOnly = true;
-            this.lcd_prefix.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // lcd_suffix
-            // 
-            this.lcd_suffix.DataPropertyName = "lcd_suffix";
-            this.lcd_suffix.HeaderText = "后缀";
-            this.lcd_suffix.MinimumWidth = 100;
-            this.lcd_suffix.Name = "lcd_suffix";
-            // 
-            // lcd_alllength
-            // 
-            this.lcd_alllength.DataPropertyName = "lcd_alllength";
-            this.lcd_alllength.HeaderText = "总长度";
-            this.lcd_alllength.MinimumWidth = 10;
-            this.lcd_alllength.Name = "lcd_alllength";
-            this.lcd_alllength.Width = 200;
-            // 
-            // lcd_length
-            // 
-            this.lcd_length.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
-            this.lcd_length.DataPropertyName = "lcd_length";
-            this.lcd_length.HeaderText = "截取长度";
-            this.lcd_length.MinimumWidth = 100;
-            this.lcd_length.Name = "lcd_length";
-            this.lcd_length.ReadOnly = true;
-            // 
-            // lcd_content
-            // 
-            this.lcd_content.DataPropertyName = "lcd_content";
-            this.lcd_content.HeaderText = "核对内容";
-            this.lcd_content.MinimumWidth = 10;
-            this.lcd_content.Name = "lcd_content";
-            this.lcd_content.Width = 200;
-            // 
-            // lcd_sql
-            // 
-            this.lcd_sql.DataPropertyName = "lcd_sql";
-            this.lcd_sql.HeaderText = "SQL";
-            this.lcd_sql.MinimumWidth = 10;
-            this.lcd_sql.Name = "lcd_sql";
-            this.lcd_sql.Width = 200;
-            // 
             // Make_SNLabelCheck
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_SNLabelCheck.cs

@@ -383,7 +383,7 @@ namespace UAS_MES_NEW.Make
         private void GetItem()
         {
             dt1 = (DataTable)dh.ExecuteSql("select lcd_sql,lcd_detno,LCD_LABELTYPE, nvl(lcd_alllength,0)lcd_alllength,nvl(LCD_LENGTH,0)LCD_LENGTH,lcd_suffix, LCD_PREFIX from LABELCHECKdetail left join labelcheck " +
-                   "on lcd_lcid=lc_id where lc_prodcode='" + ma_prodcode.Text + "' and LCD_LABELTYPE not in (select LCL_LABELTYPE from labelchecklog where " +
+                   "on lcd_lcid=lc_id where lc_prodcode='" + ma_prodcode.Text + "' and lcd_stepcode='" + User.CurrentStepCode + "' and LCD_LABELTYPE not in (select LCL_LABELTYPE from labelchecklog where " +
                    "LCL_SN='" + sn_code.Text + "') order by lcd_detno", "select");
             if (dt1.Rows.Count == 0)
             {