callm 5 сар өмнө
parent
commit
047e96fb76

+ 4 - 0
UAS_MES_YD/FunctionCode/Make/Make_FeedingCollection.cs

@@ -229,6 +229,10 @@ namespace UAS_MES_NEW.Make
                                 sql.Append("cm_makecode='" + cm_makecode + "' and cm_sncode='" + code.Text + "' and cm_stepcode='" + cm_stepcode + "' and cm_craftcode='" + cm_craftcode + "' ");
                                 sql.Append("and cm_materialtype=1 and nvl(cm_status,0) =0) and ms_nextmacode='" + oMakeCode + "'");
                                 dh.ExecuteSql(sql.GetString(), "update");
+
+                                sql.Clear();
+                                sql.Append("update makeserial set ms_nextstepcode=ms_stepcode where ms_id='" + ms_id + "'");
+                                dh.ExecuteSql(sql.GetString(), "update");
                                 //进行下料
                                 sql.Clear();
                                 sql.Append("delete from craftmaterial where (cm_sncode in (select sn from makesnrelation where firstsn");

+ 707 - 0
UAS_MES_YD/FunctionCode/Special/Special_QCCheck.Designer.cs

@@ -0,0 +1,707 @@
+namespace UAS_MES_NEW.Special
+{
+    partial class Special_QCCheck
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Special_CancelOQC));
+            this.SN_label = new System.Windows.Forms.Label();
+            this.OK = new System.Windows.Forms.RadioButton();
+            this.NG = new System.Windows.Forms.RadioButton();
+            this.pr_sendchecktype = new System.Windows.Forms.Label();
+            this.ma_salecode = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.ChoosedRejectList = new System.Windows.Forms.ListView();
+            this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader10 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.WaitRejectList = new System.Windows.Forms.ListView();
+            this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader9 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.label3 = new System.Windows.Forms.Label();
+            this.bc_remark_label = new System.Windows.Forms.Label();
+            this.bc_groupcode_label = new System.Windows.Forms.Label();
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            this.ma_prodcode_label = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.BadInfSource = new System.Windows.Forms.BindingSource(this.components);
+            this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pr_spec = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ma_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.Filter = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
+            this.bc_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ChooseedReject = new UAS_MES_NEW.CustomControl.ButtonUtil.ArrowRightButton();
+            this.WaitReject = new UAS_MES_NEW.CustomControl.ButtonUtil.ArrowLeftButton();
+            this.bc_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.bc_groupcode = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.SaveRepairInf = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.SN = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.ngqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label9 = new System.Windows.Forms.Label();
+            this.okqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label8 = new System.Windows.Forms.Label();
+            this.ob_checkno = new System.Windows.Forms.Label();
+            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.totalqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_inqty_label = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
+            this.panel1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // SN_label
+            // 
+            this.SN_label.AutoSize = true;
+            this.SN_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SN_label.Location = new System.Drawing.Point(60, 116);
+            this.SN_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.SN_label.Name = "SN_label";
+            this.SN_label.Size = new System.Drawing.Size(62, 41);
+            this.SN_label.TabIndex = 1;
+            this.SN_label.Text = "SN";
+            // 
+            // OK
+            // 
+            this.OK.AutoSize = true;
+            this.OK.Checked = true;
+            this.OK.Location = new System.Drawing.Point(67, 212);
+            this.OK.Name = "OK";
+            this.OK.Size = new System.Drawing.Size(89, 28);
+            this.OK.TabIndex = 151;
+            this.OK.TabStop = true;
+            this.OK.Text = "良品";
+            this.OK.UseVisualStyleBackColor = true;
+            // 
+            // NG
+            // 
+            this.NG.AutoSize = true;
+            this.NG.Location = new System.Drawing.Point(224, 212);
+            this.NG.Name = "NG";
+            this.NG.Size = new System.Drawing.Size(113, 28);
+            this.NG.TabIndex = 152;
+            this.NG.Text = "不良品";
+            this.NG.UseVisualStyleBackColor = true;
+            // 
+            // pr_sendchecktype
+            // 
+            this.pr_sendchecktype.AutoSize = true;
+            this.pr_sendchecktype.Location = new System.Drawing.Point(992, 278);
+            this.pr_sendchecktype.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_sendchecktype.Name = "pr_sendchecktype";
+            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 24);
+            this.pr_sendchecktype.TabIndex = 218;
+            this.pr_sendchecktype.Visible = false;
+            // 
+            // ma_salecode
+            // 
+            this.ma_salecode.AutoSize = true;
+            this.ma_salecode.Location = new System.Drawing.Point(992, 270);
+            this.ma_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_salecode.Name = "ma_salecode";
+            this.ma_salecode.Size = new System.Drawing.Size(0, 24);
+            this.ma_salecode.TabIndex = 217;
+            this.ma_salecode.Visible = false;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.ForeColor = System.Drawing.Color.Blue;
+            this.label2.Location = new System.Drawing.Point(44, 270);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(146, 42);
+            this.label2.TabIndex = 201;
+            this.label2.Text = "采集信息";
+            // 
+            // ChoosedRejectList
+            // 
+            this.ChoosedRejectList.CheckBoxes = true;
+            this.ChoosedRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader6,
+            this.columnHeader3,
+            this.columnHeader7,
+            this.columnHeader8,
+            this.columnHeader10});
+            this.ChoosedRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ChoosedRejectList.HideSelection = false;
+            this.ChoosedRejectList.Location = new System.Drawing.Point(774, 532);
+            this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(6);
+            this.ChoosedRejectList.Name = "ChoosedRejectList";
+            this.ChoosedRejectList.Size = new System.Drawing.Size(528, 408);
+            this.ChoosedRejectList.TabIndex = 213;
+            this.ChoosedRejectList.UseCompatibleStateImageBehavior = false;
+            this.ChoosedRejectList.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader6
+            // 
+            this.columnHeader6.Text = " ";
+            this.columnHeader6.Width = 20;
+            // 
+            // columnHeader3
+            // 
+            this.columnHeader3.Text = "不良代码组";
+            this.columnHeader3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader3.Width = 150;
+            // 
+            // columnHeader7
+            // 
+            this.columnHeader7.Text = "不良代码";
+            this.columnHeader7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader7.Width = 168;
+            // 
+            // columnHeader8
+            // 
+            this.columnHeader8.Text = "不良名称";
+            this.columnHeader8.Width = 99;
+            // 
+            // columnHeader10
+            // 
+            this.columnHeader10.Text = "备注";
+            this.columnHeader10.Width = 3;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.ForeColor = System.Drawing.Color.Black;
+            this.label5.Location = new System.Drawing.Point(770, 482);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(146, 42);
+            this.label5.TabIndex = 208;
+            this.label5.Text = "已选不良";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.ForeColor = System.Drawing.Color.Black;
+            this.label4.Location = new System.Drawing.Point(44, 482);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(146, 42);
+            this.label4.TabIndex = 207;
+            this.label4.Text = "待选不良";
+            // 
+            // WaitRejectList
+            // 
+            this.WaitRejectList.CheckBoxes = true;
+            this.WaitRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader5,
+            this.columnHeader4,
+            this.columnHeader1,
+            this.columnHeader2,
+            this.columnHeader9});
+            this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.WaitRejectList.FullRowSelect = true;
+            this.WaitRejectList.HideSelection = false;
+            this.WaitRejectList.Location = new System.Drawing.Point(46, 532);
+            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(6);
+            this.WaitRejectList.Name = "WaitRejectList";
+            this.WaitRejectList.Size = new System.Drawing.Size(528, 408);
+            this.WaitRejectList.TabIndex = 206;
+            this.WaitRejectList.UseCompatibleStateImageBehavior = false;
+            this.WaitRejectList.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader5
+            // 
+            this.columnHeader5.Text = " ";
+            this.columnHeader5.Width = 0;
+            // 
+            // columnHeader4
+            // 
+            this.columnHeader4.Text = "不良代码组";
+            this.columnHeader4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader4.Width = 0;
+            // 
+            // columnHeader1
+            // 
+            this.columnHeader1.Text = "不良代码";
+            this.columnHeader1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader1.Width = 134;
+            // 
+            // columnHeader2
+            // 
+            this.columnHeader2.Text = "不良名称";
+            this.columnHeader2.Width = 392;
+            // 
+            // columnHeader9
+            // 
+            this.columnHeader9.Text = "备注";
+            this.columnHeader9.Width = 0;
+            // 
+            // 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(44, 410);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(146, 41);
+            this.label3.TabIndex = 205;
+            this.label3.Text = "不良代码";
+            // 
+            // bc_remark_label
+            // 
+            this.bc_remark_label.AutoSize = true;
+            this.bc_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_remark_label.Location = new System.Drawing.Point(612, 330);
+            this.bc_remark_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bc_remark_label.Name = "bc_remark_label";
+            this.bc_remark_label.Size = new System.Drawing.Size(146, 41);
+            this.bc_remark_label.TabIndex = 204;
+            this.bc_remark_label.Text = "不良备注";
+            // 
+            // bc_groupcode_label
+            // 
+            this.bc_groupcode_label.AutoSize = true;
+            this.bc_groupcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_groupcode_label.Location = new System.Drawing.Point(44, 330);
+            this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bc_groupcode_label.Name = "bc_groupcode_label";
+            this.bc_groupcode_label.Size = new System.Drawing.Size(146, 41);
+            this.bc_groupcode_label.TabIndex = 203;
+            this.bc_groupcode_label.Text = "不良组别";
+            // 
+            // pr_detail_label
+            // 
+            this.pr_detail_label.AutoSize = true;
+            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail_label.Location = new System.Drawing.Point(1169, 39);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail_label.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
+            this.pr_detail_label.TabIndex = 219;
+            this.pr_detail_label.Text = "产品规格";
+            // 
+            // ma_prodcode_label
+            // 
+            this.ma_prodcode_label.AutoSize = true;
+            this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode_label.Location = new System.Drawing.Point(601, 39);
+            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode_label.Name = "ma_prodcode_label";
+            this.ma_prodcode_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_prodcode_label.TabIndex = 220;
+            this.ma_prodcode_label.Text = "产品编号";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(60, 39);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(114, 41);
+            this.label1.TabIndex = 223;
+            this.label1.Text = "工单号";
+            // 
+            // ms_makecode
+            // 
+            this.ms_makecode.AutoSize = true;
+            this.ms_makecode.CutLength = null;
+            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode.Location = new System.Drawing.Point(242, 39);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 41);
+            this.ms_makecode.TabIndex = 224;
+            // 
+            // pr_spec
+            // 
+            this.pr_spec.AutoSize = true;
+            this.pr_spec.CutLength = "qweqwe";
+            this.pr_spec.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_spec.Location = new System.Drawing.Point(1343, 39);
+            this.pr_spec.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_spec.MaximumSize = new System.Drawing.Size(360, 0);
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.Size = new System.Drawing.Size(0, 41);
+            this.pr_spec.TabIndex = 222;
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.CutLength = null;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode.Location = new System.Drawing.Point(783, 39);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_prodcode.TabIndex = 221;
+            this.ma_prodcode.TextChanged += new System.EventHandler(this.ma_prodcode_TextChanged);
+            // 
+            // Filter
+            // 
+            this.Filter.BackColor = System.Drawing.Color.Transparent;
+            this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
+            this.Filter.Location = new System.Drawing.Point(224, 482);
+            this.Filter.Margin = new System.Windows.Forms.Padding(4);
+            this.Filter.Name = "Filter";
+            this.Filter.PlaceHolder = "不良名称搜索";
+            this.Filter.Size = new System.Drawing.Size(352, 44);
+            this.Filter.TabIndex = 215;
+            // 
+            // bc_code
+            // 
+            this.bc_code.AllPower = null;
+            this.bc_code.BackColor = System.Drawing.Color.White;
+            this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_code.ID = null;
+            this.bc_code.Location = new System.Drawing.Point(226, 410);
+            this.bc_code.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_code.Name = "bc_code";
+            this.bc_code.Power = null;
+            this.bc_code.Size = new System.Drawing.Size(348, 40);
+            this.bc_code.Str = null;
+            this.bc_code.Str1 = null;
+            this.bc_code.Str2 = null;
+            this.bc_code.TabIndex = 214;
+            // 
+            // ChooseedReject
+            // 
+            this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
+            this.ChooseedReject.Location = new System.Drawing.Point(622, 662);
+            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(6);
+            this.ChooseedReject.Name = "ChooseedReject";
+            this.ChooseedReject.Size = new System.Drawing.Size(100, 46);
+            this.ChooseedReject.TabIndex = 211;
+            this.ChooseedReject.UseVisualStyleBackColor = true;
+            this.ChooseedReject.Click += new System.EventHandler(this.ChooseedReject_Click);
+            // 
+            // WaitReject
+            // 
+            this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
+            this.WaitReject.Location = new System.Drawing.Point(622, 788);
+            this.WaitReject.Margin = new System.Windows.Forms.Padding(6);
+            this.WaitReject.Name = "WaitReject";
+            this.WaitReject.Size = new System.Drawing.Size(100, 46);
+            this.WaitReject.TabIndex = 210;
+            this.WaitReject.UseVisualStyleBackColor = true;
+            this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
+            // 
+            // bc_remark
+            // 
+            this.bc_remark.AllPower = null;
+            this.bc_remark.BackColor = System.Drawing.Color.White;
+            this.bc_remark.ID = null;
+            this.bc_remark.Location = new System.Drawing.Point(778, 332);
+            this.bc_remark.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_remark.Multiline = true;
+            this.bc_remark.Name = "bc_remark";
+            this.bc_remark.Power = null;
+            this.bc_remark.Size = new System.Drawing.Size(524, 120);
+            this.bc_remark.Str = null;
+            this.bc_remark.Str1 = null;
+            this.bc_remark.Str2 = null;
+            this.bc_remark.TabIndex = 209;
+            // 
+            // bc_groupcode
+            // 
+            this.bc_groupcode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_groupcode.FormattingEnabled = true;
+            this.bc_groupcode.Location = new System.Drawing.Point(226, 332);
+            this.bc_groupcode.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_groupcode.Name = "bc_groupcode";
+            this.bc_groupcode.Size = new System.Drawing.Size(348, 37);
+            this.bc_groupcode.TabIndex = 202;
+            this.bc_groupcode.SelectedIndexChanged += new System.EventHandler(this.bc_groupcode_SelectedIndexChanged);
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(1343, 328);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(8);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(460, 614);
+            this.OperateResult.TabIndex = 150;
+            this.OperateResult.Text = "";
+            // 
+            // SaveRepairInf
+            // 
+            this.SaveRepairInf.AllPower = "ifall";
+            this.SaveRepairInf.BackColor = System.Drawing.Color.Transparent;
+            this.SaveRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.DownImage")));
+            this.SaveRepairInf.Image = null;
+            this.SaveRepairInf.IsShowBorder = true;
+            this.SaveRepairInf.Location = new System.Drawing.Point(774, 957);
+            this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(6);
+            this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
+            this.SaveRepairInf.Name = "SaveRepairInf";
+            this.SaveRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.NormalImage")));
+            this.SaveRepairInf.Power = null;
+            this.SaveRepairInf.Size = new System.Drawing.Size(172, 48);
+            this.SaveRepairInf.TabIndex = 145;
+            this.SaveRepairInf.Tag = "IfRead";
+            this.SaveRepairInf.Text = "确认";
+            this.SaveRepairInf.UseVisualStyleBackColor = true;
+            this.SaveRepairInf.Click += new System.EventHandler(this.SaveRepairInf_Click);
+            // 
+            // SN
+            // 
+            this.SN.AllPower = null;
+            this.SN.BackColor = System.Drawing.Color.White;
+            this.SN.ID = null;
+            this.SN.Location = new System.Drawing.Point(224, 122);
+            this.SN.Margin = new System.Windows.Forms.Padding(4);
+            this.SN.Name = "SN";
+            this.SN.Power = null;
+            this.SN.Size = new System.Drawing.Size(318, 35);
+            this.SN.Str = null;
+            this.SN.Str1 = null;
+            this.SN.Str2 = null;
+            this.SN.TabIndex = 2;
+            this.SN.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SN_KeyDown);
+            // 
+            // panel1
+            // 
+            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel1.Controls.Add(this.ngqty);
+            this.panel1.Controls.Add(this.label9);
+            this.panel1.Controls.Add(this.okqty);
+            this.panel1.Controls.Add(this.label8);
+            this.panel1.Controls.Add(this.ob_checkno);
+            this.panel1.Controls.Add(this.ob_batchqty);
+            this.panel1.Controls.Add(this.totalqty);
+            this.panel1.Controls.Add(this.mcd_inqty_label);
+            this.panel1.Location = new System.Drawing.Point(1176, 95);
+            this.panel1.Margin = new System.Windows.Forms.Padding(4);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(609, 216);
+            this.panel1.TabIndex = 225;
+            this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
+            // 
+            // ngqty
+            // 
+            this.ngqty.AutoSize = true;
+            this.ngqty.CutLength = null;
+            this.ngqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ngqty.Location = new System.Drawing.Point(228, 158);
+            this.ngqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ngqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ngqty.Name = "ngqty";
+            this.ngqty.Size = new System.Drawing.Size(0, 41);
+            this.ngqty.TabIndex = 84;
+            this.ngqty.Tag = "mcd_inqty";
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(32, 158);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(114, 41);
+            this.label9.TabIndex = 83;
+            this.label9.Text = "不良数";
+            // 
+            // okqty
+            // 
+            this.okqty.AutoSize = true;
+            this.okqty.CutLength = null;
+            this.okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.okqty.Location = new System.Drawing.Point(217, 88);
+            this.okqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.okqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.okqty.Name = "okqty";
+            this.okqty.Size = new System.Drawing.Size(0, 41);
+            this.okqty.TabIndex = 82;
+            this.okqty.Tag = "mcd_inqty";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(36, 88);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(114, 41);
+            this.label8.TabIndex = 81;
+            this.label8.Text = "良品数";
+            // 
+            // ob_checkno
+            // 
+            this.ob_checkno.AutoSize = true;
+            this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_checkno.ForeColor = System.Drawing.Color.Black;
+            this.ob_checkno.Location = new System.Drawing.Point(570, 168);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ob_checkno.Name = "ob_checkno";
+            this.ob_checkno.Size = new System.Drawing.Size(0, 41);
+            this.ob_checkno.TabIndex = 76;
+            this.ob_checkno.Tag = "ob_checkno";
+            this.ob_checkno.Visible = false;
+            // 
+            // ob_batchqty
+            // 
+            this.ob_batchqty.AutoSize = true;
+            this.ob_batchqty.CutLength = null;
+            this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_batchqty.Location = new System.Drawing.Point(376, 168);
+            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ob_batchqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ob_batchqty.Name = "ob_batchqty";
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 41);
+            this.ob_batchqty.TabIndex = 75;
+            this.ob_batchqty.Tag = "ob_batchqty";
+            // 
+            // totalqty
+            // 
+            this.totalqty.AutoSize = true;
+            this.totalqty.CutLength = null;
+            this.totalqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.totalqty.Location = new System.Drawing.Point(214, 19);
+            this.totalqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.totalqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.totalqty.Name = "totalqty";
+            this.totalqty.Size = new System.Drawing.Size(0, 41);
+            this.totalqty.TabIndex = 54;
+            this.totalqty.Tag = "mcd_inqty";
+            // 
+            // mcd_inqty_label
+            // 
+            this.mcd_inqty_label.AutoSize = true;
+            this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty_label.Location = new System.Drawing.Point(32, 19);
+            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_inqty_label.Name = "mcd_inqty_label";
+            this.mcd_inqty_label.Size = new System.Drawing.Size(146, 41);
+            this.mcd_inqty_label.TabIndex = 14;
+            this.mcd_inqty_label.Text = "已采集数";
+            // 
+            // Special_CancelOQC
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1833, 1020);
+            this.Controls.Add(this.panel1);
+            this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.pr_spec);
+            this.Controls.Add(this.ma_prodcode);
+            this.Controls.Add(this.pr_detail_label);
+            this.Controls.Add(this.ma_prodcode_label);
+            this.Controls.Add(this.pr_sendchecktype);
+            this.Controls.Add(this.ma_salecode);
+            this.Controls.Add(this.Filter);
+            this.Controls.Add(this.bc_code);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.ChoosedRejectList);
+            this.Controls.Add(this.ChooseedReject);
+            this.Controls.Add(this.WaitReject);
+            this.Controls.Add(this.bc_remark);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.WaitRejectList);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.bc_groupcode);
+            this.Controls.Add(this.bc_remark_label);
+            this.Controls.Add(this.bc_groupcode_label);
+            this.Controls.Add(this.NG);
+            this.Controls.Add(this.OK);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.SaveRepairInf);
+            this.Controls.Add(this.SN);
+            this.Controls.Add(this.SN_label);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Special_CancelOQC";
+            this.Tag = "Special!CancelOQC";
+            this.Text = "拆箱处理";
+            this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).EndInit();
+            this.panel1.ResumeLayout(true);
+            this.panel1.PerformLayout();
+            this.ResumeLayout(true);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Label SN_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox SN;
+        private CustomControl.ButtonUtil.NormalButton SaveRepairInf;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.RadioButton OK;
+        private System.Windows.Forms.RadioButton NG;
+        private System.Windows.Forms.Label pr_sendchecktype;
+        private System.Windows.Forms.Label ma_salecode;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder Filter;
+        private CustomControl.TextBoxWithIcon.EnterTextBox bc_code;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.ListView ChoosedRejectList;
+        private System.Windows.Forms.ColumnHeader columnHeader6;
+        private System.Windows.Forms.ColumnHeader columnHeader3;
+        private System.Windows.Forms.ColumnHeader columnHeader7;
+        private System.Windows.Forms.ColumnHeader columnHeader8;
+        private System.Windows.Forms.ColumnHeader columnHeader10;
+        private CustomControl.ButtonUtil.ArrowRightButton ChooseedReject;
+        private CustomControl.ButtonUtil.ArrowLeftButton WaitReject;
+        private CustomControl.TextBoxWithIcon.EnterTextBox bc_remark;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.ListView WaitRejectList;
+        private System.Windows.Forms.ColumnHeader columnHeader5;
+        private System.Windows.Forms.ColumnHeader columnHeader4;
+        private System.Windows.Forms.ColumnHeader columnHeader1;
+        private System.Windows.Forms.ColumnHeader columnHeader2;
+        private System.Windows.Forms.ColumnHeader columnHeader9;
+        private System.Windows.Forms.Label label3;
+        private CustomControl.ComBoxWithFocus.ComBoxWithFocus bc_groupcode;
+        private System.Windows.Forms.Label bc_remark_label;
+        private System.Windows.Forms.Label bc_groupcode_label;
+        private CustomControl.ValueLabel.ValueLabel pr_spec;
+        private CustomControl.ValueLabel.ValueLabel ma_prodcode;
+        private System.Windows.Forms.Label pr_detail_label;
+        private System.Windows.Forms.Label ma_prodcode_label;
+        private CustomControl.ValueLabel.ValueLabel ms_makecode;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.BindingSource BadInfSource;
+        private System.Windows.Forms.Panel panel1;
+        private CustomControl.ValueLabel.ValueLabel ngqty;
+        private System.Windows.Forms.Label label9;
+        private CustomControl.ValueLabel.ValueLabel okqty;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label ob_checkno;
+        private CustomControl.ValueLabel.ValueLabel ob_batchqty;
+        private CustomControl.ValueLabel.ValueLabel totalqty;
+        private System.Windows.Forms.Label mcd_inqty_label;
+    }
+}

