Browse Source

下地功能修改

callm 6 tháng trước cách đây
mục cha
commit
9ae6b4eba3

+ 1 - 1
UAS_MES_HGS/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -282,7 +282,7 @@ namespace UAS_MES_NEW.Make
                                 if (bufferContent.Contains("\n") || bufferContent.Contains("\r"))
                                 {
                                     // 处理完整的数据
-                                    string weigh = bufferContent.Trim(); // 去除可能的换行符
+                                    string weigh = bufferContent.Trim(); // 去除可能的换行符 
                                     Remark.AppendText("完整数据: " + weigh+"\n");
                                     weight.Text = weigh;
                                     // 清空缓冲区以准备接收下一组数据

+ 215 - 32
UAS_MES_JC/FunctionCode/Make/Make_MakeDown.Designer.cs

@@ -28,6 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_MakeDown));
             this.md_code_label = new System.Windows.Forms.Label();
             this.make_count = new System.Windows.Forms.Label();
             this.count_label = new System.Windows.Forms.Label();
@@ -50,6 +51,16 @@
             this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.inputreson = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.mdcode = new System.Windows.Forms.TextBox();
+            this.INPUT = new System.Windows.Forms.RadioButton();
+            this.NOTINPUT = new System.Windows.Forms.RadioButton();
+            this.label3 = new System.Windows.Forms.Label();
+            this.EndDate = new System.Windows.Forms.DateTimePicker();
+            this.BeginDate = new System.Windows.Forms.DateTimePicker();
+            this.st_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.st_rstepcode_label = new System.Windows.Forms.Label();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.BatchFreeze = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
             // 
@@ -57,10 +68,10 @@
             // 
             this.md_code_label.AutoSize = true;
             this.md_code_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.md_code_label.Location = new System.Drawing.Point(33, 10);
-            this.md_code_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.md_code_label.Location = new System.Drawing.Point(68, 14);
+            this.md_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.md_code_label.Name = "md_code_label";
-            this.md_code_label.Size = new System.Drawing.Size(58, 21);
+            this.md_code_label.Size = new System.Drawing.Size(114, 41);
             this.md_code_label.TabIndex = 194;
             this.md_code_label.Text = "事件号";
             // 
@@ -68,20 +79,20 @@
             // 
             this.make_count.AutoSize = true;
             this.make_count.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.make_count.Location = new System.Drawing.Point(513, 9);
-            this.make_count.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.make_count.Location = new System.Drawing.Point(1026, 18);
+            this.make_count.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.make_count.Name = "make_count";
-            this.make_count.Size = new System.Drawing.Size(0, 21);
+            this.make_count.Size = new System.Drawing.Size(0, 41);
             this.make_count.TabIndex = 197;
             // 
             // count_label
             // 
             this.count_label.AutoSize = true;
             this.count_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.count_label.Location = new System.Drawing.Point(467, 9);
-            this.count_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.count_label.Location = new System.Drawing.Point(934, 18);
+            this.count_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.count_label.Name = "count_label";
-            this.count_label.Size = new System.Drawing.Size(42, 21);
+            this.count_label.Size = new System.Drawing.Size(82, 41);
             this.count_label.TabIndex = 196;
             this.count_label.Text = "数量";
             // 
@@ -89,10 +100,10 @@
             // 
             this.md_reson.AutoSize = true;
             this.md_reson.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.md_reson.Location = new System.Drawing.Point(19, 47);
-            this.md_reson.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.md_reson.Location = new System.Drawing.Point(21, 200);
+            this.md_reson.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.md_reson.Name = "md_reson";
-            this.md_reson.Size = new System.Drawing.Size(74, 21);
+            this.md_reson.Size = new System.Drawing.Size(146, 41);
             this.md_reson.TabIndex = 198;
             this.md_reson.Text = "下地原因";
             // 
@@ -101,17 +112,20 @@
             this.LabelDataGridView.AllowUserToAddRows = false;
             this.LabelDataGridView.AllowUserToResizeRows = false;
             this.LabelDataGridView.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
+            this.LabelDataGridView.ColumnHeadersHeight = 46;
             this.LabelDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.md_macode,
             this.md_sncode,
             this.md_prodcode,
             this.pr_detail,
             this.MD_DOWNMAN});
