Browse Source

优化采集项目

callm 5 days ago
parent
commit
737f1490b7

+ 6 - 6
UAS_MES_ZT/FunctionCode/Make/Make_Repair.Designer.cs

@@ -67,7 +67,7 @@
             this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.rid_code = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.BadInfo = new System.Windows.Forms.BindingSource(this.components);
-            this.badgroup = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
+            this.badgroup = new System.Windows.Forms.ComboBox();
             this.normalButton2 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.cd_stepcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.RepairComplete = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
@@ -527,13 +527,13 @@
             // 
             // badgroup
             // 
+            this.badgroup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.badgroup.FormattingEnabled = true;
-            this.badgroup.Location = new System.Drawing.Point(1170, 520);
-            this.badgroup.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.badgroup.Location = new System.Drawing.Point(1169, 520);
             this.badgroup.Name = "badgroup";
-            this.badgroup.Size = new System.Drawing.Size(284, 32);
+            this.badgroup.Size = new System.Drawing.Size(250, 32);
             this.badgroup.TabIndex = 166;
-            this.badgroup.SelectedValueChanged += new System.EventHandler(this.badgroup_SelectedValueChanged);
+            this.badgroup.SelectedIndexChanged += new System.EventHandler(this.badgroup_SelectedIndexChanged_1);
             // 
             // normalButton2
             // 
@@ -1325,11 +1325,11 @@
         private CustomControl.ValueLabel.ValueLabel ms_makecode;
         private System.Windows.Forms.Label label1;
         private CustomControl.ButtonUtil.NormalButton normalButton2;
-        private CustomControl.ComBoxWithFocus.ComBoxWithFocus badgroup;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.ListView WaitRejectList;
         private System.Windows.Forms.ColumnHeader columnHeader5;
         private System.Windows.Forms.ColumnHeader rid_code;
         private System.Windows.Forms.BindingSource BadInfo;
+        private System.Windows.Forms.ComboBox badgroup;
     }
 }

+ 6 - 1
UAS_MES_ZT/FunctionCode/Make/Make_Repair.cs

@@ -1191,7 +1191,12 @@ namespace UAS_MES_NEW.Make
             else OperatResult.AppendText(">>必须选择不良现象\n", Color.Red);
         }
 
-        private void badgroup_SelectedValueChanged(object sender, EventArgs e)
+        private void badgroup_SelectedIndexChanged(object sender, EventArgs e)
+        {
+         
+        }
+
+        private void badgroup_SelectedIndexChanged_1(object sender, EventArgs e)
         {
             LoadBadCodeListView();
         }

+ 28 - 27
UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.Designer.cs

@@ -351,7 +351,7 @@
             this.checkBox1.AutoSize = true;
             this.checkBox1.Enabled = false;
             this.checkBox1.Location = new System.Drawing.Point(1004, 512);
-            this.checkBox1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.checkBox1.Margin = new System.Windows.Forms.Padding(5);
             this.checkBox1.Name = "checkBox1";
             this.checkBox1.Size = new System.Drawing.Size(234, 28);
             this.checkBox1.TabIndex = 130;
@@ -480,7 +480,7 @@
             // 
             this.autoin.AutoSize = true;
             this.autoin.Location = new System.Drawing.Point(887, 1079);
-            this.autoin.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.autoin.Margin = new System.Windows.Forms.Padding(5);
             this.autoin.Name = "autoin";
             this.autoin.Size = new System.Drawing.Size(186, 28);
             this.autoin.TabIndex = 159;
@@ -501,7 +501,7 @@
             this.cd_stepcode.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.cd_stepcode.FormName = null;
             this.cd_stepcode.Location = new System.Drawing.Point(715, 115);
-            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(5);
             this.cd_stepcode.Name = "cd_stepcode";
             this.cd_stepcode.Power = "ifspecial";
             this.cd_stepcode.ReturnData = null;
@@ -522,7 +522,7 @@
             this.RepairComplete.Image = null;
             this.RepairComplete.IsShowBorder = true;
             this.RepairComplete.Location = new System.Drawing.Point(1056, 112);
-            this.RepairComplete.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.RepairComplete.Margin = new System.Windows.Forms.Padding(5);
             this.RepairComplete.MoveImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.MoveImage")));
             this.RepairComplete.Name = "RepairComplete";
             this.RepairComplete.NormalImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.NormalImage")));
