فهرست منبع

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

Hcsy 8 سال پیش
والد
کامیت
7544f05c6f

+ 12 - 13
UAS-MES/DataOperate/DataHelper.cs

@@ -57,7 +57,7 @@ namespace UAS_MES.DataOperate
         {
             DataTable dt = new DataTable();
             string sql = "select " + Field + " from " + TableName + " where " + Condition;
-            Console.WriteLine(sql);
+            
             command = new OracleCommand(sql, connection);
             Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter();
@@ -119,7 +119,7 @@ namespace UAS_MES.DataOperate
         {
             DataTable dt = new DataTable();
             string sql = "select count(1) from " + TableName + " where " + Condition;
-            Console.WriteLine(sql);
+            
             command = new OracleCommand(sql, connection);
             Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
@@ -141,7 +141,7 @@ namespace UAS_MES.DataOperate
             command = new OracleCommand(sql, connection);
             Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
-            Console.WriteLine(sql);
+            
             ad.Fill(dt);
             ad.Dispose();
             command.Dispose();
@@ -157,7 +157,7 @@ namespace UAS_MES.DataOperate
             string sql = "select ";
             sql += AddField(Fields);
             sql += " from " + TableName + " where " + Condition + " and rownum=1";
-            Console.WriteLine(sql);
+            
             command = new OracleCommand(sql, connection);
             Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
@@ -211,7 +211,6 @@ namespace UAS_MES.DataOperate
                 else
                     sql.Append(" from " + TableName + ") A where ROWNUM <= " + CurrentPage * PageSize + ") where RN> " + (CurrentPage - 1) * PageSize);
             }
-            Console.WriteLine(sql.ToString());
             command = new OracleCommand(sql.ToString(), connection);
             Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
@@ -236,7 +235,7 @@ namespace UAS_MES.DataOperate
             string sql = "select ";
             sql += AddField(Fields);
             sql += " from " + TableName + " where " + Condition;
-            Console.WriteLine(sql);
+            
             command = new OracleCommand(sql, connection);
             Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
@@ -565,7 +564,7 @@ namespace UAS_MES.DataOperate
             Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             DataTable dt = new DataTable();
-            Console.WriteLine(sql);
+            
             ad.Fill(dt);
             ad.Dispose();
             command.Dispose();
@@ -609,7 +608,7 @@ namespace UAS_MES.DataOperate
                 for (int i = 0; i < addpar.Length; i++)
                     command.Parameters.Add(new OracleParameter(addpar[i].ToString(), OracleDbType.Varchar2, names[i], ParameterDirection.Input));
             }