-            this.LabelDataGridView.Location = new System.Drawing.Point(23, 194);
+            this.LabelDataGridView.Location = new System.Drawing.Point(43, 463);
+            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(6);
             this.LabelDataGridView.Name = "LabelDataGridView";
             this.LabelDataGridView.RowHeadersVisible = false;
+            this.LabelDataGridView.RowHeadersWidth = 82;
             this.LabelDataGridView.RowTemplate.Height = 23;
-            this.LabelDataGridView.Size = new System.Drawing.Size(747, 192);
+            this.LabelDataGridView.Size = new System.Drawing.Size(1494, 384);
             this.LabelDataGridView.TabIndex = 200;
             // 
             // md_macode
@@ -119,6 +133,7 @@
             this.md_macode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.md_macode.DataPropertyName = "md_macode";
             this.md_macode.HeaderText = "工单编号";
+            this.md_macode.MinimumWidth = 10;
             this.md_macode.Name = "md_macode";
             this.md_macode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             // 
@@ -127,6 +142,7 @@
             this.md_sncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.md_sncode.DataPropertyName = "md_sncode";
             this.md_sncode.HeaderText = "序列号";
+            this.md_sncode.MinimumWidth = 10;
             this.md_sncode.Name = "md_sncode";
             this.md_sncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             // 
@@ -135,6 +151,7 @@
             this.md_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.md_prodcode.DataPropertyName = "md_prodcode";
             this.md_prodcode.HeaderText = "产品代码";
+            this.md_prodcode.MinimumWidth = 10;
             this.md_prodcode.Name = "md_prodcode";
             this.md_prodcode.ReadOnly = true;
             this.md_prodcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
@@ -161,28 +178,30 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label1.Location = new System.Drawing.Point(18, 408);
-            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label1.Location = new System.Drawing.Point(53, 853);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(58, 21);
+            this.label1.Size = new System.Drawing.Size(114, 41);
             this.label1.TabIndex = 202;
             this.label1.Text = "序列号";
             // 
             // pr_code
             // 
             this.pr_code.AutoSize = true;
-            this.pr_code.Location = new System.Drawing.Point(440, 340);
+            this.pr_code.Location = new System.Drawing.Point(877, 726);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code.Name = "pr_code";
-            this.pr_code.Size = new System.Drawing.Size(0, 12);
+            this.pr_code.Size = new System.Drawing.Size(0, 24);
             this.pr_code.TabIndex = 205;
             this.pr_code.Visible = false;
             // 
             // ms_makecode
             // 
             this.ms_makecode.AutoSize = true;
-            this.ms_makecode.Location = new System.Drawing.Point(550, 340);
+            this.ms_makecode.Location = new System.Drawing.Point(1097, 726);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 12);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 24);
             this.ms_makecode.TabIndex = 206;
             this.ms_makecode.Visible = false;
             // 
@@ -191,6 +210,7 @@
             this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.dataGridViewTextBoxColumn1.DataPropertyName = "md_macode";
             this.dataGridViewTextBoxColumn1.HeaderText = "工单编号";
+            this.dataGridViewTextBoxColumn1.MinimumWidth = 10;
             this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
             this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             // 
@@ -199,6 +219,7 @@
             this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.dataGridViewTextBoxColumn2.DataPropertyName = "md_sncode";
             this.dataGridViewTextBoxColumn2.HeaderText = "序列号";
+            this.dataGridViewTextBoxColumn2.MinimumWidth = 10;
             this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
             this.dataGridViewTextBoxColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             // 
@@ -207,6 +228,7 @@
             this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.dataGridViewTextBoxColumn3.DataPropertyName = "md_prodcode";
             this.dataGridViewTextBoxColumn3.HeaderText = "产品代码";
+            this.dataGridViewTextBoxColumn3.MinimumWidth = 10;
             this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
             this.dataGridViewTextBoxColumn3.ReadOnly = true;
             this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
@@ -232,9 +254,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(377, 51);
+            this.OperateResult.Location = new System.Drawing.Point(757, 200);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(392, 124);
+            this.OperateResult.Size = new System.Drawing.Size(780, 244);
             this.OperateResult.TabIndex = 204;
             this.OperateResult.Text = "";
             // 
@@ -243,10 +266,11 @@
             this.sn_code.AllPower = null;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(99, 408);
+            this.sn_code.Location = new System.Drawing.Point(195, 862);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(6);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(196, 21);
+            this.sn_code.Size = new System.Drawing.Size(388, 35);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -256,26 +280,174 @@
             // inputreson
             // 
             this.inputreson.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.inputreson.Location = new System.Drawing.Point(87, 51);
