浏览代码

BUG修改

callm 1 年之前
父节点
当前提交
f9a1c9df30

+ 1 - 0
UAS_MES_YD/FunctionCode/Make/Make_Decompose.cs

@@ -431,6 +431,7 @@ namespace UAS_MES_NEW.Make
                         }
                         else if (nochange.Checked)
                         {
+                            Console.WriteLine(LabelDataGridView.Rows[i].Cells["cm_id"].Value+" "+LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString());
                             if (LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
                             {
                                 //判断生产信息

+ 1 - 1
UAS_MES_YD/FunctionCode/Make/Make_FeedingCollection.cs

@@ -568,7 +568,7 @@ namespace UAS_MES_NEW.Make
                 sql.Append("cm_craftcode,cm_craftname,cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid,cm_status,cm_materialtype,cm_firstsn)");
                 sql.Append("select Craftmaterial_seq.nextval, ma_code, ma_id, ma_prodcode,:soncode,ms_code,ms_sncode,mcd_stepcode,");
                 sql.Append("mcd_stepname,sp_fsoncode,ms_craftcode,ms_craftname,:barcode,1,sysdate,'" + User.UserCode + "','" + User.UserLineCode + "',ma_wccode,");
-                sql.Append("'" + User.UserSourceCode + "',:sp_id,0,1,ms_firstsn from make left join makecraftdetail on mcd_macode=ma_code  left join stepproduct on sp_stepcode=mcd_stepcode ");
+                sql.Append("'" + User.UserSourceCode + "',:sp_id,0,1,ms_firstsn from make left join makecraftdetail on mcd_maid=ma_id  left join stepproduct on sp_stepcode=mcd_stepcode ");
                 sql.Append(" and sp_mothercode = ma_prodcode left join makeserial on ms_makecode=ma_code and sp_craftcode=ms_craftcode ");
                 sql.Append("where ma_code='" + make_code + "'and sp_id=:sp_id1 and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + ms_sncode + "'");
                 dh.BatchInsert(sql.GetString(), new string[] { "soncode", "barcode", "sp_id", "sp_id1" }, CollectDataSonCode.ToArray(), CollectData.ToArray(), SPID.ToArray(), SPID.ToArray());

+ 1 - 1
UAS_MES_YD/FunctionCode/Make/Make_RePrintLabel.cs

@@ -232,7 +232,7 @@ namespace UAS_MES_NEW.Make
             //打印类型 彩盒或者标签,再次判断是否已装箱,未转号
             if (giftBox.Checked || fuselagel.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 + "'", "select");
+                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)
                 {
                     //无值提示用户序列号错误,不存在或者已经发生转号

+ 4 - 0
UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -66,6 +66,7 @@ namespace UAS_MES_NEW.Packing
             {
                 processes[i].Kill();
             }
+            pa_outboxcode.Enabled = false;
             IP.Text = BaseUtil.GetCacheData("IP").ToString();
             Port.Text = BaseUtil.GetCacheData("IPPort").ToString();
             //设置DbFind的必须的数据
@@ -1110,11 +1111,14 @@ namespace UAS_MES_NEW.Packing
             {
                 OutBoxLength.Enabled = false;
                 PreFix.Enabled = false;
+                pa_outboxcode.Enabled = false;
             }
             else
             {
                 OutBoxLength.Enabled = true;
                 PreFix.Enabled = true;
+                pa_outboxcode.Enabled = true;
+
             }
         }
     }

+ 3 - 0
UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -84,6 +84,7 @@ namespace UAS_MES_NEW.Packing
             thread = new Thread(NewPrint);
             SetLoadingWindow stw = new SetLoadingWindow(thread, "初始化打印程序");
             BaseUtil.SetFormCenter(stw);
+            pa_outboxcode.Enabled = false;
             stw.ShowDialog();
             try
             {
@@ -1082,11 +1083,13 @@ namespace UAS_MES_NEW.Packing
             {
                 OutBoxLength.Enabled = false;
                 PreFix.Enabled = false;
+                pa_outboxcode.Enabled = false;
             }
             else
             {
                 OutBoxLength.Enabled = true;
                 PreFix.Enabled = true;
+                pa_outboxcode.Enabled = true;
             }
         }
     }

+ 18 - 13
UAS_MES_YD/FunctionCode/Query/Query_SN.Designer.cs

@@ -47,9 +47,8 @@
             this.ThreeColumn = new System.Windows.Forms.RadioButton();
             this.FourColumn = new System.Windows.Forms.RadioButton();
             this.GenSN = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ma_count = new System.Windows.Forms.NumericUpDown();
             this.label1 = new System.Windows.Forms.Label();
-            ((System.ComponentModel.ISupportInitialize)(this.ma_count)).BeginInit();
+            this.ma_count = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.SuspendLayout();
             // 
             // ma_salecode_label
@@ -298,13 +297,6 @@
             this.GenSN.UseVisualStyleBackColor = false;
             this.GenSN.Click += new System.EventHandler(this.GenSN_Click);
             // 
-            // ma_count
-            // 
-            this.ma_count.Location = new System.Drawing.Point(356, 335);
-            this.ma_count.Name = "ma_count";
-            this.ma_count.Size = new System.Drawing.Size(120, 35);
-            this.ma_count.TabIndex = 247;
-            // 
             // label1
             // 
             this.label1.AutoSize = true;
@@ -316,13 +308,27 @@
             this.label1.TabIndex = 248;
             this.label1.Text = "工单数量";
             // 
+            // ma_count
+            // 
+            this.ma_count.AllPower = null;
+            this.ma_count.BackColor = System.Drawing.Color.White;
+            this.ma_count.ID = null;
+            this.ma_count.Location = new System.Drawing.Point(356, 338);
+            this.ma_count.Name = "ma_count";
+            this.ma_count.Power = null;
+            this.ma_count.Size = new System.Drawing.Size(152, 35);
+            this.ma_count.Str = null;
+            this.ma_count.Str1 = null;
+            this.ma_count.Str2 = null;
+            this.ma_count.TabIndex = 249;
+            // 
             // Query_SN
             // 
             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.label1);
             this.Controls.Add(this.ma_count);