-            Console.WriteLine(SQL);
+            
             switch (Type.ToUpper())
             {
                 case "SELECT":
@@ -663,7 +662,7 @@ namespace UAS_MES.DataOperate
         {
             DataTable dt = new DataTable();
             string sql = "select distinct count('" + Field + "') from " + TableName;
-            Console.WriteLine(sql);
+            
             command = new OracleCommand(sql, connection);
             Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
@@ -694,7 +693,7 @@ namespace UAS_MES.DataOperate
         public void DeleteDataByID(string TableName, string ID, string[] DeleteID)
         {
             string sql = "delete from " + TableName + " where " + ID + " =:DeleteID";
-            Console.WriteLine(sql);
+            
             command = new OracleCommand(sql, connection);
             Reconnect(command);
             command.ArrayBindCount = DeleteID.Length;
@@ -841,7 +840,7 @@ namespace UAS_MES.DataOperate
             command = new OracleCommand(sql, connection);
             Reconnect(command);
             command.ArrayBindCount = names[1].Length;
-            Console.WriteLine(sql);
+            
             //因为第一个数组保存的是参数的名称,所以循环从1而不是0开始
             //将第一个数组的下标固定为0作为循环添加的参数的名称
             for (int i = 1; i <= names[0].Length; i++)
@@ -952,7 +951,7 @@ namespace UAS_MES.DataOperate
         public string UpdateByCondition(string TableName, string update, string condition)
         {
             string sql = "update " + TableName + " set " + update + " where " + condition;
-            Console.WriteLine(sql);
+            
             command = new OracleCommand(sql, connection);
             Reconnect(command);
             command.ExecuteNonQuery();
@@ -996,7 +995,7 @@ namespace UAS_MES.DataOperate
                 {
                     if (!String.IsNullOrEmpty(sql))
                     {
-                        Console.WriteLine(sql);
+                        
                         command.CommandText = sql;
                         command.ExecuteNonQuery();
                     }

+ 3 - 6
UAS-MES/FunctionCode/Make/Make_NewMatainInf.cs

@@ -164,7 +164,6 @@ namespace UAS_MES.Make
             string[] nrg_name = new string[GetListViewCheckCount(nrg_name_lsv)];
             string[] nr_name = new string[GetListViewCheckCount(nr_name_lsv)];
             string[] mbr_dutycode = new string[GetListViewCheckCount(mbr_dutycode_lsv)];
-            string[] mbr_solutioncode = new string[GetListViewCheckCount(mbr_solutioncode_lsv)];
             string ErrorMessage = "";
             if (nrg_name.Length == 0)
                 ErrorMessage += " 不良原因组 ";
@@ -172,8 +171,6 @@ namespace UAS_MES.Make
                 ErrorMessage += " 不良原因 ";
             if (mbr_dutycode.Length == 0)
                 ErrorMessage += " 责任别 ";
-            if (mbr_solutioncode.Length == 0)
-                ErrorMessage += " 解决方案 ";
             if (ErrorMessage == "")
             {
                 for (int i = 0; i < mbc_component_lsv.Items.Count; i++)
@@ -199,7 +196,7 @@ namespace UAS_MES.Make
                     string macode = dt.Rows[0]["ms_makecode"].ToString();
                     string mbr_id = dh.GetSEQ("makebadreason_seq");
                     //存在不良组件进行提示
-                    if (dh.CheckExist("makebadreason left join makebad on mbr_badcode=mb_badcode and mbr_sncode=mb_sncode", "mbr_badcode='" + bccode + "' and mbr_sncode='" + sncode + "' and mbr_brcode='" + nrcode + "' and mb_status=0"))
+                    if (dh.CheckExist("makebadreason left join makebad on mbr_mbid=mb_id and mbr_sncode=mb_sncode", "mbr_badcode='" + bccode + "' and mbr_sncode='" + sncode + "' and mbr_brcode='" + nrcode + "' and mb_status=0"))
                     {
                         ErrorMessage = "不良代码【" + bc_name.Text + "】已存在不良原因【" + nrname + "】\n";
                     }
@@ -210,7 +207,7 @@ namespace UAS_MES.Make
                     }
                     else
                     {
-                        //保存不良原因
+                        //保存不良组件
                         sql.Clear();
                         sql.Append("insert into makebadrscom (mbc_id,mbc_mbrid,mbc_component,mbc_badcode,");
                         sql.Append("mbc_brcode,mbc_sncode,mbc_makecode,mbc_indate,mbc_inman ) values ");
@@ -221,7 +218,7 @@ namespace UAS_MES.Make
                     }
                     if (mbccomponent != "" || mbccomponent != null)
                     {
-                        //保存不良组件
+                        //保存不良原因
                         sql.Clear();
                         sql.Append("insert into makebadreason (mbr_mbid,mbr_id,mbr_brcode,mbr_solutioncode,");
                         sql.Append("mbr_dutycode,mbr_brgcode,mbr_badcode,mbr_sncode,mbr_makecode,mbr_indate,");

+ 62 - 36
UAS-MES/FunctionCode/Make/Make_Repair.Designer.cs

@@ -62,11 +62,7 @@
             this.ms_sncode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.mbp_partdgv = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
-            this.mbp_part1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mbp_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mbl_locdgv = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
-            this.mbl_loc1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mbl_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.RefreshTreeView = new UAS_MES.CustomControl.ClickPicBox.ClickPicBox();
             this.GetSNCode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.NewRepairInf = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -91,6 +87,12 @@
             this.SaveBadLocation = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.Scrap = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.RepairComplete = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.mbl_loc1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DeletePos = new System.Windows.Forms.DataGridViewImageColumn();
+            this.mbl_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mbp_part1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DeleteCom = new System.Windows.Forms.DataGridViewImageColumn();
+            this.mbp_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.panel2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).BeginInit();
@@ -454,6 +456,7 @@
             this.mbp_partdgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.mbp_partdgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.mbp_part1,
+            this.DeleteCom,
             this.mbp_id});
             this.mbp_partdgv.Location = new System.Drawing.Point(611, 418);
             this.mbp_partdgv.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
@@ -461,21 +464,7 @@
             this.mbp_partdgv.RowTemplate.Height = 27;
             this.mbp_partdgv.Size = new System.Drawing.Size(349, 190);
             this.mbp_partdgv.TabIndex = 121;
-            // 
-            // mbp_part1
-            // 
-            this.mbp_part1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.mbp_part1.DataPropertyName = "mbp_part";
-            this.mbp_part1.HeaderText = "已选择不良零件";
-            this.mbp_part1.Name = "mbp_part1";
-            this.mbp_part1.ReadOnly = true;
-            // 
-            // mbp_id
-            // 
-            this.mbp_id.DataPropertyName = "mbp_id";
-            this.mbp_id.HeaderText = "mbp_id";
-            this.mbp_id.Name = "mbp_id";
-            this.mbp_id.Visible = false;
+            this.mbp_partdgv.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.mbp_partdgv_CellContentClick);
             // 
             // mbl_locdgv
             // 
@@ -483,6 +472,7 @@
             this.mbl_locdgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.mbl_locdgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.mbl_loc1,
+            this.DeletePos,
             this.mbl_id});
             this.mbl_locdgv.Location = new System.Drawing.Point(222, 418);
             this.mbl_locdgv.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