+            this.inputreson.Location = new System.Drawing.Point(177, 200);
+            this.inputreson.Margin = new System.Windows.Forms.Padding(6);
             this.inputreson.Name = "inputreson";
             this.inputreson.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
-            this.inputreson.Size = new System.Drawing.Size(253, 124);
+            this.inputreson.Size = new System.Drawing.Size(502, 244);
             this.inputreson.TabIndex = 199;
             this.inputreson.Text = "";
             // 
             // mdcode
             // 
-            this.mdcode.Location = new System.Drawing.Point(87, 10);
+            this.mdcode.Location = new System.Drawing.Point(180, 20);
+            this.mdcode.Margin = new System.Windows.Forms.Padding(6);
             this.mdcode.Name = "mdcode";
             this.mdcode.ReadOnly = true;
-            this.mdcode.Size = new System.Drawing.Size(100, 21);
+            this.mdcode.Size = new System.Drawing.Size(196, 35);
             this.mdcode.TabIndex = 207;
             // 
+            // INPUT
+            // 
+            this.INPUT.AutoSize = true;
+            this.INPUT.Location = new System.Drawing.Point(447, 31);
+            this.INPUT.Name = "INPUT";
+            this.INPUT.Size = new System.Drawing.Size(113, 28);
+            this.INPUT.TabIndex = 208;
+            this.INPUT.TabStop = true;
+            this.INPUT.Text = "已投产";
+            this.INPUT.UseVisualStyleBackColor = true;
+            // 
+            // NOTINPUT
+            // 
+            this.NOTINPUT.AutoSize = true;
+            this.NOTINPUT.Location = new System.Drawing.Point(588, 31);
+            this.NOTINPUT.Name = "NOTINPUT";
+            this.NOTINPUT.Size = new System.Drawing.Size(113, 28);
+            this.NOTINPUT.TabIndex = 209;
+            this.NOTINPUT.TabStop = true;
+            this.NOTINPUT.Text = "未投产";
+            this.NOTINPUT.UseVisualStyleBackColor = true;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(18, 137);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(82, 41);
+            this.label3.TabIndex = 212;
+            this.label3.Text = "日期";
+            // 
+            // EndDate
+            // 
+            this.EndDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+            this.EndDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+            this.EndDate.Location = new System.Drawing.Point(468, 143);
+            this.EndDate.Name = "EndDate";
+            this.EndDate.Size = new System.Drawing.Size(353, 35);
+            this.EndDate.TabIndex = 211;
+            // 
+            // BeginDate
+            // 
+            this.BeginDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+            this.BeginDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+            this.BeginDate.Location = new System.Drawing.Point(109, 143);
+            this.BeginDate.Name = "BeginDate";
+            this.BeginDate.Size = new System.Drawing.Size(353, 35);
+            this.BeginDate.TabIndex = 210;
+            this.BeginDate.Value = new System.DateTime(2021, 2, 27, 13, 47, 0, 0);
+            // 
+            // st_code
+            // 
+            this.st_code.AllPower = "ifall";
+            this.st_code.Caller = null;
+            this.st_code.Condition = null;
+            this.st_code.DBTitle = "回流工序";
+            this.st_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.st_code.FormName = null;
+            this.st_code.Location = new System.Drawing.Point(681, 78);
+            this.st_code.Margin = new System.Windows.Forms.Padding(6);
+            this.st_code.Name = "st_code";
+            this.st_code.Power = "ifspecial";
+            this.st_code.ReturnData = null;
+            this.st_code.SelectField = null;
+            this.st_code.SetValueField = null;
+            this.st_code.Size = new System.Drawing.Size(318, 44);
+            this.st_code.TabIndex = 214;
+            this.st_code.TableName = null;
+            this.st_code.Tag = "";
+            this.st_code.TextBoxEnable = false;
+            // 
+            // st_rstepcode_label
+            // 
+            this.st_rstepcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.st_rstepcode_label.AutoSize = true;
+            this.st_rstepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.st_rstepcode_label.Location = new System.Drawing.Point(523, 78);
+            this.st_rstepcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.st_rstepcode_label.Name = "st_rstepcode_label";
+            this.st_rstepcode_label.Size = new System.Drawing.Size(146, 41);
+            this.st_rstepcode_label.TabIndex = 213;
+            this.st_rstepcode_label.Text = "回流工序";
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = "IFALL";
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = "";
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(209, 78);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = "";
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(282, 46);
+            this.ma_code.TabIndex = 217;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "makecode";
+            this.ma_code.TextBoxEnable = true;
+            // 
+            // 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(24, 78);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(146, 41);
+            this.label2.TabIndex = 216;
+            this.label2.Text = "工单编号";
+            // 
+            // BatchFreeze
+            // 
+            this.BatchFreeze.AllPower = null;
+            this.BatchFreeze.BackColor = System.Drawing.Color.Transparent;
+            this.BatchFreeze.DownImage = ((System.Drawing.Image)(resources.GetObject("BatchFreeze.DownImage")));
+            this.BatchFreeze.Image = null;
+            this.BatchFreeze.IsShowBorder = true;
+            this.BatchFreeze.Location = new System.Drawing.Point(913, 140);
+            this.BatchFreeze.MoveImage = ((System.Drawing.Image)(resources.GetObject("BatchFreeze.MoveImage")));
+            this.BatchFreeze.Name = "BatchFreeze";
+            this.BatchFreeze.NormalImage = ((System.Drawing.Image)(resources.GetObject("BatchFreeze.NormalImage")));
+            this.BatchFreeze.Power = null;
+            this.BatchFreeze.Size = new System.Drawing.Size(149, 44);
+            this.BatchFreeze.TabIndex = 218;
+            this.BatchFreeze.Text = "批量冻结";
+            this.BatchFreeze.UseVisualStyleBackColor = false;
+            this.BatchFreeze.Click += new System.EventHandler(this.BatchFreeze_Click);
+            // 
             // Make_MakeDown
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(812, 456);
+            this.ClientSize = new System.Drawing.Size(1624, 912);
+            this.Controls.Add(this.BatchFreeze);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.st_code);
+            this.Controls.Add(this.st_rstepcode_label);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.EndDate);
+            this.Controls.Add(this.BeginDate);
+            this.Controls.Add(this.NOTINPUT);
+            this.Controls.Add(this.INPUT);
             this.Controls.Add(this.mdcode);
             this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.pr_code);
