Ver código fonte

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

章政 7 anos atrás
pai
commit
6c2a48cc65

+ 0 - 5
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -559,11 +559,6 @@ namespace UAS_MES.Make
         private void Clean_Click(object sender, EventArgs e)
         {
             OperateResult.Clear();
-            for (int i = 0; i < 20; i++)
-            {
-                sn_code.Text = "SN30009" + i;
-                barcode_KeyDown(sender, new KeyEventArgs(Keys.Enter));
-            }
         }
 
         private void pr_code_TextChanged(object sender, EventArgs e)

+ 168 - 95
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.Designer.cs

@@ -57,8 +57,12 @@
             this.TSNPre = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.SNLength = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.TSNLength = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.Seq_Remark_PreFix = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.SameReamrk = new System.Windows.Forms.CheckBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.IFONLY = new System.Windows.Forms.CheckBox();
             this.CollectRemark = new System.Windows.Forms.CheckBox();
-            this.Remark = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
+            this.Remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             this.SuspendLayout();
             // 
@@ -66,9 +70,10 @@
             // 
             this.ms_macode_label.AutoSize = true;
             this.ms_macode_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ms_macode_label.Location = new System.Drawing.Point(25, 21);
+            this.ms_macode_label.Location = new System.Drawing.Point(19, 17);
+            this.ms_macode_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.ms_macode_label.Name = "ms_macode_label";
-            this.ms_macode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_macode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_macode_label.TabIndex = 0;
             this.ms_macode_label.Text = "工单编号";
             // 
@@ -76,9 +81,10 @@
             // 
             this.ma_prodcode_label.AutoSize = true;
             this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ma_prodcode_label.Location = new System.Drawing.Point(385, 21);
+            this.ma_prodcode_label.Location = new System.Drawing.Point(289, 17);
+            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.ma_prodcode_label.Name = "ma_prodcode_label";
-            this.ma_prodcode_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.ma_prodcode_label.TabIndex = 1;
             this.ma_prodcode_label.Text = "产品编号";
             // 
@@ -86,9 +92,10 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_detail_label.Location = new System.Drawing.Point(703, 21);
+            this.pr_detail_label.Location = new System.Drawing.Point(527, 17);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 2;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -96,9 +103,10 @@
             // 
             this.remain_qty_label.AutoSize = true;
             this.remain_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.remain_qty_label.Location = new System.Drawing.Point(25, 56);
+            this.remain_qty_label.Location = new System.Drawing.Point(19, 45);
+            this.remain_qty_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.remain_qty_label.Name = "remain_qty_label";
-            this.remain_qty_label.Size = new System.Drawing.Size(72, 27);
+            this.remain_qty_label.Size = new System.Drawing.Size(58, 21);
             this.remain_qty_label.TabIndex = 3;
             this.remain_qty_label.Text = "剩余数";
             // 
@@ -106,9 +114,10 @@
             // 
             this.PrintNum_label.AutoSize = true;
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.PrintNum_label.Location = new System.Drawing.Point(879, 520);
+            this.PrintNum_label.Location = new System.Drawing.Point(659, 416);
+            this.PrintNum_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.PrintNum_label.Name = "PrintNum_label";
-            this.PrintNum_label.Size = new System.Drawing.Size(52, 27);
+            this.PrintNum_label.Size = new System.Drawing.Size(42, 21);
             this.PrintNum_label.TabIndex = 4;
             this.PrintNum_label.Text = "计数";
             this.PrintNum_label.Visible = false;
@@ -117,9 +126,10 @@
             // 
             this.ms_macode.AutoSize = true;
             this.ms_macode.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ms_macode.Location = new System.Drawing.Point(125, 21);
+            this.ms_macode.Location = new System.Drawing.Point(94, 17);
+            this.ms_macode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.ms_macode.Name = "ms_macode";
-            this.ms_macode.Size = new System.Drawing.Size(0, 27);
+            this.ms_macode.Size = new System.Drawing.Size(0, 21);
             this.ms_macode.TabIndex = 5;
             this.ms_macode.TextChanged += new System.EventHandler(this.ms_macode_TextChanged);
             // 
@@ -127,18 +137,20 @@
             // 
             this.remain_qty.AutoSize = true;
             this.remain_qty.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.remain_qty.Location = new System.Drawing.Point(125, 56);
+            this.remain_qty.Location = new System.Drawing.Point(94, 45);
+            this.remain_qty.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.remain_qty.Name = "remain_qty";
-            this.remain_qty.Size = new System.Drawing.Size(0, 27);
+            this.remain_qty.Size = new System.Drawing.Size(0, 21);
             this.remain_qty.TabIndex = 6;
             // 
             // count
             // 
             this.count.AutoSize = true;
             this.count.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.count.Location = new System.Drawing.Point(949, 518);
+            this.count.Location = new System.Drawing.Point(712, 414);
+            this.count.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.count.Name = "count";
-            this.count.Size = new System.Drawing.Size(24, 27);
+            this.count.Size = new System.Drawing.Size(19, 21);
             this.count.TabIndex = 8;
             this.count.Text = "0";
             this.count.Visible = false;
@@ -147,10 +159,10 @@
             // 
             this.TSNLength_checkBox.AutoSize = true;
             this.TSNLength_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.TSNLength_checkBox.Location = new System.Drawing.Point(33, 101);
-            this.TSNLength_checkBox.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.TSNLength_checkBox.Location = new System.Drawing.Point(25, 81);
+            this.TSNLength_checkBox.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.TSNLength_checkBox.Name = "TSNLength_checkBox";
-            this.TSNLength_checkBox.Size = new System.Drawing.Size(100, 27);
+            this.TSNLength_checkBox.Size = new System.Drawing.Size(83, 24);
             this.TSNLength_checkBox.TabIndex = 10;
             this.TSNLength_checkBox.Text = "TSN长度";
             this.TSNLength_checkBox.UseVisualStyleBackColor = true;
@@ -159,10 +171,10 @@
             // 
             this.SNLength_checkBox.AutoSize = true;
             this.SNLength_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.SNLength_checkBox.Location = new System.Drawing.Point(33, 139);