@@ -490,21 +480,7 @@
             this.mbl_locdgv.RowTemplate.Height = 27;
             this.mbl_locdgv.Size = new System.Drawing.Size(349, 190);
             this.mbl_locdgv.TabIndex = 120;
-            // 
-            // mbl_loc1
-            // 
-            this.mbl_loc1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.mbl_loc1.DataPropertyName = "mbl_loc";
-            this.mbl_loc1.HeaderText = "已选择不良位置";
-            this.mbl_loc1.Name = "mbl_loc1";
-            this.mbl_loc1.ReadOnly = true;
-            // 
-            // mbl_id
-            // 
-            this.mbl_id.DataPropertyName = "mbl_id";
-            this.mbl_id.HeaderText = "mbl_id";
-            this.mbl_id.Name = "mbl_id";
-            this.mbl_id.Visible = false;
+            this.mbl_locdgv.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.mbl_locdgv_CellContentClick);
             // 
             // RefreshTreeView
             // 
@@ -951,6 +927,54 @@
             this.RepairComplete.UseVisualStyleBackColor = true;
             this.RepairComplete.Click += new System.EventHandler(this.RepairComplete_Click);
             // 
+            // mbl_loc1
+            // 
+            this.mbl_loc1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.mbl_loc1.DataPropertyName = "mbl_loc";
+            this.mbl_loc1.HeaderText = "已选择不良位置";
+            this.mbl_loc1.Name = "mbl_loc1";
+            this.mbl_loc1.ReadOnly = true;
+            // 
+            // DeletePos
+            // 
+            this.DeletePos.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.DeletePos.HeaderText = "删除";
+            this.DeletePos.Image = global::UAS_MES.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeletePos.Name = "DeletePos";
+            this.DeletePos.Width = 80;
+            // 
+            // mbl_id
+            // 
+            this.mbl_id.DataPropertyName = "mbl_id";
+            this.mbl_id.HeaderText = "mbl_id";
+            this.mbl_id.Name = "mbl_id";
+            this.mbl_id.Visible = false;
+            // 
+            // mbp_part1
+            // 
+            this.mbp_part1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.mbp_part1.DataPropertyName = "mbp_part";
+            this.mbp_part1.HeaderText = "已选择不良零件";
+            this.mbp_part1.Name = "mbp_part1";
+            this.mbp_part1.ReadOnly = true;
+            // 
+            // DeleteCom
+            // 
+            this.DeleteCom.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.DeleteCom.HeaderText = "删除";
+            this.DeleteCom.Image = global::UAS_MES.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeleteCom.Name = "DeleteCom";
+            this.DeleteCom.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.DeleteCom.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.DeleteCom.Width = 80;
+            // 
+            // mbp_id
+            // 
+            this.mbp_id.DataPropertyName = "mbp_id";
+            this.mbp_id.HeaderText = "mbp_id";
+            this.mbp_id.Name = "mbp_id";
+            this.mbp_id.Visible = false;
+            // 
             // Make_Repair
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -1017,14 +1041,14 @@
             this.Text = "维修作业";
             this.Load += new System.EventHandler(this.维修作业_Load);
             this.SizeChanged += new System.EventHandler(this.Make_Repair_SizeChanged);