@@ -289,13 +461,14 @@
             this.Controls.Add(this.md_code_label);
             this.Controls.Add(this.LabelDataGridView);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "Make_MakeDown";
             this.Tag = "Make!MakeDown";
             this.Text = "Make_MakeDown";
             this.Load += new System.EventHandler(this.Make_MakeDown_Load);
             this.SizeChanged += new System.EventHandler(this.Make_MakeDown_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -323,5 +496,15 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail;
         private System.Windows.Forms.DataGridViewTextBoxColumn MD_DOWNMAN;
         private System.Windows.Forms.TextBox mdcode;
+        private System.Windows.Forms.RadioButton INPUT;
+        private System.Windows.Forms.RadioButton NOTINPUT;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.DateTimePicker EndDate;
+        private System.Windows.Forms.DateTimePicker BeginDate;
+        private CustomControl.TextBoxWithIcon.SearchTextBox st_code;
+        private System.Windows.Forms.Label st_rstepcode_label;
+        private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.ButtonUtil.NormalButton BatchFreeze;
     }
 }

+ 49 - 67
UAS_MES_JC/FunctionCode/Make/Make_MakeDown.cs

@@ -55,6 +55,27 @@ namespace UAS_MES_NEW.Make
             string[] param = new string[] { caller, make_count.Text, _macode };
             dh.CallProcedure("SP_GETMAXNUMBER", ref param);
             mdcode.Text = param[2];
+
+            ma_code.TableName = " make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单编号,ma_prodcode # 产品编号,pr_spec # 型号";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += pr_code_DbChange;
+
+            st_code.FormName = Name;
+            st_code.TableName = "step";
+            st_code.SetValueField = new string[] { "st_code", "st_name" };
+            st_code.SelectField = "st_code # 工序编号 ,st_name # 工序名称";
+            st_code.DBTitle = "执行工序";
+            st_code.DbChange += pr_code_DbChange;
+        }
+        DataTable Dbfind;
+
+        private void pr_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
         }
 
         private void Make_MakeDown_SizeChanged(object sender, EventArgs e)