@@ -557,7 +557,7 @@
             this.Scrap.Image = null;
             this.Scrap.IsShowBorder = true;
             this.Scrap.Location = new System.Drawing.Point(1224, 111);
-            this.Scrap.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.Scrap.Margin = new System.Windows.Forms.Padding(5);
             this.Scrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("Scrap.MoveImage")));
             this.Scrap.Name = "Scrap";
             this.Scrap.NormalImage = ((System.Drawing.Image)(resources.GetObject("Scrap.NormalImage")));
@@ -578,7 +578,7 @@
             this.cr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.cr_code.FormName = null;
             this.cr_code.Location = new System.Drawing.Point(184, 115);
-            this.cr_code.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.cr_code.Margin = new System.Windows.Forms.Padding(5);
             this.cr_code.Name = "cr_code";
             this.cr_code.Power = "ifspecial";
             this.cr_code.ReturnData = null;
@@ -641,7 +641,7 @@
             this.retsn.BackColor = System.Drawing.Color.White;
             this.retsn.ID = null;
             this.retsn.Location = new System.Drawing.Point(1259, 1080);
-            this.retsn.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.retsn.Margin = new System.Windows.Forms.Padding(5);
             this.retsn.Name = "retsn";
             this.retsn.Power = null;
             this.retsn.Size = new System.Drawing.Size(376, 35);
@@ -661,7 +661,7 @@
             this.normalButton1.Image = null;
             this.normalButton1.IsShowBorder = true;
             this.normalButton1.Location = new System.Drawing.Point(739, 987);
-            this.normalButton1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.normalButton1.Margin = new System.Windows.Forms.Padding(5);
             this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
             this.normalButton1.Name = "normalButton1";
             this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
@@ -691,7 +691,7 @@
             "电池",
             "其他"});
             this.mbc_component.Location = new System.Drawing.Point(536, 512);
-            this.mbc_component.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.mbc_component.Margin = new System.Windows.Forms.Padding(5);
             this.mbc_component.Name = "mbc_component";
             this.mbc_component.Size = new System.Drawing.Size(239, 32);
             this.mbc_component.TabIndex = 139;
@@ -704,7 +704,7 @@
             this.mbr_dutyname.Location = new System.Drawing.Point(1467, 379);
             this.mbr_dutyname.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.mbr_dutyname.Name = "mbr_dutyname";
-            this.mbr_dutyname.Size = new System.Drawing.Size(243, 47);
+            this.mbr_dutyname.Size = new System.Drawing.Size(243, 35);
             this.mbr_dutyname.TabIndex = 135;
             this.mbr_dutyname.TableName = null;
             this.mbr_dutyname.Value = null;
@@ -718,7 +718,7 @@
             this.so_name.Location = new System.Drawing.Point(523, 459);
             this.so_name.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.so_name.Name = "so_name";
-            this.so_name.Size = new System.Drawing.Size(243, 47);
+            this.so_name.Size = new System.Drawing.Size(243, 35);
             this.so_name.TabIndex = 133;
             this.so_name.TableName = null;
             this.so_name.Value = null;
@@ -732,7 +732,7 @@
             this.nr_name.Location = new System.Drawing.Point(1004, 379);
             this.nr_name.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.nr_name.Name = "nr_name";
-            this.nr_name.Size = new System.Drawing.Size(243, 47);
+            this.nr_name.Size = new System.Drawing.Size(243, 35);
             this.nr_name.TabIndex = 132;
             this.nr_name.TableName = null;
             this.nr_name.Value = null;
@@ -746,7 +746,7 @@
             this.nrg_name.Location = new System.Drawing.Point(524, 379);
             this.nrg_name.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.nrg_name.Name = "nrg_name";
-            this.nrg_name.Size = new System.Drawing.Size(243, 47);
+            this.nrg_name.Size = new System.Drawing.Size(243, 35);
             this.nrg_name.TabIndex = 131;
             this.nrg_name.TableName = null;
             this.nrg_name.Value = null;
@@ -756,7 +756,7 @@
             // mb_badremark
             // 
             this.mb_badremark.Location = new System.Drawing.Point(1467, 285);