-            this.panel2.ResumeLayout(true);
+            this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.mbp_partdgv)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.mbl_locdgv)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -1088,8 +1112,10 @@
         private CustomControl.ValueLabel.ValueLabel ms_sncode;
         private CustomControl.TextBoxWithIcon.TextBoxWithTextArea mb_badremark;
         private System.Windows.Forms.DataGridViewTextBoxColumn mbp_part1;
+        private System.Windows.Forms.DataGridViewImageColumn DeleteCom;
         private System.Windows.Forms.DataGridViewTextBoxColumn mbp_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn mbl_loc1;
+        private System.Windows.Forms.DataGridViewImageColumn DeletePos;
         private System.Windows.Forms.DataGridViewTextBoxColumn mbl_id;
     }
 }

+ 21 - 5
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -302,7 +302,7 @@ namespace UAS_MES.Make
                     {
                         dh.UpdateByCondition("makeserial", "ms_status=4,ms_nextstepcode='',ms_stepcode='" + User.CurrentStepCode + "'", "ms_sncode='" + ms_sncode.Text + "' and ms_makecode='" + macode + "'");
                         dh.UpdateByCondition("make", "MA_NGMADEQTY=nvl(MA_NGMADEQTY,0)+1", "ma_code='" + macode + "'");
-                        LogicHandler.InsertMakeProcess(ms_sncode.Text,ms_makecode.Text,User.UserSourceCode,"报废","序列号报废",User.UserCode);
+                        LogicHandler.InsertMakeProcess(ms_sncode.Text, ms_makecode.Text, User.UserSourceCode, "报废", "序列号报废", User.UserCode);
                         OperatResult.AppendText(">>报废成功\n", Color.Green);
                         GetSNCode.Clear();
                         BaseUtil.CleanForm(this);
@@ -399,10 +399,10 @@ namespace UAS_MES.Make
             {
                 if (mbr_id != "")
                 {
-                    string delete1 = "delete from makebadrsloc where mbl_mbrid='" + mbr_id+"'";
-                    string delete2 = "delete from makebadrspart where mbp_mbrid='" + mbr_id+"'";
-                    string delete3 = "delete from makebadrscom where mbc_mbrid='" + mbr_id+"'";
-                    string delete4 = "delete from makebadreason where mbr_id='" + mbr_id+"'";
+                    string delete1 = "delete from makebadrsloc where mbl_mbrid='" + mbr_id + "'";
+                    string delete2 = "delete from makebadrspart where mbp_mbrid='" + mbr_id + "'";
+                    string delete3 = "delete from makebadrscom where mbc_mbrid='" + mbr_id + "'";
+                    string delete4 = "delete from makebadreason where mbr_id='" + mbr_id + "'";
                     dh.ExecuteSQLTran(delete1, delete2, delete3, delete4);
                     OperatResult.AppendText(">>删除成功\n", Color.Green);
                     BaseUtil.CleanControlsText(bc_name, bc_code, bg_name, bg_code, mb_badremark, nrg_name, nr_name, nr_code, mbr_solutioncode, mbr_dutycode, mbc_component);
@@ -491,5 +491,21 @@ namespace UAS_MES.Make
         {
             OperatResult.Clear();
         }
+
+        private void mbl_locdgv_CellContentClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (mbl_locdgv.Columns[e.ColumnIndex].Name == "DeletePos")
+            {
+                mbl_locdgv.Rows.RemoveAt(e.RowIndex);
+            }
+        }
+
+        private void mbp_partdgv_CellContentClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (mbp_partdgv.Columns[e.ColumnIndex].Name == "DeleteCom")
+            {
+                mbp_partdgv.Rows.RemoveAt(e.RowIndex);
+            }
+        }
     }
 }

+ 6 - 0
UAS-MES/FunctionCode/Make/Make_Repair.resx