@@ -68,74 +89,23 @@ namespace UAS_MES_NEW.Make
             {
                 if (inputreson.Text.Trim() != "")
                 {
+                    //进行下地操作,插入下地记录
                     sql.Clear();
-                    sql.Append("select max(ms_id) from makeserial where ms_sncode='" + sn_code.Text + "'");
-                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                    ms_id = dt.Rows[0][0].ToString();
-                    if (ms_id != "")
-                    {
-                        //界面赋值
-                        dtbar = (DataTable)dh.ExecuteSql("select ms_makecode,pr_code,pr_detail from makeserial left join product on MS_PRODCODE=pr_code where ms_id='" + ms_id + "'", "select");
-                        BaseUtil.SetFormValue(this.Controls, dtbar);
-                        sql.Clear();
-                        sql.Append("select ms_outboxcode, ms_downstatus,ms_outno,nvl(ms_iostatus,0) ms_iostatus,ms_prodcode from makeserial where ms_id ='" + ms_id + "' ");
-                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                        string ms_downstatus = dt.Rows[0]["ms_downstatus"].ToString();
-                        string ms_outboxcode = dt.Rows[0]["ms_outboxcode"].ToString();
-                        string ms_iostatus = dt.Rows[0]["ms_iostatus"].ToString();
-                        string ms_outno = dt.Rows[0]["ms_outno"].ToString();
-                        if (ms_downstatus == "0")
-                        {
-                            if (ms_outno == ""&& ms_iostatus =="0")
-                            {
-                                if (ms_outboxcode == null || ms_outboxcode == "")
-                                {
-                                    //进行下地操作,插入下地记录
-                                    sql.Clear();
-                                    sql.Append("INSERT INTO MAKEDOWN (MD_ID,MD_LINECODE,MD_SCCODE,MD_STEPCODE,");
-                                    sql.Append("MD_SNCODE,MD_PRODCODE,MD_MACODE, MD_DOWNREASON, MD_CODE,");
-                                    sql.Append("MD_DOWNDATE,MD_DOWNMAN,MD_STATUS) values (MAKEDOWN_seq.nextval,'" + User.UserLineCode + "','" + User.UserSourceCode + "',");
-                                    sql.Append("'" + User.CurrentStepCode + "','" + sn_code.Text + "','" + pr_code.Text + "','" + ms_makecode.Text + "','" + inputreson.Text + "','" + mdcode.Text + "',sysdate,'" + User.UserCode + "','-1')");
-                                    //执行
-                                    dh.ExecuteSql(sql.GetString(), "insert");
-                                    //更新序列号状态为下地
-                                    dh.UpdateByCondition("makeserial", "ms_downstatus='-1'", "ms_id='" + ms_id + "'");
-                                    OperateResult.AppendText(">>>序列号" + sn_code.Text + "下地成功\n", Color.Green);
-                                    //更新数量
-                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "下地操作", "序列号" + sn_code.Text + "下地成功", sn_code.Text, "");
-                                    count++;
-                                    make_count.Text = count + "";
-                                    sn_code.Text = "";
-                                    loadGrid();
-                                }
-                                else
-                                {
-                                    OperateResult.AppendText(">>>序列号" + sn_code.Text + "已装箱:" + ms_outboxcode + ",不允许下地,如需下地请先解除装箱\n", Color.Red, sn_code);
-                                    sn_code.Focus();
-                                    return;
-                                }
-                            }
-                            else
-                            {
-                                OperateResult.AppendText(">>>序列号" + sn_code.Text + "已进行出入库操作,不允许下地\n", Color.Red, sn_code);
-                                sn_code.Focus();
-                                return;
-                            }
-                        }
-                        else
-                        {
-                            OperateResult.AppendText(">>>序列号" + sn_code.Text + "目前已经是下地状态,无需重复下地\n", Color.Red, sn_code);
-                            sn_code.Focus();
-                            return;
-                        }
-
-                    }
-                    else
-                    {
-                        ms_id = null;
-                        OperateResult.AppendText(">>>序列号" + sn_code.Text + "不存在\n", Color.Red, sn_code);
-                        sn_code.Focus();
-                    }
+                    sql.Append("INSERT INTO MAKEDOWN (MD_ID,MD_LINECODE,MD_SCCODE,MD_STEPCODE,");
+                    sql.Append("MD_SNCODE,MD_PRODCODE,MD_MACODE, MD_DOWNREASON, MD_CODE,");
+                    sql.Append("MD_DOWNDATE,MD_DOWNMAN,MD_STATUS) values (MAKEDOWN_seq.nextval,'" + User.UserLineCode + "','" + User.UserSourceCode + "',");
+                    sql.Append("'" + User.CurrentStepCode + "','" + sn_code.Text + "','" + pr_code.Text + "','" + ms_makecode.Text + "','" + inputreson.Text + "','" + mdcode.Text + "',sysdate,'" + User.UserCode + "','-1')");
+                    //执行
+                    dh.ExecuteSql(sql.GetString(), "insert");
+                    //更新序列号状态为下地
+                    dh.UpdateByCondition("makeserial", "ms_downstatus='-1'", "ms_sncode='" + sn_code.Text + "'");
+                    OperateResult.AppendText(">>>序列号" + sn_code.Text + "下地成功\n", Color.Green);
+                    //更新数量
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "下地操作", "序列号" + sn_code.Text + "下地成功", sn_code.Text, "");
+                    count++;
+                    make_count.Text = count + "";
+                    sn_code.Text = "";
+                    loadGrid();
                 }
                 else
                 {
@@ -153,5 +123,17 @@ namespace UAS_MES_NEW.Make
             dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt1);
         }