-            this.SNLength_checkBox.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.SNLength_checkBox.Location = new System.Drawing.Point(25, 111);
+            this.SNLength_checkBox.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.SNLength_checkBox.Name = "SNLength_checkBox";
-            this.SNLength_checkBox.Size = new System.Drawing.Size(90, 27);
+            this.SNLength_checkBox.Size = new System.Drawing.Size(75, 24);
             this.SNLength_checkBox.TabIndex = 11;
             this.SNLength_checkBox.Text = "SN长度";
             this.SNLength_checkBox.UseVisualStyleBackColor = true;
@@ -171,10 +183,10 @@
             // 
             this.TSNPre_checkBox.AutoSize = true;
             this.TSNPre_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.TSNPre_checkBox.Location = new System.Drawing.Point(571, 100);
-            this.TSNPre_checkBox.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.TSNPre_checkBox.Location = new System.Drawing.Point(428, 80);
+            this.TSNPre_checkBox.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.TSNPre_checkBox.Name = "TSNPre_checkBox";
-            this.TSNPre_checkBox.Size = new System.Drawing.Size(100, 27);
+            this.TSNPre_checkBox.Size = new System.Drawing.Size(83, 24);
             this.TSNPre_checkBox.TabIndex = 12;
             this.TSNPre_checkBox.Text = "TSN前缀";
             this.TSNPre_checkBox.UseVisualStyleBackColor = true;
@@ -183,10 +195,10 @@
             // 
             this.SNPre_checkBox.AutoSize = true;
             this.SNPre_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.SNPre_checkBox.Location = new System.Drawing.Point(571, 140);
-            this.SNPre_checkBox.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.SNPre_checkBox.Location = new System.Drawing.Point(428, 112);
+            this.SNPre_checkBox.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.SNPre_checkBox.Name = "SNPre_checkBox";
-            this.SNPre_checkBox.Size = new System.Drawing.Size(90, 27);
+            this.SNPre_checkBox.Size = new System.Drawing.Size(75, 24);
             this.SNPre_checkBox.TabIndex = 13;
             this.SNPre_checkBox.Text = "SN前缀";
             this.SNPre_checkBox.UseVisualStyleBackColor = true;
@@ -195,9 +207,10 @@
             // 
             this.tip.AutoSize = true;
             this.tip.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold);
-            this.tip.Location = new System.Drawing.Point(25, 172);
+            this.tip.Location = new System.Drawing.Point(19, 138);
+            this.tip.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.tip.Name = "tip";
-            this.tip.Size = new System.Drawing.Size(132, 27);
+            this.tip.Size = new System.Drawing.Size(106, 22);
             this.tip.TabIndex = 18;
             this.tip.Text = "采集提示信息";
             // 
@@ -205,9 +218,10 @@
             // 
             this.in_label.AutoSize = true;
             this.in_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.in_label.Location = new System.Drawing.Point(25, 521);
+            this.in_label.Location = new System.Drawing.Point(19, 417);
+            this.in_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.in_label.Name = "in_label";
-            this.in_label.Size = new System.Drawing.Size(72, 27);
+            this.in_label.Size = new System.Drawing.Size(58, 21);
             this.in_label.TabIndex = 21;
             this.in_label.Text = "录入框";
             // 
@@ -215,10 +229,9 @@
             // 
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Image = global::UAS_MES.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.ClearSn_code.Location = new System.Drawing.Point(356, 476);
-            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ClearSn_code.Location = new System.Drawing.Point(267, 381);
             this.ClearSn_code.Name = "ClearSn_code";
-            this.ClearSn_code.Size = new System.Drawing.Size(21, 20);
+            this.ClearSn_code.Size = new System.Drawing.Size(16, 16);
             this.ClearSn_code.TabIndex = 144;
             this.ClearSn_code.TabStop = false;
             this.ClearSn_code.Click += new System.EventHandler(this.cancel_Click);
@@ -227,10 +240,9 @@
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(25, 476);
-            this.sn_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sn_code_label.Location = new System.Drawing.Point(19, 381);
             this.sn_code_label.Name = "sn_code_label";
-            this.sn_code_label.Size = new System.Drawing.Size(72, 27);
+            this.sn_code_label.Size = new System.Drawing.Size(58, 21);
             this.sn_code_label.TabIndex = 142;
             this.sn_code_label.Text = "序列号";
             // 
@@ -238,29 +250,29 @@
             // 
             this.ma_softversion.AutoSize = true;
             this.ma_softversion.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ma_softversion.Location = new System.Drawing.Point(807, 56);
+            this.ma_softversion.Location = new System.Drawing.Point(605, 45);
+            this.ma_softversion.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.ma_softversion.Name = "ma_softversion";
-            this.ma_softversion.Size = new System.Drawing.Size(0, 27);
+            this.ma_softversion.Size = new System.Drawing.Size(0, 21);
             this.ma_softversion.TabIndex = 150;
             // 
             // label2
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(703, 56);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(527, 45);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(92, 27);
+            this.label2.Size = new System.Drawing.Size(74, 21);
             this.label2.TabIndex = 149;
             this.label2.Text = "软件版本";
             // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(387, 56);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.StepCount.Location = new System.Drawing.Point(290, 45);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(117, 28);
+            this.StepCount.Size = new System.Drawing.Size(88, 22);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 195;
@@ -269,11 +281,11 @@
             // 
             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(356, 516);
-            this.ChangeResult.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.ChangeResult.Location = new System.Drawing.Point(267, 413);
+            this.ChangeResult.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.ChangeResult.Name = "ChangeResult";
             this.ChangeResult.Power = "ifspecial";
-            this.ChangeResult.Size = new System.Drawing.Size(114, 31);
+            this.ChangeResult.Size = new System.Drawing.Size(93, 25);
             this.ChangeResult.TabIndex = 145;
             this.ChangeResult.Text = "重新转换";
             this.ChangeResult.UseVisualStyleBackColor = true;
@@ -286,11 +298,10 @@
             this.show_sncode.Enabled = false;
             this.show_sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.show_sncode.ID = null;
-            this.show_sncode.Location = new System.Drawing.Point(111, 476);
-            this.show_sncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.show_sncode.Location = new System.Drawing.Point(83, 381);
             this.show_sncode.Name = "show_sncode";
             this.show_sncode.Power = null;
-            this.show_sncode.Size = new System.Drawing.Size(212, 29);
+            this.show_sncode.Size = new System.Drawing.Size(160, 25);
             this.show_sncode.Str = null;
             this.show_sncode.Str1 = null;
             this.show_sncode.Str2 = null;
