Эх сурвалжийг харах

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 жил өмнө
parent
commit
3faa27e144

+ 7 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -140,7 +140,13 @@ namespace UAS_MES.Make
                             //获取对应 产品的机身标的打印模板
                             if (ListA.Rows.Count > 0)
                             {
-                                OperateResult.AppendText(">>请采集" + ListA.Rows[RemainIndex]["sp_fsoncode"].ToString() + "或" + ListA.Rows[RemainIndex]["sp_soncode"].ToString() + "的条码\n");
+                                OperateResult.AppendText(">>请采集" + ListA.Rows[RemainIndex]["sp_fsoncode"].ToString() + "或" + ListA.Rows[RemainIndex]["sp_soncode"].ToString() + "的物料数据\n");
+                                string fsoncode = ListA.Rows[RemainIndex]["sp_fsoncode"].ToString();
+                                string soncode = ListA.Rows[RemainIndex]["sp_soncode"].ToString();
+                                if (fsoncode == soncode)
+                                    OperateResult.AppendText("<<请采集" + fsoncode + "的物料数据\n", Color.Black);
+                                else
+                                    OperateResult.AppendText("<<请采集" + fsoncode + "或" + soncode + "的物料数据\n", Color.Black);
                                 code.Clear();
                             }
                             else

+ 6 - 1
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -330,7 +330,12 @@ namespace UAS_MES.Make
                 try
                 {
                     CollectDataSonCode.Add(dt1.Rows[RemainIndex]["sp_soncode"].ToString());
-                    OperateResult.AppendText("<<请采集" + dt1.Rows[RemainIndex]["sp_fsoncode"].ToString() + "或" + dt1.Rows[RemainIndex]["sp_soncode"].ToString() + "的" + dt1.Rows[RemainIndex]["sp_type"].ToString() + "数据\n", Color.Black);
+                    string fsoncode = dt1.Rows[RemainIndex]["sp_fsoncode"].ToString();
+                    string soncode = dt1.Rows[RemainIndex]["sp_soncode"].ToString();
+                    if (fsoncode == soncode)
+                        OperateResult.AppendText("<<请采集" + fsoncode + "的物料数据\n", Color.Black);
+                    else
+                        OperateResult.AppendText("<<请采集" + fsoncode + "或" + soncode + "的物料数据\n", Color.Black);
                 }
                 catch (Exception)
                 {

+ 4 - 3
UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs

@@ -350,6 +350,7 @@
             this.pd_innerqty,
             this.pa_indate,
             this.pd_id});
+            this.PackageDetail.EnableContentClick = true;
             this.PackageDetail.Location = new System.Drawing.Point(5, 212);
             this.PackageDetail.Margin = new System.Windows.Forms.Padding(4);
             this.PackageDetail.Name = "PackageDetail";
@@ -477,6 +478,7 @@
             // 
             // pr_outboxinnerqty
             // 
+            this.pr_outboxinnerqty.Enabled = false;
             this.pr_outboxinnerqty.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.pr_outboxinnerqty.Location = new System.Drawing.Point(130, 104);
             this.pr_outboxinnerqty.Maximum = new decimal(new int[] {
@@ -743,7 +745,6 @@
             this.ResumeLayout(true);
             this.PerformLayout();
 
-
         }
 
         #endregion
@@ -755,9 +756,9 @@
         private System.Windows.Forms.Label label13;
         private System.Windows.Forms.Label pa_code_label;
         private System.Windows.Forms.Label PrintList_label;
-        private System.Windows.Forms.Label PrintNum_label; 
+        private System.Windows.Forms.Label PrintNum_label;
         private System.Windows.Forms.CheckBox Cancel;
-  
+
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum PackageDetail;
         private CustomControl.TextBoxWithIcon.EnterTextBox sn_code;
         private CustomControl.ButtonUtil.NormalButton Clean;

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.Designer.cs

@@ -316,6 +316,7 @@
             this.pd_innerqty,
             this.pa_indate,
             this.pd_id});