+
+        private void BatchFreeze_Click(object sender, EventArgs e)
+        {
+            sql.Clear();
+            sql.Append("INSERT INTO MAKEDOWN (MD_ID,MD_LINECODE,MD_SCCODE,MD_STEPCODE,");
+            sql.Append("MD_SNCODE,MD_PRODCODE,MD_MACODE, MD_DOWNREASON, MD_CODE,");
+            sql.Append("MD_DOWNDATE,MD_DOWNMAN,MD_STATUS) select MAKEDOWN_seq.nextval,'" + User.UserLineCode + "','" + User.UserSourceCode + "',");
+            sql.Append("'" + st_code.Text + "',sp_sncode,sp_prodcode,sp_makecode,'" + inputreson.Text + "','" + mdcode.Text + "',sysdate,'" + User.UserCode + "','-1' ");
+            sql.Append(" from steppassed where sp_stepcode='"+st_code.Text+"' and sp_makecode='"+ma_code.Text+ "' and sp_date between to_date('" + BeginDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + EndDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss')");
+            dh.ExecuteSql(sql.GetString(), "insert");
+            loadGrid();
+        }
     }
 }

+ 39 - 15
UAS_MES_JC/FunctionCode/Make/Make_MakeDown.resx

@@ -132,19 +132,43 @@
   <metadata name="MD_DOWNMAN.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="md_macode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="md_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="md_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="MD_DOWNMAN.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="BatchFreeze.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="BatchFreeze.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="BatchFreeze.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
 </root>

+ 1 - 1
UAS_MES_JC/FunctionCode/Make/Make_TestCollectionModule.cs

@@ -263,7 +263,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 if (needdata && GoodProduct.Checked)
                                 {
-                                    dh.ExecuteSql("insert into STEPTESTDETAIL (std_id,std_sn,std_makecode,std_indate,STD_RESCODE,std_stepcode,STD_TESTRESULT,std_class)select STEPTESTDETAIL_seq.nextval,'" + arr[i] + "','" + oMakeCode + "',sysdate,'" + User.UserSourceCode + "','" + User.CurrentStepCode + "','','http://10.1.81.208:8099/ftp" + ftppath + sn + FilePath.Text.Substring(FilePath.Text.LastIndexOf(".")) + "' from dual", "insert");
+                                    dh.ExecuteSql("insert into STEPTESTDETAIL (std_id,std_sn,std_makecode,std_indate,STD_RESCODE,std_stepcode,STD_TESTRESULT,std_class)select STEPTESTDETAIL_seq.nextval,'" + arr[i] + "','" + oMakeCode + "',sysdate,'" + User.UserSourceCode + "','" + User.CurrentStepCode + "','','http://172.16.51.3:8099/ftp" + ftppath + sn + FilePath.Text.Substring(FilePath.Text.LastIndexOf(".")) + "' from dual", "insert");
                                 }
                                 //是否提示过工单切换框,检测前后执行
                                 if (!LogicHandler.CheckDiffMakeCodeAfterStepCheck(ms_sncode.Text, oMakeCode, NoteForChange.Checked, NoteAlready, ma_code, out ErrorMessage))