+ 292 - 0
UAS_MES_YD/FunctionCode/Special/Special_QCCheck.cs

@@ -0,0 +1,292 @@
+using DevExpress.Entity.ProjectModel;
+using DevExpress.Utils;
+using LabelManager2;
+using NPOI.SS.Formula.Functions;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Special
+{   
+    public partial class Special_QCCheck : Form
+    {
+        DataHelper dh;
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        DataTable Dbfind;
+
+        /// <summary>
+        /// 已选的不良
+        /// </summary>
+        List<string> ChoosedList = new List<string>();
+        /// <summary>
+        /// 待选的不良
+        /// </summary>
+        List<string> WaitList = new List<string>();
+
+
+        public Special_QCCheck()
+        {
+            InitializeComponent();
+        }
+
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+            dh = SystemInf.dh;
+        }
+
+        private void LoadData()
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select count(1) TOTAL,sum(case when cl_result='QC抽检成功,结果为不良'" +
+                " then 1 else 0 end) NGQTY,\r\nsum(case when cl_result='QC抽检成功,结果为良品' then 1 else 0 end) OKqty " +
+                "from commandlog where cl_operate='QC抽检' and cl_date>trunc(sysdate) and cl_sourcecode='" + User.UserSourceCode + "'", "select");
+            BaseUtil.SetFormValue(this.Controls, dt);
+        }
+        private void LoadBadGroupData()
+        {
+            //如果ms_makecode的值修改过再去查询
+            sql.Clear();
+            sql.Append("select bg_code||':'||bg_name bg_name,bg_code from badgroup left join (select pb_badgroup,pr_kind ");
+            sql.Append("from product left join productkind on pk_name=pr_kind ");
+            sql.Append("left join productbadgroup on pk_code=PB_KINDCODE where pr_code='" + ma_prodcode.Text + "')");
+            sql.Append("on pb_badgroup=bg_code where bg_statuscode='AUDITED' order by case when bg_code='" + User.DefaultBadGroup + "' then 0 else 1 end");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            bc_groupcode.DisplayMember = "bg_name";
+            bc_groupcode.ValueMember = "bg_code";
+            bc_groupcode.DataSource = dt;
+        }
+
+        private void LoadBadCodeListView()
+        {
+            object bg_code = bc_groupcode.SelectedValue;
+            sql.Clear();
+            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,bc_name,'' bc_remark from badgroupdetail ");
+            sql.Append("left join badgroup on  bg_id=bgd_bgid left join badcode on bgd_badcode=bc_code where ");
+            sql.Append("bg_code='" + (bg_code != null ? bg_code.ToString() : "") + "' and bg_code is not null order by bgd_detno");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BadInfSource.DataSource = dt;
+            //往listview中添加数据
+            WaitRejectList.Items.Clear();
+            WaitRejectList.BeginUpdate();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (!ChoosedList.Contains(dt.Rows[i]["bc_code"].ToString()))
+                {
+                    ListViewItem lvi = new ListViewItem();
+                    //第一列是勾选列,设置列头文本为空
+                    lvi.Text = "";
+                    WaitList.Add(dt.Rows[i]["bc_code"].ToString());
+                    for (int j = 0; j < dt.Columns.Count; j++)
+                        lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                    WaitRejectList.Items.Add(lvi);
+                }
+            }
+            WaitRejectList.EndUpdate();
+        }
+
+        private void SN_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_makecode,ms_id,ma_prodcode,pr_detail from makeserial left join make on ms_makecode=ma_code left join product on pr_code=ma_prodcode where ms_sncode='" + SN.Text + "' or  ms_imei1='" + SN.Text + "' or ms_imei2='" + SN.Text + "' order by ms_id desc", "select");
+                if (dt.Rows.Count == 0)
+                {
+                    OperateResult.AppendText("序列号" + SN.Text + "不存在", System.Drawing.Color.Red);
+                    return;
+                }
+                BaseUtil.SetFormValue(this.Controls, dt);
+                string ms_id = dt.Rows[0]["ms_id"].ToString();
+                SN.Text = dt.Rows[0]["ms_sncode"].ToString();
+                if (OK.Checked)
+                {
+                    dh.ExecuteSql("update makeserial set ms_iftest=-1 where ms_id=" + ms_id, "update");
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "QC抽检", "QC抽检成功,结果为良品", SN.Text, "");
+                }
+                else
+                {
+                    int CheckedNum = 0;
+                    //是否已经添加到不良
+                    bool AddToReject = false;
+                    for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
+                    {
+                        if (WaitRejectList.Items[i].Checked)
+                        {
+                            AddToReject = false;
+                            for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
+                            {
+                                if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
+                                {
+                                    AddToReject = true;
+                                    OperateResult.AppendText(">>已存在" + ChoosedRejectList.Items[j].SubItems[2].Text + "不良\n", Color.Red);
+                                    break;
+                                }
+                            }
+                            //未添加则进行添加
+                            if (!AddToReject)
+                            {
+                                WaitRejectList.Items[i].Checked = false;
+                                ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
+                                WaitRejectList.Items[i].Remove();
+                                CheckedNum++;
+                            }
+                        }
+                    }
+                    if (CheckedNum == 0)
+                    {
+                        OperateResult.AppendText(">>请勾选不良代码\n", Color.Red);
+                        return;
+                    }
+                    dh.ExecuteSql("update makeserial set ms_status=3,ms_nextstepcode='' ,ms_iftest=-1 where ms_id=" + ms_id, "update");
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "QC抽检", "QC抽检成功,结果为不良", SN.Text, "");
+                }
+                OperateResult.AppendText("序列号" + SN.Text + "抽检记录成功", System.Drawing.Color.Green);
+                LoadData();
+            }
+        }
+
+        private void ChooseedReject_Click(object sender, EventArgs e)
+        {
+            if (SN.Text == "")
+            {
+                OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
+                SN.Focus();
+                return;
+            }
+            int CheckedNum = 0;
+            //是否已经添加到不良
+            bool AddToReject = false;
+            for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
+            {
+                if (WaitRejectList.Items[i].Checked)
+                {
+                    AddToReject = false;
+                    for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
+                    {
+                        if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
+                        {
+                            AddToReject = true;
+                            OperateResult.AppendText(">>已存在" + ChoosedRejectList.Items[j].SubItems[2].Text + "不良\n", Color.Red);
+                            break;
+                        }
+                    }
+                    //未添加则进行添加
+                    if (!AddToReject)
+                    {
+                        WaitRejectList.Items[i].Checked = false;
+                        ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
+                        WaitRejectList.Items[i].Remove();
+                        CheckedNum++;
+                    }
+                }
+            }
+            if (CheckedNum == 0)
+            {
+                OperateResult.AppendText(">>请勾选不良代码\n", Color.Red);
+            }
+        }
+
+        private void WaitReject_Click(object sender, EventArgs e)
+        {
+            int CheckedNum = 0;
+            //已存在在ListView中的Item是不能添加到其他ListView中的,需要调用其克隆的方法
+            for (int i = ChoosedRejectList.Items.Count - 1; i >= 0; i--)
+            {
+                if (ChoosedRejectList.Items[i].Checked)
+                {
+                    ChoosedRejectList.Items[i].Checked = false;
+                    WaitRejectList.Items.Add((ListViewItem)ChoosedRejectList.Items[i].Clone());
+                    ChoosedRejectList.Items[i].Remove();
+                    CheckedNum++;
+                }
+            }
+            if (CheckedNum == 0)
+            {
+                for (int i = ChoosedRejectList.Items.Count - 1; i >= 0; i--)
+                {
+                    WaitRejectList.Items.Add((ListViewItem)ChoosedRejectList.Items[i].Clone());
+                    ChoosedRejectList.Items[i].Remove();
+                }
+            }
+        }
+
+        private void bc_groupcode_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            LoadBadCodeListView();
+        }
+
+        private void ma_prodcode_TextChanged(object sender, EventArgs e)
+        {
+            LoadBadGroupData();
+            LoadData();
+        }
+
+        private void SaveRepairInf_Click(object sender, EventArgs e)
+        {
+            if (NG.Checked)
+            {
+                DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_makecode,ms_id,ma_prodcode,pr_detail from makeserial left join make on ms_makecode=ma_code left join product on pr_code=ma_prodcode where ms_sncode='" + SN.Text + "' or  ms_imei1='" + SN.Text + "' or ms_imei2='" + SN.Text + "' order by ms_id desc", "select");
+                if (dt.Rows.Count == 0)
+                {
+                    OperateResult.AppendText("序列号" + SN.Text + "不存在", System.Drawing.Color.Red);
+                    return;
+                }
+                BaseUtil.SetFormValue(this.Controls, dt);
+                string ms_id = dt.Rows[0]["ms_id"].ToString();
+                int RejectCount = ChoosedRejectList.Items.Count;
+                string[] bccode = new string[RejectCount];
+                string[] bcremark = new string[RejectCount];
+                string[] bgcode = new string[RejectCount];
+                string[] bgname = new string[RejectCount];
+                string[] bcname = new string[RejectCount];
+
+                if (ChoosedRejectList.Items.Count == 0)
+                {
+                    OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
+                    return;
+                }
+                else
+                {
+                    for (int i = 0; i < RejectCount; i++)
+                    {
+                        //获取不良代码组
+                        bgcode[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[0];
+                        //获取不良代码组名称
+                        bgname[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[1];
+                        //获取所有的不良代码
+                        bccode[i] = ChoosedRejectList.Items[i].SubItems[2].Text;
+                        //获取不良名称
+                        bcname[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
+                        //获取所有的不良备注
+                        bcremark[i] = bc_remark.Text;
+                    }
+                }
+
+                sql.Clear();
+                sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,mb_indate,mb_stepcode");
+                sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_status,mb_badremark,mb_bgname,mb_badname,mb_type)");
+                sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + User.UserCode + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bc_code,:bg_code,'',");
+                sql.Append("'0',:bc_remark,:bg_name,:bc_name,'Client' from make left join makeSerial on ms_makecode=ma_code  ");
+                sql.Append(" where ms_sncode='" + SN.Text + "' or ms_imei1='" + SN.Text + "' or ms_imei2='" + SN.Text + "' and ms_makecode='" + ms_makecode.Text + "'");
+                if (bgcode.Length > 0)
+                {
+                    dh.BatchInsert(sql.GetString(), new string[] { "bc_code", "bg_code", "bc_remark", "bg_name", "bc_name" }, bccode, bgcode, bcremark, bgname, bcname);
+                }
+                dh.ExecuteSql("update makeserial set ms_status=3,ms_nextstepcode='' ,ms_iftest=-1 where ms_id=" + ms_id, "update");
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "QC抽检", "QC抽检成功,结果为不良", SN.Text, "");
+                OperateResult.AppendText("序列号" + SN.Text + "抽检记录成功", System.Drawing.Color.Green);
+            }
+        }
+
+        private void panel1_Paint(object sender, PaintEventArgs e)
+        {
+
+        }
+    }
+}