-            this.mb_badremark.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8);
+            this.mb_badremark.Margin = new System.Windows.Forms.Padding(8);
             this.mb_badremark.Name = "mb_badremark";
             this.mb_badremark.Size = new System.Drawing.Size(280, 43);
             this.mb_badremark.TabIndex = 127;
@@ -908,7 +908,7 @@
             this.GetSNCode.BackColor = System.Drawing.Color.White;
             this.GetSNCode.ID = null;
             this.GetSNCode.Location = new System.Drawing.Point(488, 1069);
-            this.GetSNCode.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.GetSNCode.Margin = new System.Windows.Forms.Padding(5);
             this.GetSNCode.Name = "GetSNCode";
             this.GetSNCode.Power = null;
             this.GetSNCode.Size = new System.Drawing.Size(372, 35);
@@ -927,7 +927,7 @@
             this.NewRepairInf.Image = null;
             this.NewRepairInf.IsShowBorder = true;
             this.NewRepairInf.Location = new System.Drawing.Point(555, 987);
-            this.NewRepairInf.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.NewRepairInf.Margin = new System.Windows.Forms.Padding(5);
             this.NewRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.MoveImage")));
             this.NewRepairInf.Name = "NewRepairInf";
             this.NewRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.NormalImage")));
@@ -948,7 +948,7 @@
             this.SaveRepairInf.Image = null;
             this.SaveRepairInf.IsShowBorder = true;
             this.SaveRepairInf.Location = new System.Drawing.Point(829, 453);
-            this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(5);
             this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
             this.SaveRepairInf.Name = "SaveRepairInf";
             this.SaveRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.NormalImage")));
@@ -969,7 +969,7 @@
             this.DeleteRepairInf.Image = null;
             this.DeleteRepairInf.IsShowBorder = true;
             this.DeleteRepairInf.Location = new System.Drawing.Point(1004, 987);
-            this.DeleteRepairInf.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.DeleteRepairInf.Margin = new System.Windows.Forms.Padding(5);
             this.DeleteRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.MoveImage")));
             this.DeleteRepairInf.Name = "DeleteRepairInf";
             this.DeleteRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.NormalImage")));
@@ -990,7 +990,7 @@
             this.mbl_loc.BackColor = System.Drawing.Color.White;
             this.mbl_loc.ID = null;
             this.mbl_loc.Location = new System.Drawing.Point(524, 583);
-            this.mbl_loc.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.mbl_loc.Margin = new System.Windows.Forms.Padding(5);
             this.mbl_loc.Name = "mbl_loc";
             this.mbl_loc.Power = null;
             this.mbl_loc.Size = new System.Drawing.Size(356, 35);
@@ -1010,7 +1010,7 @@
             this.bc_name.Enabled = false;
             this.bc_name.ID = null;
             this.bc_name.Location = new System.Drawing.Point(1004, 285);
-            this.bc_name.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.bc_name.Margin = new System.Windows.Forms.Padding(5);
             this.bc_name.Name = "bc_name";
             this.bc_name.Power = null;
             this.bc_name.Size = new System.Drawing.Size(239, 35);
@@ -1030,7 +1030,7 @@
             this.bg_name.ForeColor = System.Drawing.Color.Red;
             this.bg_name.ID = null;
             this.bg_name.Location = new System.Drawing.Point(524, 288);
-            this.bg_name.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.bg_name.Margin = new System.Windows.Forms.Padding(5);
             this.bg_name.Name = "bg_name";
             this.bg_name.Power = null;
             this.bg_name.Size = new System.Drawing.Size(239, 35);
@@ -1044,7 +1044,7 @@
             // 
             this.OperatResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OperatResult.Location = new System.Drawing.Point(1467, 573);
-            this.OperatResult.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.OperatResult.Margin = new System.Windows.Forms.Padding(5);
             this.OperatResult.Name = "OperatResult";
             this.OperatResult.Size = new System.Drawing.Size(311, 497);
             this.OperatResult.TabIndex = 87;
@@ -1058,7 +1058,7 @@
             this.Clean.Image = null;
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1668, 1085);
-            this.Clean.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.Clean.Margin = new System.Windows.Forms.Padding(5);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -1078,7 +1078,7 @@
             this.NewBadCode.Image = null;
             this.NewBadCode.IsShowBorder = true;
             this.NewBadCode.Location = new System.Drawing.Point(328, 987);