@@ -126,9 +126,15 @@
   <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="DeletePos.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="NewRepairInf.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 113 - 110
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OQC_SamplingDataCollection));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
             this.ob_checkno_label = new System.Windows.Forms.Label();
             this.obd_outboxcode_label = new System.Windows.Forms.Label();
             this.ms_sncode_label = new System.Windows.Forms.Label();
@@ -59,18 +59,12 @@
             this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.WaitChooseDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
+            this.ChooseAll = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.bc_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.CheckTypeDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
-            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.oi_itemcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_checkkind = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_sampleqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_checkqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_ng = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.oi_leveldefect = new System.Windows.Forms.DataGridViewComboBoxColumn();
-            this.ois_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ois_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ChooseedReject = new UAS_MES.CustomControl.ButtonUtil.ArrowRightButton();
             this.WaitReject = new UAS_MES.CustomControl.ButtonUtil.ArrowLeftButton();
             this.oi_checkqty1 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -90,9 +84,15 @@
             this.ob_makecode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.obd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.BadGroupCode = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
-            this.ChooseAll = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.bc_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.oi_itemcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ci_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_sampleqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_checkqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_ng = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.oi_leveldefect = new System.Windows.Forms.DataGridViewComboBoxColumn();
+            this.ois_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ois_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -452,19 +452,20 @@
             // 
             // bc_code1
             // 
-            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.bc_code1.DataPropertyName = "bc_code";
             this.bc_code1.HeaderText = "不良代码";
             this.bc_code1.Name = "bc_code1";
             this.bc_code1.ReadOnly = true;
+            this.bc_code1.Width = 130;
             // 
             // bc_name1
             // 
-            this.bc_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.bc_name1.DataPropertyName = "bc_name";
             this.bc_name1.HeaderText = "不良名称 ";
             this.bc_name1.Name = "bc_name1";
             this.bc_name1.ReadOnly = true;
+            this.bc_name1.Width = 151;
             // 
             // WaitChooseDGV
             // 
@@ -484,6 +485,31 @@
             this.WaitChooseDGV.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.WaitChooseDGV_CellContentClick);
             this.WaitChooseDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.WaitChooseDGV_DataError);
             // 
+            // ChooseAll
+            // 
+            this.ChooseAll.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.ChooseAll.DataPropertyName = "ChooseAll";
+            this.ChooseAll.HeaderText = "勾选";
+            this.ChooseAll.Name = "ChooseAll";
+            this.ChooseAll.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.ChooseAll.Width = 60;
+            // 
+            // bc_code
+            // 
+            this.bc_code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.bc_code.DataPropertyName = "bc_code";
+            this.bc_code.HeaderText = "不良代码";
+            this.bc_code.Name = "bc_code";
+            this.bc_code.ReadOnly = true;
+            this.bc_code.Width = 130;
+            // 
+            // bc_name
+            // 
+            this.bc_name.DataPropertyName = "bc_name";
+            this.bc_name.HeaderText = "不良名称";
+            this.bc_name.Name = "bc_name";
+            this.bc_name.ReadOnly = true;
+            // 
             // ob_remark
             // 
             this.ob_remark.AllPower = null;
@@ -524,7 +550,7 @@
             this.CheckTypeDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.choose,
             this.oi_itemcode,
-            this.oi_checkkind,
+            this.ci_name,
             this.oi_sampleqty,
             this.oi_checkqty,
             this.oi_ng,
@@ -542,79 +568,6 @@
             this.CheckTypeDGV.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.CheckTypeDGV_CellValueChanged);
             this.CheckTypeDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.CheckTypeDGV_DataError);
             // 