+            this.Controls.Add(this.label1);
             this.Controls.Add(this.GenSN);
             this.Controls.Add(this.FourColumn);
             this.Controls.Add(this.ThreeColumn);
@@ -347,8 +353,7 @@
             this.Tag = "Query_SN";
             this.Text = "打印机调试";
             this.Load += new System.EventHandler(this.SystemSetting_PrinterTest_Load);
-            ((System.ComponentModel.ISupportInitialize)(this.ma_count)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -372,7 +377,7 @@
         private System.Windows.Forms.RadioButton ThreeColumn;
         private System.Windows.Forms.RadioButton FourColumn;
         private CustomControl.ButtonUtil.NormalButton GenSN;
-        private System.Windows.Forms.NumericUpDown ma_count;
         private System.Windows.Forms.Label label1;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ma_count;
     }
 }

+ 3 - 3
UAS_MES_YD/FunctionCode/Query/Query_SN.cs

@@ -230,7 +230,7 @@ namespace UAS_MES_NEW.Query
                 ma_qty.Text = dt.Rows[0]["ma_qty"].ToString();
                 pr_detail.Text = dt.Rows[0]["pr_detail"].ToString();
             }
-            ma_count.Value = int.Parse(ma_qty.Text);
+            ma_count.Text = ma_qty.Text;
         }
 
         private void GenSN_Click(object sender, EventArgs e)
@@ -252,7 +252,7 @@ namespace UAS_MES_NEW.Query
                 pr_exbarcode = dt.Rows[0]["pr_exbarcode"].ToString();
                 ma_qty = dt.Rows[0]["ma_qty"].ToString();
             }
-            if (dh.getRowCount("makesnlist", "msl_makecode='" + ma_code.Text + "'") + ma_count.Value > int.Parse(ma_qty))
+            if (dh.getRowCount("makesnlist", "msl_makecode='" + ma_code.Text + "'") + int.Parse(ma_count.Text) > int.Parse(ma_qty))
             {
                 MessageBox.Show("工单号" + ma_code.Text + "生产序列号超出工单数");
                 return;
@@ -342,7 +342,7 @@ namespace UAS_MES_NEW.Query
             }
             //遍历整个Grid,勾选的项目全部进行条码生成
             ArrayList<string> custbarcode = new ArrayList<string>();
-            for (int i = 0; i < ma_count.Value; i++)
+            for (int i = 0; i < int.Parse(ma_count.Text); i++)
             {
                 string data = BarcodeMethod1(PrefixFixed, Suffix, SerialNumIndex, SerialNumLength, Radix);
                 if (!custbarcode.Contains(data))