+            this.PackageDetail.EnableContentClick = true;
             this.PackageDetail.Location = new System.Drawing.Point(5, 214);
             this.PackageDetail.Margin = new System.Windows.Forms.Padding(4);
             this.PackageDetail.Name = "PackageDetail";
@@ -411,6 +412,7 @@
             // 
             // pr_outboxinnerqty
             // 
+            this.pr_outboxinnerqty.Enabled = false;
             this.pr_outboxinnerqty.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.pr_outboxinnerqty.Location = new System.Drawing.Point(130, 94);
             this.pr_outboxinnerqty.Maximum = new decimal(new int[] {

+ 0 - 18
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.resx

@@ -212,24 +212,6 @@
   <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="pd_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_outboxcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_prodcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <data name="SendCheck.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 20 - 7
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.Designer.cs

@@ -143,6 +143,7 @@
             this.TSNLength_checkBox.AutoSize = true;
             this.TSNLength_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.TSNLength_checkBox.Location = new System.Drawing.Point(46, 100);
+            this.TSNLength_checkBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.TSNLength_checkBox.Name = "TSNLength_checkBox";
             this.TSNLength_checkBox.Size = new System.Drawing.Size(117, 31);
             this.TSNLength_checkBox.TabIndex = 10;
@@ -153,7 +154,8 @@
             // 
             this.SNLength_checkBox.AutoSize = true;
             this.SNLength_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.SNLength_checkBox.Location = new System.Drawing.Point(46, 147);
+            this.SNLength_checkBox.Location = new System.Drawing.Point(46, 146);
+            this.SNLength_checkBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SNLength_checkBox.Name = "SNLength_checkBox";
             this.SNLength_checkBox.Size = new System.Drawing.Size(106, 31);
             this.SNLength_checkBox.TabIndex = 11;
@@ -165,6 +167,7 @@
             this.TSNPre_checkBox.AutoSize = true;
             this.TSNPre_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.TSNPre_checkBox.Location = new System.Drawing.Point(450, 100);
+            this.TSNPre_checkBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.TSNPre_checkBox.Name = "TSNPre_checkBox";
             this.TSNPre_checkBox.Size = new System.Drawing.Size(117, 31);
             this.TSNPre_checkBox.TabIndex = 12;
@@ -176,6 +179,7 @@
             this.SNPre_checkBox.AutoSize = true;
             this.SNPre_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.SNPre_checkBox.Location = new System.Drawing.Point(450, 148);
+            this.SNPre_checkBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SNPre_checkBox.Name = "SNPre_checkBox";
             this.SNPre_checkBox.Size = new System.Drawing.Size(106, 31);
             this.SNPre_checkBox.TabIndex = 13;
@@ -230,12 +234,14 @@
             this.ChangeResult.AutoSize = true;
             this.ChangeResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ChangeResult.Location = new System.Drawing.Point(414, 524);
+            this.ChangeResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.ChangeResult.Name = "ChangeResult";
             this.ChangeResult.Power = "ifspecial";
             this.ChangeResult.Size = new System.Drawing.Size(136, 35);
             this.ChangeResult.TabIndex = 145;
             this.ChangeResult.Text = "重新转换";
             this.ChangeResult.UseVisualStyleBackColor = true;
+            this.ChangeResult.CheckedChanged += new System.EventHandler(this.ChangeResult_CheckedChanged);
             // 
             // show_sncode
             // 
@@ -285,6 +291,7 @@
             this.code.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.code.ID = null;
             this.code.Location = new System.Drawing.Point(138, 526);
+            this.code.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.code.Name = "code";
             this.code.Power = null;
             this.code.Size = new System.Drawing.Size(238, 34);
@@ -296,10 +303,11 @@
             // 
             // OperateResult
             // 
-            this.OperateResult.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 15F);
             this.OperateResult.Location = new System.Drawing.Point(46, 221);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(1153, 241);
+            this.OperateResult.Size = new System.Drawing.Size(1153, 240);
             this.OperateResult.TabIndex = 19;
             this.OperateResult.Text = "";
             // 
@@ -309,7 +317,8 @@
             this.SNPre.BackColor = System.Drawing.Color.White;
             this.SNPre.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.SNPre.ID = null;
-            this.SNPre.Location = new System.Drawing.Point(584, 147);
+            this.SNPre.Location = new System.Drawing.Point(584, 146);
+            this.SNPre.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SNPre.Name = "SNPre";
             this.SNPre.Power = null;
             this.SNPre.Size = new System.Drawing.Size(210, 34);
@@ -325,6 +334,7 @@
             this.TSNPre.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.TSNPre.ID = null;
             this.TSNPre.Location = new System.Drawing.Point(584, 98);
+            this.TSNPre.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.TSNPre.Name = "TSNPre";
             this.TSNPre.Power = null;
             this.TSNPre.Size = new System.Drawing.Size(210, 34);
@@ -339,7 +349,8 @@
             this.SNLength.BackColor = System.Drawing.Color.White;
             this.SNLength.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.SNLength.ID = null;
-            this.SNLength.Location = new System.Drawing.Point(193, 144);
+            this.SNLength.Location = new System.Drawing.Point(194, 144);
+            this.SNLength.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SNLength.Name = "SNLength";
             this.SNLength.Negative = false;
             this.SNLength.Power = null;
@@ -355,7 +366,8 @@
             this.TSNLength.BackColor = System.Drawing.Color.White;
             this.TSNLength.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.TSNLength.ID = null;
-            this.TSNLength.Location = new System.Drawing.Point(193, 98);
+            this.TSNLength.Location = new System.Drawing.Point(194, 98);
+            this.TSNLength.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.TSNLength.Name = "TSNLength";
             this.TSNLength.Negative = false;
             this.TSNLength.Power = null;
@@ -389,7 +401,7 @@
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1268, 591);
+            this.ClientSize = new System.Drawing.Size(1268, 590);
             this.Controls.Add(this.ma_softversion);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.ChangeResult);