@@ -301,11 +312,11 @@
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.CutLength = null;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(489, 21);
+            this.ma_prodcode.Location = new System.Drawing.Point(367, 17);
             this.ma_prodcode.Margin = new System.Windows.Forms.Padding(1, 0, 1, 0);
-            this.ma_prodcode.MaximumSize = new System.Drawing.Size(177, 0);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(133, 0);
             this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
             this.ma_prodcode.TabIndex = 24;
             // 
             // pr_detail
@@ -313,11 +324,11 @@
             this.pr_detail.AutoSize = true;
             this.pr_detail.CutLength = null;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(805, 21);
+            this.pr_detail.Location = new System.Drawing.Point(604, 17);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(1, 0, 1, 0);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(145, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(109, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 27);
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 23;
             // 
             // code
@@ -326,11 +337,11 @@
             this.code.BackColor = System.Drawing.Color.White;
             this.code.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.code.ID = null;
-            this.code.Location = new System.Drawing.Point(111, 519);
-            this.code.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.code.Location = new System.Drawing.Point(83, 415);
+            this.code.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.code.Name = "code";
             this.code.Power = null;
-            this.code.Size = new System.Drawing.Size(212, 29);
+            this.code.Size = new System.Drawing.Size(160, 25);
             this.code.Str = null;
             this.code.Str1 = null;
             this.code.Str2 = null;
@@ -340,10 +351,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.OperateResult.Location = new System.Drawing.Point(31, 208);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.OperateResult.Location = new System.Drawing.Point(23, 166);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(1025, 248);
+            this.OperateResult.Size = new System.Drawing.Size(770, 199);
             this.OperateResult.TabIndex = 19;
             this.OperateResult.Text = "";
             // 
@@ -353,11 +364,11 @@
             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(689, 139);
-            this.SNPre.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.SNPre.Location = new System.Drawing.Point(517, 111);
+            this.SNPre.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.SNPre.Name = "SNPre";
             this.SNPre.Power = null;
-            this.SNPre.Size = new System.Drawing.Size(189, 29);
+            this.SNPre.Size = new System.Drawing.Size(143, 25);
             this.SNPre.Str = null;
             this.SNPre.Str1 = null;
             this.SNPre.Str2 = null;
@@ -369,11 +380,11 @@
             this.TSNPre.BackColor = System.Drawing.Color.White;
             this.TSNPre.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.TSNPre.ID = null;
-            this.TSNPre.Location = new System.Drawing.Point(689, 99);
-            this.TSNPre.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.TSNPre.Location = new System.Drawing.Point(517, 79);
+            this.TSNPre.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.TSNPre.Name = "TSNPre";
             this.TSNPre.Power = null;
-            this.TSNPre.Size = new System.Drawing.Size(189, 29);
+            this.TSNPre.Size = new System.Drawing.Size(143, 25);
             this.TSNPre.Str = null;
             this.TSNPre.Str1 = null;
             this.TSNPre.Str2 = null;
@@ -385,12 +396,12 @@
             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(164, 138);
-            this.SNLength.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.SNLength.Location = new System.Drawing.Point(123, 110);
+            this.SNLength.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.SNLength.Name = "SNLength";
             this.SNLength.Negative = false;
             this.SNLength.Power = null;
-            this.SNLength.Size = new System.Drawing.Size(189, 29);
+            this.SNLength.Size = new System.Drawing.Size(143, 25);
             this.SNLength.Str = null;
             this.SNLength.Str1 = null;
             this.SNLength.Str2 = null;
@@ -402,48 +413,106 @@
             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(164, 99);
-            this.TSNLength.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.TSNLength.Location = new System.Drawing.Point(123, 79);
+            this.TSNLength.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.TSNLength.Name = "TSNLength";
             this.TSNLength.Negative = false;
             this.TSNLength.Power = null;
-            this.TSNLength.Size = new System.Drawing.Size(189, 29);
+            this.TSNLength.Size = new System.Drawing.Size(143, 25);
             this.TSNLength.Str = null;
             this.TSNLength.Str1 = null;
             this.TSNLength.Str2 = null;
             this.TSNLength.TabIndex = 14;
             // 
+            // Seq_Remark_PreFix
+            // 
+            this.Seq_Remark_PreFix.AllPower = null;
+            this.Seq_Remark_PreFix.BackColor = System.Drawing.Color.White;
+            this.Seq_Remark_PreFix.ID = null;
+            this.Seq_Remark_PreFix.Location = new System.Drawing.Point(413, 393);
+            this.Seq_Remark_PreFix.Name = "Seq_Remark_PreFix";
+            this.Seq_Remark_PreFix.Power = null;
+            this.Seq_Remark_PreFix.Size = new System.Drawing.Size(44, 21);
+            this.Seq_Remark_PreFix.Str = null;
+            this.Seq_Remark_PreFix.Str1 = null;
+            this.Seq_Remark_PreFix.Str2 = null;
+            this.Seq_Remark_PreFix.TabIndex = 225;
+            this.Seq_Remark_PreFix.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Seq_Remark_PreFix_KeyDown);
+            // 
+            // SameReamrk
+            // 
+            this.SameReamrk.AutoSize = true;
+            this.SameReamrk.Location = new System.Drawing.Point(463, 426);
+            this.SameReamrk.Name = "SameReamrk";
+            this.SameReamrk.Size = new System.Drawing.Size(96, 16);
+            this.SameReamrk.TabIndex = 224;
+            this.SameReamrk.Text = "固定录入备注";
+            this.SameReamrk.UseVisualStyleBackColor = true;
+            this.SameReamrk.CheckedChanged += new System.EventHandler(this.SameReamrk_CheckedChanged);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(370, 394);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(37, 20);
+            this.label1.TabIndex = 223;
+            this.label1.Text = "前缀";
+            // 
+            // IFONLY
+            // 
+            this.IFONLY.AutoSize = true;
+            this.IFONLY.Location = new System.Drawing.Point(374, 426);
+            this.IFONLY.Name = "IFONLY";
+            this.IFONLY.Size = new System.Drawing.Size(84, 16);
+            this.IFONLY.TabIndex = 222;
+            this.IFONLY.Text = "不允许重复";
+            this.IFONLY.UseVisualStyleBackColor = true;
+            this.IFONLY.CheckedChanged += new System.EventHandler(this.IFONLY_CheckedChanged);
+            // 
             // CollectRemark
             // 
             this.CollectRemark.AutoSize = true;