-            // choose
-            // 
-            this.choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.choose.DataPropertyName = "choose";
-            this.choose.HeaderText = "勾选";
-            this.choose.Name = "choose";
-            this.choose.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.choose.Width = 60;
-            // 
-            // oi_itemcode
-            // 
-            this.oi_itemcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.oi_itemcode.DataPropertyName = "oi_itemcode";
-            this.oi_itemcode.HeaderText = "项目编号";
-            this.oi_itemcode.Name = "oi_itemcode";
-            // 
-            // oi_checkkind
-            // 
-            this.oi_checkkind.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.oi_checkkind.DataPropertyName = "oi_checkkind";
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.oi_checkkind.DefaultCellStyle = dataGridViewCellStyle4;
-            this.oi_checkkind.HeaderText = "项目名称";
-            this.oi_checkkind.Name = "oi_checkkind";
-            this.oi_checkkind.Width = 96;
-            // 
-            // oi_sampleqty
-            // 
-            this.oi_sampleqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.oi_sampleqty.DataPropertyName = "oi_sampleqty";
-            this.oi_sampleqty.HeaderText = "样本数";
-            this.oi_sampleqty.Name = "oi_sampleqty";
-            this.oi_sampleqty.Width = 96;
-            // 
-            // oi_checkqty
-            // 
-            this.oi_checkqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
-            this.oi_checkqty.DataPropertyName = "oi_checkqty";
-            this.oi_checkqty.HeaderText = "已检数";
-            this.oi_checkqty.Name = "oi_checkqty";
-            this.oi_checkqty.Width = 81;
-            // 
-            // oi_ng
-            // 
-            this.oi_ng.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.oi_ng.DataPropertyName = "oi_ng";
-            this.oi_ng.HeaderText = "是否通过";
-            this.oi_ng.Name = "oi_ng";
-            this.oi_ng.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.oi_ng.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // oi_leveldefect
-            // 
-            this.oi_leveldefect.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.oi_leveldefect.DataPropertyName = "oi_leveldefect";
-            this.oi_leveldefect.HeaderText = "缺陷等级";
-            this.oi_leveldefect.Name = "oi_leveldefect";
-            this.oi_leveldefect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.oi_leveldefect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.oi_leveldefect.Width = 80;
-            // 
-            // ois_remark
-            // 
-            this.ois_remark.DataPropertyName = "ois_remark";
-            this.ois_remark.HeaderText = "备注";
-            this.ois_remark.Name = "ois_remark";
-            // 
-            // ois_status
-            // 
-            this.ois_status.DataPropertyName = "ois_status";
-            this.ois_status.HeaderText = "是否检验";
-            this.ois_status.Name = "ois_status";
-            // 
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
@@ -879,28 +832,78 @@
             this.BadGroupCode.TabIndex = 219;
             this.BadGroupCode.SelectedIndexChanged += new System.EventHandler(this.BadGroupCode_SelectedIndexChanged);
             // 
-            // ChooseAll
+            // choose
             // 
-            this.ChooseAll.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.ChooseAll.DataPropertyName = "ChooseAll";
-            this.ChooseAll.HeaderText = "勾选";
-            this.ChooseAll.Name = "ChooseAll";
-            this.ChooseAll.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.ChooseAll.Width = 60;
+            this.choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.choose.DataPropertyName = "choose";
+            this.choose.HeaderText = "勾选";
+            this.choose.Name = "choose";
+            this.choose.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.choose.Width = 60;
             // 
-            // bc_code
+            // oi_itemcode
             // 
-            this.bc_code.DataPropertyName = "bc_code";
-            this.bc_code.HeaderText = "不良代码";
-            this.bc_code.Name = "bc_code";
-            this.bc_code.ReadOnly = true;
+            this.oi_itemcode.DataPropertyName = "oi_itemcode";
+            this.oi_itemcode.HeaderText = "项目编号";
+            this.oi_itemcode.Name = "oi_itemcode";
+            this.oi_itemcode.Visible = false;
             // 
-            // bc_name
+            // ci_name
             // 