@@ -419,6 +431,7 @@
             this.Controls.Add(this.ma_prodcode_label);
             this.Controls.Add(this.ms_macode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Name = "Make_SeqProgramTransform";
             this.Tag = "Make!SeqProgramTransform";
             this.Load += new System.EventHandler(this.Make_SeqProgramTransform_Load);

+ 27 - 18
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -140,22 +140,8 @@ namespace UAS_MES.Make
                                         }
                                         else
                                         {
-                                            //修改转换结果时,输入两次SN直接过站
-                                            if (dh.CheckExist("MakeSerial", "ms_sncode='" + code.Text + "' and ms_id='" + oMsid + "' and ms_beforesn is not null"))
-                                            {
-                                                step = 1;
-                                                TSN = code.Text;
-                                                //显示序列号
-                                                show_sncode.Text = TSN;
-                                                OperateResult.AppendText("<<请输入转换后的序列号\n", Color.Green, code);
-                                                ChangeResult.Enabled = false;
-                                                onlyPass = true;
-                                            }
-                                            else
-                                            {
-                                                OperateResult.AppendText(">>不存在该已转序列号:" + code.Text + "\n", Color.Red, code);
-                                                OperateResult.AppendText("<<请重新输入序列号\n", Color.Black);
-                                            }
+                                            OperateResult.AppendText(">>不存在该已转序列号:" + code.Text + "\n", Color.Red, code);
+                                            OperateResult.AppendText("<<请重新输入序列号\n", Color.Black);
                                         }
                                     }
                                     else