-            this.CollectRemark.Checked = true;
-            this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.CollectRemark.Location = new System.Drawing.Point(483, 471);
-            this.CollectRemark.Margin = new System.Windows.Forms.Padding(4);
+            this.CollectRemark.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CollectRemark.Location = new System.Drawing.Point(565, 426);
             this.CollectRemark.Name = "CollectRemark";
-            this.CollectRemark.Size = new System.Drawing.Size(100, 27);
-            this.CollectRemark.TabIndex = 199;
+            this.CollectRemark.Size = new System.Drawing.Size(72, 16);
+            this.CollectRemark.TabIndex = 221;
             this.CollectRemark.Text = "采集备注";
             this.CollectRemark.UseVisualStyleBackColor = true;
+            this.CollectRemark.CheckedChanged += new System.EventHandler(this.CollectRemark_CheckedChanged);
             // 
             // Remark
             // 
-            this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Remark.Location = new System.Drawing.Point(594, 469);
-            this.Remark.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.Remark.AllPower = null;
+            this.Remark.BackColor = System.Drawing.Color.White;
+            this.Remark.ID = null;
+            this.Remark.Location = new System.Drawing.Point(463, 368);
+            this.Remark.Margin = new System.Windows.Forms.Padding(2);
+            this.Remark.Multiline = true;
             this.Remark.Name = "Remark";
-            this.Remark.Size = new System.Drawing.Size(253, 89);
-            this.Remark.TabIndex = 198;
-            this.Remark.Text = "";
+            this.Remark.Power = null;
+            this.Remark.Size = new System.Drawing.Size(148, 46);
+            this.Remark.Str = null;
+            this.Remark.Str1 = null;
+            this.Remark.Str2 = null;
+            this.Remark.TabIndex = 226;
+            this.Remark.Enter += new System.EventHandler(this.Remark_Enter);
+            this.Remark.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Remark_KeyDown);
+            this.Remark.Leave += new System.EventHandler(this.Remark_Leave);
             // 
             // Make_SeqProgramTransform
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1084, 568);
-            this.Controls.Add(this.CollectRemark);
+            this.ClientSize = new System.Drawing.Size(813, 454);
             this.Controls.Add(this.Remark);
+            this.Controls.Add(this.Seq_Remark_PreFix);
+            this.Controls.Add(this.SameReamrk);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.IFONLY);
+            this.Controls.Add(this.CollectRemark);
             this.Controls.Add(this.StepCount);
             this.Controls.Add(this.ma_softversion);
             this.Controls.Add(this.label2);
@@ -474,7 +543,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, 1, 3, 1);
+            this.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.Name = "Make_SeqProgramTransform";
             this.Tag = "Make!SeqProgramTransform";
             this.Load += new System.EventHandler(this.Make_SeqProgramTransform_Load);
@@ -516,7 +585,11 @@
         private System.Windows.Forms.Label ma_softversion;
         private System.Windows.Forms.Label label2;
         private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox Seq_Remark_PreFix;
+        private System.Windows.Forms.CheckBox SameReamrk;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.CheckBox IFONLY;
         private System.Windows.Forms.CheckBox CollectRemark;
-        private CustomControl.RichText.RichTextAutoBottom Remark;
+        private CustomControl.TextBoxWithIcon.EnterTextBox Remark;
     }
 }

+ 184 - 34
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -78,6 +78,7 @@ namespace UAS_MES.Make
             StepCount.LineCode = User.UserLineCode;
             StepCount.Dh = dh;
             StepCount.Start();
+            Seq_Remark_PreFix.Text = BaseUtil.GetCacheData("Seq_Remark_PreFix").ToString();
         }
 
         private void code_KeyDown(object sender, KeyEventArgs e)
@@ -297,6 +298,7 @@ namespace UAS_MES.Make
                             if (checkRules(step))
                             {
                                 step += 1;
+                                code.Text = "";
                             }
                         }
                     }
@@ -309,7 +311,7 @@ namespace UAS_MES.Make
                 {
                     OperateResult.AppendText("<<输入不能为空\n", Color.Red);
                 }
-                code.Text = "";
+
             }
         }
         /// <summary>
@@ -545,6 +547,56 @@ namespace UAS_MES.Make
                     }
                     break;
             }