-            this.NewBadCode.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.NewBadCode.Margin = new System.Windows.Forms.Padding(5);
             this.NewBadCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.MoveImage")));
             this.NewBadCode.Name = "NewBadCode";
             this.NewBadCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.NormalImage")));
@@ -1100,7 +1100,7 @@
             this.SaveBadLocation.Image = null;
             this.SaveBadLocation.IsShowBorder = true;
             this.SaveBadLocation.Location = new System.Drawing.Point(909, 576);
-            this.SaveBadLocation.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.SaveBadLocation.Margin = new System.Windows.Forms.Padding(5);
             this.SaveBadLocation.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.MoveImage")));
             this.SaveBadLocation.Name = "SaveBadLocation";
             this.SaveBadLocation.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.NormalImage")));
@@ -1121,7 +1121,7 @@
             this.normalButton2.Image = null;
             this.normalButton2.IsShowBorder = true;
             this.normalButton2.Location = new System.Drawing.Point(1405, 111);
-            this.normalButton2.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.normalButton2.Margin = new System.Windows.Forms.Padding(5);
             this.normalButton2.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.MoveImage")));
             this.normalButton2.Name = "normalButton2";
             this.normalButton2.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.NormalImage")));
@@ -1141,6 +1141,7 @@
             this.badgroup.Name = "badgroup";
             this.badgroup.Size = new System.Drawing.Size(284, 32);
             this.badgroup.TabIndex = 169;
+            this.badgroup.SelectedIndexChanged += new System.EventHandler(this.badgroup_SelectedIndexChanged);
             // 
             // label3
             // 
@@ -1251,7 +1252,7 @@
             this.Controls.Add(this.bc_name_label);
             this.Controls.Add(this.bg_name_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.Margin = new System.Windows.Forms.Padding(5);
             this.Name = "Make_RepairOk";
             this.Tag = "Make!RepairOk";
             this.Text = "维修完成";

+ 24 - 16
UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.cs

@@ -131,24 +131,27 @@ namespace UAS_MES_NEW.Make
 
         private void LoadBadCodeListView()
         {
+
             string ri_id = badgroup.SelectedValue.ToString();
-            sql.Clear();
-            sql.Append("select rid_code from RepairItemdetail where rid_riid='" + ri_id + "' ");
-            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-            BadInfo.DataSource = dt;
-            //往listview中添加数据
-            WaitRejectList.Items.Clear();
-            WaitRejectList.BeginUpdate();
-            for (int i = 0; i < dt.Rows.Count; i++)
-            {
-                ListViewItem lvi = new ListViewItem();
-                //第一列是勾选列,设置列头文本为空
-                lvi.Text = "";
-                for (int j = 0; j < dt.Columns.Count; j++)
-                    lvi.SubItems.Add(dt.Rows[i][j].ToString());
-                WaitRejectList.Items.Add(lvi);
+            if (ri_id != "System.Data.DataRowView") {
+                sql.Clear();
+                sql.Append("select rid_code from RepairItemdetail where rid_riid='" + ri_id + "' ");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                BadInfo.DataSource = dt;
+                //往listview中添加数据
+                WaitRejectList.Items.Clear();
+                WaitRejectList.BeginUpdate();
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    ListViewItem lvi = new ListViewItem();
+                    //第一列是勾选列,设置列头文本为空
+                    lvi.Text = "";
+                    for (int j = 0; j < dt.Columns.Count; j++)
+                        lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                    WaitRejectList.Items.Add(lvi);
+                }
+                WaitRejectList.EndUpdate();
             }
-            WaitRejectList.EndUpdate();
         }
 
         private void Prodcode_DbChange(object sender, EventArgs e)
@@ -1242,5 +1245,10 @@ namespace UAS_MES_NEW.Make
             }
             else OperatResult.AppendText(">>序列号不允许为空\n", Color.Red);
         }
+
+        private void badgroup_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            LoadBadCodeListView();
+        }
     }
 }

+ 0 - 15
UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.resx

@@ -247,21 +247,6 @@
   <metadata name="DeleteCom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mbp_part1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="DeleteCom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mbl_orispeccode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="DeletePos.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>