@@ -177,8 +163,22 @@ namespace UAS_MES.Make
                                         else
                                         //不为空,进行过转换。不勾选修改结果,就不能再修改
                                         {
-                                            OperateResult.AppendText(">>序列号" + code.Text + "已经转换过\n", Color.Red,code);
-                                            OperateResult.AppendText("<<请重新输入TSN\n", Color.Black);
+                                            //修改转换结果时,输入两次SN直接过站
+                                            if (dh.CheckExist("MakeSerial", "ms_sncode='" + code.Text + "' and ms_id='" + oMsid + "' and ms_beforesn is not null"))
+                                            {
+                                                step = 1;
+                                                TSN = code.Text;
+                                                //显示序列号
+                                                show_sncode.Text = TSN;
+                                                OperateResult.AppendText("<<请输入转换后的序列号\n", Color.Green, code);
+                                                ChangeResult.Enabled = false;
+                                                onlyPass = true;
+                                            }
+                                            else
+                                            {
+                                                OperateResult.AppendText(">>序列号:" + code.Text + "错误\n", Color.Red, code);
+                                                OperateResult.AppendText("<<请重新输入序列号\n", Color.Black);
+                                            }
                                         }
                                     }
                                 }
@@ -719,5 +719,14 @@ namespace UAS_MES.Make
                 return false;
             }
         }
+
+        private void ChangeResult_CheckedChanged(object sender, EventArgs e)
+        {
+            if (ChangeResult.Checked)
+            {
+                //勾选的时候提示输入TSN
+                OperateResult.AppendText("<<请输入TSN号\n", Color.Black);
+            }
+        }
     }
 }

+ 11 - 9
UAS-MES/FunctionCode/Make/Make_SeqTransform.Designer.cs

@@ -95,7 +95,7 @@
             // 
             this.sncode_label.AutoSize = true;
             this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sncode_label.Location = new System.Drawing.Point(25, 645);
+            this.sncode_label.Location = new System.Drawing.Point(25, 644);
             this.sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.sncode_label.Name = "sncode_label";
             this.sncode_label.Size = new System.Drawing.Size(86, 31);
@@ -118,7 +118,7 @@
             // 
             this.afterTransSNLength_checkBox.AutoSize = true;
             this.afterTransSNLength_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.afterTransSNLength_checkBox.Location = new System.Drawing.Point(28, 171);
+            this.afterTransSNLength_checkBox.Location = new System.Drawing.Point(28, 170);
             this.afterTransSNLength_checkBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.afterTransSNLength_checkBox.Name = "afterTransSNLength_checkBox";
             this.afterTransSNLength_checkBox.Size = new System.Drawing.Size(198, 31);
@@ -184,7 +184,7 @@
             // 
             this.remain_qty.AutoSize = true;
             this.remain_qty.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.remain_qty.Location = new System.Drawing.Point(139, 76);
+            this.remain_qty.Location = new System.Drawing.Point(140, 76);
             this.remain_qty.Name = "remain_qty";
             this.remain_qty.Size = new System.Drawing.Size(0, 31);
             this.remain_qty.TabIndex = 99;
@@ -237,12 +237,14 @@
             this.ChangeResult.AutoSize = true;
             this.ChangeResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ChangeResult.Location = new System.Drawing.Point(420, 641);
+            this.ChangeResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.ChangeResult.Name = "ChangeResult";
             this.ChangeResult.Power = "ifspecial";
             this.ChangeResult.Size = new System.Drawing.Size(136, 35);
             this.ChangeResult.TabIndex = 146;
             this.ChangeResult.Text = "重新转换";
             this.ChangeResult.UseVisualStyleBackColor = true;
+            this.ChangeResult.CheckedChanged += new System.EventHandler(this.ChangeResult_CheckedChanged);
             // 
             // show_sncode
             // 
@@ -297,7 +299,7 @@
             // beforeTransSNLength
             // 
             this.beforeTransSNLength.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.beforeTransSNLength.Location = new System.Drawing.Point(267, 117);
+            this.beforeTransSNLength.Location = new System.Drawing.Point(267, 116);
             this.beforeTransSNLength.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.beforeTransSNLength.Name = "beforeTransSNLength";
             this.beforeTransSNLength.Size = new System.Drawing.Size(250, 34);
@@ -338,9 +340,9 @@
             // 
             // OperateResult
             // 
-            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 15F);
             this.OperateResult.Location = new System.Drawing.Point(28, 220);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(1216, 344);
             this.OperateResult.TabIndex = 78;