+            if (step == ListA.Rows.Count + 1)
+            {
+                if (CollectRemark.Checked || SameReamrk.Checked)
+                {
+                    if (Remark.Text == "")
+                    {
+                        OperateResult.AppendText(">>备注栏信息为空,录入备注信息\n", Color.Black);
+                        Remark.SelectAll();
+                        Remark.Focus();
+                        imei.Replace(code.Text, "");
+                        return false;
+                    }
+                    if (IFONLY.Checked)
+                    {
+                        if (!CheckPre())
+                        {
+                            imei.Replace(code.Text, "");
+                            return false;
+                        }
+                        string UsedSncode = dh.getFieldDataByCondition("SNRELATIONINFORECORD", "SIR_SNCODE", "sir_remark = '" + Remark.Text + "'").ToString();
+                        if (UsedSncode != "")
+                        {
+                            OperateResult.AppendText(">>备注信息" + Remark.Text + "已被" + UsedSncode + "采集,不可重复采集\n", Color.Red);
+                            Remark.SelectAll();
+                            Remark.Focus();
+                            imei.Replace(code.Text, "");
+                            return false;
+                        }
+                        LogicHandler.CollectRemarkInf(show_sncode.Text, "", "", ms_macode.Text, ma_prodcode.Text, Remark.Text);
+                        OperateResult.AppendText(">>备注:" + Remark.Text + "\n", Color.Black);
+                        if (CollectRemark.Checked) {
+                            Remark.Text = "";
+                        }
+                    }
+                    else
+                    {
+                        if (!CheckPre())
+                        {
+                            imei.Replace(code.Text, "");
+                            return false;
+                        }
+                        LogicHandler.CollectRemarkInf(show_sncode.Text, "", "", ms_macode.Text, ma_prodcode.Text, Remark.Text);
+                        OperateResult.AppendText(">>备注:" + Remark.Text + "\n", Color.Black);
+                        if (CollectRemark.Checked)
+                        {
+                            Remark.Text = "";
+                        }
+                    }
+                }
+            }
             //满足规则,则采集
             if (type == "MAC" || type == "BT")
             {
@@ -557,47 +609,71 @@ namespace UAS_MES.Make
             //说明已经是最后一个校验规则
             if (step == ListA.Rows.Count + 1)
             {
-                //通过存储过程二次校验
-                if (LogicHandler.snChangeAndBurn(TSN, SN, User.UserSourceCode, User.UserCode, ms_macode.Text, ChangeResult.Checked ? 1 : 0, (hs.ContainsKey("IMEI1") ? hs["IMEI1"].ToString() : ""), (hs.ContainsKey("IMEI2") ? hs["IMEI2"].ToString() : ""), (hs.ContainsKey("IMEI3") ? hs["IMEI3"].ToString() : ""), "", (hs.ContainsKey("NETCODE") ? hs["NETCODE"].ToString() : ""), "", "", "", "", (hs.ContainsKey("MAC") ? hs["MAC"].ToString() : ""), (hs.ContainsKey("BT") ? hs["BT"].ToString() : ""), "", "", "", out errorMessage))
+                return SetStepResult();
+            }
+            else
+            {
+                OperateResult.AppendText(">>请输入" + ListA.Rows[step - 1]["psr_type"] + "\n", Color.Green, code);
+                return true;
+            }
+        }
+
+        //校验备注前缀
+        private Boolean CheckPre()
+        {
+            try
+            {
+                if (Remark.Text.Substring(0, Seq_Remark_PreFix.Text.Length) != Seq_Remark_PreFix.Text)
                 {
-                    OperateResult.AppendText("<<序列号" + TSN + "成功转换为" + SN + "\n<<关联采集成功\n", Color.Green);
-                    //写入日志
-                    LogManager.DoLog("修改序列号:" + TSN + "为" + SN + "成功!" + "操作人:" + User.UserCode);
-                    //记录日志
-                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_macode.Text, User.UserLineCode, User.UserSourceCode, "序列烧录转换", TSN + "转换为" + SN, SN, "");
-                    //获取剩余数,刷新页面
-                    sql.Clear();
-                    sql.Append("select mcd_inqty from makecraftdetail where mcd_macode='" + ms_macode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
-                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                    if (dt.Rows.Count > 0)
-                    {
-                        remain_qty.Text = ma_qty - int.Parse(dt.Rows[0]["mcd_inqty"].ToString()) + "";
-                    }
-                    if (CollectRemark.Checked && Remark.Text != "")
-                    {
-                        LogicHandler.CollectRemarkInf(SN, "", "", ms_macode.Text, ma_prodcode.Text, Remark.Text);
-                    }
-                    //更新页面计数+1
-                    count.Text = int.Parse(count.Text) + 1 + "";
-                    //完成之后,清除信息
-                    clearInfo();
-                    OperateResult.AppendText(">>请输入TSN号\n", Color.Black);
+                    OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.Red);
+                    Remark.SelectAll();
+                    Remark.Focus();
+                    return false;
                 }
-                else
+            }
+            catch (Exception)
+            {
+                OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.Red);
+                Remark.SelectAll();
+                Remark.Focus();
+                return false;
+            }
+            return true;
+        }
+
+        //通过存储过程二次校验
+        private Boolean SetStepResult()
+        {
+            if (LogicHandler.snChangeAndBurn(TSN, SN, User.UserSourceCode, User.UserCode, ms_macode.Text, ChangeResult.Checked ? 1 : 0, (hs.ContainsKey("IMEI1") ? hs["IMEI1"].ToString() : ""), (hs.ContainsKey("IMEI2") ? hs["IMEI2"].ToString() : ""), (hs.ContainsKey("IMEI3") ? hs["IMEI3"].ToString() : ""), "", (hs.ContainsKey("NETCODE") ? hs["NETCODE"].ToString() : ""), "", "", "", "", (hs.ContainsKey("MAC") ? hs["MAC"].ToString() : ""), (hs.ContainsKey("BT") ? hs["BT"].ToString() : ""), "", "", "", out errorMessage))
+            {
+                OperateResult.AppendText("<<序列号" + TSN + "成功转换为" + SN + "\n<<关联采集成功\n", Color.Green);
+                //写入日志
+                LogManager.DoLog("修改序列号:" + TSN + "为" + SN + "成功!" + "操作人:" + User.UserCode);
+                //记录日志
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_macode.Text, User.UserLineCode, User.UserSourceCode, "序列烧录转换", TSN + "转换为" + SN, SN, "");
+                //获取剩余数,刷新页面
+                sql.Clear();
+                sql.Append("select mcd_inqty from makecraftdetail where mcd_macode='" + ms_macode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                if (dt.Rows.Count > 0)
                 {
-                    OperateResult.AppendText(">>" + errorMessage + "\n", Color.Red, code);
-                    OperateResult.AppendText(">>请重新输入TSN\n", Color.Black, code);
-                    //    //清空信息
-                    clearInfo();
+                    remain_qty.Text = ma_qty - int.Parse(dt.Rows[0]["mcd_inqty"].ToString()) + "";
                 }
-                code.Text = "";
-                return false;
+                //更新页面计数+1
+                count.Text = int.Parse(count.Text) + 1 + "";
+                //完成之后,清除信息
+                clearInfo();
+                OperateResult.AppendText(">>请输入TSN号\n", Color.Black);
             }
             else
             {
-                OperateResult.AppendText(">>请输入" + ListA.Rows[step - 1]["psr_type"] + "\n", Color.Green, code);
-                return true;
+                OperateResult.AppendText(">>" + errorMessage + "\n", Color.Red, code);
+                OperateResult.AppendText(">>请重新输入TSN\n", Color.Black, code);
+                //    //清空信息
+                clearInfo();
             }
+            code.Text = "";
+            return false;
         }
         /// <summary>
         /// 工单号变化时,带出校验规则
@@ -717,5 +793,79 @@ namespace UAS_MES.Make
         {
             asc.controlAutoSize(this);
         }