-            this.bc_name.DataPropertyName = "bc_name";
-            this.bc_name.HeaderText = "不良名称";
-            this.bc_name.Name = "bc_name";
-            this.bc_name.ReadOnly = true;
+            this.ci_name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.ci_name.DataPropertyName = "ci_name";
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.ci_name.DefaultCellStyle = dataGridViewCellStyle1;
+            this.ci_name.HeaderText = "项目名称";
+            this.ci_name.Name = "ci_name";
+            // 
+            // oi_sampleqty
+            // 
+            this.oi_sampleqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.oi_sampleqty.DataPropertyName = "oi_sampleqty";
+            this.oi_sampleqty.HeaderText = "样本数";
+            this.oi_sampleqty.Name = "oi_sampleqty";
+            this.oi_sampleqty.Width = 96;
+            // 
+            // oi_checkqty
+            // 
+            this.oi_checkqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.oi_checkqty.DataPropertyName = "oi_checkqty";
+            this.oi_checkqty.HeaderText = "已检数";
+            this.oi_checkqty.Name = "oi_checkqty";
+            this.oi_checkqty.Width = 81;
+            // 
+            // oi_ng
+            // 
+            this.oi_ng.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.oi_ng.DataPropertyName = "oi_ng";
+            this.oi_ng.HeaderText = "是否通过";
+            this.oi_ng.Name = "oi_ng";
+            this.oi_ng.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.oi_ng.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // oi_leveldefect
+            // 
+            this.oi_leveldefect.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.oi_leveldefect.DataPropertyName = "oi_leveldefect";
+            this.oi_leveldefect.HeaderText = "缺陷等级";
+            this.oi_leveldefect.Name = "oi_leveldefect";
+            this.oi_leveldefect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.oi_leveldefect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // ois_remark
+            // 
+            this.ois_remark.DataPropertyName = "ois_remark";
+            this.ois_remark.HeaderText = "备注";
+            this.ois_remark.Name = "ois_remark";
+            this.ois_remark.Visible = false;
+            // 
+            // ois_status
+            // 
+            this.ois_status.DataPropertyName = "ois_status";
+            this.ois_status.HeaderText = "是否检验";
+            this.ois_status.Name = "ois_status";
+            this.ois_status.Visible = false;
             // 
             // OQC_SamplingDataCollection
             // 
@@ -1015,20 +1018,20 @@
         private System.Windows.Forms.Label ob_maxngacceptqty_label;
         private System.Windows.Forms.Label ob_projectcode_label;
         private CustomControl.ComBoxWithFocus.ComBoxWithFocus BadGroupCode;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn ChooseAll;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bc_code;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bc_name;
         private System.Windows.Forms.DataGridViewTextBoxColumn or_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_code1;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_name1;
         private System.Windows.Forms.DataGridViewCheckBoxColumn choose;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_itemcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn oi_checkkind;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ci_name;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_sampleqty;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_checkqty;
         private System.Windows.Forms.DataGridViewCheckBoxColumn oi_ng;
         private System.Windows.Forms.DataGridViewComboBoxColumn oi_leveldefect;
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_remark;
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_status;
-        private System.Windows.Forms.DataGridViewCheckBoxColumn ChooseAll;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bc_code;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bc_name;
     }
 }

+ 2 - 2
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -154,10 +154,10 @@ namespace UAS_MES.OQC
                 checkkind += ("'" + dt.Rows[i]["oi_checkkind"].ToString() + "',");
             }
             sql.Clear();
-            sql.Append("select 1 choose,oi_itemcode,oi_checkkind,oi_sampleqty,nvl((oi_checkqty),0) oi_checkqty, ");
+            sql.Append("select 1 choose,ci_name,oi_itemcode,oi_checkkind,oi_sampleqty,nvl((oi_checkqty),0) oi_checkqty, ");
             sql.Append("nvl(ois_id,0) ois_id,nvl(ois_ifng,0) oi_ng,nvl(ois_defectlevel,'-1') oi_leveldefect, ");
             sql.Append("ois_remark,case nvl(ois_id,0) when 0 then '未检验' else '已检验' end ois_status ");
-            sql.Append("from OQCItems left join OQCItemSamples on  ois_sncode='" + sncode.Text + "' and ois_checkno=oi_checkno and ");
+            sql.Append("from OQCItems left join  QUA_CHECKITEM on oi_itemcode=ci_code left join OQCItemSamples on  ois_sncode='" + sncode.Text + "' and ois_checkno=oi_checkno and ");
             sql.Append("ois_itemcode=oi_itemcode and ois_projectcode = oi_projectcode where oi_checkno ='" + ob_checkno.Text + "' ");
             sql.Append("and oi_checkkind in (" + checkkind.Substring(0, checkkind.Length - 1) + ")");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");

+ 1 - 37
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.resx

@@ -258,15 +258,6 @@
   <metadata name="bc_name1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="or_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bc_code1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bc_name1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="ChooseAll.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -282,34 +273,7 @@
   <metadata name="oi_itemcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="oi_checkkind.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="oi_sampleqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="oi_checkqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="oi_ng.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="oi_leveldefect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ois_remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ois_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="oi_itemcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="oi_checkkind.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="ci_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="oi_sampleqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">