@@ -352,8 +354,8 @@
             this.sncode.BackColor = System.Drawing.Color.White;
             this.sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.sncode.ID = null;
-            this.sncode.Location = new System.Drawing.Point(145, 645);
-            this.sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.sncode.Location = new System.Drawing.Point(145, 644);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.sncode.Name = "sncode";
             this.sncode.Power = "ifwrite";
             this.sncode.Size = new System.Drawing.Size(238, 34);
@@ -418,7 +420,7 @@
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Make_SeqTransform";
             this.Tag = "Make!SeqTransform";
             this.Text = " ";

+ 26 - 17
UAS-MES/FunctionCode/Make/Make_SeqTransform.cs

@@ -124,21 +124,8 @@ namespace UAS_MES.Make
                                         }
                                         else
                                         {
-                                            //修改转换结果时,输入两次SN直接过站
-                                            if (dh.CheckExist("MakeSerial", "ms_sncode='" + sncode.Text + "' and ms_id='" + oMsId + "' and ms_beforesn is not null"))
-                                            {
-                                                bsncode = sncode.Text;
-                                                //显示序列号
-                                                show_sncode.Text = bsncode;
-                                                OperateResult.AppendText("<<请输入转换后的序列号\n", Color.Green, sncode);
-                                                ChangeResult.Enabled = false;
-                                                flag = true;
-                                            }
-                                            else
-                                            {
-                                                OperateResult.AppendText(">>不存在该已转序列号:" + sncode.Text + "\n", Color.Red, sncode);
-                                                OperateResult.AppendText("<<请重新输入序列号\n", Color.Black);
-                                            }
+                                            OperateResult.AppendText(">>不存在该已转序列号:" + sncode.Text + "\n", Color.Red, sncode);
+                                            OperateResult.AppendText("<<请重新输入序列号\n", Color.Black);
                                         }
                                         break;
                                     case CheckState.Unchecked:
@@ -157,8 +144,21 @@ namespace UAS_MES.Make
                                         else
                                         //不为空,进行过转换。不勾选修改结果,就不能再修改
                                         {
-                                            OperateResult.AppendText(">>序列号" + sncode.Text + "已经转换过\n", Color.Red, sncode);
-                                            OperateResult.AppendText("<<请重新输入序列号\n", Color.Black);
+                                            //修改转换结果时,输入两次SN直接过站
+                                            if (dh.CheckExist("MakeSerial", "ms_sncode='" + sncode.Text + "' and ms_id='" + oMsId + "' and ms_beforesn is not null"))
+                                            {
+                                                bsncode = sncode.Text;
+                                                //显示序列号
+                                                show_sncode.Text = bsncode;
+                                                OperateResult.AppendText("<<请输入转换后的序列号\n", Color.Green, sncode);
+                                                ChangeResult.Enabled = false;
+                                                flag = true;
+                                            }
+                                            else
+                                            {
+                                                OperateResult.AppendText(">>序列号:" + sncode.Text + "错误\n", Color.Red, sncode);
+                                                OperateResult.AppendText("<<请重新输入序列号\n", Color.Black);
+                                            }
                                         }
                                         break;
                                     default:
@@ -534,5 +534,14 @@ namespace UAS_MES.Make
             }
             return false;
         }
+
+        private void ChangeResult_CheckedChanged(object sender, EventArgs e)
+        {
+            if (ChangeResult.Checked)
+            {
+                //勾选的时候提示输入TSN
+                OperateResult.AppendText("<<请输入TSN号\n", Color.Black);
+            }
+        }
     }
 }

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_SpecialCartonPack.cs

@@ -112,7 +112,7 @@ namespace UAS_MES.Make
                             {
                                 weight.Text = Regex.Replace(serialPort1.ReadLine(), "\\D+", "");
                                 if (pr_cartonunit.Text == "kg")
-                                    weight.Text = (double.Parse(weight.Text) / 1000).ToString();
+                                    weight.Text = (double.Parse(weight.Text == "" ? "0" : weight.Text) / 1000).ToString();
                             }
                             catch (Exception)
                             {