+
+        private void Seq_Remark_PreFix_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                BaseUtil.SetCacheData("Seq_Remark_PreFix", Seq_Remark_PreFix.Text);
+                if (CollectRemark.Checked || SameReamrk.Checked)
+                {
+                    Remark.SelectAll();
+                    Remark.Focus();
+                }
+            }
+        }
+
+        private void Remark_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                try
+                {
+                    if (step == ListA.Rows.Count + 1 && (CollectRemark.Checked || SameReamrk.Checked) && Remark.Text != "")
+                    {
+                        code.Enabled = true;
+                        code.Focus();
+                        code_KeyDown(this, new KeyEventArgs(Keys.Enter));
+                    }
+                    else
+                    {
+                        code.Enabled = true;
+                        code.Focus();
+                    }
+                }
+                catch {
+                    code.Enabled = true;
+                    code.Focus();
+                }
+            }
+        }
+
+        private void IFONLY_CheckedChanged(object sender, EventArgs e)
+        {
+            if (IFONLY.Checked)
+            {
+                SameReamrk.Checked = false;
+                CollectRemark.Checked = true;
+            }
+        }
+
+        private void SameReamrk_CheckedChanged(object sender, EventArgs e)
+        {
+            if (SameReamrk.Checked)
+            {
+                IFONLY.Checked = false;
+                CollectRemark.Checked = false;
+            }
+        }
+
+        private void CollectRemark_CheckedChanged(object sender, EventArgs e)
+        {
+            if (CollectRemark.Checked)
+            {
+                SameReamrk.Checked = false;
+            }
+        }
+
+        private void Remark_Enter(object sender, EventArgs e)
+        {
+            code.Enabled = false;
+        }
+
+        private void Remark_Leave(object sender, EventArgs e)
+        {
+            code.Enabled = true;
+        }
     }
 }

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

@@ -320,7 +320,9 @@
             this.Remark.Str1 = null;
             this.Remark.Str2 = null;
             this.Remark.TabIndex = 221;
+            this.Remark.Enter += new System.EventHandler(this.Remark_Enter);
             this.Remark.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Remark_KeyDown);
+            this.Remark.Leave += new System.EventHandler(this.Remark_Leave);
             // 
             // Seq_Remark_PreFix
             // 

+ 34 - 4
UAS-MES/FunctionCode/Make/Make_SeqTransform.cs

@@ -243,6 +243,10 @@ namespace UAS_MES.Make
                                             return;
                                         }
                                         LogicHandler.CollectRemarkInf(show_sncode.Text, "", "", oMakeCode, ma_prodcode.Text, Remark.Text);
+                                        OperateResult.AppendText(">>备注:" + Remark.Text + "\n", Color.Black);
+                                        if (CollectRemark.Checked) {
+                                            Remark.Text = "";
+                                        }
                                     }
                                     else 
                                     {
@@ -251,6 +255,11 @@ namespace UAS_MES.Make
                                             return;
                                         }
                                         LogicHandler.CollectRemarkInf(show_sncode.Text, "", "", oMakeCode, ma_prodcode.Text, Remark.Text);
+                                        OperateResult.AppendText(">>备注:" + Remark.Text + "\n", Color.Black);
+                                        if (CollectRemark.Checked)
+                                        {
+                                            Remark.Text = "";
+                                        }
                                     }
                                 }
 
@@ -513,13 +522,24 @@ namespace UAS_MES.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                if ( (CollectRemark.Checked || SameReamrk.Checked) && Remark.Text != "")
+                try
                 {
-                    sncode.Focus();
-                    sncode_KeyDown(this, new KeyEventArgs(Keys.Enter));
+                    if ((CollectRemark.Checked || SameReamrk.Checked) && Remark.Text != "")
+                    {
+                        sncode.Enabled = true;
+                        sncode.Focus();
+                        sncode_KeyDown(this, new KeyEventArgs(Keys.Enter));
+                    }
+                    else
+                    {
+                        sncode.Enabled = true;
+                        sncode.Focus();
+                    }
                 }
-                else
+                catch {
+                    sncode.Enabled = true;
                     sncode.Focus();
+                }
             }
         }
 
@@ -585,5 +605,15 @@ namespace UAS_MES.Make
                 SameReamrk.Checked = false;
             }
         }
+
+        private void Remark_Leave(object sender, EventArgs e)
+        {
+            sncode.Enabled = true;
+        }
+
+        private void Remark_Enter(object sender, EventArgs e)
+        {
+            sncode.Enabled = false;
+        }
     }
 }

+ 8 - 1
UAS_MES_NEW/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -99,6 +99,7 @@ namespace UAS_MES_NEW.Make
                     if (dt.Rows.Count > 0)
                     {
                         //重量的临时变量
+                        pr_code.Text = dt.Rows[0]["pr_code"].ToString();
                         string _weight = dt.Rows[0]["pr_colorboxgw"].ToString();
                         string _maxweight = dt.Rows[0]["pr_colorboxmaxw"].ToString();
                         string _minweight = dt.Rows[0]["pr_colorboxminw"].ToString();
@@ -114,6 +115,7 @@ namespace UAS_MES_NEW.Make
                             OperateResult.AppendText(">>序列号" + sncode.Text + "所属订单号" + ma_salecode_text + "与界面订单号" + ma_salecode.Text + "不同,无法采集\n", Color.Red, sncode);
                             return;
                         }
+                        ma_salecode.Text = dt.Rows[0]["ma_salecode"].ToString();
                         BaseUtil.SetFormValue(this.Controls, dt);
                         if (Weight - MinWeight == MaxWeight - Weight)
                             pr_colorboxgw.Text = Weight + "±" + (MaxWeight - Weight) + dt.Rows[0]["pr_colorboxunit"].ToString();