+ 200 - 0
UAS_MES_YD/FunctionCode/Special/Special_QCCheck.resx

@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="BadInfSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="ChooseedReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAslJREFU
+        SEuN1kuojVEYxvHtco77JUUpURQliQxcE+0BMlIkBpJQJmJwBqRMKAZKykSMkJEwUaIwcElIKQzccz2i
+        3HP3f77Wu8679n6d7a3f4Fuf5znZ+9trfbV6vb4bD7vxBPvQF/r3tcZJ65NwFY8R9TzCTcyCZVJDw3Bj
+        LM7jTze+YiPCsrTWEx34iajDXMRoNPXkSTcn4w6iEvMWS2CZ1JA7RJ/mAUR57xiGoOjJYzewEK8RlZgH
+        mI6cs3FrI9Hqk/+NXWhD0VONLSbr8BlRkdFzo68854KeabiPKG/0SGxAzhXjbvTGTvxCVGSOYxiKMrtO
+        luE9orzpxGLkXDHuxiAcRlTi7UUfFGV2jR7YhlYP/j1MRc7m8YsYhQuISsw3bEbO2bi1gTiCKO/pF6m/
+        WfRUY4vJFNxFVGLeYSlyzsatjcEVRHnvKPQtpQY3WnQWodUvUpviTORc0DMbTxHljZ5jPc9tVUHjcMNb
+        j4+Iisw1jEeVsbHrZBU+IMqbT+hI8ebhphmAs4hKvO2oMn5sDf1xBlHW60zRcrjhrUGr/+ENTECVsbHr
+        ZAVabRFfsCXFu4ZFbz5eICowzzEPORf0aDPVaRDlvT1orwpsWPD0jOhUj8JGz8Bq5JyNWxuBc4jy3ilU
+        G3IxWkh08ySisNGvZQd6ocrZ2DXaodeeKO/dQtPX74t0SOpjjMKeTvrBKIrsOtFZqjMuypuX0ORcVKRD
+        slXRZWhT7Cph7DqZg2eI8kYP9lrkXFS0AP+zWc5Aztm4NR0ZlxDljV5f9Narl4CixxdNxG1EBUY/6eXI
+        ORu31g+HEOU9vWkMRdFTTVocjtOIwuYHtkKnf1Fk18kmfEfUYa5jHHKuGBa0Y+9HFPYOQrtyU4mtQW+v
+        bxDljc7Auci5pmFxJbSx6VegjbLRK+j1Nr/si5+0pm3kBPTiFvWIHvx/v21WU6v9BRMV4fPlTpe/AAAA
+        AElFTkSuQmCC
+</value>
+  </data>
+  <data name="WaitReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAs1JREFU
+        SEuN10uoTVEcx3HvV3nkEUPlFVKUDBDliGImiZQkiYkBGSgZGEiiyIASRgp5JVIGhlLkmTJC5K2833l8
+        f9v6rbP2PX+d+6/PYP3X/f3v7Zy91963S1SNRqM0EVfwCA8CD3EbM1FlynIP3bEN/5sj2jucovViwwbj
+        DP60sQu9UOVcXidL8Q5R3u5gSoo3i6b1xG5E4dIFDEGVc3mdTIc+hShvzzEXaUIqNQpr8RXRALuPSagy
+        ZbmHkbiKKG9fsAb1OW4k8/AS0QDTV7EIOecqegNxHFHefmMn9M0053iRTMBdRAPsF7aiK5qDKK/RA9uh
+        XxrNsFMYhNqcctBQ6BqJwqUTGIDaIK+TVfiMKG/XMQo513FQb+xDFC7dwhjUBpVrzMEzRHl7glnIuVxF
+        cz2+IxpgrzEfLYOK3jjcRJS3T1iBljlVpeZCvEE0wH5gA1oGFT0dDecQ5U3Xow5RHaa1ObloTsM9RANK
+        h9AXLYNST3t7EWVLR9Ef8R+kYuMkonBJx8Nk+A9I6X+VerPxAVHeXmEqwjm52NApqudONMT0ke9By6NE
+        lXq6G48gypuOh/0IP/FcaXMx3iIaZN+wDs6kCXmGjMAlRHn7ic3ohtqcXGlDh+BG6GKOBtkLVM8nK2aY
+        3ir0YI3y9h7LkXO1KjY6e07pdh+L2sByDZ1TTxHlTeeUrsOcy1U2oVv6LKIhpdNoeTR4negc+ogobzeg
+        cy3ncpVNjMY1RENMF+wO6PlWG+Y1dM1sga6haIbpsTYMOZurbGIG2r3/6Lm2EjnnKnr9cBBRvnQA8R3p
+        ZrIE7d4UdV3k12BxFb3huIgob74jq7eOllIz0Q9sQrs7Ui9wepGrci6vk/HQgzzKm+7IZUgTOpQ2kj7o
+        zB15DHqhq3IurxPdaY8R5U37C1K8XmyU9PGfh25xfV0R/UeTz52y3EtWQ9dqNEP4HY3LfwGra+NvPdw7
+        fgAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="SaveRepairInf.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="SaveRepairInf.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="SaveRepairInf.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 9 - 0
UAS_MES_YD/UAS_MES_YD.csproj

@@ -1169,6 +1169,12 @@
     <Compile Include="FunctionCode\Special\Special_MixPackage.Designer.cs">
       <DependentUpon>Special_MixPackage.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Special\Special_QCCheck.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_QCCheck.Designer.cs">
+      <DependentUpon>Special_QCCheck.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Special\Special_QCForce.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1816,6 +1822,9 @@
     <EmbeddedResource Include="FunctionCode\Special\Special_MixPackage.resx">
       <DependentUpon>Special_MixPackage.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_QCCheck.resx">
+      <DependentUpon>Special_QCCheck.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_QCForce.resx">
       <DependentUpon>Special_QCForce.cs</DependentUpon>
     </EmbeddedResource>