@@ -138,6 +140,11 @@ namespace UAS_MES_NEW.Make
                             double ActualWeight = double.Parse(weight.Text == "" ? "0" : weight.Text.Replace("kg", "").Trim());
                             if (PR_CHECKCOLORBOXW != "0")
                             {
+                                if (MinWeight == 0 || MaxWeight == 0)
+                                {
+                                    OperateResult.AppendText(">>产品" + pr_code.Text + "未维护彩盒重量范围\n", Color.Red);
+                                    return;
+                                }
                                 if ((ActualWeight >= MinWeight) && (ActualWeight <= MaxWeight))
                                 {
                                     OperateResult.AppendText(">>彩盒" + sncode.Text + "重量检测检测合格\n", Color.Green);
@@ -319,7 +326,7 @@ namespace UAS_MES_NEW.Make
         private void SendCheck_Click(object sender, EventArgs e)
         {
             sql.Clear();
-            sql.Append("update oqcbatch set ob_status='UNCHECK' where ob_checkno ='" + ob_checkno.Text + "'");
+            sql.Append("update oqcbatch set ob_status='UNCHECK',ob_breakingdate=sysdate where ob_checkno ='" + ob_checkno.Text + "'");
             dh.ExecuteSql(sql.GetString(), "select");
             ob_nowcheckqty.Text = "";
             ob_batchqty.Text = "";

+ 21 - 19
UAS_MES_NEW/FunctionCode/Make/Make_SeqProgramTransform.Designer.cs

@@ -50,6 +50,7 @@
             this.label1 = new System.Windows.Forms.Label();
             this.IFONLY = new System.Windows.Forms.CheckBox();
             this.CollectRemark = new System.Windows.Forms.CheckBox();
+            this.Remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.Seq_Remark_PreFix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
@@ -62,7 +63,6 @@
             this.TSNPre = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.SNLength = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.TSNLength = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
-            this.Remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             this.SuspendLayout();
             // 
@@ -310,6 +310,26 @@
             this.CollectRemark.UseVisualStyleBackColor = true;
             this.CollectRemark.CheckedChanged += new System.EventHandler(this.CollectRemark_CheckedChanged);
             // 
+            // Remark
+            // 
+            this.Remark.AllPower = null;
+            this.Remark.BackColor = System.Drawing.Color.White;
+            this.Remark.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.Remark.ID = null;
+            this.Remark.Location = new System.Drawing.Point(458, 377);
+            this.Remark.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.Remark.Multiline = true;
+            this.Remark.Name = "Remark";
+            this.Remark.Power = null;
+            this.Remark.Size = new System.Drawing.Size(143, 37);
+            this.Remark.Str = null;
+            this.Remark.Str1 = null;
+            this.Remark.Str2 = null;
+            this.Remark.TabIndex = 220;
+            this.Remark.Enter += new System.EventHandler(this.Remark_Enter);
+            this.Remark.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Remark_KeyDown);
+            this.Remark.Leave += new System.EventHandler(this.Remark_Leave);
+            // 
             // Seq_Remark_PreFix
             // 
             this.Seq_Remark_PreFix.AllPower = null;
@@ -484,24 +504,6 @@
             this.TSNLength.Str2 = null;
             this.TSNLength.TabIndex = 14;
             // 
-            // Remark
-            // 
-            this.Remark.AllPower = null;
-            this.Remark.BackColor = System.Drawing.Color.White;
-            this.Remark.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.Remark.ID = null;
-            this.Remark.Location = new System.Drawing.Point(458, 377);
-            this.Remark.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
-            this.Remark.Multiline = true;
-            this.Remark.Name = "Remark";
-            this.Remark.Power = null;
-            this.Remark.Size = new System.Drawing.Size(143, 37);
-            this.Remark.Str = null;
-            this.Remark.Str1 = null;
-            this.Remark.Str2 = null;
-            this.Remark.TabIndex = 220;
-            this.Remark.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Remark_KeyDown);
-            // 
             // Make_SeqProgramTransform
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

+ 34 - 4
UAS_MES_NEW/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -576,6 +576,10 @@ namespace UAS_MES_NEW.Make
                             return false;
                         }
                         LogicHandler.CollectRemarkInf(show_sncode.Text, "", "", ms_macode.Text, ma_prodcode.Text, Remark.Text);
+                        if (CollectRemark.Checked)
+                        {
+                            Remark.Text = "";
+                        }
                     }
                     else
                     {
@@ -585,6 +589,10 @@ namespace UAS_MES_NEW.Make
                             return false;
                         }
                         LogicHandler.CollectRemarkInf(show_sncode.Text, "", "", ms_macode.Text, ma_prodcode.Text, Remark.Text);
+                        if (CollectRemark.Checked)
+                        {
+                            Remark.Text = "";
+                        }
                     }
                 }
             }
@@ -802,13 +810,25 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                if (step == ListA.Rows.Count + 1 && (CollectRemark.Checked || SameReamrk.Checked) && Remark.Text != "")
+                try
                 {
-                    code.Focus();
-                    code_KeyDown(this, new KeyEventArgs(Keys.Enter));
+                    if (step == ListA.Rows.Count + 1 && (CollectRemark.Checked || SameReamrk.Checked) && Remark.Text != "")
+                    {
+                        code.Enabled = true;
+                        code.Focus();
+                        code_KeyDown(this, new KeyEventArgs(Keys.Enter));
+                    }
+                    else
+                    {
+                        code.Enabled = true;
+                        code.Focus();
+                    }
                 }
-                else
+                catch
+                {
+                    code.Enabled = true;
                     code.Focus();
+                }
             }
         }
 
@@ -837,5 +857,15 @@ namespace UAS_MES_NEW.Make
                 SameReamrk.Checked = false;
             }
         }
+
+        private void Remark_Enter(object sender, EventArgs e)
+        {
+            code.Enabled = false;
+        }
+
+        private void Remark_Leave(object sender, EventArgs e)
+        {
+            code.Enabled = true;
+        }
     }
 }

+ 2 - 0
UAS_MES_NEW/FunctionCode/Make/Make_SeqTransform.Designer.cs

@@ -419,7 +419,9 @@
             this.Remark.Str1 = null;
             this.Remark.Str2 = null;
             this.Remark.TabIndex = 226;
+            this.Remark.Enter += new System.EventHandler(this.Remark_Enter);
             this.Remark.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Remark_KeyDown);
+            this.Remark.Leave += new System.EventHandler(this.Remark_Leave);
             // 
             // Seq_Remark_PreFix
             // 

+ 34 - 4
UAS_MES_NEW/FunctionCode/Make/Make_SeqTransform.cs

@@ -243,6 +243,10 @@ namespace UAS_MES_NEW.Make
                                             return;
                                         }
                                         LogicHandler.CollectRemarkInf(show_sncode.Text, "", "", oMakeCode, ma_prodcode.Text, Remark.Text);
+                                        if (CollectRemark.Checked)
+                                        {
+                                            Remark.Text = "";
+                                        }
                                     }
                                     else
                                     {
@@ -251,6 +255,10 @@ namespace UAS_MES_NEW.Make
                                             return;
                                         }
                                         LogicHandler.CollectRemarkInf(show_sncode.Text, "", "", oMakeCode, ma_prodcode.Text, Remark.Text);
+                                        if (CollectRemark.Checked)
+                                        {
+                                            Remark.Text = "";
+                                        }
                                     }
                                 }
 
@@ -513,13 +521,25 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                if ((CollectRemark.Checked || SameReamrk.Checked) && Remark.Text != "")
+                try
                 {
-                    sncode.Focus();
-                    sncode_KeyDown(this, new KeyEventArgs(Keys.Enter));
+                    if ((CollectRemark.Checked || SameReamrk.Checked) && Remark.Text != "")
+                    {
+                        sncode.Enabled = true;
+                        sncode.Focus();
+                        sncode_KeyDown(this, new KeyEventArgs(Keys.Enter));
+                    }
+                    else
+                    {
+                        sncode.Enabled = true;
+                        sncode.Focus();
+                    }
                 }
-                else
+                catch
+                {
+                    sncode.Enabled = true;
                     sncode.Focus();
+                }
             }
         }
 
@@ -585,5 +605,15 @@ namespace UAS_MES_NEW.Make
                 SameReamrk.Checked = false;
             }
         }
+
+        private void Remark_Leave(object sender, EventArgs e)
+        {
+            sncode.Enabled = true;
+        }
+
+        private void Remark_Enter(object sender, EventArgs e)
+        {
+            sncode.Enabled = false;
+        }
     }
 }

+ 13 - 10
UAS_MES_NEW/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -67,7 +67,7 @@ namespace UAS_MES_NEW.Packing
                 lbl = new ApplicationClass();
                 BaseUtil.WriteLbl();
             }
-            catch (Exception)
+            catch (Exception ex)
             {
                 OperateResult.AppendText("未正确安装CodeSoft软件\n", Color.Red);
             }
@@ -159,10 +159,12 @@ namespace UAS_MES_NEW.Packing
         private void LoadData()
         {
             //加载表单数据
+            string Err = "";
             sql.Clear();
             sql.Append("select pa_prodcode,pr_cartonmaxw,pa_salecode,pa_remark,pa_makecode,pr_cartonunit,pr_code,pr_cartonminw,pr_cartongw,pa_outboxcode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,");
             sql.Append("pa_status,pr_packrule,pr_detail,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,pa_packageqty,nvl(pa_standardqty,0)pa_standardqty,nvl(pr_outboxinnerqty,0)pr_outboxinnerqty,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,pa_currentqty from package left join ");
             sql.Append("product on pa_prodcode=pr_code where pa_outboxcode='" + pa_outboxcode.Text + "'");
+            Err = "箱号";
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count > 0)
             {
@@ -260,7 +262,7 @@ namespace UAS_MES_NEW.Packing
             {
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
-                    dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_prodcode,ms_craftcode from makeserial where ms_sncode ='" + sn_code.Text + "'  order by ms_id desc", "select");
+                    dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_craftcode,ms_prodcode from makeserial where ms_sncode ='" + sn_code.Text + "'  order by ms_id desc", "select");
                     if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || (dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))
                     {
                         if (oMsID == "" || oMsID == "null" || oMsID == "0")
@@ -273,7 +275,7 @@ namespace UAS_MES_NEW.Packing
                         {
                             string prodcode = dt.Rows[0]["ms_prodcode"].ToString();
                             string craftcode = dt.Rows[0]["ms_craftcode"].ToString();
-                            string craftstepcode = dh.getFieldDataByCondition("craft left join craftdetail on cr_id =cd_crid", "(cd_stepcode)", "cr_prodcode='" + prodcode + "' and cr_code='" + craftcode + "' and cd_stepcode='" + User.CurrentStepCode + "'").ToString();
+                            string craftstepcode = dh.getFieldDataByCondition("craft left join craftdetail on cr_id =cd_crid", "cd_stepcode", "cr_prodcode='" + prodcode + "' and cr_code='" + craftcode + "' and cd_stepcode='" + User.CurrentStepCode + "'").ToString();
                             if (craftstepcode == "")
                             {
                                 OperateResult.AppendText("工序" + User.CurrentStepCode + "不在途程" + craftcode + "内,不允许采集\n", Color.Red);
@@ -454,6 +456,11 @@ namespace UAS_MES_NEW.Packing
                                         float weigh = float.Parse(ActWeigh);
                                         if (PR_CHECKCARTONW != "0")
                                         {
+                                            if (MinWeight == 0 || MaxWeight == 0)
+                                            {
+                                                OperateResult.AppendText(">>产品" + pr_code.Text + "未维护卡通箱重量范围\n", Color.Red);
+                                                return;
+                                            }
                                             if (!(weigh >= MinWeight && weigh <= MaxWeight) || weigh == 0)
                                             {
                                                 OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);
@@ -552,11 +559,6 @@ namespace UAS_MES_NEW.Packing
         private void Clean_Click(object sender, EventArgs e)
         {
             OperateResult.Clear();
-            for (int i = 0; i < 20; i++)
-            {
-                sn_code.Text = "SN30009" + i;
-                barcode_KeyDown(sender, new KeyEventArgs(Keys.Enter));
-            }
         }
 
         private void pr_code_TextChanged(object sender, EventArgs e)
@@ -651,7 +653,7 @@ namespace UAS_MES_NEW.Packing
                     return;
                 }
                 sql.Clear();
-                sql.Append("update oqcbatch set ob_status='UNCHECK' where ob_checkno ='" + ob_checkno.Text + "'");
+                sql.Append("update oqcbatch set ob_status='UNCHECK',ob_breakingdate=sysdate where ob_checkno ='" + ob_checkno.Text + "'");
                 dh.ExecuteSql(sql.GetString(), "select");
                 ob_nowcheckqty.Text = "";
                 ob_batchqty.Text = "";
@@ -806,7 +808,7 @@ namespace UAS_MES_NEW.Packing
                                 List<string> SQLS2 = new List<string>();
                                 string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + pr_code.Text + "'").ToString();
                                 //置空原箱
-                                SQLS2.Add("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY="+ standqty + " where pa_outboxcode='" + pa_outboxcode.Text + "'");
+                                SQLS2.Add("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = " + standqty + " where pa_outboxcode='" + pa_outboxcode.Text + "'");
                                 pa_status.Text = "0";
                                 //删除箱的明细
                                 SQLS2.Add("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'");
@@ -998,6 +1000,7 @@ namespace UAS_MES_NEW.Packing
                 }
             }
         }
+
         private bool CheckOutBoxLength(string ms_salecode_text)
         {
             if (AutoGenBoxCode.Checked)